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 275 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
286 | 286 |
287 // Remove the end markers of 'atomic' allocation region because the | 287 // Remove the end markers of 'atomic' allocation region because the |
288 // region should be wired-in now. | 288 // region should be wired-in now. |
289 if (node->opcode() == IrOpcode::kFinishRegion || | 289 if (node->opcode() == IrOpcode::kFinishRegion || |
290 node->opcode() == IrOpcode::kBeginRegion) { | 290 node->opcode() == IrOpcode::kBeginRegion) { |
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. |
| 297 // TODO(epertoso): Pickup the current frame state. |
| 298 if (node->opcode() == IrOpcode::kCheckPoint) { |
| 299 // Unlink the check point; effect uses will be updated to the incoming |
| 300 // effect that is passed. |
| 301 node->Kill(); |
| 302 return; |
| 303 } |
| 304 |
296 if (node->opcode() == IrOpcode::kIfSuccess) { | 305 if (node->opcode() == IrOpcode::kIfSuccess) { |
297 // We always schedule IfSuccess with its call, so skip it here. | 306 // We always schedule IfSuccess with its call, so skip it here. |
298 DCHECK_EQ(IrOpcode::kCall, node->InputAt(0)->opcode()); | 307 DCHECK_EQ(IrOpcode::kCall, node->InputAt(0)->opcode()); |
299 // The IfSuccess node should not belong to an exceptional call node | 308 // The IfSuccess node should not belong to an exceptional call node |
300 // because such IfSuccess nodes should only start a basic block (and | 309 // because such IfSuccess nodes should only start a basic block (and |
301 // basic block start nodes are not handled in the ProcessNode method). | 310 // basic block start nodes are not handled in the ProcessNode method). |
302 DCHECK(!NodeProperties::IsExceptionalCall(node->InputAt(0))); | 311 DCHECK(!NodeProperties::IsExceptionalCall(node->InputAt(0))); |
303 return; | 312 return; |
304 } | 313 } |
305 | 314 |
(...skipping 649 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
955 return jsgraph()->Int32Constant(Smi::kMaxValue); | 964 return jsgraph()->Int32Constant(Smi::kMaxValue); |
956 } | 965 } |
957 | 966 |
958 Node* EffectControlLinearizer::SmiShiftBitsConstant() { | 967 Node* EffectControlLinearizer::SmiShiftBitsConstant() { |
959 return jsgraph()->IntPtrConstant(kSmiShiftSize + kSmiTagSize); | 968 return jsgraph()->IntPtrConstant(kSmiShiftSize + kSmiTagSize); |
960 } | 969 } |
961 | 970 |
962 } // namespace compiler | 971 } // namespace compiler |
963 } // namespace internal | 972 } // namespace internal |
964 } // namespace v8 | 973 } // namespace v8 |
OLD | NEW |