Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright 2014 the V8 project authors. All rights reserved. | 1 // Copyright 2014 the V8 project authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef V8_COMPILER_AST_GRAPH_BUILDER_H_ | 5 #ifndef V8_COMPILER_AST_GRAPH_BUILDER_H_ |
| 6 #define V8_COMPILER_AST_GRAPH_BUILDER_H_ | 6 #define V8_COMPILER_AST_GRAPH_BUILDER_H_ |
| 7 | 7 |
| 8 #include "src/ast.h" | 8 #include "src/ast.h" |
| 9 #include "src/compiler/js-graph.h" | 9 #include "src/compiler/js-graph.h" |
| 10 #include "src/compiler/liveness-analyzer.h" | 10 #include "src/compiler/liveness-analyzer.h" |
| (...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 45 Node* NewBranch(Node* condition, BranchHint hint = BranchHint::kNone) { | 45 Node* NewBranch(Node* condition, BranchHint hint = BranchHint::kNone) { |
| 46 return NewNode(common()->Branch(hint), condition); | 46 return NewNode(common()->Branch(hint), condition); |
| 47 } | 47 } |
| 48 | 48 |
| 49 protected: | 49 protected: |
| 50 #define DECLARE_VISIT(type) void Visit##type(type* node) override; | 50 #define DECLARE_VISIT(type) void Visit##type(type* node) override; |
| 51 // Visiting functions for AST nodes make this an AstVisitor. | 51 // Visiting functions for AST nodes make this an AstVisitor. |
| 52 AST_NODE_LIST(DECLARE_VISIT) | 52 AST_NODE_LIST(DECLARE_VISIT) |
| 53 #undef DECLARE_VISIT | 53 #undef DECLARE_VISIT |
| 54 | 54 |
| 55 Node* relaxed_context() const { return relaxed_context_; } | |
|
titzer
2015/07/02 14:52:07
Can we just call this the outer_context_param() ?
| |
| 56 | |
| 55 // Visiting function for declarations list is overridden. | 57 // Visiting function for declarations list is overridden. |
| 56 void VisitDeclarations(ZoneList<Declaration*>* declarations) override; | 58 void VisitDeclarations(ZoneList<Declaration*>* declarations) override; |
| 57 | 59 |
| 58 private: | 60 private: |
| 59 class AstContext; | 61 class AstContext; |
| 60 class AstEffectContext; | 62 class AstEffectContext; |
| 61 class AstValueContext; | 63 class AstValueContext; |
| 62 class AstTestContext; | 64 class AstTestContext; |
| 63 class ContextScope; | 65 class ContextScope; |
| 64 class ControlScope; | 66 class ControlScope; |
| (...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 111 | 113 |
| 112 // Analyzer of local variable liveness. | 114 // Analyzer of local variable liveness. |
| 113 LivenessAnalyzer liveness_analyzer_; | 115 LivenessAnalyzer liveness_analyzer_; |
| 114 | 116 |
| 115 // Function info for frame state construction. | 117 // Function info for frame state construction. |
| 116 const FrameStateFunctionInfo* const frame_state_function_info_; | 118 const FrameStateFunctionInfo* const frame_state_function_info_; |
| 117 | 119 |
| 118 // Type feedback table. | 120 // Type feedback table. |
| 119 JSTypeFeedbackTable* js_type_feedback_; | 121 JSTypeFeedbackTable* js_type_feedback_; |
| 120 | 122 |
| 123 // The context that can be used for context relaxation if possible, otherwise | |
| 124 // nullptr. | |
| 125 Node* relaxed_context_; | |
| 126 | |
| 121 // Growth increment for the temporary buffer used to construct input lists to | 127 // Growth increment for the temporary buffer used to construct input lists to |
| 122 // new nodes. | 128 // new nodes. |
| 123 static const int kInputBufferSizeIncrement = 64; | 129 static const int kInputBufferSizeIncrement = 64; |
| 124 | 130 |
| 125 Zone* local_zone() const { return local_zone_; } | 131 Zone* local_zone() const { return local_zone_; } |
| 126 Environment* environment() const { return environment_; } | 132 Environment* environment() const { return environment_; } |
| 127 AstContext* ast_context() const { return ast_context_; } | 133 AstContext* ast_context() const { return ast_context_; } |
| 128 ControlScope* execution_control() const { return execution_control_; } | 134 ControlScope* execution_control() const { return execution_control_; } |
| 129 ContextScope* execution_context() const { return execution_context_; } | 135 ContextScope* execution_context() const { return execution_context_; } |
| 130 CommonOperatorBuilder* common() const { return jsgraph_->common(); } | 136 CommonOperatorBuilder* common() const { return jsgraph_->common(); } |
| (...skipping 417 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 548 | 554 |
| 549 // Prepare environment to be used as loop header. | 555 // Prepare environment to be used as loop header. |
| 550 void PrepareForLoop(BitVector* assigned, bool is_osr = false); | 556 void PrepareForLoop(BitVector* assigned, bool is_osr = false); |
| 551 }; | 557 }; |
| 552 | 558 |
| 553 } // namespace compiler | 559 } // namespace compiler |
| 554 } // namespace internal | 560 } // namespace internal |
| 555 } // namespace v8 | 561 } // namespace v8 |
| 556 | 562 |
| 557 #endif // V8_COMPILER_AST_GRAPH_BUILDER_H_ | 563 #endif // V8_COMPILER_AST_GRAPH_BUILDER_H_ |
| OLD | NEW |