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/v8.h" | 8 #include "src/v8.h" |
| 9 | 9 |
| 10 #include "src/ast.h" | 10 #include "src/ast.h" |
| (...skipping 247 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 258 int index = static_cast<int>(values()->size()) - depth - 1; | 258 int index = static_cast<int>(values()->size()) - depth - 1; |
| 259 return values()->at(index); | 259 return values()->at(index); |
| 260 } | 260 } |
| 261 void Drop(int depth) { | 261 void Drop(int depth) { |
| 262 DCHECK(depth >= 0 && depth <= stack_height()); | 262 DCHECK(depth >= 0 && depth <= stack_height()); |
| 263 values()->erase(values()->end() - depth, values()->end()); | 263 values()->erase(values()->end() - depth, values()->end()); |
| 264 } | 264 } |
| 265 | 265 |
| 266 // Preserve a checkpoint of the environment for the IR graph. Any | 266 // Preserve a checkpoint of the environment for the IR graph. Any |
| 267 // further mutation of the environment will not affect checkpoints. | 267 // further mutation of the environment will not affect checkpoints. |
| 268 Node* Checkpoint(BailoutId ast_id); | 268 Node* Checkpoint(BailoutId ast_id, Node* parent); |
|
Jarin
2014/08/29 15:07:06
I believe we will always initially create framesta
sigurds
2014/09/01 08:48:18
Done.
| |
| 269 | 269 |
| 270 private: | 270 private: |
| 271 void UpdateStateValues(Node** state_values, int offset, int count); | 271 void UpdateStateValues(Node** state_values, int offset, int count); |
| 272 | 272 |
| 273 int parameters_count_; | 273 int parameters_count_; |
| 274 int locals_count_; | 274 int locals_count_; |
| 275 Node* parameters_node_; | 275 Node* parameters_node_; |
| 276 Node* locals_node_; | 276 Node* locals_node_; |
| 277 Node* stack_node_; | 277 Node* stack_node_; |
| 278 }; | 278 }; |
| (...skipping 143 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 422 }; | 422 }; |
| 423 | 423 |
| 424 Scope* AstGraphBuilder::current_scope() const { | 424 Scope* AstGraphBuilder::current_scope() const { |
| 425 return execution_context_->scope(); | 425 return execution_context_->scope(); |
| 426 } | 426 } |
| 427 } | 427 } |
| 428 } | 428 } |
| 429 } // namespace v8::internal::compiler | 429 } // namespace v8::internal::compiler |
| 430 | 430 |
| 431 #endif // V8_COMPILER_AST_GRAPH_BUILDER_H_ | 431 #endif // V8_COMPILER_AST_GRAPH_BUILDER_H_ |
| OLD | NEW |