diff options
author | Alon Zakai <azakai@google.com> | 2021-06-17 07:51:11 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-06-17 07:51:11 -0700 |
commit | c36c6fa9e42f4e917864312780ba95fb996eda79 (patch) | |
tree | 1e171bbd8b1a10f09ab14a59bc03b39bbe494c1e /src/wasm-interpreter.h | |
parent | 9d279c08b9f37b6cf2c5a5fac564eee9ea4fb927 (diff) | |
download | binaryen-c36c6fa9e42f4e917864312780ba95fb996eda79.tar.gz binaryen-c36c6fa9e42f4e917864312780ba95fb996eda79.tar.bz2 binaryen-c36c6fa9e42f4e917864312780ba95fb996eda79.zip |
[Wasm GC] rtt.fresh_sub (#3936)
This is the same as rtt.sub, but creates a "new" rtt each time. See
https://docs.google.com/document/d/1DklC3qVuOdLHSXB5UXghM_syCh-4cMinQ50ICiXnK3Q/edit#
The old Literal implementation of rtts becomes a little more complex here,
as it was designed for the original spec where only structure matters. It may
be worth a complete redesign there, but for now as the spec is in flux I think
the approach here is good enough.
Diffstat (limited to 'src/wasm-interpreter.h')
-rw-r--r-- | src/wasm-interpreter.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/wasm-interpreter.h b/src/wasm-interpreter.h index 94230b747..c3148d9c6 100644 --- a/src/wasm-interpreter.h +++ b/src/wasm-interpreter.h @@ -1594,6 +1594,9 @@ public: auto parentValue = parent.getSingleValue(); auto newSupers = std::make_unique<RttSupers>(parentValue.getRttSupers()); newSupers->push_back(parentValue.type); + if (curr->fresh) { + newSupers->back().makeFresh(); + } return Literal(std::move(newSupers), curr->type); } Flow visitStructNew(StructNew* curr) { |