summaryrefslogtreecommitdiff
path: root/test/binaryen.js
diff options
context:
space:
mode:
authordcode <dcode@dcode.io>2022-08-31 19:53:56 +0200
committerGitHub <noreply@github.com>2022-08-31 10:53:56 -0700
commit0821cd10da9ca81371688e132ed17164f23ea889 (patch)
tree76c0ee016b9ed3c8ed1320c7980ed93ca80b14d8 /test/binaryen.js
parentc74d5eb62e13e11da4352693a76eec405fccd565 (diff)
downloadbinaryen-0821cd10da9ca81371688e132ed17164f23ea889.tar.gz
binaryen-0821cd10da9ca81371688e132ed17164f23ea889.tar.bz2
binaryen-0821cd10da9ca81371688e132ed17164f23ea889.zip
Add remaining GC and string instructions to C API (#4998)
Adds C-API bindings for the following expression classes: RefTest RefCast BrOn with operations BrOnNull, BrOnNonNull, BrOnCast, BrOnCastFail, BrOnFunc, BrOnNonFunc, BrOnData, BrOnNonData, BrOnI31, BrOnNonI31 StructNew with operations StringNewUTF8, StringNewWTF8, StringNewReplace, StringNewWTF16, StringNewUTF8Array, StringNewWTF8Array, StringNewReplaceArray, StringNewWTF16Array StructGet StructSet ArrayNew ArrayInit ArrayGet ArraySet ArrayLen ArrayCopy StringNew StringConst StringMeasure with operations StringMeasureUTF8, StringMeasureWTF8, StringMeasureWTF16, StringMeasureIsUSV, StringMeasureWTF16View StringEncode with operations StringEncodeUTF8, StringEncodeWTF8, StringEncodeWTF16, StringEncodeUTF8Array, StringEncodeWTF8Array, StringEncodeWTF16Array StringConcat StringEq StringAs with operations StringAsWTF8, StringAsWTF16, StringAsIter StringWTF8Advance StringWTF16Get StringIterNext StringIterMove with operations StringIterMoveAdvance, StringIterMoveRewind StringSliceWTF with operations StringSliceWTF8, StringSliceWTF16 StringSliceIter
Diffstat (limited to 'test/binaryen.js')
-rw-r--r--test/binaryen.js/kitchen-sink.js15
-rw-r--r--test/binaryen.js/kitchen-sink.js.txt15
2 files changed, 30 insertions, 0 deletions
diff --git a/test/binaryen.js/kitchen-sink.js b/test/binaryen.js/kitchen-sink.js
index 95c2568e6..61e1c54f5 100644
--- a/test/binaryen.js/kitchen-sink.js
+++ b/test/binaryen.js/kitchen-sink.js
@@ -171,6 +171,21 @@ function test_ids() {
console.log("ArrayGetId: " + binaryen.ArrayGetId);
console.log("ArraySetId: " + binaryen.ArraySetId);
console.log("ArrayLenId: " + binaryen.ArrayLenId);
+ console.log("ArrayCopy: " + binaryen.ArrayCopyId);
+ console.log("RefAs: " + binaryen.RefAsId);
+ console.log("StringNew: " + binaryen.StringNewId);
+ console.log("StringConst: " + binaryen.StringConstId);
+ console.log("StringMeasure: " + binaryen.StringMeasureId);
+ console.log("StringEncode: " + binaryen.StringEncodeId);
+ console.log("StringConcat: " + binaryen.StringConcatId);
+ console.log("StringEq: " + binaryen.StringEqId);
+ console.log("StringAs: " + binaryen.StringAsId);
+ console.log("StringWTF8Advance: " + binaryen.StringWTF8AdvanceId);
+ console.log("StringWTF16Get: " + binaryen.StringWTF16GetId);
+ console.log("StringIterNext: " + binaryen.StringIterNextId);
+ console.log("StringIterMove: " + binaryen.StringIterMoveId);
+ console.log("StringSliceWTF: " + binaryen.StringSliceWTFId);
+ console.log("StringSliceIter: " + binaryen.StringSliceIterId);
}
function test_core() {
diff --git a/test/binaryen.js/kitchen-sink.js.txt b/test/binaryen.js/kitchen-sink.js.txt
index 7d52a31ff..a9209da59 100644
--- a/test/binaryen.js/kitchen-sink.js.txt
+++ b/test/binaryen.js/kitchen-sink.js.txt
@@ -101,6 +101,21 @@ ArrayInitId: 64
ArrayGetId: 65
ArraySetId: 66
ArrayLenId: 67
+ArrayCopy: 68
+RefAs: 69
+StringNew: 70
+StringConst: 71
+StringMeasure: 72
+StringEncode: 73
+StringConcat: 74
+StringEq: 75
+StringAs: 76
+StringWTF8Advance: 77
+StringWTF16Get: 78
+StringIterNext: 79
+StringIterMove: 80
+StringSliceWTF: 81
+StringSliceIter: 82
getExpressionInfo={"id":15,"type":4,"op":6}
(f32.neg
(f32.const -33.61199951171875)