Chromium Code Reviews| Index: src/interpreter/bytecode-generator.h |
| diff --git a/src/interpreter/bytecode-generator.h b/src/interpreter/bytecode-generator.h |
| index e79ff787e9246ba278bddfa09a3e48daf21a7fc2..e9c558245002899345fbe31220081c15226e8754 100644 |
| --- a/src/interpreter/bytecode-generator.h |
| +++ b/src/interpreter/bytecode-generator.h |
| @@ -31,14 +31,18 @@ class BytecodeGenerator : public AstVisitor { |
| class ContextScope; |
| class ControlScope; |
| class ControlScopeForIteration; |
| + class ExpressionResultScope; |
| + class TopLevelResultScope; |
| + class AccumulatorResultScope; |
| + class EffectResultScope; |
| + class RegisterResultScope; |
| void MakeBytecodeBody(); |
| Register NextContextRegister() const; |
| DEFINE_AST_VISITOR_SUBCLASS_MEMBERS(); |
| - Register VisitArguments(ZoneList<Expression*>* arguments, |
| - TemporaryRegisterScope* caller_scope); |
| + Register VisitArguments(ZoneList<Expression*>* arguments); |
| void VisitArithmeticExpression(BinaryOperation* binop); |
| void VisitCommaExpression(BinaryOperation* binop); |
| void VisitLogicalOrExpression(BinaryOperation* binop); |
| @@ -61,6 +65,18 @@ class BytecodeGenerator : public AstVisitor { |
| void VisitTypeOf(UnaryOperation* expr); |
| void VisitNot(UnaryOperation* expr); |
| + // Visitors for obtaining expression result in the accumulator, in a |
| + // register, or just getting the effect. |
| + void VisitForAccumulatorValue(Expression* expression); |
| + MUST_USE_RESULT Register VisitForRegisterValue(Expression* expression); |
| + void VisitForEffect(Expression* node); |
| + |
| + // Binary expression state machine and load-store tracking. |
| + void PrepareForBinaryExpression(); |
| + Register LoadForBinaryExpression(Register reg); |
| + void StoreForBinaryExpression(Register reg); |
| + void CompleteBinaryExpression(); |
| + |
| inline BytecodeArrayBuilder* builder() { return &builder_; } |
| inline Isolate* isolate() const { return isolate_; } |
| @@ -80,6 +96,12 @@ class BytecodeGenerator : public AstVisitor { |
| execution_context_ = context; |
| } |
| + void set_result_scope(ExpressionResultScope* result_scope); |
| + ExpressionResultScope* result_scope() const; |
| + ExpressionResultScope* parent_result_scope() const; |
| + TopLevelResultScope* top_level_result_scope() const; |
| + void set_top_level_result_scope(TopLevelResultScope* result_scope); |
| + |
| ZoneVector<Handle<Object>>* globals() { return &globals_; } |
| inline LanguageMode language_mode() const; |
| Strength language_mode_strength() const; |
| @@ -93,6 +115,11 @@ class BytecodeGenerator : public AstVisitor { |
| ZoneVector<Handle<Object>> globals_; |
| ControlScope* execution_control_; |
| ContextScope* execution_context_; |
| + ExpressionResultScope* result_scope_; |
| + TopLevelResultScope* top_level_result_scope_; |
|
rmcilroy
2015/10/19 12:56:23
This doesn't seem to be used? Can we remove it for
oth
2015/10/20 15:28:53
Removed for now. Having a central reference saves
|
| + |
| + int binary_expression_depth_; |
| + ZoneSet<int> binary_expression_hazard_set_; |
| }; |
| } // namespace interpreter |