summaryrefslogtreecommitdiff
path: root/src/passes/Print.cpp
diff options
context:
space:
mode:
authorThomas Lively <tlively@google.com>2023-01-10 15:05:56 -0600
committerGitHub <noreply@github.com>2023-01-10 13:05:56 -0800
commit31171ca083c7a4d1394ad7812369d385e1dd38a0 (patch)
tree51d6691faf64fdd266ca31acb5b66295a53d9cc5 /src/passes/Print.cpp
parent36e2abbcdd22b2b1707757b49fb4ac8844f28e5d (diff)
downloadbinaryen-31171ca083c7a4d1394ad7812369d385e1dd38a0.tar.gz
binaryen-31171ca083c7a4d1394ad7812369d385e1dd38a0.tar.bz2
binaryen-31171ca083c7a4d1394ad7812369d385e1dd38a0.zip
[Wasm GC] Replace `HeapType::data` with `HeapType::struct_` (#5416)
`struct` has replaced `data` in the upstream spec, so update Binaryen's types to match. We had already supported `struct` as an alias for data, but now remove support for `data` entirely. Also remove instructions like `ref.is_data` that are deprecated and do not make sense without a `data` type.
Diffstat (limited to 'src/passes/Print.cpp')
-rw-r--r--src/passes/Print.cpp18
1 files changed, 2 insertions, 16 deletions
diff --git a/src/passes/Print.cpp b/src/passes/Print.cpp
index e0d9a46a3..38e88fde5 100644
--- a/src/passes/Print.cpp
+++ b/src/passes/Print.cpp
@@ -105,8 +105,8 @@ bool maybePrintRefShorthand(std::ostream& o, Type type) {
case HeapType::i31:
o << "i31ref";
return true;
- case HeapType::data:
- o << "dataref";
+ case HeapType::struct_:
+ o << "structref";
return true;
case HeapType::array:
o << "arrayref";
@@ -2099,9 +2099,6 @@ struct PrintExpressionContents
case HeapType::func:
printMedium(o, "ref.is_func");
return;
- case HeapType::data:
- printMedium(o, "ref.is_data");
- return;
case HeapType::i31:
printMedium(o, "ref.is_i31");
return;
@@ -2129,9 +2126,6 @@ struct PrintExpressionContents
case HeapType::func:
printMedium(o, "ref.as_func");
return;
- case HeapType::data:
- printMedium(o, "ref.as_data");
- return;
case HeapType::i31:
printMedium(o, "ref.as_i31");
return;
@@ -2167,10 +2161,6 @@ struct PrintExpressionContents
printMedium(o, "br_on_func ");
printName(curr->name, o);
return;
- case HeapType::data:
- printMedium(o, "br_on_data ");
- printName(curr->name, o);
- return;
case HeapType::i31:
printMedium(o, "br_on_i31 ");
printName(curr->name, o);
@@ -2196,10 +2186,6 @@ struct PrintExpressionContents
printMedium(o, "br_on_non_func ");
printName(curr->name, o);
return;
- case HeapType::data:
- printMedium(o, "br_on_non_data ");
- printName(curr->name, o);
- return;
case HeapType::i31:
printMedium(o, "br_on_non_i31 ");
printName(curr->name, o);