Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(289)

Side by Side Diff: src/compiler/simplified-lowering.cc

Issue 2022753002: [turbofan] Fix NumberIsHoleNaN to check the upper word. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Typos Created 4 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | test/mjsunit/compiler/regress-number-is-hole-nan.js » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « no previous file | test/mjsunit/compiler/regress-number-is-hole-nan.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698