Commit c5b46fd3 authored by Loo Rong Jie's avatar Loo Rong Jie Committed by Commit Bot

[wasm] Pull return true out of macro

Change-Id: I7fd794342a13718059b47ea25c26d850ed2da509
Reviewed-on: https://chromium-review.googlesource.com/564189Reviewed-by: 's avatarClemens Hammacher <clemensh@chromium.org>
Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#46506}
parent 5359d868
...@@ -248,11 +248,10 @@ const char* WasmOpcodes::OpcodeName(WasmOpcode opcode) { ...@@ -248,11 +248,10 @@ const char* WasmOpcodes::OpcodeName(WasmOpcode opcode) {
bool WasmOpcodes::IsPrefixOpcode(WasmOpcode opcode) { bool WasmOpcodes::IsPrefixOpcode(WasmOpcode opcode) {
switch (opcode) { switch (opcode) {
#define CHECK_PREFIX(name, opcode) \ #define CHECK_PREFIX(name, opcode) case k##name##Prefix:
case k##name##Prefix: \
return true;
FOREACH_PREFIX(CHECK_PREFIX) FOREACH_PREFIX(CHECK_PREFIX)
#undef CHECK_PREFIX #undef CHECK_PREFIX
return true;
default: default:
return false; return false;
} }
...@@ -260,11 +259,10 @@ bool WasmOpcodes::IsPrefixOpcode(WasmOpcode opcode) { ...@@ -260,11 +259,10 @@ bool WasmOpcodes::IsPrefixOpcode(WasmOpcode opcode) {
bool WasmOpcodes::IsControlOpcode(WasmOpcode opcode) { bool WasmOpcodes::IsControlOpcode(WasmOpcode opcode) {
switch (opcode) { switch (opcode) {
#define CHECK_OPCODE(name, opcode, _) \ #define CHECK_OPCODE(name, opcode, _) case kExpr##name:
case kExpr##name: \
return true;
FOREACH_CONTROL_OPCODE(CHECK_OPCODE) FOREACH_CONTROL_OPCODE(CHECK_OPCODE)
#undef CHECK_OPCODE #undef CHECK_OPCODE
return true;
default: default:
return false; return false;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment