diff options
author | Sam Clegg <sbc@chromium.org> | 2021-02-18 08:10:02 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-02-18 08:10:02 -0800 |
commit | f7bfc85fae3bebf9ff818905c9bc6df51989ce70 (patch) | |
tree | cfe41c2e470fb3b93efaf3064cf9b3e1cba10876 /test | |
parent | 3ed396e11f8aa5bd4fd4290eaf2bfbe9b8fbbe9d (diff) | |
download | binaryen-f7bfc85fae3bebf9ff818905c9bc6df51989ce70.tar.gz binaryen-f7bfc85fae3bebf9ff818905c9bc6df51989ce70.tar.bz2 binaryen-f7bfc85fae3bebf9ff818905c9bc6df51989ce70.zip |
Allow em_js strings to be exported as globals (#3577)
Diffstat (limited to 'test')
-rw-r--r-- | test/lit/wasm-emscripten-finalize/em_js.wat | 20 |
1 files changed, 7 insertions, 13 deletions
diff --git a/test/lit/wasm-emscripten-finalize/em_js.wat b/test/lit/wasm-emscripten-finalize/em_js.wat index 85b3ece89..02fc32bfc 100644 --- a/test/lit/wasm-emscripten-finalize/em_js.wat +++ b/test/lit/wasm-emscripten-finalize/em_js.wat @@ -5,7 +5,7 @@ ;; All functions should be stripped from the binary, regardless ;; of internal name -;; CHECK-NOT: (func +;; CHECK-NOT: (global ;; The data section that contains only em_js strings should ;; be stripped (shrunk to zero size): @@ -24,18 +24,12 @@ (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" (func $__em_js__foo)) - (export "__em_js__bar" (func $bar)) - (export "__em_js__baz" (func $baz)) + (export "__em_js__foo" (global $__em_js__foo)) + (export "__em_js__bar" (global $bar)) + (export "__em_js__baz" (global $baz)) ;; Name matches export name - (func $__em_js__foo (result i32) - (i32.const 1024) - ) + (global $__em_js__foo i32 (i32.const 1024)) ;; Name does not match export name - (func $bar (result i32) - (i32.const 2048) - ) - (func $baz (result i32) - (i32.const 512) - ) + (global $bar i32 (i32.const 2048)) + (global $baz i32 (i32.const 512)) ) |