diff options
author | Alon Zakai <azakai@google.com> | 2021-10-08 12:48:53 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-10-08 12:48:53 -0700 |
commit | 562250e14af4f74911b5f8510ca3c5774c9b1e1c (patch) | |
tree | 697710519fbd6e7bd7ae346050ca0cdcc2fa85a5 /src/passes/Print.cpp | |
parent | c2fa907f010b6418e5cbfc3c5baface3c0898062 (diff) | |
download | binaryen-562250e14af4f74911b5f8510ca3c5774c9b1e1c.tar.gz binaryen-562250e14af4f74911b5f8510ca3c5774c9b1e1c.tar.bz2 binaryen-562250e14af4f74911b5f8510ca3c5774c9b1e1c.zip |
Emit heap types for call_indirect that match the table (#4221)
See #4220 - this lets us handle the common case for now of simply having
an identical heap type to the table when the signature is identical.
With this PR, #4207's optimization of call_ref + table.get into
call_indirect now leads to a binary that works in V8 in nominal mode.
Diffstat (limited to 'src/passes/Print.cpp')
-rw-r--r-- | src/passes/Print.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/passes/Print.cpp b/src/passes/Print.cpp index a5db73132..bea704b1d 100644 --- a/src/passes/Print.cpp +++ b/src/passes/Print.cpp @@ -435,7 +435,9 @@ struct PrintExpressionContents o << '('; printMinor(o, "type "); - TypeNamePrinter(o, wasm).print(HeapType(curr->sig)); + + TypeNamePrinter(o, wasm).print(curr->getHeapType(wasm)); + o << ')'; } void visitLocalGet(LocalGet* curr) { |