Index: src/wasm/wasm-interpreter.h |
diff --git a/src/wasm/wasm-interpreter.h b/src/wasm/wasm-interpreter.h |
index 217c8b37f0bf8cca7702000b8ef7f142ab07bfc6..87758bdd24f352c7a7158aa517afa140308b1c40 100644 |
--- a/src/wasm/wasm-interpreter.h |
+++ b/src/wasm/wasm-interpreter.h |
@@ -56,13 +56,22 @@ struct WasmVal { |
#undef DECLARE_CONSTRUCTOR |
template <typename T> |
- T to() { |
+ inline T to() { |
+ UNREACHABLE(); |
+ } |
+ |
+ template <typename T> |
+ inline T to_unchecked() { |
UNREACHABLE(); |
} |
}; |
#define DECLARE_CAST(field, localtype, ctype) \ |
template <> \ |
+ inline ctype WasmVal::to_unchecked() { \ |
+ return val.field; \ |
+ } \ |
+ template <> \ |
inline ctype WasmVal::to() { \ |
CHECK_EQ(localtype, type); \ |
return val.field; \ |
@@ -70,11 +79,6 @@ struct WasmVal { |
FOREACH_UNION_MEMBER(DECLARE_CAST) |
#undef DECLARE_CAST |
-template <> |
-inline void WasmVal::to() { |
- CHECK_EQ(kWasmStmt, type); |
-} |
- |
// Representation of frames within the interpreter. |
class WasmFrame { |
public: |