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 | 10 |
(...skipping 300 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
311 BailoutId bailout_id); | 311 BailoutId bailout_id); |
312 void VisitForInBody(ForInStatement* stmt); | 312 void VisitForInBody(ForInStatement* stmt); |
313 | 313 |
314 // Dispatched from VisitClassLiteral. | 314 // Dispatched from VisitClassLiteral. |
315 void VisitClassLiteralContents(ClassLiteral* expr); | 315 void VisitClassLiteralContents(ClassLiteral* expr); |
316 | 316 |
317 // Builds deoptimization for a given node. | 317 // Builds deoptimization for a given node. |
318 void PrepareFrameState( | 318 void PrepareFrameState( |
319 Node* node, BailoutId ast_id, | 319 Node* node, BailoutId ast_id, |
320 OutputFrameStateCombine combine = OutputFrameStateCombine::Ignore()); | 320 OutputFrameStateCombine combine = OutputFrameStateCombine::Ignore()); |
| 321 void PrepareFrameStateAfterAndBefore(Node* node, BailoutId ast_id, |
| 322 OutputFrameStateCombine combine, |
| 323 Node* frame_state_before); |
321 | 324 |
322 BitVector* GetVariablesAssignedInLoop(IterationStatement* stmt); | 325 BitVector* GetVariablesAssignedInLoop(IterationStatement* stmt); |
323 | 326 |
324 DEFINE_AST_VISITOR_SUBCLASS_MEMBERS(); | 327 DEFINE_AST_VISITOR_SUBCLASS_MEMBERS(); |
325 DISALLOW_COPY_AND_ASSIGN(AstGraphBuilder); | 328 DISALLOW_COPY_AND_ASSIGN(AstGraphBuilder); |
326 }; | 329 }; |
327 | 330 |
328 | 331 |
329 // The abstract execution environment for generated code consists of | 332 // The abstract execution environment for generated code consists of |
330 // parameter variables, local variables and the operand stack. The | 333 // parameter variables, local variables and the operand stack. The |
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
401 values()->erase(values()->end() - depth, values()->end()); | 404 values()->erase(values()->end() - depth, values()->end()); |
402 } | 405 } |
403 void Trim(int trim_to_height) { | 406 void Trim(int trim_to_height) { |
404 int depth = stack_height() - trim_to_height; | 407 int depth = stack_height() - trim_to_height; |
405 DCHECK(depth >= 0 && depth <= stack_height()); | 408 DCHECK(depth >= 0 && depth <= stack_height()); |
406 values()->erase(values()->end() - depth, values()->end()); | 409 values()->erase(values()->end() - depth, values()->end()); |
407 } | 410 } |
408 | 411 |
409 // Preserve a checkpoint of the environment for the IR graph. Any | 412 // Preserve a checkpoint of the environment for the IR graph. Any |
410 // further mutation of the environment will not affect checkpoints. | 413 // further mutation of the environment will not affect checkpoints. |
411 Node* Checkpoint(BailoutId ast_id, OutputFrameStateCombine combine); | 414 Node* Checkpoint(BailoutId ast_id, OutputFrameStateCombine combine = |
| 415 OutputFrameStateCombine::Ignore()); |
412 | 416 |
413 // Control dependency tracked by this environment. | 417 // Control dependency tracked by this environment. |
414 Node* GetControlDependency() { return control_dependency_; } | 418 Node* GetControlDependency() { return control_dependency_; } |
415 void UpdateControlDependency(Node* dependency) { | 419 void UpdateControlDependency(Node* dependency) { |
416 control_dependency_ = dependency; | 420 control_dependency_ = dependency; |
417 } | 421 } |
418 | 422 |
419 // Effect dependency tracked by this environment. | 423 // Effect dependency tracked by this environment. |
420 Node* GetEffectDependency() { return effect_dependency_; } | 424 Node* GetEffectDependency() { return effect_dependency_; } |
421 void UpdateEffectDependency(Node* dependency) { | 425 void UpdateEffectDependency(Node* dependency) { |
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
475 | 479 |
476 // Prepare environment to be used as loop header. | 480 // Prepare environment to be used as loop header. |
477 void PrepareForLoop(BitVector* assigned, bool is_osr = false); | 481 void PrepareForLoop(BitVector* assigned, bool is_osr = false); |
478 }; | 482 }; |
479 | 483 |
480 } // namespace compiler | 484 } // namespace compiler |
481 } // namespace internal | 485 } // namespace internal |
482 } // namespace v8 | 486 } // namespace v8 |
483 | 487 |
484 #endif // V8_COMPILER_AST_GRAPH_BUILDER_H_ | 488 #endif // V8_COMPILER_AST_GRAPH_BUILDER_H_ |
OLD | NEW |