File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -145,7 +145,7 @@ struct MinifyImportsAndExports : public Pass {
145145 std::map<Name, Name> oldToNew;
146146 auto process = [&](Name& name) {
147147 // do not minifiy special imports, they must always exist
148- if (name == MEMORY_BASE || name == TABLE_BASE) {
148+ if (name == MEMORY_BASE || name == TABLE_BASE || name == STACK_POINTER ) {
149149 return ;
150150 }
151151 auto newName = names.getName (soFar++);
Original file line number Diff line number Diff line change @@ -25,6 +25,7 @@ extern Name GROW_WASM_MEMORY;
2525extern Name WASM_CALL_CTORS;
2626extern Name MEMORY_BASE;
2727extern Name TABLE_BASE;
28+ extern Name STACK_POINTER;
2829extern Name GET_TEMP_RET0;
2930extern Name SET_TEMP_RET0;
3031extern Name NEW_SIZE;
Original file line number Diff line number Diff line change @@ -65,7 +65,7 @@ Global* EmscriptenGlueGenerator::getStackPointerGlobal() {
6565 // linker could export it by name?
6666 for (auto & g : wasm.globals ) {
6767 if (g->imported ()) {
68- if (g->base == " __stack_pointer " ) {
68+ if (g->base == STACK_POINTER ) {
6969 return g.get ();
7070 }
7171 } else if (!isExported (wasm, g->name )) {
Original file line number Diff line number Diff line change @@ -48,6 +48,7 @@ Name GROW_WASM_MEMORY("__growWasmMemory");
4848Name WASM_CALL_CTORS (" __wasm_call_ctors" );
4949Name MEMORY_BASE (" __memory_base" );
5050Name TABLE_BASE (" __table_base" );
51+ Name STACK_POINTER (" __stack_pointer" );
5152Name GET_TEMP_RET0 (" getTempRet0" );
5253Name SET_TEMP_RET0 (" setTempRet0" );
5354Name NEW_SIZE (" newSize" );
You can’t perform that action at this time.
0 commit comments