diff options
Diffstat (limited to 'src/wasm/wasm.cpp')
-rw-r--r-- | src/wasm/wasm.cpp | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/src/wasm/wasm.cpp b/src/wasm/wasm.cpp index cbf573950..20f3ec843 100644 --- a/src/wasm/wasm.cpp +++ b/src/wasm/wasm.cpp @@ -1083,7 +1083,15 @@ void CallRef::finalize(Type type_) { // TODO (gc): rtt.canon // TODO (gc): rtt.sub // TODO (gc): struct.new -// TODO (gc): struct.get + +void StructGet::finalize() { + if (value->type == Type::unreachable) { + type = Type::unreachable; + } else { + type = value->type.getHeapType().getStruct().fields[index].type; + } +} + // TODO (gc): struct.set // TODO (gc): array.new // TODO (gc): array.get |