diff --git a/src/shared-constants.h b/src/shared-constants.h index 5367d339f36..b0fd7d625f3 100644 --- a/src/shared-constants.h +++ b/src/shared-constants.h @@ -21,7 +21,6 @@ namespace wasm { -extern Name GROW_WASM_MEMORY; extern Name WASM_CALL_CTORS; extern Name MEMORY_BASE; extern Name TABLE_BASE; diff --git a/src/tools/wasm-emscripten-finalize.cpp b/src/tools/wasm-emscripten-finalize.cpp index c0911a37d50..b98e957da1d 100644 --- a/src/tools/wasm-emscripten-finalize.cpp +++ b/src/tools/wasm-emscripten-finalize.cpp @@ -335,7 +335,6 @@ int main(int argc, const char* argv[]) { } else { BYN_TRACE("finalizing as regular module\n"); generator.internalizeStackPointerGlobal(); - generator.generateMemoryGrowthFunction(); // For side modules these gets called via __post_instantiate if (Function* F = wasm.getFunctionOrNull(ASSIGN_GOT_ENTRIES)) { auto* ex = new Export(); diff --git a/src/wasm-emscripten.h b/src/wasm-emscripten.h index 0303af053d1..7318b01fb12 100644 --- a/src/wasm-emscripten.h +++ b/src/wasm-emscripten.h @@ -33,7 +33,6 @@ class EmscriptenGlueGenerator { : wasm(wasm), builder(wasm), stackPointerOffset(stackPointerOffset), useStackPointerGlobal(stackPointerOffset == 0) {} - Function* generateMemoryGrowthFunction(); Function* generateAssignGOTEntriesFunction(); void generatePostInstantiateFunction(); diff --git a/src/wasm/wasm-emscripten.cpp b/src/wasm/wasm-emscripten.cpp index a0f0ade9d3f..178a0865b08 100644 --- a/src/wasm/wasm-emscripten.cpp +++ b/src/wasm/wasm-emscripten.cpp @@ -116,19 +116,6 @@ void EmscriptenGlueGenerator::generatePostInstantiateFunction() { wasm.addExport(ex); } -Function* EmscriptenGlueGenerator::generateMemoryGrowthFunction() { - Name name(GROW_WASM_MEMORY); - std::vector params{{NEW_SIZE, Type::i32}}; - Function* growFunction = - builder.makeFunction(name, std::move(params), Type::i32, {}); - growFunction->body = - builder.makeMemoryGrow(builder.makeLocalGet(0, Type::i32)); - - addExportedFunction(wasm, growFunction); - - return growFunction; -} - inline void exportFunction(Module& wasm, Name name, bool must_export) { if (!wasm.getFunctionOrNull(name)) { assert(!must_export); diff --git a/src/wasm/wasm.cpp b/src/wasm/wasm.cpp index 738823d666a..dce6ac7deab 100644 --- a/src/wasm/wasm.cpp +++ b/src/wasm/wasm.cpp @@ -50,7 +50,6 @@ const char* Memory64Feature = "memory64"; } // namespace UserSections } // namespace BinaryConsts -Name GROW_WASM_MEMORY("__growWasmMemory"); Name WASM_CALL_CTORS("__wasm_call_ctors"); Name MEMORY_BASE("__memory_base"); Name TABLE_BASE("__table_base"); diff --git a/test/lld/basic_safe_stack.wat.out b/test/lld/basic_safe_stack.wat.out index 74a2355ddb9..9c3d31bc4ad 100644 --- a/test/lld/basic_safe_stack.wat.out +++ b/test/lld/basic_safe_stack.wat.out @@ -1,8 +1,8 @@ (module (type $none_=>_none (func)) - (type $i32_=>_i32 (func (param i32) (result i32))) (type $i32_=>_none (func (param i32))) (type $i32_i32_=>_none (func (param i32 i32))) + (type $i32_=>_i32 (func (param i32) (result i32))) (import "env" "__handle_stack_overflow" (func $__handle_stack_overflow)) (memory $0 2) (table $0 1 1 funcref) @@ -17,7 +17,6 @@ (export "main" (func $main)) (export "__data_end" (global $global$1)) (export "__set_stack_limits" (func $__set_stack_limits)) - (export "__growWasmMemory" (func $__growWasmMemory)) (func $__wasm_call_ctors (nop) ) @@ -87,11 +86,6 @@ (local.get $1) ) ) - (func $__growWasmMemory (param $newSize i32) (result i32) - (memory.grow - (local.get $newSize) - ) - ) ) (; --BEGIN METADATA -- @@ -111,8 +105,7 @@ "stackRestore", "stackAlloc", "main", - "__set_stack_limits", - "__growWasmMemory" + "__set_stack_limits" ], "namedGlobals": { "__data_end" : "568" diff --git a/test/lld/bigint.wat.out b/test/lld/bigint.wat.out index cbe8fb7a605..2590c0e3b8f 100644 --- a/test/lld/bigint.wat.out +++ b/test/lld/bigint.wat.out @@ -1,6 +1,5 @@ (module (type $i64_=>_i64 (func (param i64) (result i64))) - (type $i32_=>_i32 (func (param i32) (result i32))) (type $i32_i64_=>_i64 (func (param i32 i64) (result i64))) (table $0 1 1 funcref) (elem (i32.const 1) $foo) @@ -8,7 +7,6 @@ (global $global$1 i32 (i32.const 658)) (export "__data_end" (global $global$1)) (export "dynCall_jj" (func $dynCall_jj)) - (export "__growWasmMemory" (func $__growWasmMemory)) (func $foo (param $0 i64) (result i64) (unreachable) ) @@ -18,11 +16,6 @@ (local.get $fptr) ) ) - (func $__growWasmMemory (param $newSize i32) (result i32) - (memory.grow - (local.get $newSize) - ) - ) ) (; --BEGIN METADATA -- @@ -34,8 +27,7 @@ "externs": [ ], "exports": [ - "dynCall_jj", - "__growWasmMemory" + "dynCall_jj" ], "namedGlobals": { "__data_end" : "658" diff --git a/test/lld/duplicate_imports.wat.out b/test/lld/duplicate_imports.wat.out index 29ed9af65e2..6467c2bab3f 100644 --- a/test/lld/duplicate_imports.wat.out +++ b/test/lld/duplicate_imports.wat.out @@ -1,7 +1,7 @@ (module - (type $i32_=>_i32 (func (param i32) (result i32))) (type $none_=>_none (func)) (type $none_=>_i32 (func (result i32))) + (type $i32_=>_i32 (func (param i32) (result i32))) (type $i32_i32_=>_i32 (func (param i32 i32) (result i32))) (type $i64_=>_i32 (func (param i64) (result i32))) (type $i32_f32_f64_=>_f32 (func (param i32 f32 f64) (result f32))) @@ -21,7 +21,6 @@ (export "main" (func $main)) (export "__heap_base" (global $global$1)) (export "__data_end" (global $global$2)) - (export "__growWasmMemory" (func $__growWasmMemory)) (func $main (result i32) (drop (call $puts1 @@ -46,11 +45,6 @@ ) ) ) - (func $__growWasmMemory (param $newSize i32) (result i32) - (memory.grow - (local.get $newSize) - ) - ) ) (; --BEGIN METADATA -- @@ -67,8 +61,7 @@ ], "exports": [ "__wasm_call_ctors", - "main", - "__growWasmMemory" + "main" ], "namedGlobals": { "__heap_base" : "66128", diff --git a/test/lld/em_asm.wat.mem.out b/test/lld/em_asm.wat.mem.out index 30a4ac1d456..669be352196 100644 --- a/test/lld/em_asm.wat.mem.out +++ b/test/lld/em_asm.wat.mem.out @@ -1,7 +1,6 @@ (module (type $none_=>_none (func)) (type $none_=>_i32 (func (result i32))) - (type $i32_=>_i32 (func (param i32) (result i32))) (type $i32_i32_=>_i32 (func (param i32 i32) (result i32))) (type $i32_i32_i32_=>_i32 (func (param i32 i32 i32) (result i32))) (import "env" "emscripten_asm_const_int" (func $emscripten_asm_const_int (param i32 i32 i32) (result i32))) @@ -13,7 +12,6 @@ (export "__wasm_call_ctors" (func $__wasm_call_ctors)) (export "main" (func $main)) (export "__data_end" (global $global$1)) - (export "__growWasmMemory" (func $__growWasmMemory)) (func $__wasm_call_ctors (nop) ) @@ -67,11 +65,6 @@ (func $main (param $0 i32) (param $1 i32) (result i32) (call $__original_main) ) - (func $__growWasmMemory (param $newSize i32) (result i32) - (memory.grow - (local.get $newSize) - ) - ) ) (; --BEGIN METADATA -- @@ -93,8 +86,7 @@ ], "exports": [ "__wasm_call_ctors", - "main", - "__growWasmMemory" + "main" ], "namedGlobals": { "__data_end" : "658" diff --git a/test/lld/em_asm.wat.out b/test/lld/em_asm.wat.out index 501583d3670..3f067cb507f 100644 --- a/test/lld/em_asm.wat.out +++ b/test/lld/em_asm.wat.out @@ -1,7 +1,6 @@ (module (type $none_=>_none (func)) (type $none_=>_i32 (func (result i32))) - (type $i32_=>_i32 (func (param i32) (result i32))) (type $i32_i32_=>_i32 (func (param i32 i32) (result i32))) (type $i32_i32_i32_=>_i32 (func (param i32 i32 i32) (result i32))) (import "env" "emscripten_asm_const_int" (func $emscripten_asm_const_int (param i32 i32 i32) (result i32))) @@ -14,7 +13,6 @@ (export "__wasm_call_ctors" (func $__wasm_call_ctors)) (export "main" (func $main)) (export "__data_end" (global $global$1)) - (export "__growWasmMemory" (func $__growWasmMemory)) (func $__wasm_call_ctors (nop) ) @@ -68,11 +66,6 @@ (func $main (param $0 i32) (param $1 i32) (result i32) (call $__original_main) ) - (func $__growWasmMemory (param $newSize i32) (result i32) - (memory.grow - (local.get $newSize) - ) - ) ) (; --BEGIN METADATA -- @@ -94,8 +87,7 @@ ], "exports": [ "__wasm_call_ctors", - "main", - "__growWasmMemory" + "main" ], "namedGlobals": { "__data_end" : "658" diff --git a/test/lld/em_asm_O0.wat.out b/test/lld/em_asm_O0.wat.out index 03d750e710f..abb789f28d9 100644 --- a/test/lld/em_asm_O0.wat.out +++ b/test/lld/em_asm_O0.wat.out @@ -1,6 +1,5 @@ (module (type $none_=>_none (func)) - (type $i32_=>_i32 (func (param i32) (result i32))) (type $i32_i32_=>_i32 (func (param i32 i32) (result i32))) (type $i32_i32_i32_=>_i32 (func (param i32 i32 i32) (result i32))) (import "env" "emscripten_asm_const_int" (func $emscripten_asm_const_int (param i32 i32 i32) (result i32))) @@ -13,7 +12,6 @@ (export "__wasm_call_ctors" (func $__wasm_call_ctors)) (export "main" (func $main)) (export "__data_end" (global $global$1)) - (export "__growWasmMemory" (func $__growWasmMemory)) (func $__wasm_call_ctors (nop) ) @@ -93,11 +91,6 @@ ) (local.get $3) ) - (func $__growWasmMemory (param $newSize i32) (result i32) - (memory.grow - (local.get $newSize) - ) - ) ) (; --BEGIN METADATA -- @@ -119,8 +112,7 @@ ], "exports": [ "__wasm_call_ctors", - "main", - "__growWasmMemory" + "main" ], "namedGlobals": { "__data_end" : "652" diff --git a/test/lld/em_asm_main_thread.wat.out b/test/lld/em_asm_main_thread.wat.out index 8e53466ddb8..be026fba251 100644 --- a/test/lld/em_asm_main_thread.wat.out +++ b/test/lld/em_asm_main_thread.wat.out @@ -1,9 +1,9 @@ (module (type $none_=>_i32 (func (result i32))) - (type $i32_=>_i32 (func (param i32) (result i32))) (type $none_=>_none (func)) (type $i32_i32_=>_none (func (param i32 i32))) (type $i32_i32_i32_=>_none (func (param i32 i32 i32))) + (type $i32_=>_i32 (func (param i32) (result i32))) (type $i32_i32_=>_i32 (func (param i32 i32) (result i32))) (type $i32_i32_i32_=>_i32 (func (param i32 i32 i32) (result i32))) (import "env" "emscripten_asm_const_int_sync_on_main_thread" (func $emscripten_asm_const_int_sync_on_main_thread (param i32 i32 i32) (result i32))) @@ -18,7 +18,6 @@ (export "__heap_base" (global $global$1)) (export "__data_end" (global $global$2)) (export "main" (func $main)) - (export "__growWasmMemory" (func $__growWasmMemory)) (func $__wasm_call_ctors (nop) ) @@ -190,11 +189,6 @@ (func $main (param $0 i32) (param $1 i32) (result i32) (call $__original_main) ) - (func $__growWasmMemory (param $newSize i32) (result i32) - (memory.grow - (local.get $newSize) - ) - ) ) (; --BEGIN METADATA -- @@ -216,8 +210,7 @@ ], "exports": [ "__wasm_call_ctors", - "main", - "__growWasmMemory" + "main" ], "namedGlobals": { "__heap_base" : "66192", diff --git a/test/lld/em_asm_table.wat.out b/test/lld/em_asm_table.wat.out index e59ecfb4020..e1f4ed7dfc1 100644 --- a/test/lld/em_asm_table.wat.out +++ b/test/lld/em_asm_table.wat.out @@ -2,7 +2,6 @@ (type $i32_i32_=>_none (func (param i32 i32))) (type $i32_i32_i32_=>_i32 (func (param i32 i32 i32) (result i32))) (type $i32_i32_i32_=>_none (func (param i32 i32 i32))) - (type $i32_=>_i32 (func (param i32) (result i32))) (type $i32_i32_i32_i32_=>_i32 (func (param i32 i32 i32 i32) (result i32))) (import "env" "memory" (memory $2 8192)) (import "env" "emscripten_log" (func $fimport$0 (param i32 i32))) @@ -14,7 +13,6 @@ (export "__data_end" (global $global$1)) (export "dynCall_vii" (func $dynCall_vii)) (export "dynCall_iiii" (func $dynCall_iiii)) - (export "__growWasmMemory" (func $__growWasmMemory)) (func $dynCall_vii (param $fptr i32) (param $0 i32) (param $1 i32) (call_indirect (type $i32_i32_=>_none) (local.get $0) @@ -30,11 +28,6 @@ (local.get $fptr) ) ) - (func $__growWasmMemory (param $newSize i32) (result i32) - (memory.grow - (local.get $newSize) - ) - ) ) (; --BEGIN METADATA -- @@ -49,8 +42,7 @@ ], "exports": [ "dynCall_vii", - "dynCall_iiii", - "__growWasmMemory" + "dynCall_iiii" ], "namedGlobals": { "__data_end" : "1048" diff --git a/test/lld/em_js_O0.wat.out b/test/lld/em_js_O0.wat.out index af048242e99..0c256068d43 100644 --- a/test/lld/em_js_O0.wat.out +++ b/test/lld/em_js_O0.wat.out @@ -1,5 +1,4 @@ (module - (type $i32_=>_i32 (func (param i32) (result i32))) (import "env" "memory" (memory $0 256 256)) (data (i32.const 1024) "(void)<::>{ out(\"no args works\"); }\00(void)<::>{ out(\"no args returning int\"); return 12; }\00(void)<::>{ out(\"no args returning double\"); return 12.25; }\00(int x)<::>{ out(\" takes ints: \" + x);}\00(double d)<::>{ out(\" takes doubles: \" + d);}\00(char* str)<::>{ out(\" takes strings: \" + UTF8ToString(str)); return 7.75; }\00(int x, int y)<::>{ out(\" takes multiple ints: \" + x + \", \" + y); return 6; }\00(int x, const char* str, double d)<::>{ out(\" mixed arg types: \" + x + \", \" + UTF8ToString(str) + \", \" + d); return 8.125; }\00(int unused)<::>{ out(\" ignores unused args\"); return 5.5; }\00(int x, int y)<::>{ out(\" skips unused args: \" + y); return 6; }\00(double x, double y, double z)<::>{ out(\" \" + x + \" + \" + z); return x + z; }\00(void)<::>{ out(\" can use <::> separator in user code\"); return 15; }\00(void)<::>{ var x, y; x = {}; y = 3; x[y] = [1, 2, 3]; out(\" can have commas in user code: \" + x[y]); return x[y][1]; }\00(void)<::>{ var jsString = \'\e3\81\93\e3\82\93\e3\81\ab\e3\81\a1\e3\81\af\'; var lengthBytes = lengthBytesUTF8(jsString); var stringOnWasmHeap = _malloc(lengthBytes); stringToUTF8(jsString, stringOnWasmHeap, lengthBytes+1); return stringOnWasmHeap; }\00(void)<::>{ var jsString = \'hello from js\'; var lengthBytes = jsString.length+1; var stringOnWasmHeap = _malloc(lengthBytes); stringToUTF8(jsString, stringOnWasmHeap, lengthBytes+1); return stringOnWasmHeap; }\00BEGIN\n\00 noarg_int returned: %d\n\00 noarg_double returned: %f\n\00 stringarg returned: %f\n\00string arg\00 multi_intarg returned: %d\n\00 multi_mixedarg returned: %f\n\00hello\00 unused_args returned: %d\n\00 skip_args returned: %f\n\00 add_outer returned: %f\n\00 user_separator returned: %d\n\00 user_comma returned: %d\n\00 return_str returned: %s\n\00 return_utf8_str returned: %s\n\00END\n\00\00\cc\1a\00\00\00\00\00\00\00\00\00\00\00\00\00\00T!\"\19\0d\01\02\03\11K\1c\0c\10\04\0b\1d\12\1e\'hnopqb \05\06\0f\13\14\15\1a\08\16\07($\17\18\t\n\0e\1b\1f%#\83\82}&*+<=>?CGJMXYZ[\\]^_`acdefgijklrstyz{|\00\00\00\00\00\00\00\00\00Illegal byte sequence\00Domain error\00Result not representable\00Not a tty\00Permission denied\00Operation not permitted\00No such file or directory\00No such process\00File exists\00Value too large for data type\00No space left on device\00Out of memory\00Resource busy\00Interrupted system call\00Resource temporarily unavailable\00Invalid seek\00Cross-device link\00Read-only file system\00Directory not empty\00Connection reset by peer\00Operation timed out\00Connection refused\00Host is down\00Host is unreachable\00Address in use\00Broken pipe\00I/O error\00No such device or address\00Block device required\00No such device\00Not a directory\00Is a directory\00Text file busy\00Exec format error\00Invalid argument\00Argument list too long\00Symbolic link loop\00Filename too long\00Too many open files in system\00No file descriptors available\00Bad file descriptor\00No child process\00Bad address\00File too large\00Too many links\00No locks available\00Resource deadlock would occur\00State not recoverable\00Previous owner died\00Operation canceled\00Function not implemented\00No message of desired type\00Identifier removed\00Device not a stream\00No data available\00Device timeout\00Out of streams resources\00Link has been severed\00Protocol error\00Bad message\00File descriptor in bad state\00Not a socket\00Destination address required\00Message too large\00Protocol wrong type for socket\00Protocol not available\00Protocol not supported\00Socket type not supported\00Not supported\00Protocol family not supported\00Address family not supported by protocol\00Address not available\00Network is down\00Network unreachable\00Connection reset by network\00Connection aborted\00No buffer space available\00Socket is connected\00Socket not connected\00Cannot send after socket shutdown\00Operation already in progress\00Operation in progress\00Stale file handle\00Remote I/O error\00Quota exceeded\00No medium found\00Wrong medium type\00No error information\00\00-+ 0X0x\00(null)\00\00\00\00\11\00\n\00\11\11\11\00\00\00\00\05\00\00\00\00\00\00\t\00\00\00\00\0b\00\00\00\00\00\00\00\00\11\00\0f\n\11\11\11\03\n\07\00\01\13\t\0b\0b\00\00\t\06\0b\00\00\0b\00\06\11\00\00\00\11\11\11\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\0b\00\00\00\00\00\00\00\00\11\00\n\n\11\11\11\00\n\00\00\02\00\t\0b\00\00\00\t\00\0b\00\00\0b\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\0c\00\00\00\00\00\00\00\00\00\00\00\0c\00\00\00\00\0c\00\00\00\00\t\0c\00\00\00\00\00\0c\00\00\0c\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\0e\00\00\00\00\00\00\00\00\00\00\00\0d\00\00\00\04\0d\00\00\00\00\t\0e\00\00\00\00\00\0e\00\00\0e\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\10\00\00\00\00\00\00\00\00\00\00\00\0f\00\00\00\00\0f\00\00\00\00\t\10\00\00\00\00\00\10\00\00\10\00\00\12\00\00\00\12\12\12\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\12\00\00\00\12\12\12\00\00\00\00\00\00\t\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\0b\00\00\00\00\00\00\00\00\00\00\00\n\00\00\00\00\n\00\00\00\00\t\0b\00\00\00\00\00\0b\00\00\0b\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\0c\00\00\00\00\00\00\00\00\00\00\00\0c\00\00\00\00\0c\00\00\00\00\t\0c\00\00\00\00\00\0c\00\00\0c\00\000123456789ABCDEF-0X+0X 0X-0x+0x 0x\00inf\00INF\00nan\00NAN\00.\00") (data (i32.const 5232) "\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00") @@ -9,12 +8,6 @@ (global $global$2 i32 (i32.const 7232)) (export "__heap_base" (global $global$1)) (export "__data_end" (global $global$2)) - (export "__growWasmMemory" (func $__growWasmMemory)) - (func $__growWasmMemory (param $newSize i32) (result i32) - (memory.grow - (local.get $newSize) - ) - ) ) (; --BEGIN METADATA -- @@ -29,7 +22,6 @@ "externs": [ ], "exports": [ - "__growWasmMemory" ], "namedGlobals": { "__heap_base" : "5250112", diff --git a/test/lld/gdollar_mainmodule.wat.out b/test/lld/gdollar_mainmodule.wat.out index 6ab1c692353..29eec0b0fbf 100644 --- a/test/lld/gdollar_mainmodule.wat.out +++ b/test/lld/gdollar_mainmodule.wat.out @@ -1,7 +1,6 @@ (module (type $none_=>_i32 (func (result i32))) (type $none_=>_none (func)) - (type $i32_=>_i32 (func (param i32) (result i32))) (type $i32_i32_=>_i32 (func (param i32 i32) (result i32))) (import "env" "memory" (memory $0 0)) (data (global.get $gimport$3) "") @@ -20,7 +19,6 @@ (export "someglobal2" (global $global$1)) (export "main" (func $main)) (export "__data_end" (global $global$2)) - (export "__growWasmMemory" (func $__growWasmMemory)) (export "__assign_got_enties" (func $__assign_got_enties)) (func $main (param $0 i32) (param $1 i32) (result i32) (i32.const 0) @@ -39,11 +37,6 @@ (call $g$someglobal3) ) ) - (func $__growWasmMemory (param $newSize i32) (result i32) - (memory.grow - (local.get $newSize) - ) - ) ) (; --BEGIN METADATA -- @@ -64,7 +57,6 @@ ], "exports": [ "main", - "__growWasmMemory", "__assign_got_enties" ], "namedGlobals": { diff --git a/test/lld/hello_world.passive.wat.out b/test/lld/hello_world.passive.wat.out index ab580104f37..4b6794485f9 100644 --- a/test/lld/hello_world.passive.wat.out +++ b/test/lld/hello_world.passive.wat.out @@ -1,7 +1,7 @@ (module (type $none_=>_none (func)) - (type $i32_=>_i32 (func (param i32) (result i32))) (type $none_=>_i32 (func (result i32))) + (type $i32_=>_i32 (func (param i32) (result i32))) (type $i32_i32_=>_i32 (func (param i32 i32) (result i32))) (import "env" "puts" (func $puts (param i32) (result i32))) (memory $0 2) @@ -15,7 +15,6 @@ (export "__heap_base" (global $global$1)) (export "__data_end" (global $global$2)) (export "main" (func $main)) - (export "__growWasmMemory" (func $__growWasmMemory)) (func $__wasm_call_ctors (call $__wasm_init_memory) ) @@ -37,11 +36,6 @@ (func $main (param $0 i32) (param $1 i32) (result i32) (call $__original_main) ) - (func $__growWasmMemory (param $newSize i32) (result i32) - (memory.grow - (local.get $newSize) - ) - ) ) (; --BEGIN METADATA -- @@ -58,8 +52,7 @@ ], "exports": [ "__wasm_call_ctors", - "main", - "__growWasmMemory" + "main" ], "namedGlobals": { "__heap_base" : "66128", diff --git a/test/lld/hello_world.wat.mem.out b/test/lld/hello_world.wat.mem.out index cdd378f720a..24504bf087a 100644 --- a/test/lld/hello_world.wat.mem.out +++ b/test/lld/hello_world.wat.mem.out @@ -1,7 +1,7 @@ (module - (type $i32_=>_i32 (func (param i32) (result i32))) (type $none_=>_none (func)) (type $none_=>_i32 (func (result i32))) + (type $i32_=>_i32 (func (param i32) (result i32))) (type $i32_i32_=>_i32 (func (param i32 i32) (result i32))) (import "env" "puts" (func $puts (param i32) (result i32))) (memory $0 2) @@ -12,7 +12,6 @@ (export "__wasm_call_ctors" (func $__wasm_call_ctors)) (export "main" (func $main)) (export "__data_end" (global $global$1)) - (export "__growWasmMemory" (func $__growWasmMemory)) (func $__wasm_call_ctors (nop) ) @@ -27,11 +26,6 @@ (func $main (param $0 i32) (param $1 i32) (result i32) (call $__original_main) ) - (func $__growWasmMemory (param $newSize i32) (result i32) - (memory.grow - (local.get $newSize) - ) - ) ) (; --BEGIN METADATA -- @@ -48,8 +42,7 @@ ], "exports": [ "__wasm_call_ctors", - "main", - "__growWasmMemory" + "main" ], "namedGlobals": { "__data_end" : "581" diff --git a/test/lld/hello_world.wat.out b/test/lld/hello_world.wat.out index c33b0ff70b9..842bdec9e14 100644 --- a/test/lld/hello_world.wat.out +++ b/test/lld/hello_world.wat.out @@ -1,7 +1,7 @@ (module - (type $i32_=>_i32 (func (param i32) (result i32))) (type $none_=>_none (func)) (type $none_=>_i32 (func (result i32))) + (type $i32_=>_i32 (func (param i32) (result i32))) (type $i32_i32_=>_i32 (func (param i32 i32) (result i32))) (import "env" "puts" (func $puts (param i32) (result i32))) (memory $0 2) @@ -13,7 +13,6 @@ (export "__wasm_call_ctors" (func $__wasm_call_ctors)) (export "main" (func $main)) (export "__data_end" (global $global$1)) - (export "__growWasmMemory" (func $__growWasmMemory)) (func $__wasm_call_ctors (nop) ) @@ -28,11 +27,6 @@ (func $main (param $0 i32) (param $1 i32) (result i32) (call $__original_main) ) - (func $__growWasmMemory (param $newSize i32) (result i32) - (memory.grow - (local.get $newSize) - ) - ) ) (; --BEGIN METADATA -- @@ -49,8 +43,7 @@ ], "exports": [ "__wasm_call_ctors", - "main", - "__growWasmMemory" + "main" ], "namedGlobals": { "__data_end" : "581" diff --git a/test/lld/init.wat.out b/test/lld/init.wat.out index d5a3b8b817a..8f139db666a 100644 --- a/test/lld/init.wat.out +++ b/test/lld/init.wat.out @@ -1,7 +1,6 @@ (module (type $none_=>_none (func)) (type $none_=>_i32 (func (result i32))) - (type $i32_=>_i32 (func (param i32) (result i32))) (type $i32_i32_=>_i32 (func (param i32 i32) (result i32))) (memory $0 2) (table $0 1 1 funcref) @@ -11,7 +10,6 @@ (export "__wasm_call_ctors" (func $__wasm_call_ctors)) (export "main" (func $main)) (export "__data_end" (global $global$1)) - (export "__growWasmMemory" (func $__growWasmMemory)) (func $__wasm_call_ctors (call $init_x) (call $init_y) @@ -41,11 +39,6 @@ (func $main (param $0 i32) (param $1 i32) (result i32) (call $__original_main) ) - (func $__growWasmMemory (param $newSize i32) (result i32) - (memory.grow - (local.get $newSize) - ) - ) ) (; --BEGIN METADATA -- @@ -61,8 +54,7 @@ ], "exports": [ "__wasm_call_ctors", - "main", - "__growWasmMemory" + "main" ], "namedGlobals": { "__data_end" : "576" diff --git a/test/lld/longjmp.wat.out b/test/lld/longjmp.wat.out index 71f2d9d89b7..281eda72cc0 100644 --- a/test/lld/longjmp.wat.out +++ b/test/lld/longjmp.wat.out @@ -3,8 +3,8 @@ (type $i32_=>_none (func (param i32))) (type $i32_i32_i32_=>_none (func (param i32 i32 i32))) (type $none_=>_i32 (func (result i32))) - (type $i32_=>_i32 (func (param i32) (result i32))) (type $none_=>_none (func)) + (type $i32_=>_i32 (func (param i32) (result i32))) (type $i32_i32_=>_i32 (func (param i32 i32) (result i32))) (type $i32_i32_i32_=>_i32 (func (param i32 i32 i32) (result i32))) (type $i32_i32_i32_i32_=>_i32 (func (param i32 i32 i32 i32) (result i32))) @@ -27,7 +27,6 @@ (export "main" (func $2)) (export "__data_end" (global $global$1)) (export "dynCall_vii" (func $dynCall_vii)) - (export "__growWasmMemory" (func $__growWasmMemory)) (func $0 (nop) ) @@ -141,11 +140,6 @@ (local.get $fptr) ) ) - (func $__growWasmMemory (param $newSize i32) (result i32) - (memory.grow - (local.get $newSize) - ) - ) ) (; --BEGIN METADATA -- @@ -170,8 +164,7 @@ "exports": [ "__wasm_call_ctors", "main", - "dynCall_vii", - "__growWasmMemory" + "dynCall_vii" ], "namedGlobals": { "__data_end" : "576" diff --git a/test/lld/main_module.wat.out b/test/lld/main_module.wat.out index 12e561d9e49..6ff88c31a82 100644 --- a/test/lld/main_module.wat.out +++ b/test/lld/main_module.wat.out @@ -25,7 +25,6 @@ (export "ptr_local_func" (global $global$1)) (export "__data_end" (global $global)) (export "dynCall_i" (func $dynCall_i)) - (export "__growWasmMemory" (func $__growWasmMemory)) (export "__assign_got_enties" (func $__assign_got_enties)) (func $__wasm_call_ctors (call $__wasm_apply_relocs) @@ -78,11 +77,6 @@ (local.get $fptr) ) ) - (func $__growWasmMemory (param $newSize i32) (result i32) - (memory.grow - (local.get $newSize) - ) - ) ) (; --BEGIN METADATA -- @@ -107,7 +101,6 @@ "__wasm_call_ctors", "_Z13print_messagev", "dynCall_i", - "__growWasmMemory", "__assign_got_enties" ], "namedGlobals": { diff --git a/test/lld/main_module_table.wat.out b/test/lld/main_module_table.wat.out index 2d58d505613..99939706fae 100644 --- a/test/lld/main_module_table.wat.out +++ b/test/lld/main_module_table.wat.out @@ -1,7 +1,6 @@ (module (type $none_=>_none (func)) (type $i32_=>_none (func (param i32))) - (type $i32_=>_i32 (func (param i32) (result i32))) (import "env" "__stack_pointer" (global $sp_import i32)) (import "env" "__table_base" (global $__table_base i32)) (table $0 1 funcref) @@ -12,7 +11,6 @@ (export "__stdio_write" (func $__stdio_write)) (export "__data_end" (global $global)) (export "dynCall_v" (func $dynCall_v)) - (export "__growWasmMemory" (func $__growWasmMemory)) (export "__assign_got_enties" (func $__assign_got_enties)) (func $__stdio_write (nop) @@ -30,11 +28,6 @@ (local.get $fptr) ) ) - (func $__growWasmMemory (param $newSize i32) (result i32) - (memory.grow - (local.get $newSize) - ) - ) ) (; --BEGIN METADATA -- @@ -53,7 +46,6 @@ "exports": [ "__stdio_write", "dynCall_v", - "__growWasmMemory", "__assign_got_enties" ], "namedGlobals": { diff --git a/test/lld/main_module_table_2.wat.out b/test/lld/main_module_table_2.wat.out index 2c9b501259c..69ef69622e8 100644 --- a/test/lld/main_module_table_2.wat.out +++ b/test/lld/main_module_table_2.wat.out @@ -1,7 +1,6 @@ (module (type $none_=>_none (func)) (type $i32_=>_none (func (param i32))) - (type $i32_=>_i32 (func (param i32) (result i32))) (import "env" "table" (table $timport$9 2 funcref)) (elem (global.get $__table_base) $__stdio_write) (import "env" "__stack_pointer" (global $sp_import i32)) @@ -12,7 +11,6 @@ (export "__stdio_write" (func $__stdio_write)) (export "__data_end" (global $global)) (export "dynCall_v" (func $dynCall_v)) - (export "__growWasmMemory" (func $__growWasmMemory)) (export "__assign_got_enties" (func $__assign_got_enties)) (func $__stdio_write (nop) @@ -30,11 +28,6 @@ (local.get $fptr) ) ) - (func $__growWasmMemory (param $newSize i32) (result i32) - (memory.grow - (local.get $newSize) - ) - ) ) (; --BEGIN METADATA -- @@ -53,7 +46,6 @@ "exports": [ "__stdio_write", "dynCall_v", - "__growWasmMemory", "__assign_got_enties" ], "namedGlobals": { diff --git a/test/lld/main_module_table_3.wat.out b/test/lld/main_module_table_3.wat.out index 442dcf3b13d..783c8914e80 100644 --- a/test/lld/main_module_table_3.wat.out +++ b/test/lld/main_module_table_3.wat.out @@ -1,7 +1,6 @@ (module (type $none_=>_none (func)) (type $i32_=>_none (func (param i32))) - (type $i32_=>_i32 (func (param i32) (result i32))) (import "env" "table" (table $timport$9 2 funcref)) (elem (i32.const 0) $__stdio_write) (import "env" "__stack_pointer" (global $sp_import i32)) @@ -12,7 +11,6 @@ (export "__stdio_write" (func $__stdio_write)) (export "__data_end" (global $global)) (export "dynCall_v" (func $dynCall_v)) - (export "__growWasmMemory" (func $__growWasmMemory)) (export "__assign_got_enties" (func $__assign_got_enties)) (func $__stdio_write (nop) @@ -30,11 +28,6 @@ (local.get $fptr) ) ) - (func $__growWasmMemory (param $newSize i32) (result i32) - (memory.grow - (local.get $newSize) - ) - ) ) (; --BEGIN METADATA -- @@ -53,7 +46,6 @@ "exports": [ "__stdio_write", "dynCall_v", - "__growWasmMemory", "__assign_got_enties" ], "namedGlobals": { diff --git a/test/lld/main_module_table_4.wat.out b/test/lld/main_module_table_4.wat.out index 268f8af084e..809a7506e6b 100644 --- a/test/lld/main_module_table_4.wat.out +++ b/test/lld/main_module_table_4.wat.out @@ -1,7 +1,6 @@ (module (type $none_=>_none (func)) (type $i32_=>_none (func (param i32))) - (type $i32_=>_i32 (func (param i32) (result i32))) (import "env" "table" (table $timport$9 2 funcref)) (elem (global.get $tb) $__stdio_write) (import "env" "__stack_pointer" (global $sp_import i32)) @@ -12,7 +11,6 @@ (export "__stdio_write" (func $__stdio_write)) (export "__data_end" (global $global)) (export "dynCall_v" (func $dynCall_v)) - (export "__growWasmMemory" (func $__growWasmMemory)) (export "__assign_got_enties" (func $__assign_got_enties)) (func $__stdio_write (nop) @@ -30,11 +28,6 @@ (local.get $fptr) ) ) - (func $__growWasmMemory (param $newSize i32) (result i32) - (memory.grow - (local.get $newSize) - ) - ) ) (; --BEGIN METADATA -- @@ -53,7 +46,6 @@ "exports": [ "__stdio_write", "dynCall_v", - "__growWasmMemory", "__assign_got_enties" ], "namedGlobals": { diff --git a/test/lld/main_module_table_5.wat.out b/test/lld/main_module_table_5.wat.out index 8977c7d07cc..dd5e248309a 100644 --- a/test/lld/main_module_table_5.wat.out +++ b/test/lld/main_module_table_5.wat.out @@ -1,7 +1,6 @@ (module (type $none_=>_none (func)) (type $i32_=>_none (func (param i32))) - (type $i32_=>_i32 (func (param i32) (result i32))) (import "env" "table" (table $timport$9 2 funcref)) (elem (global.get $tb) $other $stuff $__stdio_write) (import "env" "__stack_pointer" (global $sp_import i32)) @@ -12,7 +11,6 @@ (export "__stdio_write" (func $__stdio_write)) (export "__data_end" (global $global)) (export "dynCall_v" (func $dynCall_v)) - (export "__growWasmMemory" (func $__growWasmMemory)) (export "__assign_got_enties" (func $__assign_got_enties)) (func $__stdio_write (nop) @@ -36,11 +34,6 @@ (local.get $fptr) ) ) - (func $__growWasmMemory (param $newSize i32) (result i32) - (memory.grow - (local.get $newSize) - ) - ) ) (; --BEGIN METADATA -- @@ -59,7 +52,6 @@ "exports": [ "__stdio_write", "dynCall_v", - "__growWasmMemory", "__assign_got_enties" ], "namedGlobals": { diff --git a/test/lld/recursive.wat.out b/test/lld/recursive.wat.out index 0e118dc13dd..7f9fd12893e 100644 --- a/test/lld/recursive.wat.out +++ b/test/lld/recursive.wat.out @@ -2,7 +2,6 @@ (type $i32_i32_=>_i32 (func (param i32 i32) (result i32))) (type $none_=>_none (func)) (type $none_=>_i32 (func (result i32))) - (type $i32_=>_i32 (func (param i32) (result i32))) (import "env" "iprintf" (func $iprintf (param i32 i32) (result i32))) (memory $0 2) (data (i32.const 568) "%d:%d\n\00Result: %d\n\00") @@ -13,7 +12,6 @@ (export "__wasm_call_ctors" (func $__wasm_call_ctors)) (export "main" (func $main)) (export "__data_end" (global $global$1)) - (export "__growWasmMemory" (func $__growWasmMemory)) (func $__wasm_call_ctors (nop) ) @@ -86,11 +84,6 @@ (func $main (param $0 i32) (param $1 i32) (result i32) (call $__original_main) ) - (func $__growWasmMemory (param $newSize i32) (result i32) - (memory.grow - (local.get $newSize) - ) - ) ) (; --BEGIN METADATA -- @@ -107,8 +100,7 @@ ], "exports": [ "__wasm_call_ctors", - "main", - "__growWasmMemory" + "main" ], "namedGlobals": { "__data_end" : "587" diff --git a/test/lld/recursive_safe_stack.wat.out b/test/lld/recursive_safe_stack.wat.out index d70611220a2..eb25f13ad96 100644 --- a/test/lld/recursive_safe_stack.wat.out +++ b/test/lld/recursive_safe_stack.wat.out @@ -3,7 +3,6 @@ (type $none_=>_none (func)) (type $i32_i32_=>_none (func (param i32 i32))) (type $none_=>_i32 (func (result i32))) - (type $i32_=>_i32 (func (param i32) (result i32))) (import "env" "printf" (func $printf (param i32 i32) (result i32))) (import "env" "__handle_stack_overflow" (func $__handle_stack_overflow)) (memory $0 2) @@ -20,7 +19,6 @@ (export "__data_end" (global $global$2)) (export "main" (func $main)) (export "__set_stack_limits" (func $__set_stack_limits)) - (export "__growWasmMemory" (func $__growWasmMemory)) (func $__wasm_call_ctors (nop) ) @@ -173,11 +171,6 @@ (local.get $1) ) ) - (func $__growWasmMemory (param $newSize i32) (result i32) - (memory.grow - (local.get $newSize) - ) - ) ) (; --BEGIN METADATA -- @@ -196,8 +189,7 @@ "exports": [ "__wasm_call_ctors", "main", - "__set_stack_limits", - "__growWasmMemory" + "__set_stack_limits" ], "namedGlobals": { "__heap_base" : "66128", diff --git a/test/lld/reserved_func_ptr.wat.out b/test/lld/reserved_func_ptr.wat.out index e49180a0f1e..4841f068cdb 100644 --- a/test/lld/reserved_func_ptr.wat.out +++ b/test/lld/reserved_func_ptr.wat.out @@ -1,10 +1,10 @@ (module (type $i32_i32_i32_=>_none (func (param i32 i32 i32))) (type $none_=>_none (func)) - (type $i32_=>_i32 (func (param i32) (result i32))) (type $i32_i32_=>_i32 (func (param i32 i32) (result i32))) (type $i32_=>_none (func (param i32))) (type $i32_i32_i32_i32_=>_none (func (param i32 i32 i32 i32))) + (type $i32_=>_i32 (func (param i32) (result i32))) (type $f32_f32_i32_=>_f32 (func (param f32 f32 i32) (result f32))) (type $f64_i32_=>_f64 (func (param f64 i32) (result f64))) (import "env" "_Z4atoiPKc" (func $atoi\28char\20const*\29 (param i32) (result i32))) @@ -18,7 +18,6 @@ (export "main" (func $main)) (export "__data_end" (global $global$1)) (export "dynCall_viii" (func $dynCall_viii)) - (export "__growWasmMemory" (func $__growWasmMemory)) (func $__wasm_call_ctors (nop) ) @@ -120,11 +119,6 @@ (local.get $fptr) ) ) - (func $__growWasmMemory (param $newSize i32) (result i32) - (memory.grow - (local.get $newSize) - ) - ) ) (; --BEGIN METADATA -- @@ -142,8 +136,7 @@ "exports": [ "__wasm_call_ctors", "main", - "dynCall_viii", - "__growWasmMemory" + "dynCall_viii" ], "namedGlobals": { "__data_end" : "568" diff --git a/test/lld/safe_stack_standalone-wasm.wat.out b/test/lld/safe_stack_standalone-wasm.wat.out index 3f1cdeb3c3c..ab09be06be6 100644 --- a/test/lld/safe_stack_standalone-wasm.wat.out +++ b/test/lld/safe_stack_standalone-wasm.wat.out @@ -3,7 +3,6 @@ (type $none_=>_none (func)) (type $i32_i32_=>_none (func (param i32 i32))) (type $none_=>_i32 (func (result i32))) - (type $i32_=>_i32 (func (param i32) (result i32))) (import "env" "printf" (func $printf (param i32 i32) (result i32))) (memory $0 2) (data (i32.const 568) "%d:%d\n\00Result: %d\n\00") @@ -19,7 +18,6 @@ (export "__data_end" (global $global$2)) (export "main" (func $main)) (export "__set_stack_limits" (func $__set_stack_limits)) - (export "__growWasmMemory" (func $__growWasmMemory)) (func $__wasm_call_ctors (nop) ) @@ -172,11 +170,6 @@ (local.get $1) ) ) - (func $__growWasmMemory (param $newSize i32) (result i32) - (memory.grow - (local.get $newSize) - ) - ) ) (; --BEGIN METADATA -- @@ -194,8 +187,7 @@ "exports": [ "__wasm_call_ctors", "main", - "__set_stack_limits", - "__growWasmMemory" + "__set_stack_limits" ], "namedGlobals": { "__heap_base" : "66128", diff --git a/test/lld/standalone-wasm-with-start.wat.out b/test/lld/standalone-wasm-with-start.wat.out index d463d0bfb79..7e91a9bef78 100644 --- a/test/lld/standalone-wasm-with-start.wat.out +++ b/test/lld/standalone-wasm-with-start.wat.out @@ -1,6 +1,5 @@ (module (type $none_=>_i32 (func (result i32))) - (type $i32_=>_i32 (func (param i32) (result i32))) (memory $0 2) (table $0 1 1 funcref) (elem (i32.const 0) $foo) @@ -11,18 +10,12 @@ (export "_start" (func $_start)) (export "__heap_base" (global $global$1)) (export "__data_end" (global $global$2)) - (export "__growWasmMemory" (func $__growWasmMemory)) (func $_start (result i32) (nop) ) (func $foo (result i32) (nop) ) - (func $__growWasmMemory (param $newSize i32) (result i32) - (memory.grow - (local.get $newSize) - ) - ) ) (; --BEGIN METADATA -- @@ -34,8 +27,7 @@ "externs": [ ], "exports": [ - "_start", - "__growWasmMemory" + "_start" ], "namedGlobals": { "__heap_base" : "66112", diff --git a/test/lld/standalone-wasm.wat.out b/test/lld/standalone-wasm.wat.out index d0c2450a5a9..07c42322782 100644 --- a/test/lld/standalone-wasm.wat.out +++ b/test/lld/standalone-wasm.wat.out @@ -1,6 +1,5 @@ (module (type $none_=>_i32 (func (result i32))) - (type $i32_=>_i32 (func (param i32) (result i32))) (type $i32_i32_=>_i32 (func (param i32 i32) (result i32))) (memory $0 2) (table $0 1 1 funcref) @@ -12,7 +11,6 @@ (export "main" (func $main)) (export "__heap_base" (global $global$1)) (export "__data_end" (global $global$2)) - (export "__growWasmMemory" (func $__growWasmMemory)) (func $__original_main (result i32) (nop) ) @@ -22,11 +20,6 @@ (func $foo (result i32) (nop) ) - (func $__growWasmMemory (param $newSize i32) (result i32) - (memory.grow - (local.get $newSize) - ) - ) ) (; --BEGIN METADATA -- @@ -38,8 +31,7 @@ "externs": [ ], "exports": [ - "main", - "__growWasmMemory" + "main" ], "namedGlobals": { "__heap_base" : "66112", diff --git a/test/lld/standalone-wasm2.wat.out b/test/lld/standalone-wasm2.wat.out index 5e71730fd76..177848a2b4b 100644 --- a/test/lld/standalone-wasm2.wat.out +++ b/test/lld/standalone-wasm2.wat.out @@ -1,6 +1,5 @@ (module (type $i32_i32_=>_i32 (func (param i32 i32) (result i32))) - (type $i32_=>_i32 (func (param i32) (result i32))) (memory $0 2) (global $global$0 (mut i32) (i32.const 66112)) (global $global$1 i32 (i32.const 66112)) @@ -9,7 +8,6 @@ (export "main" (func $main)) (export "__heap_base" (global $global$1)) (export "__data_end" (global $global$2)) - (export "__growWasmMemory" (func $__growWasmMemory)) (func $__original_main (param $0 i32) (param $1 i32) (result i32) (nop) ) @@ -19,11 +17,6 @@ (local.get $1) ) ) - (func $__growWasmMemory (param $newSize i32) (result i32) - (memory.grow - (local.get $newSize) - ) - ) ) (; --BEGIN METADATA -- @@ -35,8 +28,7 @@ "externs": [ ], "exports": [ - "main", - "__growWasmMemory" + "main" ], "namedGlobals": { "__heap_base" : "66112", diff --git a/test/lld/standalone-wasm3.wat.out b/test/lld/standalone-wasm3.wat.out index b0db5cb7777..35e9123d954 100644 --- a/test/lld/standalone-wasm3.wat.out +++ b/test/lld/standalone-wasm3.wat.out @@ -1,5 +1,4 @@ (module - (type $i32_=>_i32 (func (param i32) (result i32))) (type $i32_i32_=>_i32 (func (param i32 i32) (result i32))) (memory $0 2) (global $global$0 (mut i32) (i32.const 66112)) @@ -8,15 +7,9 @@ (export "memory" (memory $0)) (export "__heap_base" (global $global$1)) (export "__data_end" (global $global$2)) - (export "__growWasmMemory" (func $__growWasmMemory)) (func $__original_main (param $0 i32) (param $1 i32) (result i32) (nop) ) - (func $__growWasmMemory (param $newSize i32) (result i32) - (memory.grow - (local.get $newSize) - ) - ) ) (; --BEGIN METADATA -- @@ -28,7 +21,6 @@ "externs": [ ], "exports": [ - "__growWasmMemory" ], "namedGlobals": { "__heap_base" : "66112",