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/ast/scopes.h" | 7 #include "src/ast/scopes.h" |
8 #include "src/compiler.h" | 8 #include "src/compiler.h" |
9 #include "src/compiler/ast-loop-assignment-analyzer.h" | 9 #include "src/compiler/ast-loop-assignment-analyzer.h" |
10 #include "src/compiler/control-builders.h" | 10 #include "src/compiler/control-builders.h" |
(...skipping 4057 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4068 DCHECK_EQ(IrOpcode::kDead, | 4068 DCHECK_EQ(IrOpcode::kDead, |
4069 NodeProperties::GetFrameStateInput(node, 0)->opcode()); | 4069 NodeProperties::GetFrameStateInput(node, 0)->opcode()); |
4070 bool node_has_exception = NodeProperties::IsExceptionalCall(node); | 4070 bool node_has_exception = NodeProperties::IsExceptionalCall(node); |
4071 NodeProperties::ReplaceFrameStateInput( | 4071 NodeProperties::ReplaceFrameStateInput( |
4072 node, 0, | 4072 node, 0, |
4073 environment()->Checkpoint(ast_id, combine, node_has_exception)); | 4073 environment()->Checkpoint(ast_id, combine, node_has_exception)); |
4074 } | 4074 } |
4075 } | 4075 } |
4076 | 4076 |
4077 void AstGraphBuilder::PrepareEagerCheckpoint(BailoutId ast_id) { | 4077 void AstGraphBuilder::PrepareEagerCheckpoint(BailoutId ast_id) { |
| 4078 if (environment()->GetEffectDependency()->opcode() == IrOpcode::kCheckpoint) { |
| 4079 // We skip preparing a checkpoint if there already is one the current effect |
| 4080 // dependency. This is just an optimization and not need for correctness. |
| 4081 return; |
| 4082 } |
4078 if (ast_id != BailoutId::None()) { | 4083 if (ast_id != BailoutId::None()) { |
4079 Node* node = NewNode(common()->Checkpoint()); | 4084 Node* node = NewNode(common()->Checkpoint()); |
4080 DCHECK_EQ(IrOpcode::kDead, | 4085 DCHECK_EQ(IrOpcode::kDead, |
4081 NodeProperties::GetFrameStateInput(node, 0)->opcode()); | 4086 NodeProperties::GetFrameStateInput(node, 0)->opcode()); |
4082 NodeProperties::ReplaceFrameStateInput(node, 0, | 4087 NodeProperties::ReplaceFrameStateInput(node, 0, |
4083 environment()->Checkpoint(ast_id)); | 4088 environment()->Checkpoint(ast_id)); |
4084 } | 4089 } |
4085 } | 4090 } |
4086 | 4091 |
4087 BitVector* AstGraphBuilder::GetVariablesAssignedInLoop( | 4092 BitVector* AstGraphBuilder::GetVariablesAssignedInLoop( |
(...skipping 299 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4387 // Phi does not exist yet, introduce one. | 4392 // Phi does not exist yet, introduce one. |
4388 value = NewPhi(inputs, value, control); | 4393 value = NewPhi(inputs, value, control); |
4389 value->ReplaceInput(inputs - 1, other); | 4394 value->ReplaceInput(inputs - 1, other); |
4390 } | 4395 } |
4391 return value; | 4396 return value; |
4392 } | 4397 } |
4393 | 4398 |
4394 } // namespace compiler | 4399 } // namespace compiler |
4395 } // namespace internal | 4400 } // namespace internal |
4396 } // namespace v8 | 4401 } // namespace v8 |
OLD | NEW |