| 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 #include "src/compiler/ast-graph-builder.h" | 5 #include "src/compiler/ast-graph-builder.h" |
| 6 | 6 |
| 7 #include "src/compiler.h" | 7 #include "src/compiler.h" |
| 8 #include "src/compiler/control-builders.h" | 8 #include "src/compiler/control-builders.h" |
| 9 #include "src/compiler/machine-operator.h" | 9 #include "src/compiler/machine-operator.h" |
| 10 #include "src/compiler/node-properties.h" | 10 #include "src/compiler/node-properties.h" |
| (...skipping 209 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 220 Node* AstGraphBuilder::Environment::Checkpoint( | 220 Node* AstGraphBuilder::Environment::Checkpoint( |
| 221 BailoutId ast_id, OutputFrameStateCombine combine) { | 221 BailoutId ast_id, OutputFrameStateCombine combine) { |
| 222 UpdateStateValues(¶meters_node_, 0, parameters_count()); | 222 UpdateStateValues(¶meters_node_, 0, parameters_count()); |
| 223 UpdateStateValues(&locals_node_, parameters_count(), locals_count()); | 223 UpdateStateValues(&locals_node_, parameters_count(), locals_count()); |
| 224 UpdateStateValues(&stack_node_, parameters_count() + locals_count(), | 224 UpdateStateValues(&stack_node_, parameters_count() + locals_count(), |
| 225 stack_height()); | 225 stack_height()); |
| 226 | 226 |
| 227 Operator* op = common()->FrameState(ast_id, combine); | 227 Operator* op = common()->FrameState(ast_id, combine); |
| 228 | 228 |
| 229 return graph()->NewNode(op, parameters_node_, locals_node_, stack_node_, | 229 return graph()->NewNode(op, parameters_node_, locals_node_, stack_node_, |
| 230 GetContext(), | 230 GetContext()); |
| 231 builder()->jsgraph()->UndefinedConstant()); | |
| 232 } | 231 } |
| 233 | 232 |
| 234 | 233 |
| 235 AstGraphBuilder::AstContext::AstContext(AstGraphBuilder* own, | 234 AstGraphBuilder::AstContext::AstContext(AstGraphBuilder* own, |
| 236 Expression::Context kind) | 235 Expression::Context kind) |
| 237 : kind_(kind), owner_(own), outer_(own->ast_context()) { | 236 : kind_(kind), owner_(own), outer_(own->ast_context()) { |
| 238 owner()->set_ast_context(this); // Push. | 237 owner()->set_ast_context(this); // Push. |
| 239 #ifdef DEBUG | 238 #ifdef DEBUG |
| 240 original_height_ = environment()->stack_height(); | 239 original_height_ = environment()->stack_height(); |
| 241 #endif | 240 #endif |
| (...skipping 1771 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2013 DCHECK(node->InputAt(frame_state_index)->op()->opcode() == IrOpcode::kDead); | 2012 DCHECK(node->InputAt(frame_state_index)->op()->opcode() == IrOpcode::kDead); |
| 2014 | 2013 |
| 2015 Node* frame_state_node = environment()->Checkpoint(ast_id, combine); | 2014 Node* frame_state_node = environment()->Checkpoint(ast_id, combine); |
| 2016 node->ReplaceInput(frame_state_index, frame_state_node); | 2015 node->ReplaceInput(frame_state_index, frame_state_node); |
| 2017 } | 2016 } |
| 2018 } | 2017 } |
| 2019 | 2018 |
| 2020 } | 2019 } |
| 2021 } | 2020 } |
| 2022 } // namespace v8::internal::compiler | 2021 } // namespace v8::internal::compiler |
| OLD | NEW |