Index: src/interpreter/bytecode-generator.h |
diff --git a/src/interpreter/bytecode-generator.h b/src/interpreter/bytecode-generator.h |
index 846731b16d2364eb7dd5864ae9648cb039dacda3..01d1b602f903731df6e5197e3195e83714e95724 100644 |
--- a/src/interpreter/bytecode-generator.h |
+++ b/src/interpreter/bytecode-generator.h |
@@ -53,7 +53,10 @@ class BytecodeGenerator final : public AstVisitor<BytecodeGenerator> { |
class TestResultScope; |
class ValueResultScope; |
+ using ToBooleanMode = BytecodeArrayBuilder::ToBooleanMode; |
+ |
enum class TestFallthrough { kThen, kElse, kNone }; |
+ enum class TypeHint { kAny, kBoolean }; |
void GenerateBytecodeBody(); |
void AllocateDeferredConstants(Isolate* isolate); |
@@ -162,7 +165,7 @@ class BytecodeGenerator final : public AstVisitor<BytecodeGenerator> { |
// Visitors for obtaining expression result in the accumulator, in a |
// register, or just getting the effect. |
- void VisitForAccumulatorValue(Expression* expr); |
+ TypeHint VisitForAccumulatorValue(Expression* expr); |
void VisitForAccumulatorValueOrTheHole(Expression* expr); |
MUST_USE_RESULT Register VisitForRegisterValue(Expression* expr); |
void VisitForRegisterValue(Expression* expr, Register destination); |
@@ -176,6 +179,8 @@ class BytecodeGenerator final : public AstVisitor<BytecodeGenerator> { |
inline Runtime::FunctionId StoreToSuperRuntimeId(); |
inline Runtime::FunctionId StoreKeyedToSuperRuntimeId(); |
+ ToBooleanMode ToBooleanModeFromTypeHint(TypeHint type_hint); |
+ |
inline BytecodeArrayBuilder* builder() const { return builder_; } |
inline Zone* zone() const { return zone_; } |
inline DeclarationScope* closure_scope() const { return closure_scope_; } |