Commit 2a226292 authored by Clemens Hammacher's avatar Clemens Hammacher Committed by Commit Bot

[wasm] [cleanup] Mark {UnsupportedOpcode} as noreturn

This allows us to just call this method without returning dummy
{nullptr} values or even calling {graph()->NewNode()} afterwards.

R=ahaas@chromium.org
BUG=v8:6474

Change-Id: I6c03eb639dfb635ce791e7d3a731d9dfdf7800a8
Reviewed-on: https://chromium-review.googlesource.com/529308
Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
Reviewed-by: 's avatarAndreas Haas <ahaas@chromium.org>
Cr-Commit-Position: refs/heads/master@{#45840}
parent 0a355777
......@@ -45,16 +45,15 @@
#define WASM_64 0
#endif
#define FATAL_UNSUPPORTED_OPCODE(opcode) \
V8_Fatal(__FILE__, __LINE__, "Unsupported opcode #%d:%s", (opcode), \
wasm::WasmOpcodes::OpcodeName(opcode));
namespace v8 {
namespace internal {
namespace compiler {
namespace {
const Operator* UnsupportedOpcode(wasm::WasmOpcode opcode) {
V8_Fatal(__FILE__, __LINE__, "Unsupported opcode #%d:%s", opcode,
wasm::WasmOpcodes::OpcodeName(opcode));
return nullptr;
}
void MergeControlToEnd(JSGraph* jsgraph, Node* node) {
Graph* g = jsgraph->graph();
......@@ -585,7 +584,7 @@ Node* WasmGraphBuilder::Binop(wasm::WasmOpcode opcode, Node* left, Node* right,
case wasm::kExprF64AsmjsStoreMem:
return BuildAsmjsStoreMem(MachineType::Float64(), left, right);
default:
op = UnsupportedOpcode(opcode);
FATAL_UNSUPPORTED_OPCODE(opcode);
}
return graph()->NewNode(op, left, right);
}
......@@ -846,7 +845,7 @@ Node* WasmGraphBuilder::Unop(wasm::WasmOpcode opcode, Node* input,
case wasm::kExprF64AsmjsLoadMem:
return BuildAsmjsLoadMem(MachineType::Float64(), input);
default:
op = UnsupportedOpcode(opcode);
FATAL_UNSUPPORTED_OPCODE(opcode);
}
return graph()->NewNode(op, input);
}
......@@ -3502,7 +3501,7 @@ Node* WasmGraphBuilder::SimdOp(wasm::WasmOpcode opcode,
case wasm::kExprS1x16AllTrue:
return graph()->NewNode(jsgraph()->machine()->S1x16AllTrue(), inputs[0]);
default:
return graph()->NewNode(UnsupportedOpcode(opcode));
FATAL_UNSUPPORTED_OPCODE(opcode);
}
}
......@@ -3535,7 +3534,7 @@ Node* WasmGraphBuilder::SimdLaneOp(wasm::WasmOpcode opcode, uint8_t lane,
return graph()->NewNode(jsgraph()->machine()->I8x16ReplaceLane(lane),
inputs[0], inputs[1]);
default:
return graph()->NewNode(UnsupportedOpcode(opcode));
FATAL_UNSUPPORTED_OPCODE(opcode);
}
}
......@@ -3568,7 +3567,7 @@ Node* WasmGraphBuilder::SimdShiftOp(wasm::WasmOpcode opcode, uint8_t shift,
return graph()->NewNode(jsgraph()->machine()->I8x16ShrU(shift),
inputs[0]);
default:
return graph()->NewNode(UnsupportedOpcode(opcode));
FATAL_UNSUPPORTED_OPCODE(opcode);
}
}
......
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