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

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

Issue 1269323003: Cleanup unnecessary duplication of runtime functions. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Adapt test case. Created 5 years, 4 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/linkage.cc ('k') | src/hydrogen.cc » ('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 1323 matching lines...) Expand 10 before | Expand all | Expand 10 after
1334 node->set_op(machine()->Store( 1334 node->set_op(machine()->Store(
1335 StoreRepresentation(access.machine_type, 1335 StoreRepresentation(access.machine_type,
1336 ComputeWriteBarrierKind(access.base_is_tagged, 1336 ComputeWriteBarrierKind(access.base_is_tagged,
1337 access.machine_type, type)))); 1337 access.machine_type, type))));
1338 node->ReplaceInput(1, ComputeIndex(access, node->InputAt(1))); 1338 node->ReplaceInput(1, ComputeIndex(access, node->InputAt(1)));
1339 } 1339 }
1340 1340
1341 1341
1342 Node* SimplifiedLowering::StringComparison(Node* node, bool requires_ordering) { 1342 Node* SimplifiedLowering::StringComparison(Node* node, bool requires_ordering) {
1343 Runtime::FunctionId f = 1343 Runtime::FunctionId f =
1344 requires_ordering ? Runtime::kStringCompareRT : Runtime::kStringEquals; 1344 requires_ordering ? Runtime::kStringCompare : Runtime::kStringEquals;
1345 ExternalReference ref(f, jsgraph()->isolate()); 1345 ExternalReference ref(f, jsgraph()->isolate());
1346 Operator::Properties props = node->op()->properties(); 1346 Operator::Properties props = node->op()->properties();
1347 // TODO(mstarzinger): We should call StringCompareStub here instead, once an 1347 // TODO(mstarzinger): We should call StringCompareStub here instead, once an
1348 // interface descriptor is available for it. 1348 // interface descriptor is available for it.
1349 CallDescriptor* desc = Linkage::GetRuntimeCallDescriptor(zone(), f, 2, props); 1349 CallDescriptor* desc = Linkage::GetRuntimeCallDescriptor(zone(), f, 2, props);
1350 return graph()->NewNode(common()->Call(desc), 1350 return graph()->NewNode(common()->Call(desc),
1351 jsgraph()->CEntryStubConstant(1), 1351 jsgraph()->CEntryStubConstant(1),
1352 NodeProperties::GetValueInput(node, 0), 1352 NodeProperties::GetValueInput(node, 0),
1353 NodeProperties::GetValueInput(node, 1), 1353 NodeProperties::GetValueInput(node, 1),
1354 jsgraph()->ExternalConstant(ref), 1354 jsgraph()->ExternalConstant(ref),
(...skipping 278 matching lines...) Expand 10 before | Expand all | Expand 10 after
1633 1633
1634 void SimplifiedLowering::DoStringLessThanOrEqual(Node* node) { 1634 void SimplifiedLowering::DoStringLessThanOrEqual(Node* node) {
1635 node->set_op(machine()->IntLessThanOrEqual()); 1635 node->set_op(machine()->IntLessThanOrEqual());
1636 node->ReplaceInput(0, StringComparison(node, true)); 1636 node->ReplaceInput(0, StringComparison(node, true));
1637 node->ReplaceInput(1, jsgraph()->SmiConstant(EQUAL)); 1637 node->ReplaceInput(1, jsgraph()->SmiConstant(EQUAL));
1638 } 1638 }
1639 1639
1640 } // namespace compiler 1640 } // namespace compiler
1641 } // namespace internal 1641 } // namespace internal
1642 } // namespace v8 1642 } // namespace v8
OLDNEW
« no previous file with comments | « src/compiler/linkage.cc ('k') | src/hydrogen.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698