Chromium Code Reviews| Index: src/wasm/wasm-opcodes.cc |
| diff --git a/src/wasm/wasm-opcodes.cc b/src/wasm/wasm-opcodes.cc |
| index a08fa8dbe6bc458f6ea0993881ed0f20d6bb9491..7d4e82f79e6b9b48f830fd8cb81f6b0f2112d2eb 100644 |
| --- a/src/wasm/wasm-opcodes.cc |
| +++ b/src/wasm/wasm-opcodes.cc |
| @@ -79,6 +79,20 @@ static void InitSigTable() { |
| #undef SET_SIG_TABLE |
| } |
| +bool WasmOpcodes::IsSimd(WasmOpcode opcode) { |
|
titzer
2016/05/19 09:43:27
Could we make this into a range check instead of a
gdeepti
2016/07/01 22:24:48
Converted to a prefix check.
|
| + switch (opcode) { |
| +#define IS_SIMD_OPCODE(name, opcode, sig) \ |
| + case kExpr##name: \ |
| + if (kExpr##name == opcode) { \ |
|
titzer
2016/05/19 09:43:27
The if here is redundant.
gdeepti
2016/07/01 22:24:48
Function now removed.
|
| + return true; \ |
| + } |
| + FOREACH_SIMD_OPCODE(IS_SIMD_OPCODE) |
| +#undef IS_SIMD_OPCODE |
| + default: |
| + return false; |
| + } |
| +} |
| + |
| class SigTable { |
| public: |
| SigTable() { |