| Index: src/compiler/common-operator.h
|
| diff --git a/src/compiler/common-operator.h b/src/compiler/common-operator.h
|
| index c5a8d7ee691a40e5f54c7b5960237521dfe169f0..31c3d129e2257a8b553a6955e1a09333b1d99246 100644
|
| --- a/src/compiler/common-operator.h
|
| +++ b/src/compiler/common-operator.h
|
| @@ -23,6 +23,16 @@ struct CommonOperatorBuilderImpl;
|
| class Operator;
|
|
|
|
|
| +// Prediction hint for branches.
|
| +enum class BranchHint : uint8_t { kNone, kTrue, kFalse };
|
| +
|
| +inline size_t hash_value(BranchHint hint) { return static_cast<size_t>(hint); }
|
| +
|
| +std::ostream& operator<<(std::ostream&, BranchHint);
|
| +
|
| +BranchHint BranchHintOf(const Operator* const);
|
| +
|
| +
|
| // Flag that describes how to combine the current environment with
|
| // the output of a node to obtain a framestate for lazy bailout.
|
| class OutputFrameStateCombine {
|
| @@ -57,6 +67,10 @@ class OutputFrameStateCombine {
|
| return kind_ == kPushOutput && parameter_ == 0;
|
| }
|
|
|
| + size_t ConsumedOutputCount() const {
|
| + return kind_ == kPushOutput ? GetPushCount() : 1;
|
| + }
|
| +
|
| bool operator==(OutputFrameStateCombine const& other) const {
|
| return kind_ == other.kind_ && parameter_ == other.parameter_;
|
| }
|
| @@ -117,16 +131,17 @@ std::ostream& operator<<(std::ostream&, FrameStateCallInfo const&);
|
|
|
| // Interface for building common operators that can be used at any level of IR,
|
| // including JavaScript, mid-level, and low-level.
|
| -class CommonOperatorBuilder FINAL {
|
| +class CommonOperatorBuilder FINAL : public ZoneObject {
|
| public:
|
| explicit CommonOperatorBuilder(Zone* zone);
|
|
|
| const Operator* Dead();
|
| const Operator* End();
|
| - const Operator* Branch();
|
| + const Operator* Branch(BranchHint = BranchHint::kNone);
|
| const Operator* IfTrue();
|
| const Operator* IfFalse();
|
| const Operator* Throw();
|
| + const Operator* Terminate(int effects);
|
| const Operator* Return();
|
|
|
| const Operator* Start(int num_formal_parameters);
|
| @@ -159,6 +174,8 @@ class CommonOperatorBuilder FINAL {
|
|
|
| const CommonOperatorBuilderImpl& impl_;
|
| Zone* const zone_;
|
| +
|
| + DISALLOW_COPY_AND_ASSIGN(CommonOperatorBuilder);
|
| };
|
|
|
| } // namespace compiler
|
|
|