summaryrefslogtreecommitdiff
path: root/test/example
diff options
context:
space:
mode:
Diffstat (limited to 'test/example')
-rw-r--r--test/example/c-api-kitchen-sink.c11
-rw-r--r--test/example/c-api-kitchen-sink.txt17
-rw-r--r--test/example/typeinfo.cpp13
-rw-r--r--test/example/typeinfo.txt5
4 files changed, 5 insertions, 41 deletions
diff --git a/test/example/c-api-kitchen-sink.c b/test/example/c-api-kitchen-sink.c
index 58b1e00aa..d70ad11eb 100644
--- a/test/example/c-api-kitchen-sink.c
+++ b/test/example/c-api-kitchen-sink.c
@@ -205,12 +205,6 @@ void test_types() {
BinaryenTypeExpand(externref, &valueType);
assert(valueType == externref);
- BinaryenType exnref = BinaryenTypeExnref();
- printf(" // BinaryenTypeExnref: %d\n", exnref);
- assert(BinaryenTypeArity(exnref) == 1);
- BinaryenTypeExpand(exnref, &valueType);
- assert(valueType == exnref);
-
BinaryenType anyref = BinaryenTypeAnyref();
printf(" // BinaryenTypeAnyref: %d\n", anyref);
assert(BinaryenTypeArity(anyref) == 1);
@@ -312,7 +306,6 @@ void test_core() {
BinaryenExpressionRef funcrefExpr = BinaryenRefNull(module, BinaryenTypeFuncref());
funcrefExpr =
BinaryenRefFunc(module, "kitchen()sinker", BinaryenTypeFuncref());
- BinaryenExpressionRef exnrefExpr = BinaryenRefNull(module, BinaryenTypeExnref());
BinaryenExpressionRef i31refExpr = BinaryenI31New(module, makeInt32(module, 1));
// Events
@@ -713,7 +706,6 @@ void test_core() {
// Reference types
BinaryenRefIsNull(module, externrefExpr),
BinaryenRefIsNull(module, funcrefExpr),
- BinaryenRefIsNull(module, exnrefExpr),
BinaryenSelect(
module,
temp10,
@@ -750,7 +742,6 @@ void test_core() {
BinaryenPop(module, BinaryenTypeFloat64()),
BinaryenPop(module, BinaryenTypeFuncref()),
BinaryenPop(module, BinaryenTypeExternref()),
- BinaryenPop(module, BinaryenTypeExnref()),
BinaryenPop(module, iIfF),
// Memory
BinaryenMemorySize(module),
@@ -780,7 +771,7 @@ void test_core() {
BinaryenBlock(module, "the-body", bodyList, 2, BinaryenTypeAuto());
// Create the function
- BinaryenType localTypes[] = {BinaryenTypeInt32(), BinaryenTypeExnref()};
+ BinaryenType localTypes[] = {BinaryenTypeInt32(), BinaryenTypeExternref()};
BinaryenFunctionRef sinker = BinaryenAddFunction(
module, "kitchen()sinker", iIfF, BinaryenTypeInt32(), localTypes, 2, body);
diff --git a/test/example/c-api-kitchen-sink.txt b/test/example/c-api-kitchen-sink.txt
index 90634550b..350c5555f 100644
--- a/test/example/c-api-kitchen-sink.txt
+++ b/test/example/c-api-kitchen-sink.txt
@@ -7,10 +7,9 @@
// BinaryenTypeVec128: 6
// BinaryenTypeFuncref: 7
// BinaryenTypeExternref: 8
- // BinaryenTypeExnref: 9
- // BinaryenTypeAnyref: 10
- // BinaryenTypeEqref: 11
- // BinaryenTypeI31ref: 13
+ // BinaryenTypeAnyref: 9
+ // BinaryenTypeEqref: 10
+ // BinaryenTypeI31ref: 12
// BinaryenTypeAuto: -1
BinaryenFeatureMVP: 0
BinaryenFeatureAtomics: 1
@@ -48,7 +47,7 @@ BinaryenFeatureAll: 8191
(start $starter)
(func "$kitchen()sinker" (param $0 i32) (param $1 i64) (param $2 f32) (param $3 f64) (result i32)
(local $4 i32)
- (local $5 exnref)
+ (local $5 externref)
(block $the-body (result i32)
(block $the-nothing
(drop
@@ -1748,11 +1747,6 @@ BinaryenFeatureAll: 8191
)
)
(drop
- (ref.is_null
- (ref.null exn)
- )
- )
- (drop
(select (result funcref)
(ref.null func)
(ref.func "$kitchen()sinker")
@@ -1837,9 +1831,6 @@ BinaryenFeatureAll: 8191
(pop externref)
)
(drop
- (pop exnref)
- )
- (drop
(pop i32 i64 f32 f64)
)
(drop
diff --git a/test/example/typeinfo.cpp b/test/example/typeinfo.cpp
index 729d57925..94d7c2317 100644
--- a/test/example/typeinfo.cpp
+++ b/test/example/typeinfo.cpp
@@ -25,14 +25,6 @@ void test_compound() {
assert(Type(extern_, NonNullable).getID() ==
Type(sameExtern, NonNullable).getID());
- HeapType exn(HeapType::exn);
- assert(Type(exn, Nullable).getID() == Type::exnref);
- assert(Type(exn, NonNullable).getID() == Type(exn, NonNullable).getID());
- assert(Type(exn, NonNullable).getID() != Type(exn, Nullable).getID());
- HeapType sameExn(HeapType::exn);
- assert(Type(exn, NonNullable).getID() ==
- Type(sameExn, NonNullable).getID());
-
HeapType any(HeapType::any);
assert(Type(any, Nullable).getID() == Type::anyref);
assert(Type(any, NonNullable).getID() == Type(any, NonNullable).getID());
@@ -160,9 +152,6 @@ void test_printing() {
std::cout << HeapType(HeapType::i31) << "\n";
std::cout << Type(HeapType::i31, Nullable) << "\n";
std::cout << Type(HeapType::i31, NonNullable) << "\n";
- std::cout << HeapType(HeapType::exn) << "\n";
- std::cout << Type(HeapType::exn, Nullable) << "\n";
- std::cout << Type(HeapType::exn, NonNullable) << "\n";
std::cout << HeapType(Signature(Type::none, Type::none)) << "\n";
std::cout << HeapType(Struct({})) << "\n";
std::cout << HeapType(Array({Type::i32, Immutable})) << "\n";
@@ -231,8 +220,6 @@ void test_printing() {
std::cout << Type(Rtt(3, HeapType::eq)) << "\n";
std::cout << Rtt(4, HeapType::i31) << "\n";
std::cout << Type(Rtt(4, HeapType::i31)) << "\n";
- std::cout << Rtt(5, HeapType::exn) << "\n";
- std::cout << Type(Rtt(5, HeapType::exn)) << "\n";
Rtt signatureRtt(6, Signature(Type::none, Type::none));
std::cout << signatureRtt << "\n";
std::cout << Type(signatureRtt) << "\n";
diff --git a/test/example/typeinfo.txt b/test/example/typeinfo.txt
index 4ba628925..c205ce431 100644
--- a/test/example/typeinfo.txt
+++ b/test/example/typeinfo.txt
@@ -14,9 +14,6 @@ eqref
i31
(ref null i31)
i31ref
-exn
-exnref
-(ref exn)
(func)
(struct)
(array i32)
@@ -62,8 +59,6 @@ none
(rtt 3 eq)
(rtt 4 i31)
(rtt 4 i31)
-(rtt 5 exn)
-(rtt 5 exn)
(rtt 6 (func))
(rtt 6 (func))
(rtt 7 (struct))