diff options
author | Jérôme Vouillon <jerome.vouillon@gmail.com> | 2024-07-08 16:23:00 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-07-08 20:23:00 +0000 |
commit | 81f8f770a1b2adc027cbbbd981781d2ee6952e54 (patch) | |
tree | 11df952c2b2da03fb5ad5a3d75b64a060df1a130 /src/ir/properties.h | |
parent | 9792f2c1fd311c3ffd2036288c6e7614a0486481 (diff) | |
download | binaryen-81f8f770a1b2adc027cbbbd981781d2ee6952e54.tar.gz binaryen-81f8f770a1b2adc027cbbbd981781d2ee6952e54.tar.bz2 binaryen-81f8f770a1b2adc027cbbbd981781d2ee6952e54.zip |
Rename external conversion instructions (#6716)
Rename instructions `extern.internalize` into `any.convert_extern` and
`extern.externalize` into `extern.convert_any` to follow more closely
the spec. This was changed in
https://github.com/WebAssembly/gc/issues/432.
The legacy name is still accepted in text inputs and in the C and JS
APIs.
Diffstat (limited to 'src/ir/properties.h')
-rw-r--r-- | src/ir/properties.h | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/ir/properties.h b/src/ir/properties.h index 4b73b7211..ccb2392b0 100644 --- a/src/ir/properties.h +++ b/src/ir/properties.h @@ -83,7 +83,7 @@ inline bool isNamedControlFlow(Expression* curr) { // isValidInConstantExpression or find better names(#4845) inline bool isSingleConstantExpression(const Expression* curr) { if (auto* refAs = curr->dynCast<RefAs>()) { - if (refAs->op == ExternExternalize || refAs->op == ExternInternalize) { + if (refAs->op == ExternConvertAny || refAs->op == AnyConvertExtern) { return isSingleConstantExpression(refAs->value); } } @@ -124,9 +124,9 @@ inline Literal getLiteral(const Expression* curr) { } else if (auto* s = curr->dynCast<StringConst>()) { return Literal(s->string.toString()); } else if (auto* r = curr->dynCast<RefAs>()) { - if (r->op == ExternExternalize) { + if (r->op == ExternConvertAny) { return getLiteral(r->value).externalize(); - } else if (r->op == ExternInternalize) { + } else if (r->op == AnyConvertExtern) { return getLiteral(r->value).internalize(); } } @@ -329,7 +329,7 @@ inline Expression** getImmediateFallthroughPtr( // Extern conversions are not casts and actually produce new values. // Treating them as fallthroughs would lead to misoptimizations of // subsequent casts. - if (as->op != ExternInternalize && as->op != ExternExternalize) { + if (as->op != AnyConvertExtern && as->op != ExternConvertAny) { return &as->value; } } else if (auto* br = curr->dynCast<BrOn>()) { |