Index: src/compiler/common-operator.h |
diff --git a/src/compiler/common-operator.h b/src/compiler/common-operator.h |
index c5a8d7ee691a40e5f54c7b5960237521dfe169f0..c65e1a7db5abbe8cc0078bc8bba3a416729e95fa 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 { |
@@ -123,7 +133,7 @@ class CommonOperatorBuilder FINAL { |
const Operator* Dead(); |
const Operator* End(); |
- const Operator* Branch(); |
+ const Operator* Branch(BranchHint = BranchHint::kNone); |
const Operator* IfTrue(); |
const Operator* IfFalse(); |
const Operator* Throw(); |