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 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
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; |
67 class ControlScopeForCatch; | 67 class ControlScopeForCatch; |
68 class ControlScopeForFinally; | 68 class ControlScopeForFinally; |
69 class Environment; | 69 class Environment; |
| 70 class FrameStateBeforeAndAfter; |
70 friend class ControlBuilder; | 71 friend class ControlBuilder; |
71 | 72 |
72 Zone* local_zone_; | 73 Zone* local_zone_; |
73 CompilationInfo* info_; | 74 CompilationInfo* info_; |
74 JSGraph* jsgraph_; | 75 JSGraph* jsgraph_; |
75 Environment* environment_; | 76 Environment* environment_; |
76 AstContext* ast_context_; | 77 AstContext* ast_context_; |
77 | 78 |
78 // List of global declarations for functions and variables. | 79 // List of global declarations for functions and variables. |
79 ZoneVector<Handle<Object>> globals_; | 80 ZoneVector<Handle<Object>> globals_; |
(...skipping 125 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
205 Node* MakeNode(const Operator* op, int value_input_count, Node** value_inputs, | 206 Node* MakeNode(const Operator* op, int value_input_count, Node** value_inputs, |
206 bool incomplete); | 207 bool incomplete); |
207 | 208 |
208 // Helper to indicate a node exits the function body. | 209 // Helper to indicate a node exits the function body. |
209 void UpdateControlDependencyToLeaveFunction(Node* exit); | 210 void UpdateControlDependencyToLeaveFunction(Node* exit); |
210 | 211 |
211 // Builds deoptimization for a given node. | 212 // Builds deoptimization for a given node. |
212 void PrepareFrameState( | 213 void PrepareFrameState( |
213 Node* node, BailoutId ast_id, | 214 Node* node, BailoutId ast_id, |
214 OutputFrameStateCombine combine = OutputFrameStateCombine::Ignore()); | 215 OutputFrameStateCombine combine = OutputFrameStateCombine::Ignore()); |
215 void PrepareFrameStateAfterAndBefore(Node* node, BailoutId ast_id, | |
216 OutputFrameStateCombine combine, | |
217 Node* frame_state_before); | |
218 | 216 |
219 BitVector* GetVariablesAssignedInLoop(IterationStatement* stmt); | 217 BitVector* GetVariablesAssignedInLoop(IterationStatement* stmt); |
220 | 218 |
221 // Check if the given statement is an OSR entry. | 219 // Check if the given statement is an OSR entry. |
222 // If so, record the stack height into the compilation and return {true}. | 220 // If so, record the stack height into the compilation and return {true}. |
223 bool CheckOsrEntry(IterationStatement* stmt); | 221 bool CheckOsrEntry(IterationStatement* stmt); |
224 | 222 |
225 // Computes local variable liveness and replaces dead variables in | 223 // Computes local variable liveness and replaces dead variables in |
226 // frame states with the undefined values. | 224 // frame states with the undefined values. |
227 void ClearNonLiveSlotsInFrameStates(); | 225 void ClearNonLiveSlotsInFrameStates(); |
(...skipping 284 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
512 | 510 |
513 // Prepare environment to be used as loop header. | 511 // Prepare environment to be used as loop header. |
514 void PrepareForLoop(BitVector* assigned, bool is_osr = false); | 512 void PrepareForLoop(BitVector* assigned, bool is_osr = false); |
515 }; | 513 }; |
516 | 514 |
517 } // namespace compiler | 515 } // namespace compiler |
518 } // namespace internal | 516 } // namespace internal |
519 } // namespace v8 | 517 } // namespace v8 |
520 | 518 |
521 #endif // V8_COMPILER_AST_GRAPH_BUILDER_H_ | 519 #endif // V8_COMPILER_AST_GRAPH_BUILDER_H_ |
OLD | NEW |