Skip to content

Commit cc1112a

Browse files
authored
Remove special handling of stackSave/stackRestore/stackAlloc (#17399)
There is no different between how these symbols are handled under the standard an minimal runtime (unlike the other symbols that are added separately there). I'm working changes to remove all the different in the library vs runtime split that exist between minimal runtime and regular runtime. For most symbols this means moving them to JS library functions but for these three they are already handled the same in both runtimes.
1 parent 1e74723 commit cc1112a

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

src/modules.js

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -446,6 +446,11 @@ function exportRuntime() {
446446
'abort',
447447
'keepRuntimeAlive',
448448
'wasmMemory',
449+
// These last three are actually native wasm functions these days but we
450+
// allow exporting them via EXPORTED_RUNTIME_METHODS for backwards compat.
451+
'stackSave',
452+
'stackRestore',
453+
'stackAlloc',
449454
];
450455

451456
if (USE_PTHREADS && ALLOW_MEMORY_GROWTH) {
@@ -473,9 +478,6 @@ function exportRuntime() {
473478
runtimeElements = runtimeElements.concat([
474479
'run',
475480
'warnOnce',
476-
'stackSave',
477-
'stackRestore',
478-
'stackAlloc',
479481
'AsciiToString',
480482
'stringToAscii',
481483
'UTF16ToString',

0 commit comments

Comments
 (0)