| Index: src/compiler/common-operator.cc
|
| diff --git a/src/compiler/common-operator.cc b/src/compiler/common-operator.cc
|
| index 874ad29cef7d9efa7129fcd92e55333755159a1a..f716109c04bc5b9af5a212a8ad05f9d33b2ca5a7 100644
|
| --- a/src/compiler/common-operator.cc
|
| +++ b/src/compiler/common-operator.cc
|
| @@ -105,7 +105,6 @@ std::ostream& operator<<(std::ostream& os, ParameterInfo const& i) {
|
| V(IfTrue, Operator::kKontrol, 0, 0, 1, 0, 0, 1) \
|
| V(IfFalse, Operator::kKontrol, 0, 0, 1, 0, 0, 1) \
|
| V(IfSuccess, Operator::kKontrol, 0, 0, 1, 0, 0, 1) \
|
| - V(IfException, Operator::kKontrol, 0, 0, 1, 1, 0, 1) \
|
| V(IfDefault, Operator::kKontrol, 0, 0, 1, 0, 0, 1) \
|
| V(Throw, Operator::kKontrol, 1, 1, 1, 0, 0, 1) \
|
| V(Deoptimize, Operator::kNoThrow, 1, 1, 1, 0, 0, 1) \
|
| @@ -210,6 +209,18 @@ struct CommonOperatorGlobalCache final {
|
| CACHED_OP_LIST(CACHED)
|
| #undef CACHED
|
|
|
| + template <bool kCaughtLocally>
|
| + struct IfExceptionOperator final : public Operator1<bool> {
|
| + IfExceptionOperator()
|
| + : Operator1<bool>( // --
|
| + IrOpcode::kIfException, Operator::kKontrol, // opcode
|
| + "IfException", // name
|
| + 0, 0, 1, 1, 0, 1, // counts
|
| + kCaughtLocally) {} // parameter
|
| + };
|
| + IfExceptionOperator<false> kLocallyUncaugthIfExceptionOperator;
|
| + IfExceptionOperator<true> kLocallyCaugthIfExceptionOperator;
|
| +
|
| template <size_t kInputCount>
|
| struct EndOperator final : public Operator {
|
| EndOperator()
|
| @@ -385,6 +396,17 @@ const Operator* CommonOperatorBuilder::Branch(BranchHint hint) {
|
| }
|
|
|
|
|
| +const Operator* CommonOperatorBuilder::IfException(bool locally_caught) {
|
| + if (locally_caught) {
|
| + return &cache_.kLocallyCaugthIfExceptionOperator;
|
| + } else {
|
| + return &cache_.kLocallyUncaugthIfExceptionOperator;
|
| + }
|
| + UNREACHABLE();
|
| + return nullptr;
|
| +}
|
| +
|
| +
|
| const Operator* CommonOperatorBuilder::Switch(size_t control_output_count) {
|
| DCHECK_GE(control_output_count, 3u); // Disallow trivial switches.
|
| return new (zone()) Operator( // --
|
|
|