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

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

Issue 552803002: Get CallInterfaceDescriptor directly from CodeStub. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 3 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 | Annotate | Revision Log
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 "src/base/bits.h" 7 #include "src/base/bits.h"
8 #include "src/compiler/common-operator.h" 8 #include "src/compiler/common-operator.h"
9 #include "src/compiler/graph-inl.h" 9 #include "src/compiler/graph-inl.h"
10 #include "src/compiler/node-properties-inl.h" 10 #include "src/compiler/node-properties-inl.h"
(...skipping 834 matching lines...) Expand 10 before | Expand all | Expand 10 after
845 const ElementAccess& access = ElementAccessOf(node->op()); 845 const ElementAccess& access = ElementAccessOf(node->op());
846 WriteBarrierKind kind = ComputeWriteBarrierKind( 846 WriteBarrierKind kind = ComputeWriteBarrierKind(
847 access.base_is_tagged, access.machine_type, access.type); 847 access.base_is_tagged, access.machine_type, access.type);
848 node->set_op(machine_.Store(access.machine_type, kind)); 848 node->set_op(machine_.Store(access.machine_type, kind));
849 node->ReplaceInput(1, ComputeIndex(access, node->InputAt(1))); 849 node->ReplaceInput(1, ComputeIndex(access, node->InputAt(1)));
850 } 850 }
851 851
852 852
853 void SimplifiedLowering::DoStringAdd(Node* node) { 853 void SimplifiedLowering::DoStringAdd(Node* node) {
854 StringAddStub stub(zone()->isolate(), STRING_ADD_CHECK_NONE, NOT_TENURED); 854 StringAddStub stub(zone()->isolate(), STRING_ADD_CHECK_NONE, NOT_TENURED);
855 CodeStubInterfaceDescriptor d(&stub); 855 CallInterfaceDescriptor d = stub.GetCallInterfaceDescriptor();
856 CallDescriptor::Flags flags = CallDescriptor::kNoFlags; 856 CallDescriptor::Flags flags = CallDescriptor::kNoFlags;
857 CallDescriptor* desc = Linkage::GetStubCallDescriptor(&d, 0, flags, zone()); 857 CallDescriptor* desc = Linkage::GetStubCallDescriptor(d, 0, flags, zone());
858 node->set_op(common()->Call(desc)); 858 node->set_op(common()->Call(desc));
859 node->InsertInput(zone(), 0, jsgraph()->HeapConstant(stub.GetCode())); 859 node->InsertInput(zone(), 0, jsgraph()->HeapConstant(stub.GetCode()));
860 node->AppendInput(zone(), jsgraph()->UndefinedConstant()); 860 node->AppendInput(zone(), jsgraph()->UndefinedConstant());
861 node->AppendInput(zone(), graph()->start()); 861 node->AppendInput(zone(), graph()->start());
862 node->AppendInput(zone(), graph()->start()); 862 node->AppendInput(zone(), graph()->start());
863 } 863 }
864 864
865 865
866 Node* SimplifiedLowering::StringComparison(Node* node, bool requires_ordering) { 866 Node* SimplifiedLowering::StringComparison(Node* node, bool requires_ordering) {
867 CEntryStub stub(zone()->isolate(), 1); 867 CEntryStub stub(zone()->isolate(), 1);
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
899 void SimplifiedLowering::DoStringLessThanOrEqual(Node* node) { 899 void SimplifiedLowering::DoStringLessThanOrEqual(Node* node) {
900 node->set_op(machine()->IntLessThanOrEqual()); 900 node->set_op(machine()->IntLessThanOrEqual());
901 node->ReplaceInput(0, StringComparison(node, true)); 901 node->ReplaceInput(0, StringComparison(node, true));
902 node->ReplaceInput(1, jsgraph()->SmiConstant(EQUAL)); 902 node->ReplaceInput(1, jsgraph()->SmiConstant(EQUAL));
903 } 903 }
904 904
905 905
906 } // namespace compiler 906 } // namespace compiler
907 } // namespace internal 907 } // namespace internal
908 } // namespace v8 908 } // namespace v8
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698