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

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

Issue 1890763002: [turbofan] Remove unused PlainPrimitiveToNumber operator. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 8 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 | « src/compiler/opcodes.h ('k') | src/compiler/simplified-operator.h » ('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/base/bits.h" 9 #include "src/base/bits.h"
10 #include "src/code-factory.h" 10 #include "src/code-factory.h"
(...skipping 999 matching lines...) Expand 10 before | Expand all | Expand 10 after
1010 node->ReplaceInput(0, 1010 node->ReplaceInput(0,
1011 jsgraph_->graph()->NewNode( 1011 jsgraph_->graph()->NewNode(
1012 lowering->machine()->Float64ExtractLowWord32(), 1012 lowering->machine()->Float64ExtractLowWord32(),
1013 node->InputAt(0))); 1013 node->InputAt(0)));
1014 node->AppendInput(jsgraph_->zone(), 1014 node->AppendInput(jsgraph_->zone(),
1015 jsgraph_->Int32Constant(kHoleNanLower32)); 1015 jsgraph_->Int32Constant(kHoleNanLower32));
1016 NodeProperties::ChangeOp(node, jsgraph_->machine()->Word32Equal()); 1016 NodeProperties::ChangeOp(node, jsgraph_->machine()->Word32Equal());
1017 } 1017 }
1018 break; 1018 break;
1019 } 1019 }
1020 case IrOpcode::kPlainPrimitiveToNumber: {
1021 VisitUnop(node, UseInfo::AnyTagged(), MachineRepresentation::kTagged);
1022 if (lower()) {
1023 // PlainPrimitiveToNumber(x) => Call(ToNumberStub, x, no-context)
1024 Operator::Properties properties = node->op()->properties();
1025 Callable callable = CodeFactory::ToNumber(jsgraph_->isolate());
1026 CallDescriptor::Flags flags = CallDescriptor::kNoFlags;
1027 CallDescriptor* desc = Linkage::GetStubCallDescriptor(
1028 jsgraph_->isolate(), jsgraph_->zone(), callable.descriptor(), 0,
1029 flags, properties);
1030 node->InsertInput(jsgraph_->zone(), 0,
1031 jsgraph_->HeapConstant(callable.code()));
1032 node->AppendInput(jsgraph_->zone(), jsgraph_->NoContextConstant());
1033 NodeProperties::ChangeOp(node, jsgraph_->common()->Call(desc));
1034 }
1035 break;
1036 }
1037 case IrOpcode::kReferenceEqual: { 1020 case IrOpcode::kReferenceEqual: {
1038 VisitBinop(node, UseInfo::AnyTagged(), MachineRepresentation::kBit); 1021 VisitBinop(node, UseInfo::AnyTagged(), MachineRepresentation::kBit);
1039 if (lower()) { 1022 if (lower()) {
1040 NodeProperties::ChangeOp(node, lowering->machine()->WordEqual()); 1023 NodeProperties::ChangeOp(node, lowering->machine()->WordEqual());
1041 } 1024 }
1042 break; 1025 break;
1043 } 1026 }
1044 case IrOpcode::kStringEqual: { 1027 case IrOpcode::kStringEqual: {
1045 VisitBinop(node, UseInfo::AnyTagged(), MachineRepresentation::kTagged); 1028 VisitBinop(node, UseInfo::AnyTagged(), MachineRepresentation::kTagged);
1046 if (lower()) { 1029 if (lower()) {
(...skipping 1143 matching lines...) Expand 10 before | Expand all | Expand 10 after
2190 if (!rhs_type->Is(type_cache_.kZeroToThirtyOne)) { 2173 if (!rhs_type->Is(type_cache_.kZeroToThirtyOne)) {
2191 node->ReplaceInput(1, graph()->NewNode(machine()->Word32And(), rhs, 2174 node->ReplaceInput(1, graph()->NewNode(machine()->Word32And(), rhs,
2192 jsgraph()->Int32Constant(0x1f))); 2175 jsgraph()->Int32Constant(0x1f)));
2193 } 2176 }
2194 NodeProperties::ChangeOp(node, op); 2177 NodeProperties::ChangeOp(node, op);
2195 } 2178 }
2196 2179
2197 } // namespace compiler 2180 } // namespace compiler
2198 } // namespace internal 2181 } // namespace internal
2199 } // namespace v8 2182 } // namespace v8
OLDNEW
« no previous file with comments | « src/compiler/opcodes.h ('k') | src/compiler/simplified-operator.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698