From 63a042e3a94df7ba3a5c9dde03990a9813fdc366 Mon Sep 17 00:00:00 2001 From: Alon Zakai Date: Tue, 8 Dec 2020 18:55:20 -0800 Subject: [GC] Add basic RTT support (#3432) This adds rtt.canon and rtt.sub together with RTT type support that is necessary for them. Together this lets us test roundtripping the instructions and types. Also fixes a missing traversal over globals in collectHeapTypes, which the example from the GC docs requires, as the RTTs are in globals there. This does not yet add full interpreter support and other things. It disables initial contents on GC in the fuzzer, to avoid the fuzzer breaking. Renames the binary ID for exnref, which is being removed from the spec, and which overlaps with the binary ID for rtt. --- src/wasm/literal.cpp | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/wasm/literal.cpp') diff --git a/src/wasm/literal.cpp b/src/wasm/literal.cpp index b7cf5084e..c19efa225 100644 --- a/src/wasm/literal.cpp +++ b/src/wasm/literal.cpp @@ -60,6 +60,9 @@ Literal::Literal(const Literal& other) : type(other.type) { new (&gcData) std::shared_ptr(other.gcData); } else if (type.isFunction()) { func = other.func; + } else if (type.isRtt()) { + // Nothing to do: Rtts help JITs optimize, but are not used in the + // interpreter yet, and they are opaque to the wasm itself. } else { TODO_SINGLE_COMPOUND(type); switch (type.getBasic()) { -- cgit v1.2.3