| 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 1073 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1084 // Just change representation if necessary. | 1084 // Just change representation if necessary. |
| 1085 VisitUnop(node, UseInfo::TruncatingWord32(), | 1085 VisitUnop(node, UseInfo::TruncatingWord32(), |
| 1086 MachineRepresentation::kWord32); | 1086 MachineRepresentation::kWord32); |
| 1087 if (lower()) DeferReplacement(node, node->InputAt(0)); | 1087 if (lower()) DeferReplacement(node, node->InputAt(0)); |
| 1088 break; | 1088 break; |
| 1089 } | 1089 } |
| 1090 case IrOpcode::kNumberIsHoleNaN: { | 1090 case IrOpcode::kNumberIsHoleNaN: { |
| 1091 VisitUnop(node, UseInfo::TruncatingFloat64(), | 1091 VisitUnop(node, UseInfo::TruncatingFloat64(), |
| 1092 MachineRepresentation::kBit); | 1092 MachineRepresentation::kBit); |
| 1093 if (lower()) { | 1093 if (lower()) { |
| 1094 // NumberIsHoleNaN(x) => Word32Equal(Float64ExtractLowWord32(x), | 1094 // NumberIsHoleNaN(x) => Word32Equal(Float64ExtractHighWord32(x), |
| 1095 // #HoleNaNLower32) | 1095 // #HoleNanUpper32) |
| 1096 node->ReplaceInput(0, | 1096 node->ReplaceInput( |
| 1097 jsgraph_->graph()->NewNode( | 1097 0, jsgraph_->graph()->NewNode( |
| 1098 lowering->machine()->Float64ExtractLowWord32(), | 1098 lowering->machine()->Float64ExtractHighWord32(), |
| 1099 node->InputAt(0))); | 1099 node->InputAt(0))); |
| 1100 node->AppendInput(jsgraph_->zone(), | 1100 node->AppendInput(jsgraph_->zone(), |
| 1101 jsgraph_->Int32Constant(kHoleNanLower32)); | 1101 jsgraph_->Int32Constant(kHoleNanUpper32)); |
| 1102 NodeProperties::ChangeOp(node, jsgraph_->machine()->Word32Equal()); | 1102 NodeProperties::ChangeOp(node, jsgraph_->machine()->Word32Equal()); |
| 1103 } | 1103 } |
| 1104 break; | 1104 break; |
| 1105 } | 1105 } |
| 1106 case IrOpcode::kReferenceEqual: { | 1106 case IrOpcode::kReferenceEqual: { |
| 1107 VisitBinop(node, UseInfo::AnyTagged(), MachineRepresentation::kBit); | 1107 VisitBinop(node, UseInfo::AnyTagged(), MachineRepresentation::kBit); |
| 1108 if (lower()) { | 1108 if (lower()) { |
| 1109 NodeProperties::ChangeOp(node, lowering->machine()->WordEqual()); | 1109 NodeProperties::ChangeOp(node, lowering->machine()->WordEqual()); |
| 1110 } | 1110 } |
| 1111 break; | 1111 break; |
| (...skipping 1354 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2466 isolate(), graph()->zone(), callable.descriptor(), 0, flags, | 2466 isolate(), graph()->zone(), callable.descriptor(), 0, flags, |
| 2467 Operator::kNoProperties); | 2467 Operator::kNoProperties); |
| 2468 to_number_operator_.set(common()->Call(desc)); | 2468 to_number_operator_.set(common()->Call(desc)); |
| 2469 } | 2469 } |
| 2470 return to_number_operator_.get(); | 2470 return to_number_operator_.get(); |
| 2471 } | 2471 } |
| 2472 | 2472 |
| 2473 } // namespace compiler | 2473 } // namespace compiler |
| 2474 } // namespace internal | 2474 } // namespace internal |
| 2475 } // namespace v8 | 2475 } // namespace v8 |
| OLD | NEW |