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 29 matching lines...) Expand all Loading... |
40 // Helpers to create new control nodes. | 40 // Helpers to create new control nodes. |
41 Node* NewIfTrue() { return NewNode(common()->IfTrue()); } | 41 Node* NewIfTrue() { return NewNode(common()->IfTrue()); } |
42 Node* NewIfFalse() { return NewNode(common()->IfFalse()); } | 42 Node* NewIfFalse() { return NewNode(common()->IfFalse()); } |
43 Node* NewMerge() { return NewNode(common()->Merge(1), true); } | 43 Node* NewMerge() { return NewNode(common()->Merge(1), true); } |
44 Node* NewLoop() { return NewNode(common()->Loop(1), true); } | 44 Node* NewLoop() { return NewNode(common()->Loop(1), true); } |
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 // Visiting function for declarations list is overridden. | 55 // Visiting function for declarations list is overridden. |
56 void VisitDeclarations(ZoneList<Declaration*>* declarations) OVERRIDE; | 56 void VisitDeclarations(ZoneList<Declaration*>* declarations) override; |
57 | 57 |
58 private: | 58 private: |
59 class AstContext; | 59 class AstContext; |
60 class AstEffectContext; | 60 class AstEffectContext; |
61 class AstValueContext; | 61 class AstValueContext; |
62 class AstTestContext; | 62 class AstTestContext; |
63 class ContextScope; | 63 class ContextScope; |
64 class ControlScope; | 64 class ControlScope; |
65 class ControlScopeForBreakable; | 65 class ControlScopeForBreakable; |
66 class ControlScopeForIteration; | 66 class ControlScopeForIteration; |
(...skipping 445 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
512 | 512 |
513 // Prepare environment to be used as loop header. | 513 // Prepare environment to be used as loop header. |
514 void PrepareForLoop(BitVector* assigned, bool is_osr = false); | 514 void PrepareForLoop(BitVector* assigned, bool is_osr = false); |
515 }; | 515 }; |
516 | 516 |
517 } // namespace compiler | 517 } // namespace compiler |
518 } // namespace internal | 518 } // namespace internal |
519 } // namespace v8 | 519 } // namespace v8 |
520 | 520 |
521 #endif // V8_COMPILER_AST_GRAPH_BUILDER_H_ | 521 #endif // V8_COMPILER_AST_GRAPH_BUILDER_H_ |
OLD | NEW |