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 1020 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1031 DCHECK(NodeProperties::IsValueEdge(edge)); | 1031 DCHECK(NodeProperties::IsValueEdge(edge)); |
1032 } | 1032 } |
1033 } | 1033 } |
1034 } | 1034 } |
1035 | 1035 |
1036 void ChangeToInt32OverflowOp(Node* node, const Operator* op) { | 1036 void ChangeToInt32OverflowOp(Node* node, const Operator* op) { |
1037 Node* effect = NodeProperties::GetEffectInput(node); | 1037 Node* effect = NodeProperties::GetEffectInput(node); |
1038 Node* control = NodeProperties::GetControlInput(node); | 1038 Node* control = NodeProperties::GetControlInput(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 = | 1041 effect = |
1042 graph()->NewNode(simplified()->CheckIf(), overflow, effect, control); | 1042 graph()->NewNode(simplified()->CheckIf(), overflow, 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 |
1049 void VisitSpeculativeAdditiveOp(Node* node, Truncation truncation, | 1049 void VisitSpeculativeAdditiveOp(Node* node, Truncation truncation, |
1050 SimplifiedLowering* lowering) { | 1050 SimplifiedLowering* lowering) { |
1051 if (BothInputsAre(node, Type::Signed32()) && | 1051 if (BothInputsAre(node, Type::Signed32()) && |
(...skipping 1835 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2887 isolate(), graph()->zone(), callable.descriptor(), 0, flags, | 2887 isolate(), graph()->zone(), callable.descriptor(), 0, flags, |
2888 Operator::kNoProperties); | 2888 Operator::kNoProperties); |
2889 to_number_operator_.set(common()->Call(desc)); | 2889 to_number_operator_.set(common()->Call(desc)); |
2890 } | 2890 } |
2891 return to_number_operator_.get(); | 2891 return to_number_operator_.get(); |
2892 } | 2892 } |
2893 | 2893 |
2894 } // namespace compiler | 2894 } // namespace compiler |
2895 } // namespace internal | 2895 } // namespace internal |
2896 } // namespace v8 | 2896 } // namespace v8 |
OLD | NEW |