summaryrefslogtreecommitdiff
path: root/src/wasm-delegations-fields.def
diff options
context:
space:
mode:
authorThomas Lively <tlively@google.com>2023-01-09 16:23:57 -0600
committerGitHub <noreply@github.com>2023-01-09 14:23:57 -0800
commit67abc2a1b9adcdf080387a29e0c92b6f5a31057a (patch)
treed8e8304e9ecdd700b56b949bb5132b26e09362f4 /src/wasm-delegations-fields.def
parente3d9b82d9f8910063373e2952582de545659d448 (diff)
downloadbinaryen-67abc2a1b9adcdf080387a29e0c92b6f5a31057a.tar.gz
binaryen-67abc2a1b9adcdf080387a29e0c92b6f5a31057a.tar.bz2
binaryen-67abc2a1b9adcdf080387a29e0c92b6f5a31057a.zip
Replace `RefIs` with `RefIsNull` (#5401)
* Replace `RefIs` with `RefIsNull` The other `ref.is*` instructions are deprecated and expressible in terms of `ref.test`. Update binary and text parsing to parse those instructions as `RefTest` expressions. Also update the printing and emitting of `RefTest` expressions to emit the legacy instructions for now to minimize test changes and make this a mostly non-functional change. Since `ref.is_null` is the only `RefIs` instruction left, remove the `RefIsOp` field and rename the expression class to `RefIsNull`. The few test changes are due to the fact that `ref.is*` instructions are now subject to `ref.test` validation, and in particular it is no longer valid to perform a `ref.is_func` on a value outside of the `func` type hierarchy.
Diffstat (limited to 'src/wasm-delegations-fields.def')
-rw-r--r--src/wasm-delegations-fields.def9
1 files changed, 4 insertions, 5 deletions
diff --git a/src/wasm-delegations-fields.def b/src/wasm-delegations-fields.def
index f929def4a..019cdbc0d 100644
--- a/src/wasm-delegations-fields.def
+++ b/src/wasm-delegations-fields.def
@@ -491,11 +491,10 @@ switch (DELEGATE_ID) {
DELEGATE_END(RefNull);
break;
}
- case Expression::Id::RefIsId: {
- DELEGATE_START(RefIs);
- DELEGATE_FIELD_INT(RefIs, op);
- DELEGATE_FIELD_CHILD(RefIs, value);
- DELEGATE_END(RefIs);
+ case Expression::Id::RefIsNullId: {
+ DELEGATE_START(RefIsNull);
+ DELEGATE_FIELD_CHILD(RefIsNull, value);
+ DELEGATE_END(RefIsNull);
break;
}
case Expression::Id::RefFuncId: {