summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/lit/help/wasm-emscripten-finalize.test3
-rw-r--r--test/lit/wasm-emscripten-finalize/em_asm.wat22
-rw-r--r--test/lit/wasm-emscripten-finalize/em_js.wat25
-rw-r--r--test/lit/wasm-emscripten-finalize/passive-pic.wat40
-rw-r--r--test/lit/wasm-emscripten-finalize/tag_export.wat12
-rw-r--r--test/lld/basic_safe_stack.wat.out25
-rw-r--r--test/lld/duplicate_imports.wat.out27
-rw-r--r--test/lld/em_asm.wat.mem.out29
-rw-r--r--test/lld/em_asm.wat.out29
-rw-r--r--test/lld/em_asm64.wat.out30
-rw-r--r--test/lld/em_asm_O0.wat.out29
-rw-r--r--test/lld/em_asm_main_thread.wat.out31
-rw-r--r--test/lld/em_asm_pthread.wasm.out88
-rw-r--r--test/lld/em_asm_shared.wat.out40
-rw-r--r--test/lld/em_asm_table.wat.out24
-rw-r--r--test/lld/em_js_O0.wat.out25
-rw-r--r--test/lld/hello_world.passive.wat.out24
-rw-r--r--test/lld/hello_world.wat.mem.out22
-rw-r--r--test/lld/hello_world.wat.out22
-rw-r--r--test/lld/init.wat.out21
-rw-r--r--test/lld/longjmp.wat.out30
-rw-r--r--test/lld/main_module.wat.out31
-rw-r--r--test/lld/main_module_table.wat.out23
-rw-r--r--test/lld/main_module_table_2.wat.out23
-rw-r--r--test/lld/main_module_table_3.wat.out23
-rw-r--r--test/lld/main_module_table_4.wat.out24
-rw-r--r--test/lld/main_module_table_5.wat.out25
-rw-r--r--test/lld/no-emit-metadata.wat20
-rw-r--r--test/lld/no-emit-metadata.wat.out30
-rw-r--r--test/lld/recursive.wat.out22
-rw-r--r--test/lld/recursive_safe_stack.wat.out26
-rw-r--r--test/lld/reserved_func_ptr.wat.out23
-rw-r--r--test/lld/safe_stack_standalone-wasm.wat.out24
-rw-r--r--test/lld/shared.wat.out30
-rw-r--r--test/lld/shared_add_to_table.wasm.out34
-rw-r--r--test/lld/shared_longjmp.wat.out38
-rw-r--r--test/lld/standalone-wasm-with-start.wat.out21
-rw-r--r--test/lld/standalone-wasm.wat.out21
-rw-r--r--test/lld/standalone-wasm2.wat.out21
-rw-r--r--test/lld/standalone-wasm3.wat.out20
-rw-r--r--test/unit/test_finalize.py6
41 files changed, 1 insertions, 1082 deletions
diff --git a/test/lit/help/wasm-emscripten-finalize.test b/test/lit/help/wasm-emscripten-finalize.test
index 5079f192f..43e1652c5 100644
--- a/test/lit/help/wasm-emscripten-finalize.test
+++ b/test/lit/help/wasm-emscripten-finalize.test
@@ -20,9 +20,6 @@
;; CHECK-NEXT: output file. In this mode if no output
;; CHECK-NEXT: file is specified, we write to stdout.
;; CHECK-NEXT:
-;; CHECK-NEXT: --no-emit-metadata,-n Skip the writing to emscripten metadata
-;; CHECK-NEXT: JSON to stdout.
-;; CHECK-NEXT:
;; CHECK-NEXT: --global-base The address at which static globals were
;; CHECK-NEXT: placed
;; CHECK-NEXT:
diff --git a/test/lit/wasm-emscripten-finalize/em_asm.wat b/test/lit/wasm-emscripten-finalize/em_asm.wat
deleted file mode 100644
index 195c4b9af..000000000
--- a/test/lit/wasm-emscripten-finalize/em_asm.wat
+++ /dev/null
@@ -1,22 +0,0 @@
-;; Test that em_asm string are extracted correctly when the __start_em_asm
-;; and __stop_em_asm globals are exported.
-
-;; RUN: wasm-emscripten-finalize %s -S | filecheck %s
-
-;; Check that the data segment that contains only EM_ASM strings resized to
-;; zero, and that the string are extracted into the metadata.
-
-;; CHECK: "asmConsts": {
-;; CHECK-NEXT: "512": "{ console.log('JS hello'); }",
-;; CHECK-NEXT: "541": "{ console.log('hello again'); }"
-;; CHECK-NEXT: },
-
-(module
- (memory 1 1)
- (global (export "__start_em_asm") i32 (i32.const 512))
- (global (export "__stop_em_asm") i32 (i32.const 573))
-
- (data (i32.const 100) "normal data")
- (data (i32.const 512) "{ console.log('JS hello'); }\00{ console.log('hello again'); }\00")
- (data (i32.const 1024) "more data")
-)
diff --git a/test/lit/wasm-emscripten-finalize/em_js.wat b/test/lit/wasm-emscripten-finalize/em_js.wat
deleted file mode 100644
index b10774ed3..000000000
--- a/test/lit/wasm-emscripten-finalize/em_js.wat
+++ /dev/null
@@ -1,25 +0,0 @@
-;; Test that funcions exported with __em_js are correctly removed
-;; once they strings they return are extracted.
-
-;; RUN: wasm-emscripten-finalize %s -S | filecheck %s
-
-;; CHECK: "emJsFuncs": {
-;; CHECK-NEXT: "bar": "more JS string data",
-;; CHECK-NEXT: "baz": "Only em_js strings here",
-;; CHECK-NEXT: "foo": "some JS string data"
-;; CHECK-NEXT: },
-
-(module
- (memory 1 1)
- (data (i32.const 1024) "some JS string data\00xxx")
- (data (i32.const 512) "Only em_js strings here\00")
- (data (i32.const 2048) "more JS string data\00yyy")
- (export "__em_js__foo" (global $__em_js__foo))
- (export "__em_js__bar" (global $bar))
- (export "__em_js__baz" (global $baz))
- ;; Name matches export name
- (global $__em_js__foo i32 (i32.const 1024))
- ;; Name does not match export name
- (global $bar i32 (i32.const 2048))
- (global $baz i32 (i32.const 512))
-)
diff --git a/test/lit/wasm-emscripten-finalize/passive-pic.wat b/test/lit/wasm-emscripten-finalize/passive-pic.wat
deleted file mode 100644
index 63e2cb72c..000000000
--- a/test/lit/wasm-emscripten-finalize/passive-pic.wat
+++ /dev/null
@@ -1,40 +0,0 @@
-;; Test that wasm-emscripten-finalize can locate data within passive segments
-;; even when compiled with PIC, which means that segment addresses are non-constant.
-
-;; RUN: wasm-emscripten-finalize --enable-bulk-memory %s -o out.wasm | filecheck %s
-
-;; CHECK: "asmConsts": {
-;; CHECK: "3": "hello"
-;; CHECK: },
-
-(module
- (import "env" "memory" (memory $memory 1 1))
- (import "env" "__memory_base" (global $__memory_base i32))
- (import "env" "emscripten_asm_const_int" (func $emscripten_asm_const_int (param i32 i32 i32) (result i32)))
- (data "xxxhello\00yyy")
- (global (export "__start_em_asm") i32 (i32.const 3))
- (global (export "__stop_em_asm") i32 (i32.const 9))
- ;; memory init function similar to those generated by wasm-ld
- (start $__wasm_init_memory)
- (func $__wasm_init_memory
- (memory.init 0
- (i32.add
- (i32.const 0)
- (global.get $__memory_base)
- )
- (i32.const 0)
- (i32.const 12)
- )
- )
- ;; EM_ASM call passing string at address 3 in the passive segment
- (func $foo (result i32)
- (call $emscripten_asm_const_int
- (i32.add
- (global.get $__memory_base)
- (i32.const 3)
- )
- (i32.const 0)
- (i32.const 0)
- )
- )
-)
diff --git a/test/lit/wasm-emscripten-finalize/tag_export.wat b/test/lit/wasm-emscripten-finalize/tag_export.wat
deleted file mode 100644
index 86c8c1331..000000000
--- a/test/lit/wasm-emscripten-finalize/tag_export.wat
+++ /dev/null
@@ -1,12 +0,0 @@
-;; RUN: wasm-emscripten-finalize %s | filecheck %s
-
-(module
- (tag $e1 (export "e1") (param i32))
- (tag $e2 (param f32))
- (export "e2" (tag $e2))
-)
-
-;; CHECK: "exports": [
-;; CHECK: "e1",
-;; CHECK: "e2"
-;; CHECK: ],
diff --git a/test/lld/basic_safe_stack.wat.out b/test/lld/basic_safe_stack.wat.out
index 9ed9eb221..d0bcd0563 100644
--- a/test/lld/basic_safe_stack.wat.out
+++ b/test/lld/basic_safe_stack.wat.out
@@ -88,28 +88,3 @@
)
)
)
-(;
---BEGIN METADATA --
-{
- "declares": [
- "__handle_stack_overflow"
- ],
- "globalImports": [
- ],
- "exports": [
- "__wasm_call_ctors",
- "stackRestore",
- "stackAlloc",
- "main",
- "__set_stack_limits"
- ],
- "namedGlobals": {
- },
- "invokeFuncs": [
- ],
- "mainReadsParams": 0,
- "features": [
- ]
-}
--- END METADATA --
-;)
diff --git a/test/lld/duplicate_imports.wat.out b/test/lld/duplicate_imports.wat.out
index 68f4d96a6..5cb68af56 100644
--- a/test/lld/duplicate_imports.wat.out
+++ b/test/lld/duplicate_imports.wat.out
@@ -64,30 +64,3 @@
)
)
)
-(;
---BEGIN METADATA --
-{
- "declares": [
- "puts"
- ],
- "globalImports": [
- ],
- "exports": [
- "__wasm_call_ctors",
- "main",
- "dynCall_ffd",
- "dynCall_fdd"
- ],
- "namedGlobals": {
- "__heap_base" : "66128",
- "__data_end" : "581"
- },
- "invokeFuncs": [
- "invoke_ffd"
- ],
- "mainReadsParams": 0,
- "features": [
- ]
-}
--- END METADATA --
-;)
diff --git a/test/lld/em_asm.wat.mem.out b/test/lld/em_asm.wat.mem.out
index ddf3aa739..6647b397c 100644
--- a/test/lld/em_asm.wat.mem.out
+++ b/test/lld/em_asm.wat.mem.out
@@ -66,32 +66,3 @@
(call $__original_main)
)
)
-(;
---BEGIN METADATA --
-{
- "asmConsts": {
- "574": "{ Module.print(\"Hello \\ world\\t\\n\"); }",
- "614": "{ return $0 + $1; }",
- "634": "{ Module.print(\"Got \" + $0); }"
- },
- "declares": [
- "emscripten_asm_const_int"
- ],
- "globalImports": [
- ],
- "exports": [
- "__wasm_call_ctors",
- "main"
- ],
- "namedGlobals": {
- "__start_em_asm" : "574",
- "__stop_em_asm" : "665"
- },
- "invokeFuncs": [
- ],
- "mainReadsParams": 0,
- "features": [
- ]
-}
--- END METADATA --
-;)
diff --git a/test/lld/em_asm.wat.out b/test/lld/em_asm.wat.out
index 8afbfda3d..8ed3d72ba 100644
--- a/test/lld/em_asm.wat.out
+++ b/test/lld/em_asm.wat.out
@@ -70,32 +70,3 @@
(call $__original_main)
)
)
-(;
---BEGIN METADATA --
-{
- "asmConsts": {
- "574": "{ Module.print(\"Hello \\ world\\t\\n\"); }",
- "614": "{ return $0 + $1; }",
- "634": "{ Module.print(\"Got \" + $0); }"
- },
- "declares": [
- "emscripten_asm_const_int"
- ],
- "globalImports": [
- ],
- "exports": [
- "__wasm_call_ctors",
- "main"
- ],
- "namedGlobals": {
- "__start_em_asm" : "574",
- "__stop_em_asm" : "665"
- },
- "invokeFuncs": [
- ],
- "mainReadsParams": 0,
- "features": [
- ]
-}
--- END METADATA --
-;)
diff --git a/test/lld/em_asm64.wat.out b/test/lld/em_asm64.wat.out
index bac187c23..33e5bb176 100644
--- a/test/lld/em_asm64.wat.out
+++ b/test/lld/em_asm64.wat.out
@@ -70,33 +70,3 @@
(call $__original_main)
)
)
-(;
---BEGIN METADATA --
-{
- "asmConsts": {
- "574": "{ Module.print(\"Hello world\"); }",
- "607": "{ return $0 + $1; }",
- "627": "{ Module.print(\"Got \" + $0); }"
- },
- "declares": [
- "emscripten_asm_const_int"
- ],
- "globalImports": [
- ],
- "exports": [
- "__wasm_call_ctors",
- "main"
- ],
- "namedGlobals": {
- "__start_em_asm" : "574",
- "__stop_em_asm" : "658"
- },
- "invokeFuncs": [
- ],
- "mainReadsParams": 0,
- "features": [
- "--enable-memory64"
- ]
-}
--- END METADATA --
-;)
diff --git a/test/lld/em_asm_O0.wat.out b/test/lld/em_asm_O0.wat.out
index 5a533cdef..fb2495476 100644
--- a/test/lld/em_asm_O0.wat.out
+++ b/test/lld/em_asm_O0.wat.out
@@ -98,32 +98,3 @@
(call $__original_main)
)
)
-(;
---BEGIN METADATA --
-{
- "asmConsts": {
- "568": "{ Module.print(\"Hello world\"); }",
- "601": "{ return $0 + $1; }",
- "621": "{ Module.print(\"Got \" + $0); }"
- },
- "declares": [
- "emscripten_asm_const_int"
- ],
- "globalImports": [
- ],
- "exports": [
- "__wasm_call_ctors",
- "main"
- ],
- "namedGlobals": {
- "__start_em_asm" : "568",
- "__stop_em_asm" : "652"
- },
- "invokeFuncs": [
- ],
- "mainReadsParams": 0,
- "features": [
- ]
-}
--- END METADATA --
-;)
diff --git a/test/lld/em_asm_main_thread.wat.out b/test/lld/em_asm_main_thread.wat.out
index 5c279a598..621465913 100644
--- a/test/lld/em_asm_main_thread.wat.out
+++ b/test/lld/em_asm_main_thread.wat.out
@@ -194,34 +194,3 @@
(call $__original_main)
)
)
-(;
---BEGIN METADATA --
-{
- "asmConsts": {
- "568": "{ Module.print(\"Hello world\"); }",
- "601": "{ return $0 + $1; }",
- "621": "{ Module.print(\"Got \" + $0); }"
- },
- "declares": [
- "emscripten_asm_const_int_sync_on_main_thread"
- ],
- "globalImports": [
- ],
- "exports": [
- "__wasm_call_ctors",
- "main"
- ],
- "namedGlobals": {
- "__start_em_asm" : "568",
- "__stop_em_asm" : "652",
- "__heap_base" : "66192",
- "__data_end" : "652"
- },
- "invokeFuncs": [
- ],
- "mainReadsParams": 0,
- "features": [
- ]
-}
--- END METADATA --
-;)
diff --git a/test/lld/em_asm_pthread.wasm.out b/test/lld/em_asm_pthread.wasm.out
index 0f684e224..0bf7927dd 100644
--- a/test/lld/em_asm_pthread.wasm.out
+++ b/test/lld/em_asm_pthread.wasm.out
@@ -12829,91 +12829,3 @@
)
;; custom section "producers", size 172
)
-(;
---BEGIN METADATA --
-{
- "asmConsts": {
- "1658": "{ console.log(\"Hello.\"); }",
- "1685": "throw 'Canceled!'",
- "1703": "{ setTimeout(function() { __emscripten_do_dispatch_to_thread($0, $1); }, 0); }"
- },
- "emJsFuncs": {
- "initPthreadsJS": "(void)<::>{ PThread.initRuntime(); }",
- "world": "()<::>{ console.log(\"World.\"); }"
- },
- "declares": [
- "emscripten_asm_const_int",
- "__cxa_thread_atexit",
- "__clock_gettime",
- "emscripten_get_now",
- "emscripten_conditional_set_current_thread_status",
- "emscripten_futex_wait",
- "emscripten_futex_wake",
- "__assert_fail",
- "emscripten_set_current_thread_status",
- "_emscripten_notify_thread_queue",
- "emscripten_webgl_create_context",
- "emscripten_set_canvas_element_size",
- "pthread_create",
- "emscripten_receive_on_main_thread_js",
- "emscripten_resize_heap",
- "fd_write",
- "setTempRet0"
- ],
- "globalImports": [
- ],
- "exports": [
- "__wasm_call_ctors",
- "main",
- "emscripten_tls_init",
- "emscripten_get_global_libc",
- "__errno_location",
- "fflush",
- "__emscripten_pthread_data_constructor",
- "pthread_self",
- "__pthread_tsd_run_dtors",
- "emscripten_current_thread_process_queued_calls",
- "emscripten_register_main_browser_thread_id",
- "emscripten_main_browser_thread_id",
- "_emscripten_do_dispatch_to_thread",
- "emscripten_sync_run_in_main_thread_2",
- "emscripten_sync_run_in_main_thread_4",
- "emscripten_main_thread_process_queued_calls",
- "emscripten_run_in_main_runtime_thread_js",
- "_emscripten_call_on_thread",
- "_emscripten_thread_init",
- "stackSave",
- "stackRestore",
- "stackAlloc",
- "emscripten_stack_init",
- "emscripten_stack_set_limits",
- "emscripten_stack_get_free",
- "emscripten_stack_get_end",
- "malloc",
- "free",
- "memalign",
- "dynCall_vi",
- "dynCall_ii",
- "dynCall_iiii",
- "dynCall_jiji"
- ],
- "namedGlobals": {
- "__em_js__world" : "1588",
- "__em_js__initPthreadsJS" : "1621",
- "_emscripten_allow_main_runtime_queued_calls" : "1432",
- "_emscripten_main_thread_futex" : "1836",
- "__start_em_asm" : "1658",
- "__stop_em_asm" : "1782"
- },
- "invokeFuncs": [
- ],
- "mainReadsParams": 1,
- "features": [
- "--enable-threads",
- "--enable-mutable-globals",
- "--enable-bulk-memory",
- "--enable-sign-ext"
- ]
-}
--- END METADATA --
-;)
diff --git a/test/lld/em_asm_shared.wat.out b/test/lld/em_asm_shared.wat.out
index ac15b0fd9..0962d3504 100644
--- a/test/lld/em_asm_shared.wat.out
+++ b/test/lld/em_asm_shared.wat.out
@@ -96,43 +96,3 @@
(call $__original_main)
)
)
-(;
---BEGIN METADATA --
-{
- "asmConsts": {
- "6": "{ Module.print(\"Hello world\"); }",
- "39": "{ return $0 + $1; }",
- "59": "{ Module.print(\"Got \" + $0); }"
- },
- "declares": [
- "emscripten_asm_const_int"
- ],
- "globalImports": [
- "__stack_pointer",
- "__memory_base",
- "__table_base",
- "_ZN20__em_asm_sig_builderI19__em_asm_type_tupleIJEEE6bufferE",
- "_ZN20__em_asm_sig_builderI19__em_asm_type_tupleIJiiEEE6bufferE",
- "_ZN20__em_asm_sig_builderI19__em_asm_type_tupleIJiEEE6bufferE"
- ],
- "exports": [
- "__wasm_call_ctors",
- "__wasm_apply_data_relocs",
- "__original_main",
- "main"
- ],
- "namedGlobals": {
- "_ZN20__em_asm_sig_builderI19__em_asm_type_tupleIJEEE6bufferE" : "0",
- "_ZN20__em_asm_sig_builderI19__em_asm_type_tupleIJiiEEE6bufferE" : "1",
- "_ZN20__em_asm_sig_builderI19__em_asm_type_tupleIJiEEE6bufferE" : "4",
- "__start_em_asm" : "6",
- "__stop_em_asm" : "90"
- },
- "invokeFuncs": [
- ],
- "mainReadsParams": 0,
- "features": [
- ]
-}
--- END METADATA --
-;)
diff --git a/test/lld/em_asm_table.wat.out b/test/lld/em_asm_table.wat.out
index 4a654c141..c91f774ed 100644
--- a/test/lld/em_asm_table.wat.out
+++ b/test/lld/em_asm_table.wat.out
@@ -29,27 +29,3 @@
)
)
)
-(;
---BEGIN METADATA --
-{
- "declares": [
- "emscripten_log",
- "emscripten_asm_const_int"
- ],
- "globalImports": [
- ],
- "exports": [
- "dynCall_vii",
- "dynCall_iiii"
- ],
- "namedGlobals": {
- "__data_end" : "1048"
- },
- "invokeFuncs": [
- ],
- "mainReadsParams": 0,
- "features": [
- ]
-}
--- END METADATA --
-;)
diff --git a/test/lld/em_js_O0.wat.out b/test/lld/em_js_O0.wat.out
index e3271166b..bda4f1b52 100644
--- a/test/lld/em_js_O0.wat.out
+++ b/test/lld/em_js_O0.wat.out
@@ -20,28 +20,3 @@
)
)
)
-(;
---BEGIN METADATA --
-{
- "emJsFuncs": {
- "noarg": "(void)<::>{ out(\"no args works\"); }"
- },
- "declares": [
- ],
- "globalImports": [
- ],
- "exports": [
- "__em_js__noarg"
- ],
- "namedGlobals": {
- "__heap_base" : "5250112",
- "__data_end" : "7232"
- },
- "invokeFuncs": [
- ],
- "mainReadsParams": 0,
- "features": [
- ]
-}
--- END METADATA --
-;)
diff --git a/test/lld/hello_world.passive.wat.out b/test/lld/hello_world.passive.wat.out
index 1c96749d2..4cd5ed3c7 100644
--- a/test/lld/hello_world.passive.wat.out
+++ b/test/lld/hello_world.passive.wat.out
@@ -37,27 +37,3 @@
(call $__original_main)
)
)
-(;
---BEGIN METADATA --
-{
- "declares": [
- "puts"
- ],
- "globalImports": [
- ],
- "exports": [
- "__wasm_call_ctors",
- "main"
- ],
- "namedGlobals": {
- "__heap_base" : "66128",
- "__data_end" : "581"
- },
- "invokeFuncs": [
- ],
- "mainReadsParams": 0,
- "features": [
- ]
-}
--- END METADATA --
-;)
diff --git a/test/lld/hello_world.wat.mem.out b/test/lld/hello_world.wat.mem.out
index f55fbcf89..c482a7465 100644
--- a/test/lld/hello_world.wat.mem.out
+++ b/test/lld/hello_world.wat.mem.out
@@ -25,25 +25,3 @@
(call $__original_main)
)
)
-(;
---BEGIN METADATA --
-{
- "declares": [
- "puts"
- ],
- "globalImports": [
- ],
- "exports": [
- "__wasm_call_ctors",
- "main"
- ],
- "namedGlobals": {
- },
- "invokeFuncs": [
- ],
- "mainReadsParams": 0,
- "features": [
- ]
-}
--- END METADATA --
-;)
diff --git a/test/lld/hello_world.wat.out b/test/lld/hello_world.wat.out
index de4d9670f..8081048d8 100644
--- a/test/lld/hello_world.wat.out
+++ b/test/lld/hello_world.wat.out
@@ -26,25 +26,3 @@
(call $__original_main)
)
)
-(;
---BEGIN METADATA --
-{
- "declares": [
- "puts"
- ],
- "globalImports": [
- ],
- "exports": [
- "__wasm_call_ctors",
- "main"
- ],
- "namedGlobals": {
- },
- "invokeFuncs": [
- ],
- "mainReadsParams": 0,
- "features": [
- ]
-}
--- END METADATA --
-;)
diff --git a/test/lld/init.wat.out b/test/lld/init.wat.out
index 7525cf131..68388eecb 100644
--- a/test/lld/init.wat.out
+++ b/test/lld/init.wat.out
@@ -38,24 +38,3 @@
(call $__original_main)
)
)
-(;
---BEGIN METADATA --
-{
- "declares": [
- ],
- "globalImports": [
- ],
- "exports": [
- "__wasm_call_ctors",
- "main"
- ],
- "namedGlobals": {
- },
- "invokeFuncs": [
- ],
- "mainReadsParams": 0,
- "features": [
- ]
-}
--- END METADATA --
-;)
diff --git a/test/lld/longjmp.wat.out b/test/lld/longjmp.wat.out
index bef99c9d4..3bb1c6dd4 100644
--- a/test/lld/longjmp.wat.out
+++ b/test/lld/longjmp.wat.out
@@ -141,33 +141,3 @@
)
)
)
-(;
---BEGIN METADATA --
-{
- "declares": [
- "malloc",
- "saveSetjmp",
- "getTempRet0",
- "emscripten_longjmp",
- "testSetjmp",
- "setTempRet0",
- "free"
- ],
- "globalImports": [
- ],
- "exports": [
- "__wasm_call_ctors",
- "main",
- "dynCall_vii"
- ],
- "namedGlobals": {
- },
- "invokeFuncs": [
- "invoke_vii"
- ],
- "mainReadsParams": 0,
- "features": [
- ]
-}
--- END METADATA --
-;)
diff --git a/test/lld/main_module.wat.out b/test/lld/main_module.wat.out
index 1c27ba34f..1761b6dde 100644
--- a/test/lld/main_module.wat.out
+++ b/test/lld/main_module.wat.out
@@ -53,34 +53,3 @@
)
)
)
-(;
---BEGIN METADATA --
-{
- "declares": [
- "puts"
- ],
- "globalImports": [
- "__stack_pointer",
- "__memory_base",
- "__table_base",
- "external_var",
- "puts",
- "_Z13print_messagev"
- ],
- "exports": [
- "__wasm_call_ctors",
- "_Z13print_messagev"
- ],
- "namedGlobals": {
- "ptr_puts" : "16",
- "ptr_local_func" : "20",
- "__data_end" : "42"
- },
- "invokeFuncs": [
- ],
- "mainReadsParams": 0,
- "features": [
- ]
-}
--- END METADATA --
-;)
diff --git a/test/lld/main_module_table.wat.out b/test/lld/main_module_table.wat.out
index dd37f93b6..368df93b6 100644
--- a/test/lld/main_module_table.wat.out
+++ b/test/lld/main_module_table.wat.out
@@ -9,26 +9,3 @@
(nop)
)
)
-(;
---BEGIN METADATA --
-{
- "declares": [
- ],
- "globalImports": [
- "__stack_pointer",
- "__stdio_write"
- ],
- "exports": [
- "__stdio_write"
- ],
- "namedGlobals": {
- "__data_end" : "42"
- },
- "invokeFuncs": [
- ],
- "mainReadsParams": 0,
- "features": [
- ]
-}
--- END METADATA --
-;)
diff --git a/test/lld/main_module_table_2.wat.out b/test/lld/main_module_table_2.wat.out
index 37a162860..7d4046d16 100644
--- a/test/lld/main_module_table_2.wat.out
+++ b/test/lld/main_module_table_2.wat.out
@@ -10,26 +10,3 @@
(nop)
)
)
-(;
---BEGIN METADATA --
-{
- "declares": [
- ],
- "globalImports": [
- "__stack_pointer",
- "__stdio_write"
- ],
- "exports": [
- "__stdio_write"
- ],
- "namedGlobals": {
- "__data_end" : "42"
- },
- "invokeFuncs": [
- ],
- "mainReadsParams": 0,
- "features": [
- ]
-}
--- END METADATA --
-;)
diff --git a/test/lld/main_module_table_3.wat.out b/test/lld/main_module_table_3.wat.out
index 8153a2770..72a29a7f2 100644
--- a/test/lld/main_module_table_3.wat.out
+++ b/test/lld/main_module_table_3.wat.out
@@ -11,26 +11,3 @@
(nop)
)
)
-(;
---BEGIN METADATA --
-{
- "declares": [
- ],
- "globalImports": [
- "__stack_pointer",
- "__stdio_write"
- ],
- "exports": [
- "__stdio_write"
- ],
- "namedGlobals": {
- "__data_end" : "42"
- },
- "invokeFuncs": [
- ],
- "mainReadsParams": 0,
- "features": [
- ]
-}
--- END METADATA --
-;)
diff --git a/test/lld/main_module_table_4.wat.out b/test/lld/main_module_table_4.wat.out
index e09e42238..09008d4e8 100644
--- a/test/lld/main_module_table_4.wat.out
+++ b/test/lld/main_module_table_4.wat.out
@@ -12,27 +12,3 @@
(nop)
)
)
-(;
---BEGIN METADATA --
-{
- "declares": [
- ],
- "globalImports": [
- "__stack_pointer",
- "__stdio_write",
- "__table_base"
- ],
- "exports": [
- "__stdio_write"
- ],
- "namedGlobals": {
- "__data_end" : "42"
- },
- "invokeFuncs": [
- ],
- "mainReadsParams": 0,
- "features": [
- ]
-}
--- END METADATA --
-;)
diff --git a/test/lld/main_module_table_5.wat.out b/test/lld/main_module_table_5.wat.out
index bf543f98a..3620dc0b4 100644
--- a/test/lld/main_module_table_5.wat.out
+++ b/test/lld/main_module_table_5.wat.out
@@ -25,28 +25,3 @@
)
)
)
-(;
---BEGIN METADATA --
-{
- "declares": [
- ],
- "globalImports": [
- "__stack_pointer",
- "__stdio_write",
- "__table_base"
- ],
- "exports": [
- "__stdio_write",
- "dynCall_v"
- ],
- "namedGlobals": {
- "__data_end" : "42"
- },
- "invokeFuncs": [
- ],
- "mainReadsParams": 0,
- "features": [
- ]
-}
--- END METADATA --
-;)
diff --git a/test/lld/no-emit-metadata.wat b/test/lld/no-emit-metadata.wat
deleted file mode 100644
index 2ccbf3f29..000000000
--- a/test/lld/no-emit-metadata.wat
+++ /dev/null
@@ -1,20 +0,0 @@
-(module
- (memory $0 2)
- (table $0 1 1 funcref)
- (elem (i32.const 0) $foo)
- (global $global$0 (mut i32) (i32.const 66112))
- (global $global$1 i32 (i32.const 66112))
- (global $global$2 i32 (i32.const 576))
- (export "memory" (memory $0))
- (export "main" (func $main))
- (export "__heap_base" (global $global$1))
- (export "__data_end" (global $global$2))
- (func $__original_main (result i32)
- (nop)
- )
- (func $main (param $0 i32) (param $1 i32) (result i32)
- (call $__original_main)
- )
- (func $foo (result i32))
-)
-
diff --git a/test/lld/no-emit-metadata.wat.out b/test/lld/no-emit-metadata.wat.out
deleted file mode 100644
index 281eba998..000000000
--- a/test/lld/no-emit-metadata.wat.out
+++ /dev/null
@@ -1,30 +0,0 @@
-(module
- (type $none_=>_i32 (func (result i32)))
- (type $i32_i32_=>_i32 (func (param i32 i32) (result i32)))
- (type $i32_=>_i32 (func (param i32) (result i32)))
- (global $global$0 (mut i32) (i32.const 66112))
- (global $global$1 i32 (i32.const 66112))
- (global $global$2 i32 (i32.const 576))
- (memory $0 2)
- (table $0 1 1 funcref)
- (elem (i32.const 0) $foo)
- (export "memory" (memory $0))
- (export "main" (func $main))
- (export "__heap_base" (global $global$1))
- (export "__data_end" (global $global$2))
- (export "dynCall_i" (func $dynCall_i))
- (func $__original_main (result i32)
- (nop)
- )
- (func $main (param $0 i32) (param $1 i32) (result i32)
- (call $__original_main)
- )
- (func $foo (result i32)
- (nop)
- )
- (func $dynCall_i (param $fptr i32) (result i32)
- (call_indirect (type $none_=>_i32)
- (local.get $fptr)
- )
- )
-)
diff --git a/test/lld/recursive.wat.out b/test/lld/recursive.wat.out
index 5ffbf8210..ae7945a2a 100644
--- a/test/lld/recursive.wat.out
+++ b/test/lld/recursive.wat.out
@@ -83,25 +83,3 @@
(call $__original_main)
)
)
-(;
---BEGIN METADATA --
-{
- "declares": [
- "iprintf"
- ],
- "globalImports": [
- ],
- "exports": [
- "__wasm_call_ctors",
- "main"
- ],
- "namedGlobals": {
- },
- "invokeFuncs": [
- ],
- "mainReadsParams": 0,
- "features": [
- ]
-}
--- END METADATA --
-;)
diff --git a/test/lld/recursive_safe_stack.wat.out b/test/lld/recursive_safe_stack.wat.out
index d6cd8f63a..f5808ee88 100644
--- a/test/lld/recursive_safe_stack.wat.out
+++ b/test/lld/recursive_safe_stack.wat.out
@@ -181,29 +181,3 @@
)
)
)
-(;
---BEGIN METADATA --
-{
- "declares": [
- "printf",
- "__handle_stack_overflow"
- ],
- "globalImports": [
- ],
- "exports": [
- "__wasm_call_ctors",
- "main",
- "__set_stack_limits"
- ],
- "namedGlobals": {
- "__heap_base" : "66128",
- "__data_end" : "587"
- },
- "invokeFuncs": [
- ],
- "mainReadsParams": 0,
- "features": [
- ]
-}
--- END METADATA --
-;)
diff --git a/test/lld/reserved_func_ptr.wat.out b/test/lld/reserved_func_ptr.wat.out
index 373800dbc..d20ecbc51 100644
--- a/test/lld/reserved_func_ptr.wat.out
+++ b/test/lld/reserved_func_ptr.wat.out
@@ -118,26 +118,3 @@
)
)
)
-(;
---BEGIN METADATA --
-{
- "declares": [
- "_Z4atoiPKc"
- ],
- "globalImports": [
- ],
- "exports": [
- "__wasm_call_ctors",
- "__main_argc_argv",
- "dynCall_viii"
- ],
- "namedGlobals": {
- },
- "invokeFuncs": [
- ],
- "mainReadsParams": 1,
- "features": [
- ]
-}
--- END METADATA --
-;)
diff --git a/test/lld/safe_stack_standalone-wasm.wat.out b/test/lld/safe_stack_standalone-wasm.wat.out
index b5bd4a869..876e9fabc 100644
--- a/test/lld/safe_stack_standalone-wasm.wat.out
+++ b/test/lld/safe_stack_standalone-wasm.wat.out
@@ -171,27 +171,3 @@
)
)
)
-(;
---BEGIN METADATA --
-{
- "declares": [
- "printf"
- ],
- "globalImports": [
- ],
- "exports": [
- "__wasm_call_ctors",
- "main",
- "__set_stack_limits"
- ],
- "namedGlobals": {
- "__heap_base" : "66128",
- "__data_end" : "587"
- },
- "invokeFuncs": [
- ],
- "features": [
- ]
-}
--- END METADATA --
-;)
diff --git a/test/lld/shared.wat.out b/test/lld/shared.wat.out
index b152d52b8..1a496e436 100644
--- a/test/lld/shared.wat.out
+++ b/test/lld/shared.wat.out
@@ -51,33 +51,3 @@
)
)
)
-(;
---BEGIN METADATA --
-{
- "declares": [
- "puts"
- ],
- "globalImports": [
- "__memory_base",
- "__table_base",
- "external_var",
- "puts",
- "_Z13print_messagev"
- ],
- "exports": [
- "__wasm_call_ctors",
- "__wasm_apply_data_relocs",
- "_Z13print_messagev"
- ],
- "namedGlobals": {
- "ptr_puts" : "16",
- "ptr_local_func" : "20"
- },
- "invokeFuncs": [
- ],
- "mainReadsParams": 0,
- "features": [
- ]
-}
--- END METADATA --
-;)
diff --git a/test/lld/shared_add_to_table.wasm.out b/test/lld/shared_add_to_table.wasm.out
index f4551d34a..91be03860 100644
--- a/test/lld/shared_add_to_table.wasm.out
+++ b/test/lld/shared_add_to_table.wasm.out
@@ -68,37 +68,3 @@
;; tablealignment: 0
;; custom section "producers", size 157
)
-(;
---BEGIN METADATA --
-{
- "declares": [
- "_Z16waka_func_theirsi"
- ],
- "globalImports": [
- "__stack_pointer",
- "__memory_base",
- "__table_base",
- "_Z16waka_func_theirsi",
- "_Z14waka_func_minei",
- "waka_mine",
- "waka_others"
- ],
- "exports": [
- "__wasm_call_ctors",
- "__wasm_apply_relocs",
- "_Z14waka_func_minei",
- "__original_main",
- "main"
- ],
- "namedGlobals": {
- "waka_mine" : "0",
- "__dso_handle" : "0"
- },
- "invokeFuncs": [
- ],
- "mainReadsParams": 0,
- "features": [
- ]
-}
--- END METADATA --
-;)
diff --git a/test/lld/shared_longjmp.wat.out b/test/lld/shared_longjmp.wat.out
index 65d6b088c..449714270 100644
--- a/test/lld/shared_longjmp.wat.out
+++ b/test/lld/shared_longjmp.wat.out
@@ -151,41 +151,3 @@
)
)
)
-(;
---BEGIN METADATA --
-{
- "declares": [
- "malloc",
- "saveSetjmp",
- "getTempRet0",
- "emscripten_longjmp",
- "testSetjmp",
- "setTempRet0",
- "free"
- ],
- "globalImports": [
- "__memory_base",
- "__table_base",
- "__THREW__",
- "emscripten_longjmp",
- "__threwValue"
- ],
- "exports": [
- "__wasm_call_ctors",
- "__wasm_apply_data_relocs",
- "_start",
- "dynCall_vii"
- ],
- "namedGlobals": {
- "__THREW__" : "0",
- "__threwValue" : "4"
- },
- "invokeFuncs": [
- "invoke_vii"
- ],
- "mainReadsParams": 0,
- "features": [
- ]
-}
--- END METADATA --
-;)
diff --git a/test/lld/standalone-wasm-with-start.wat.out b/test/lld/standalone-wasm-with-start.wat.out
index b5bbb22b4..e158a7433 100644
--- a/test/lld/standalone-wasm-with-start.wat.out
+++ b/test/lld/standalone-wasm-with-start.wat.out
@@ -17,24 +17,3 @@
(nop)
)
)
-(;
---BEGIN METADATA --
-{
- "declares": [
- ],
- "globalImports": [
- ],
- "exports": [
- "_start"
- ],
- "namedGlobals": {
- "__heap_base" : "66112",
- "__data_end" : "576"
- },
- "invokeFuncs": [
- ],
- "features": [
- ]
-}
--- END METADATA --
-;)
diff --git a/test/lld/standalone-wasm.wat.out b/test/lld/standalone-wasm.wat.out
index 54519e820..dfce73e5c 100644
--- a/test/lld/standalone-wasm.wat.out
+++ b/test/lld/standalone-wasm.wat.out
@@ -21,24 +21,3 @@
(nop)
)
)
-(;
---BEGIN METADATA --
-{
- "declares": [
- ],
- "globalImports": [
- ],
- "exports": [
- "main"
- ],
- "namedGlobals": {
- "__heap_base" : "66112",
- "__data_end" : "576"
- },
- "invokeFuncs": [
- ],
- "features": [
- ]
-}
--- END METADATA --
-;)
diff --git a/test/lld/standalone-wasm2.wat.out b/test/lld/standalone-wasm2.wat.out
index 8863dc151..bc8c94d1a 100644
--- a/test/lld/standalone-wasm2.wat.out
+++ b/test/lld/standalone-wasm2.wat.out
@@ -18,24 +18,3 @@
)
)
)
-(;
---BEGIN METADATA --
-{
- "declares": [
- ],
- "globalImports": [
- ],
- "exports": [
- "main"
- ],
- "namedGlobals": {
- "__heap_base" : "66112",
- "__data_end" : "576"
- },
- "invokeFuncs": [
- ],
- "features": [
- ]
-}
--- END METADATA --
-;)
diff --git a/test/lld/standalone-wasm3.wat.out b/test/lld/standalone-wasm3.wat.out
index df6c277c6..bbbd38c82 100644
--- a/test/lld/standalone-wasm3.wat.out
+++ b/test/lld/standalone-wasm3.wat.out
@@ -11,23 +11,3 @@
(nop)
)
)
-(;
---BEGIN METADATA --
-{
- "declares": [
- ],
- "globalImports": [
- ],
- "exports": [
- ],
- "namedGlobals": {
- "__heap_base" : "66112",
- "__data_end" : "576"
- },
- "invokeFuncs": [
- ],
- "features": [
- ]
-}
--- END METADATA --
-;)
diff --git a/test/unit/test_finalize.py b/test/unit/test_finalize.py
index 6733155cb..4f5029bd5 100644
--- a/test/unit/test_finalize.py
+++ b/test/unit/test_finalize.py
@@ -4,14 +4,10 @@ from . import utils
class EmscriptenFinalizeTest(utils.BinaryenTestCase):
def do_output_test(self, args):
- # without any output file specified, don't error, don't write the wasm,
- # but do emit metadata
+ # without any output file specified, don't error, don't write the wasm
p = shared.run_process(shared.WASM_EMSCRIPTEN_FINALIZE + [
self.input_path('empty_lld.wat'), '--global-base=1024'
] + args, capture_output=True)
- # metadata is always present
- self.assertIn('{', p.stdout)
- self.assertIn('}', p.stdout)
return p.stdout
def test_no_output(self):