| Index: src/compiler/raw-machine-assembler.cc
|
| diff --git a/src/compiler/raw-machine-assembler.cc b/src/compiler/raw-machine-assembler.cc
|
| index 8fd8b5c763059a13e7afcda4eca3fdd135fef286..3bc5db86b67dd526047d887ab55d655d98b501f5 100644
|
| --- a/src/compiler/raw-machine-assembler.cc
|
| +++ b/src/compiler/raw-machine-assembler.cc
|
| @@ -85,6 +85,29 @@ void RawMachineAssembler::Branch(Node* condition, RawMachineLabel* true_val,
|
| current_block_ = nullptr;
|
| }
|
|
|
| +void RawMachineAssembler::BranchIfException(Node* node,
|
| + RawMachineLabel* if_exception) {
|
| + RawMachineLabel success, call, exception;
|
| + DCHECK_NE(schedule()->end(), current_block_);
|
| + DCHECK(!node->op()->HasProperty(Operator::kNoThrow));
|
| +
|
| + Goto(&call);
|
| + Bind(&call);
|
| + schedule()->AddCall(CurrentBlock(), node, Use(&success), Use(&exception));
|
| + current_block_ = nullptr;
|
| +
|
| + Bind(&exception);
|
| + {
|
| + const Operator* op = common()->IfException();
|
| + Node* args[] = {node, node};
|
| + Node* on_exception = MakeNode(op, arraysize(args), args);
|
| + schedule()->AddNode(CurrentBlock(), on_exception);
|
| + Goto(if_exception);
|
| + }
|
| +
|
| + Bind(&success);
|
| +}
|
| +
|
| void RawMachineAssembler::Switch(Node* index, RawMachineLabel* default_label,
|
| const int32_t* case_values,
|
| RawMachineLabel** case_labels,
|
|
|