| Index: src/wasm/wasm-interpreter.h
|
| diff --git a/src/wasm/wasm-interpreter.h b/src/wasm/wasm-interpreter.h
|
| index f4adf378efc1bf30edbc3c40b03ca827efd59ab9..80e6c4ba79a8fa147088a6ab16971b6dd2e4f88d 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:
|
|
|