Chromium Code Reviews| Index: src/compiler/ast-graph-builder.h |
| diff --git a/src/compiler/ast-graph-builder.h b/src/compiler/ast-graph-builder.h |
| index 861bd5baa36e8320be889c47e1135e32c6b9f23e..0797a782a991c35b0dba120c7f0fce3d01ad0229 100644 |
| --- a/src/compiler/ast-graph-builder.h |
| +++ b/src/compiler/ast-graph-builder.h |
| @@ -171,8 +171,11 @@ class AstGraphBuilder : public StructuredGraphBuilder, public AstVisitor { |
| // Dispatched from VisitForInStatement. |
| void VisitForInAssignment(Expression* expr, Node* value); |
| - void BuildLazyBailout(Node* node, BailoutId ast_id); |
| - void BuildLazyBailoutWithPushedNode(Node* node, BailoutId ast_id); |
| + enum OutputFrameStateCombine { PUSH_OUTPUT, IGNORE_OUTPUT }; |
|
Michael Starzinger
2014/08/12 21:17:40
nit: Can we add a comment describing the semantics
|
| + |
| + void BuildLazyBailout(Node* node, BailoutId ast_id, |
|
Michael Starzinger
2014/08/12 21:17:41
nit: Since the BuildFoo methods all have a clear s
|
| + OutputFrameStateCombine combine = IGNORE_OUTPUT); |
|
Michael Starzinger
2014/08/12 21:27:40
nit: Also, there seems to be no caller relying on
|
| + OutputFrameStateCombine StateCombineFromAstContext(); |
|
Michael Starzinger
2014/08/12 21:17:40
suggestion: I would be fine with moving this into
|
| DEFINE_AST_VISITOR_SUBCLASS_MEMBERS(); |
| DISALLOW_COPY_AND_ASSIGN(AstGraphBuilder); |
| @@ -285,7 +288,6 @@ class AstGraphBuilder::AstContext BASE_EMBEDDED { |
| // Plug a node into this expression context. Call this function in tail |
| // position in the Visit functions for expressions. |
| virtual void ProduceValue(Node* value) = 0; |
| - virtual void ProduceValueWithLazyBailout(Node* value) = 0; |
| // Unplugs a node from this expression context. Call this to retrieve the |
| // result of another Visit function that already plugged the context. |
| @@ -295,8 +297,7 @@ class AstGraphBuilder::AstContext BASE_EMBEDDED { |
| void ReplaceValue() { ProduceValue(ConsumeValue()); } |
| protected: |
| - AstContext(AstGraphBuilder* owner, Expression::Context kind, |
| - BailoutId bailout_id); |
| + AstContext(AstGraphBuilder* owner, Expression::Context kind); |
| virtual ~AstContext(); |
| AstGraphBuilder* owner() const { return owner_; } |
| @@ -308,8 +309,6 @@ class AstGraphBuilder::AstContext BASE_EMBEDDED { |
| int original_height_; |
| #endif |
| - BailoutId bailout_id_; |
| - |
| private: |
| Expression::Context kind_; |
| AstGraphBuilder* owner_; |
| @@ -320,11 +319,10 @@ class AstGraphBuilder::AstContext BASE_EMBEDDED { |
| // Context to evaluate expression for its side effects only. |
| class AstGraphBuilder::AstEffectContext V8_FINAL : public AstContext { |
| public: |
| - explicit AstEffectContext(AstGraphBuilder* owner, BailoutId bailout_id) |
| - : AstContext(owner, Expression::kEffect, bailout_id) {} |
| + explicit AstEffectContext(AstGraphBuilder* owner) |
| + : AstContext(owner, Expression::kEffect) {} |
| virtual ~AstEffectContext(); |
| virtual void ProduceValue(Node* value) V8_OVERRIDE; |
| - virtual void ProduceValueWithLazyBailout(Node* value) V8_OVERRIDE; |
| virtual Node* ConsumeValue() V8_OVERRIDE; |
| }; |
| @@ -332,11 +330,10 @@ class AstGraphBuilder::AstEffectContext V8_FINAL : public AstContext { |
| // Context to evaluate expression for its value (and side effects). |
| class AstGraphBuilder::AstValueContext V8_FINAL : public AstContext { |
| public: |
| - explicit AstValueContext(AstGraphBuilder* owner, BailoutId bailout_id) |
| - : AstContext(owner, Expression::kValue, bailout_id) {} |
| + explicit AstValueContext(AstGraphBuilder* owner) |
| + : AstContext(owner, Expression::kValue) {} |
| virtual ~AstValueContext(); |
| virtual void ProduceValue(Node* value) V8_OVERRIDE; |
| - virtual void ProduceValueWithLazyBailout(Node* value) V8_OVERRIDE; |
| virtual Node* ConsumeValue() V8_OVERRIDE; |
| }; |
| @@ -344,11 +341,10 @@ class AstGraphBuilder::AstValueContext V8_FINAL : public AstContext { |
| // Context to evaluate expression for a condition value (and side effects). |
| class AstGraphBuilder::AstTestContext V8_FINAL : public AstContext { |
| public: |
| - explicit AstTestContext(AstGraphBuilder* owner, BailoutId bailout_id) |
| - : AstContext(owner, Expression::kTest, bailout_id) {} |
| + explicit AstTestContext(AstGraphBuilder* owner) |
| + : AstContext(owner, Expression::kTest) {} |
| virtual ~AstTestContext(); |
| virtual void ProduceValue(Node* value) V8_OVERRIDE; |
| - virtual void ProduceValueWithLazyBailout(Node* value) V8_OVERRIDE; |
| virtual Node* ConsumeValue() V8_OVERRIDE; |
| }; |