diff options
Diffstat (limited to 'test/binaryen.js')
-rw-r--r-- | test/binaryen.js/expressions.js | 16 | ||||
-rw-r--r-- | test/binaryen.js/expressions.js.txt | 4 | ||||
-rw-r--r-- | test/binaryen.js/kitchen-sink.js | 4 | ||||
-rw-r--r-- | test/binaryen.js/kitchen-sink.js.txt | 22 | ||||
-rw-r--r-- | test/binaryen.js/reloc.js.txt | 2 | ||||
-rw-r--r-- | test/binaryen.js/zero-filled-memory.js.txt | 4 |
6 files changed, 26 insertions, 26 deletions
diff --git a/test/binaryen.js/expressions.js b/test/binaryen.js/expressions.js index c9111c9b4..a214ec340 100644 --- a/test/binaryen.js/expressions.js +++ b/test/binaryen.js/expressions.js @@ -1283,7 +1283,7 @@ console.log("# MemoryInit"); const module = new binaryen.Module(); module.setMemory(1, 1, null); - var segment = 1; + var segment = "1"; var dest = module.i32.const(2); var offset = module.i32.const(3); var size = module.i32.const(4); @@ -1296,8 +1296,8 @@ console.log("# MemoryInit"); assert(theMemoryInit.size === size); assert(theMemoryInit.type === binaryen.none); - theMemoryInit.segment = segment = 5; - assert(theMemoryInit.segment === 5); + theMemoryInit.segment = segment = "5"; + assert(theMemoryInit.segment === "5"); theMemoryInit.dest = dest = module.i32.const(6); assert(theMemoryInit.dest === dest); theMemoryInit.offset = offset = module.i32.const(7); @@ -1312,7 +1312,7 @@ console.log("# MemoryInit"); assert( theMemoryInit.toText() == - "(memory.init $0 5\n (i32.const 6)\n (i32.const 7)\n (i32.const 8)\n)\n" + "(memory.init $0 $5\n (i32.const 6)\n (i32.const 7)\n (i32.const 8)\n)\n" ); module.dispose(); @@ -1322,15 +1322,15 @@ console.log("# DataDrop"); (function testDataDrop() { const module = new binaryen.Module(); - var segment = 1; + var segment = "1"; const theDataDrop = binaryen.DataDrop(module.data.drop(segment)); assert(theDataDrop instanceof binaryen.DataDrop); assert(theDataDrop instanceof binaryen.Expression); assert(theDataDrop.segment === segment); assert(theDataDrop.type === binaryen.none); - theDataDrop.segment = segment = 2; - assert(theDataDrop.segment === 2); + theDataDrop.segment = segment = "2"; + assert(theDataDrop.segment === "2"); theDataDrop.type = binaryen.f64; theDataDrop.finalize(); assert(theDataDrop.type === binaryen.none); @@ -1339,7 +1339,7 @@ console.log("# DataDrop"); assert( theDataDrop.toText() == - "(data.drop 2)\n" + "(data.drop $2)\n" ); module.dispose(); diff --git a/test/binaryen.js/expressions.js.txt b/test/binaryen.js/expressions.js.txt index 75f3a8d54..bbc1b0140 100644 --- a/test/binaryen.js/expressions.js.txt +++ b/test/binaryen.js/expressions.js.txt @@ -191,14 +191,14 @@ ) # MemoryInit -(memory.init $0 5 +(memory.init $0 $5 (i32.const 6) (i32.const 7) (i32.const 8) ) # DataDrop -(data.drop 2) +(data.drop $2) # MemoryCopy (memory.copy $0 $0 diff --git a/test/binaryen.js/kitchen-sink.js b/test/binaryen.js/kitchen-sink.js index 3522ea5da..f62ed5a2a 100644 --- a/test/binaryen.js/kitchen-sink.js +++ b/test/binaryen.js/kitchen-sink.js @@ -555,8 +555,8 @@ function test_core() { module.i8x16.shuffle(module.v128.const(v128_bytes), module.v128.const(v128_bytes), v128_bytes), module.v128.bitselect(module.v128.const(v128_bytes), module.v128.const(v128_bytes), module.v128.const(v128_bytes)), // Bulk memory - module.memory.init(0, makeInt32(1024), makeInt32(0), makeInt32(12)), - module.data.drop(0), + module.memory.init("0", makeInt32(1024), makeInt32(0), makeInt32(12)), + module.data.drop("0"), module.memory.copy(makeInt32(2048), makeInt32(1024), makeInt32(12)), module.memory.fill(makeInt32(0), makeInt32(42), makeInt32(1024)), // All the rest diff --git a/test/binaryen.js/kitchen-sink.js.txt b/test/binaryen.js/kitchen-sink.js.txt index aed5849e2..187fa06f2 100644 --- a/test/binaryen.js/kitchen-sink.js.txt +++ b/test/binaryen.js/kitchen-sink.js.txt @@ -140,8 +140,8 @@ getExpressionInfo(tuple[3])={"id":14,"type":5,"value":3.7} (import "module" "base" (tag $a-tag-imp (param i32))) (global $a-global i32 (i32.const 1)) (memory $0 (shared 1 256)) - (data (i32.const 10) "hello, world") - (data "I am passive") + (data $0 (i32.const 10) "hello, world") + (data $1 "I am passive") (table $t0 1 funcref) (elem $e0 (i32.const 0) "$kitchen()sinker") (tag $a-tag (param i32)) @@ -1914,12 +1914,12 @@ getExpressionInfo(tuple[3])={"id":14,"type":5,"value":3.7} (v128.const i32x4 0x04030201 0x08070605 0x0c0b0a09 0x100f0e0d) ) ) - (memory.init 0 + (memory.init $0 (i32.const 1024) (i32.const 0) (i32.const 12) ) - (data.drop 0) + (data.drop $0) (memory.copy (i32.const 2048) (i32.const 1024) @@ -2244,8 +2244,8 @@ getExpressionInfo(tuple[3])={"id":14,"type":5,"value":3.7} (import "module" "base" (tag $a-tag-imp (param i32))) (global $a-global i32 (i32.const 1)) (memory $0 (shared 1 256)) - (data (i32.const 10) "hello, world") - (data "I am passive") + (data $0 (i32.const 10) "hello, world") + (data $1 "I am passive") (table $t0 1 funcref) (elem $e0 (i32.const 0) "$kitchen()sinker") (tag $a-tag (param i32)) @@ -4018,12 +4018,12 @@ getExpressionInfo(tuple[3])={"id":14,"type":5,"value":3.7} (v128.const i32x4 0x04030201 0x08070605 0x0c0b0a09 0x100f0e0d) ) ) - (memory.init 0 + (memory.init $0 (i32.const 1024) (i32.const 0) (i32.const 12) ) - (data.drop 0) + (data.drop $0) (memory.copy (i32.const 2048) (i32.const 1024) @@ -4884,9 +4884,9 @@ sizeof Literal: 24 (global $a-global2 i32 (i32.const 2)) (global $a-global3 i32 (i32.const 3)) (memory $0 1 256) - (data (i32.const 10) "hello, world") - (data (global.get $a-global) "segment data 2") - (data "hello, passive") + (data $0 (i32.const 10) "hello, world") + (data $1 (global.get $a-global) "segment data 2") + (data $2 "hello, passive") (table $t0 1 funcref) (elem $e0 (i32.const 0) $fn0 $fn1 $fn2) (export "export0" (func $fn0)) diff --git a/test/binaryen.js/reloc.js.txt b/test/binaryen.js/reloc.js.txt index 262ba3d0c..bfddb0970 100644 --- a/test/binaryen.js/reloc.js.txt +++ b/test/binaryen.js/reloc.js.txt @@ -3,7 +3,7 @@ (import "env" "memory_base" (global $memory_base i32)) (import "env" "table_base" (global $table_base i32)) (memory $0 1) - (data (global.get $memory_base) "data data") + (data $0 (global.get $memory_base) "data data") (table $0 1 funcref) (elem $0 (global.get $table_base) $func $func) (func $func diff --git a/test/binaryen.js/zero-filled-memory.js.txt b/test/binaryen.js/zero-filled-memory.js.txt index 10f7a3fbe..dec414e3b 100644 --- a/test/binaryen.js/zero-filled-memory.js.txt +++ b/test/binaryen.js/zero-filled-memory.js.txt @@ -8,14 +8,14 @@ === unoptimized === (module (import "env" "memory" (memory $0 1)) - (data (i32.const 1024) "\00\00\00\00") + (data $0 (i32.const 1024) "\00\00\00\00") (export "memory" (memory $0)) ) === optimized, zeroFilledMemory=false === (module (import "env" "memory" (memory $0 1)) - (data (i32.const 1024) "\00\00\00\00") + (data $0 (i32.const 1024) "\00\00\00\00") (export "memory" (memory $0)) ) |