Index: src/interpreter/bytecode-array-builder.h |
diff --git a/src/interpreter/bytecode-array-builder.h b/src/interpreter/bytecode-array-builder.h |
index 98703473d7937ad8c9aea8e53b47d821a616fb84..d9f1c4a5ab58849c341f51e848621a2ff67393cd 100644 |
--- a/src/interpreter/bytecode-array-builder.h |
+++ b/src/interpreter/bytecode-array-builder.h |
@@ -297,8 +297,13 @@ class V8_EXPORT_PRIVATE BytecodeArrayBuilder final |
// Type feedback will be recorded in the |feedback_slot| |
BytecodeArrayBuilder& CountOperation(Token::Value op, int feedback_slot); |
+ enum class ToBooleanMode { |
+ kConvertToBoolean, // Perform ToBoolean conversion on accumulator. |
+ kAlreadyBoolean, // Accumulator is already a Boolean. |
+ }; |
+ |
// Unary Operators. |
- BytecodeArrayBuilder& LogicalNot(); |
+ BytecodeArrayBuilder& LogicalNot(ToBooleanMode mode); |
BytecodeArrayBuilder& TypeOf(); |
// Expects a heap object in the accumulator. Returns its super constructor in |
@@ -331,8 +336,10 @@ class V8_EXPORT_PRIVATE BytecodeArrayBuilder final |
BytecodeArrayBuilder& Bind(const BytecodeLabel& target, BytecodeLabel* label); |
BytecodeArrayBuilder& Jump(BytecodeLabel* label); |
- BytecodeArrayBuilder& JumpIfTrue(BytecodeLabel* label); |
- BytecodeArrayBuilder& JumpIfFalse(BytecodeLabel* label); |
+ BytecodeArrayBuilder& JumpLoop(BytecodeLabel* label, int loop_depth); |
+ |
+ BytecodeArrayBuilder& JumpIfTrue(ToBooleanMode mode, BytecodeLabel* label); |
+ BytecodeArrayBuilder& JumpIfFalse(ToBooleanMode mode, BytecodeLabel* label); |
BytecodeArrayBuilder& JumpIfNotHole(BytecodeLabel* label); |
BytecodeArrayBuilder& JumpIfJSReceiver(BytecodeLabel* label); |
BytecodeArrayBuilder& JumpIfNull(BytecodeLabel* label); |
@@ -343,7 +350,6 @@ class V8_EXPORT_PRIVATE BytecodeArrayBuilder final |
NilValue nil); |
BytecodeArrayBuilder& JumpIfNotNil(BytecodeLabel* label, Token::Value op, |
NilValue nil); |
- BytecodeArrayBuilder& JumpLoop(BytecodeLabel* label, int loop_depth); |
BytecodeArrayBuilder& StackCheck(int position); |
@@ -505,6 +511,9 @@ class V8_EXPORT_PRIVATE BytecodeArrayBuilder final |
DISALLOW_COPY_AND_ASSIGN(BytecodeArrayBuilder); |
}; |
+V8_EXPORT_PRIVATE std::ostream& operator<<( |
+ std::ostream& os, const BytecodeArrayBuilder::ToBooleanMode& mode); |
+ |
} // namespace interpreter |
} // namespace internal |
} // namespace v8 |