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

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

Issue 1818923002: [stubs] Split ToNumberStub into reusable subparts. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: REBASE Created 4 years, 9 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 1059 matching lines...) Expand 10 before | Expand all | Expand 10 after
1070 CallDescriptor* desc = Linkage::GetStubCallDescriptor( 1070 CallDescriptor* desc = Linkage::GetStubCallDescriptor(
1071 jsgraph_->isolate(), jsgraph_->zone(), callable.descriptor(), 0, 1071 jsgraph_->isolate(), jsgraph_->zone(), callable.descriptor(), 0,
1072 flags, properties); 1072 flags, properties);
1073 node->InsertInput(jsgraph_->zone(), 0, 1073 node->InsertInput(jsgraph_->zone(), 0,
1074 jsgraph_->HeapConstant(callable.code())); 1074 jsgraph_->HeapConstant(callable.code()));
1075 node->InsertInput(jsgraph_->zone(), 3, jsgraph_->NoContextConstant()); 1075 node->InsertInput(jsgraph_->zone(), 3, jsgraph_->NoContextConstant());
1076 NodeProperties::ChangeOp(node, jsgraph_->common()->Call(desc)); 1076 NodeProperties::ChangeOp(node, jsgraph_->common()->Call(desc));
1077 } 1077 }
1078 break; 1078 break;
1079 } 1079 }
1080 case IrOpcode::kStringToNumber: {
1081 VisitUnop(node, UseInfo::AnyTagged(), MachineRepresentation::kTagged);
1082 if (lower()) {
1083 // StringToNumber(x) => Call(StringToNumberStub, x, no-context)
1084 Operator::Properties properties = node->op()->properties();
1085 Callable callable = CodeFactory::StringToNumber(jsgraph_->isolate());
1086 CallDescriptor::Flags flags = CallDescriptor::kNoFlags;
1087 CallDescriptor* desc = Linkage::GetStubCallDescriptor(
1088 jsgraph_->isolate(), jsgraph_->zone(), callable.descriptor(), 0,
1089 flags, properties);
1090 node->InsertInput(jsgraph_->zone(), 0,
1091 jsgraph_->HeapConstant(callable.code()));
1092 node->AppendInput(jsgraph_->zone(), jsgraph_->NoContextConstant());
1093 NodeProperties::ChangeOp(node, jsgraph_->common()->Call(desc));
1094 }
1095 break;
1096 }
1080 case IrOpcode::kAllocate: { 1097 case IrOpcode::kAllocate: {
1081 ProcessInput(node, 0, UseInfo::AnyTagged()); 1098 ProcessInput(node, 0, UseInfo::AnyTagged());
1082 ProcessRemainingInputs(node, 1); 1099 ProcessRemainingInputs(node, 1);
1083 SetOutput(node, MachineRepresentation::kTagged); 1100 SetOutput(node, MachineRepresentation::kTagged);
1084 break; 1101 break;
1085 } 1102 }
1086 case IrOpcode::kLoadField: { 1103 case IrOpcode::kLoadField: {
1087 FieldAccess access = FieldAccessOf(node->op()); 1104 FieldAccess access = FieldAccessOf(node->op());
1088 ProcessInput(node, 0, UseInfoForBasePointer(access)); 1105 ProcessInput(node, 0, UseInfoForBasePointer(access));
1089 ProcessRemainingInputs(node, 1); 1106 ProcessRemainingInputs(node, 1);
(...skipping 681 matching lines...) Expand 10 before | Expand all | Expand 10 after
1771 if (!rhs_type->Is(type_cache_.kZeroToThirtyOne)) { 1788 if (!rhs_type->Is(type_cache_.kZeroToThirtyOne)) {
1772 node->ReplaceInput(1, graph()->NewNode(machine()->Word32And(), rhs, 1789 node->ReplaceInput(1, graph()->NewNode(machine()->Word32And(), rhs,
1773 jsgraph()->Int32Constant(0x1f))); 1790 jsgraph()->Int32Constant(0x1f)));
1774 } 1791 }
1775 NodeProperties::ChangeOp(node, op); 1792 NodeProperties::ChangeOp(node, op);
1776 } 1793 }
1777 1794
1778 } // namespace compiler 1795 } // namespace compiler
1779 } // namespace internal 1796 } // namespace internal
1780 } // namespace v8 1797 } // 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