diff options
author | Thomas Lively <tlively@google.com> | 2023-09-13 20:02:26 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-09-13 20:02:26 -0700 |
commit | 2cbe448eb4df17010f0e5f360a8e705da710f3e0 (patch) | |
tree | b0967cb40dd4dbb2d209afb66cdf58c8af498cf9 /test/binaryen.js | |
parent | 9d79632c210a8c5002657ae87ff06c70ee109e8f (diff) | |
download | binaryen-2cbe448eb4df17010f0e5f360a8e705da710f3e0.tar.gz binaryen-2cbe448eb4df17010f0e5f360a8e705da710f3e0.tar.bz2 binaryen-2cbe448eb4df17010f0e5f360a8e705da710f3e0.zip |
Replace i31.new with ref.i31 everywhere (#5931)
Replace i31.new with ref.i31 in the printer, tests, and source code. Continue
parsing i31.new for the time being to allow a graceful transition. Also update
the JS API to reflect the new instruction name.
Diffstat (limited to 'test/binaryen.js')
-rw-r--r-- | test/binaryen.js/expressions.js | 4 | ||||
-rw-r--r-- | test/binaryen.js/expressions.js.txt | 2 | ||||
-rw-r--r-- | test/binaryen.js/kitchen-sink.js | 6 | ||||
-rw-r--r-- | test/binaryen.js/kitchen-sink.js.txt | 12 |
4 files changed, 12 insertions, 12 deletions
diff --git a/test/binaryen.js/expressions.js b/test/binaryen.js/expressions.js index 83e005f0d..e5ad3567e 100644 --- a/test/binaryen.js/expressions.js +++ b/test/binaryen.js/expressions.js @@ -1776,7 +1776,7 @@ console.log("# RefI31"); const module = new binaryen.Module(); var value = module.local.get(1, binaryen.i32); - const theRefI31 = binaryen.RefI31(module.i31.new(value)); + const theRefI31 = binaryen.RefI31(module.ref.i31(value)); assert(theRefI31 instanceof binaryen.RefI31); assert(theRefI31 instanceof binaryen.Expression); assert(theRefI31.value === value); @@ -1792,7 +1792,7 @@ console.log("# RefI31"); assert( theRefI31.toText() == - "(i31.new\n (local.get $2)\n)\n" + "(ref.i31\n (local.get $2)\n)\n" ); module.dispose(); diff --git a/test/binaryen.js/expressions.js.txt b/test/binaryen.js/expressions.js.txt index 01ef40f70..96d22f51e 100644 --- a/test/binaryen.js/expressions.js.txt +++ b/test/binaryen.js/expressions.js.txt @@ -331,7 +331,7 @@ ) # RefI31 -(i31.new +(ref.i31 (local.get $2) ) diff --git a/test/binaryen.js/kitchen-sink.js b/test/binaryen.js/kitchen-sink.js index ecc20448f..235d09f3e 100644 --- a/test/binaryen.js/kitchen-sink.js +++ b/test/binaryen.js/kitchen-sink.js @@ -669,16 +669,16 @@ function test_core() { module.memory.grow(makeInt32(0)), // GC - module.i31.new( + module.ref.i31( module.i32.const(0) ), module.i31.get_s( - module.i31.new( + module.ref.i31( module.i32.const(1) ) ), module.i31.get_u( - module.i31.new( + module.ref.i31( module.i32.const(2) ) ), diff --git a/test/binaryen.js/kitchen-sink.js.txt b/test/binaryen.js/kitchen-sink.js.txt index ce0150f81..e8cb7e0ab 100644 --- a/test/binaryen.js/kitchen-sink.js.txt +++ b/test/binaryen.js/kitchen-sink.js.txt @@ -2202,20 +2202,20 @@ getExpressionInfo(tuple[3])={"id":14,"type":5,"value":3.7} ) ) (drop - (i31.new + (ref.i31 (i32.const 0) ) ) (drop (i31.get_s - (i31.new + (ref.i31 (i32.const 1) ) ) ) (drop (i31.get_u - (i31.new + (ref.i31 (i32.const 2) ) ) @@ -4306,20 +4306,20 @@ getExpressionInfo(tuple[3])={"id":14,"type":5,"value":3.7} ) ) (drop - (i31.new + (ref.i31 (i32.const 0) ) ) (drop (i31.get_s - (i31.new + (ref.i31 (i32.const 1) ) ) ) (drop (i31.get_u - (i31.new + (ref.i31 (i32.const 2) ) ) |