summaryrefslogtreecommitdiff
path: root/src/passes/Print.cpp
diff options
context:
space:
mode:
authorThomas Lively <tlively@google.com>2022-10-18 13:54:22 -0500
committerGitHub <noreply@github.com>2022-10-18 13:54:22 -0500
commit8377174c3bb56b58cda054b3210799439004e229 (patch)
tree0d172db76ef1409b4c2e4134a39e1418dfbb52fc /src/passes/Print.cpp
parent6bef18672fae68ee4976a7b26f277f6caa32734f (diff)
downloadbinaryen-8377174c3bb56b58cda054b3210799439004e229.tar.gz
binaryen-8377174c3bb56b58cda054b3210799439004e229.tar.bz2
binaryen-8377174c3bb56b58cda054b3210799439004e229.zip
Parse and emit `array.len` without a type annotation (#5151)
Test that we can still parse the old annotated form as well.
Diffstat (limited to 'src/passes/Print.cpp')
-rw-r--r--src/passes/Print.cpp9
1 files changed, 1 insertions, 8 deletions
diff --git a/src/passes/Print.cpp b/src/passes/Print.cpp
index 0f4a314ae..d0f19f78e 100644
--- a/src/passes/Print.cpp
+++ b/src/passes/Print.cpp
@@ -2236,14 +2236,7 @@ struct PrintExpressionContents
printMedium(o, "array.set ");
TypeNamePrinter(o, wasm).print(curr->ref->type.getHeapType());
}
- void visitArrayLen(ArrayLen* curr) {
- printMedium(o, "array.len ");
- if (curr->ref->type == Type::unreachable) {
- TypeNamePrinter(o, wasm).print(HeapType::array);
- } else {
- TypeNamePrinter(o, wasm).print(curr->ref->type.getHeapType());
- }
- }
+ void visitArrayLen(ArrayLen* curr) { printMedium(o, "array.len"); }
void visitArrayCopy(ArrayCopy* curr) {
if (printUnreachableOrNullReplacement(curr->srcRef) ||
printUnreachableOrNullReplacement(curr->destRef)) {