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

Side by Side Diff: src/code-stubs-hydrogen.cc

Issue 1823523002: [stubs] Unify the type conversion call interface descriptors. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: 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/code-stubs.cc ('k') | src/ia32/interface-descriptors-ia32.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 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 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/code-stubs.h" 5 #include "src/code-stubs.h"
6 6
7 #include "src/bailout-reason.h" 7 #include "src/bailout-reason.h"
8 #include "src/crankshaft/hydrogen.h" 8 #include "src/crankshaft/hydrogen.h"
9 #include "src/crankshaft/lithium.h" 9 #include "src/crankshaft/lithium.h"
10 #include "src/field-index.h" 10 #include "src/field-index.h"
(...skipping 1515 matching lines...) Expand 10 before | Expand all | Expand 10 after
1526 // The input is already a primitive. 1526 // The input is already a primitive.
1527 Push(input); 1527 Push(input);
1528 } 1528 }
1529 if_inputisprimitive.Else(); 1529 if_inputisprimitive.Else();
1530 { 1530 {
1531 // Convert the input to a primitive. 1531 // Convert the input to a primitive.
1532 Push(BuildToPrimitive(input, input_map)); 1532 Push(BuildToPrimitive(input, input_map));
1533 } 1533 }
1534 if_inputisprimitive.End(); 1534 if_inputisprimitive.End();
1535 // Convert the primitive to a string value. 1535 // Convert the primitive to a string value.
1536 ToStringDescriptor descriptor(isolate());
1537 ToStringStub stub(isolate()); 1536 ToStringStub stub(isolate());
1538 HValue* values[] = {context(), Pop()}; 1537 HValue* values[] = {context(), Pop()};
1539 Push(AddUncasted<HCallWithDescriptor>( 1538 Push(AddUncasted<HCallWithDescriptor>(
1540 Add<HConstant>(stub.GetCode()), 0, descriptor, 1539 Add<HConstant>(stub.GetCode()), 0, stub.GetCallInterfaceDescriptor(),
1541 Vector<HValue*>(values, arraysize(values)))); 1540 Vector<HValue*>(values, arraysize(values))));
1542 } 1541 }
1543 if_inputisstring.End(); 1542 if_inputisstring.End();
1544 } 1543 }
1545 if_inputissmi.End(); 1544 if_inputissmi.End();
1546 return Pop(); 1545 return Pop();
1547 } 1546 }
1548 1547
1549 1548
1550 HValue* CodeStubGraphBuilderBase::BuildToPrimitive(HValue* input, 1549 HValue* CodeStubGraphBuilderBase::BuildToPrimitive(HValue* input,
(...skipping 237 matching lines...) Expand 10 before | Expand all | Expand 10 after
1788 } 1787 }
1789 1788
1790 1789
1791 Handle<Code> ElementsTransitionAndStoreStub::GenerateCode() { 1790 Handle<Code> ElementsTransitionAndStoreStub::GenerateCode() {
1792 return DoGenerateCode(this); 1791 return DoGenerateCode(this);
1793 } 1792 }
1794 1793
1795 1794
1796 template <> 1795 template <>
1797 HValue* CodeStubGraphBuilder<ToObjectStub>::BuildCodeStub() { 1796 HValue* CodeStubGraphBuilder<ToObjectStub>::BuildCodeStub() {
1798 HValue* receiver = GetParameter(ToObjectDescriptor::kReceiverIndex); 1797 HValue* receiver = GetParameter(TypeConversionDescriptor::kArgumentIndex);
1799 return BuildToObject(receiver); 1798 return BuildToObject(receiver);
1800 } 1799 }
1801 1800
1802 1801
1803 Handle<Code> ToObjectStub::GenerateCode() { return DoGenerateCode(this); } 1802 Handle<Code> ToObjectStub::GenerateCode() { return DoGenerateCode(this); }
1804 1803
1805 1804
1806 void CodeStubGraphBuilderBase::BuildCheckAndInstallOptimizedCode( 1805 void CodeStubGraphBuilderBase::BuildCheckAndInstallOptimizedCode(
1807 HValue* js_function, 1806 HValue* js_function,
1808 HValue* native_context, 1807 HValue* native_context,
(...skipping 555 matching lines...) Expand 10 before | Expand all | Expand 10 after
2364 return Pop(); 2363 return Pop();
2365 } 2364 }
2366 2365
2367 2366
2368 Handle<Code> KeyedLoadGenericStub::GenerateCode() { 2367 Handle<Code> KeyedLoadGenericStub::GenerateCode() {
2369 return DoGenerateCode(this); 2368 return DoGenerateCode(this);
2370 } 2369 }
2371 2370
2372 } // namespace internal 2371 } // namespace internal
2373 } // namespace v8 2372 } // namespace v8
OLDNEW
« no previous file with comments | « src/code-stubs.cc ('k') | src/ia32/interface-descriptors-ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698