diff options
author | Thomas Lively <7121787+tlively@users.noreply.github.com> | 2022-07-20 20:13:18 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-07-20 20:13:18 -0700 |
commit | da5035f893ce9e046f99cf3ede92b576024aa9da (patch) | |
tree | 9db48e77502a646d74ef1a9d11f9b8f0967ff856 /test/binaryen.js | |
parent | 1c53f7dd29e79bc1894959cad817b22f087689f7 (diff) | |
download | binaryen-da5035f893ce9e046f99cf3ede92b576024aa9da.tar.gz binaryen-da5035f893ce9e046f99cf3ede92b576024aa9da.tar.bz2 binaryen-da5035f893ce9e046f99cf3ede92b576024aa9da.zip |
Remove basic reference types (#4802)
Basic reference types like `Type::funcref`, `Type::anyref`, etc. made it easy to
accidentally forget to handle reference types with the same basic HeapTypes but
the opposite nullability. In principle there is nothing special about the types
with shorthands except in the binary and text formats. Removing these shorthands
from the internal type representation by removing all basic reference types
makes some code more complicated locally, but simplifies code globally and
encourages properly handling both nullable and non-nullable reference types.
Diffstat (limited to 'test/binaryen.js')
-rw-r--r-- | test/binaryen.js/kitchen-sink.js | 18 | ||||
-rw-r--r-- | test/binaryen.js/kitchen-sink.js.txt | 12 |
2 files changed, 0 insertions, 30 deletions
diff --git a/test/binaryen.js/kitchen-sink.js b/test/binaryen.js/kitchen-sink.js index ecfc73bff..6e5e19b2c 100644 --- a/test/binaryen.js/kitchen-sink.js +++ b/test/binaryen.js/kitchen-sink.js @@ -68,24 +68,6 @@ function test_types() { console.log(" // BinaryenTypeVec128: " + binaryen.v128); console.log(" //", binaryen.expandType(binaryen.v128).join(",")); - console.log(" // BinaryenTypeFuncref: " + binaryen.funcref); - console.log(" //", binaryen.expandType(binaryen.funcref).join(",")); - - console.log(" // BinaryenTypeExternref: " + binaryen.externref); - console.log(" //", binaryen.expandType(binaryen.externref).join(",")); - - console.log(" // BinaryenTypeAnyref: " + binaryen.anyref); - console.log(" //", binaryen.expandType(binaryen.anyref).join(",")); - - console.log(" // BinaryenTypeEqref: " + binaryen.eqref); - console.log(" //", binaryen.expandType(binaryen.eqref).join(",")); - - console.log(" // BinaryenTypeI31ref: " + binaryen.i31ref); - console.log(" //", binaryen.expandType(binaryen.i31ref).join(",")); - - console.log(" // BinaryenTypeDataref: " + binaryen.dataref); - console.log(" //", binaryen.expandType(binaryen.dataref).join(",")); - console.log(" // BinaryenTypeAuto: " + binaryen.auto); var i32_pair = binaryen.createType([binaryen.i32, binaryen.i32]); diff --git a/test/binaryen.js/kitchen-sink.js.txt b/test/binaryen.js/kitchen-sink.js.txt index 36b5c6749..f5b77234d 100644 --- a/test/binaryen.js/kitchen-sink.js.txt +++ b/test/binaryen.js/kitchen-sink.js.txt @@ -12,18 +12,6 @@ // 5 // BinaryenTypeVec128: 6 // 6 - // BinaryenTypeFuncref: 7 - // 7 - // BinaryenTypeExternref: 8 - // 8 - // BinaryenTypeAnyref: 8 - // 8 - // BinaryenTypeEqref: 9 - // 9 - // BinaryenTypeI31ref: 10 - // 10 - // BinaryenTypeDataref: 11 - // 11 // BinaryenTypeAuto: -1 // 2,2 // 2,2 |