summaryrefslogtreecommitdiff
path: root/src/wasm-interpreter.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/wasm-interpreter.h')
-rw-r--r--src/wasm-interpreter.h10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/wasm-interpreter.h b/src/wasm-interpreter.h
index afc193f71..75f2a8338 100644
--- a/src/wasm-interpreter.h
+++ b/src/wasm-interpreter.h
@@ -1785,16 +1785,16 @@ public:
}
const auto& value = flow.getSingleValue();
NOTE_EVAL1(value);
- if (value.isNull()) {
- trap("null ref");
- }
switch (curr->op) {
case RefAsNonNull:
- // We've already checked for a null.
+ if (value.isNull()) {
+ trap("null ref");
+ }
return value;
case ExternInternalize:
+ return value.internalize();
case ExternExternalize:
- WASM_UNREACHABLE("unimplemented extern conversion");
+ return value.externalize();
}
WASM_UNREACHABLE("unimplemented ref.as_*");
}