OLD | NEW |
1 // Copyright 2015 the V8 project authors. All rights reserved. | 1 // Copyright 2015 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/effect-control-linearizer.h" | 5 #include "src/compiler/effect-control-linearizer.h" |
6 | 6 |
7 #include "src/code-factory.h" | 7 #include "src/code-factory.h" |
8 #include "src/compiler/access-builder.h" | 8 #include "src/compiler/access-builder.h" |
9 #include "src/compiler/js-graph.h" | 9 #include "src/compiler/js-graph.h" |
10 #include "src/compiler/linkage.h" | 10 #include "src/compiler/linkage.h" |
(...skipping 280 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
291 // Update the value uses to the value input of the finish node and | 291 // Update the value uses to the value input of the finish node and |
292 // the effect uses to the effect input. | 292 // the effect uses to the effect input. |
293 return RemoveRegionNode(node); | 293 return RemoveRegionNode(node); |
294 } | 294 } |
295 | 295 |
296 // Special treatment for checkpoint nodes. | 296 // Special treatment for checkpoint nodes. |
297 // TODO(epertoso): Pickup the current frame state. | 297 // TODO(epertoso): Pickup the current frame state. |
298 if (node->opcode() == IrOpcode::kCheckpoint) { | 298 if (node->opcode() == IrOpcode::kCheckpoint) { |
299 // Unlink the check point; effect uses will be updated to the incoming | 299 // Unlink the check point; effect uses will be updated to the incoming |
300 // effect that is passed. | 300 // effect that is passed. |
301 node->Kill(); | 301 node->TrimInputCount(0); |
302 return; | 302 return; |
303 } | 303 } |
304 | 304 |
305 if (node->opcode() == IrOpcode::kIfSuccess) { | 305 if (node->opcode() == IrOpcode::kIfSuccess) { |
306 // We always schedule IfSuccess with its call, so skip it here. | 306 // We always schedule IfSuccess with its call, so skip it here. |
307 DCHECK_EQ(IrOpcode::kCall, node->InputAt(0)->opcode()); | 307 DCHECK_EQ(IrOpcode::kCall, node->InputAt(0)->opcode()); |
308 // The IfSuccess node should not belong to an exceptional call node | 308 // The IfSuccess node should not belong to an exceptional call node |
309 // because such IfSuccess nodes should only start a basic block (and | 309 // because such IfSuccess nodes should only start a basic block (and |
310 // basic block start nodes are not handled in the ProcessNode method). | 310 // basic block start nodes are not handled in the ProcessNode method). |
311 DCHECK(!NodeProperties::IsExceptionalCall(node->InputAt(0))); | 311 DCHECK(!NodeProperties::IsExceptionalCall(node->InputAt(0))); |
(...skipping 671 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
983 return jsgraph()->Int32Constant(Smi::kMaxValue); | 983 return jsgraph()->Int32Constant(Smi::kMaxValue); |
984 } | 984 } |
985 | 985 |
986 Node* EffectControlLinearizer::SmiShiftBitsConstant() { | 986 Node* EffectControlLinearizer::SmiShiftBitsConstant() { |
987 return jsgraph()->IntPtrConstant(kSmiShiftSize + kSmiTagSize); | 987 return jsgraph()->IntPtrConstant(kSmiShiftSize + kSmiTagSize); |
988 } | 988 } |
989 | 989 |
990 } // namespace compiler | 990 } // namespace compiler |
991 } // namespace internal | 991 } // namespace internal |
992 } // namespace v8 | 992 } // namespace v8 |
OLD | NEW |