| 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/simplified-lowering.h" | 5 #include "src/compiler/simplified-lowering.h" |
| 6 | 6 |
| 7 #include <limits> | 7 #include <limits> |
| 8 | 8 |
| 9 #include "src/address-map.h" | 9 #include "src/address-map.h" |
| 10 #include "src/base/bits.h" | 10 #include "src/base/bits.h" |
| (...skipping 1015 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1026 edge.UpdateTo(control); | 1026 edge.UpdateTo(control); |
| 1027 } else if (NodeProperties::IsEffectEdge(edge)) { | 1027 } else if (NodeProperties::IsEffectEdge(edge)) { |
| 1028 edge.UpdateTo(effect); | 1028 edge.UpdateTo(effect); |
| 1029 } else { | 1029 } else { |
| 1030 DCHECK(NodeProperties::IsValueEdge(edge)); | 1030 DCHECK(NodeProperties::IsValueEdge(edge)); |
| 1031 } | 1031 } |
| 1032 } | 1032 } |
| 1033 } | 1033 } |
| 1034 | 1034 |
| 1035 void ChangeToInt32OverflowOp(Node* node, const Operator* op) { | 1035 void ChangeToInt32OverflowOp(Node* node, const Operator* op) { |
| 1036 Node* frame_state = NodeProperties::GetFrameStateInput(node, 0); | |
| 1037 Node* effect = NodeProperties::GetEffectInput(node); | 1036 Node* effect = NodeProperties::GetEffectInput(node); |
| 1038 Node* control = NodeProperties::GetControlInput(node); | 1037 Node* control = NodeProperties::GetControlInput(node); |
| 1038 Node* frame_state = NodeProperties::FindFrameStateBefore(node); |
| 1039 Node* arith = graph()->NewNode(op, node->InputAt(0), node->InputAt(1)); | 1039 Node* arith = graph()->NewNode(op, node->InputAt(0), node->InputAt(1)); |
| 1040 Node* overflow = graph()->NewNode(common()->Projection(1), arith); | 1040 Node* overflow = graph()->NewNode(common()->Projection(1), arith); |
| 1041 control = effect = graph()->NewNode(common()->DeoptimizeIf(), overflow, | 1041 control = effect = graph()->NewNode(common()->DeoptimizeIf(), overflow, |
| 1042 frame_state, effect, control); | 1042 frame_state, effect, control); |
| 1043 | 1043 |
| 1044 Node* value = graph()->NewNode(common()->Projection(0), arith); | 1044 Node* value = graph()->NewNode(common()->Projection(0), arith); |
| 1045 ReplaceEffectControlUses(node, effect, control); | 1045 ReplaceEffectControlUses(node, effect, control); |
| 1046 DeferReplacement(node, value); | 1046 DeferReplacement(node, value); |
| 1047 } | 1047 } |
| 1048 | 1048 |
| (...skipping 1765 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2814 isolate(), graph()->zone(), callable.descriptor(), 0, flags, | 2814 isolate(), graph()->zone(), callable.descriptor(), 0, flags, |
| 2815 Operator::kNoProperties); | 2815 Operator::kNoProperties); |
| 2816 to_number_operator_.set(common()->Call(desc)); | 2816 to_number_operator_.set(common()->Call(desc)); |
| 2817 } | 2817 } |
| 2818 return to_number_operator_.get(); | 2818 return to_number_operator_.get(); |
| 2819 } | 2819 } |
| 2820 | 2820 |
| 2821 } // namespace compiler | 2821 } // namespace compiler |
| 2822 } // namespace internal | 2822 } // namespace internal |
| 2823 } // namespace v8 | 2823 } // namespace v8 |
| OLD | NEW |