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

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

Issue 1248303002: Unify runtime-style IC functions with Runtime intrinsics (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Cleanup Created 5 years, 5 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
OLDNEW
1 // Copyright 2013 the V8 project authors. All rights reserved. 1 // Copyright 2013 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/v8.h" 5 #include "src/v8.h"
6 6
7 #if V8_TARGET_ARCH_X64 7 #if V8_TARGET_ARCH_X64
8 8
9 #include "src/bootstrapper.h" 9 #include "src/bootstrapper.h"
10 #include "src/code-stubs.h" 10 #include "src/code-stubs.h"
(...skipping 871 matching lines...) Expand 10 before | Expand all | Expand 10 after
882 __ JumpUnlessNonNegativeSmi(key, &slow); 882 __ JumpUnlessNonNegativeSmi(key, &slow);
883 883
884 // Everything is fine, call runtime. 884 // Everything is fine, call runtime.
885 __ PopReturnAddressTo(scratch); 885 __ PopReturnAddressTo(scratch);
886 __ Push(receiver); // receiver 886 __ Push(receiver); // receiver
887 __ Push(key); // key 887 __ Push(key); // key
888 __ PushReturnAddressFrom(scratch); 888 __ PushReturnAddressFrom(scratch);
889 889
890 // Perform tail call to the entry. 890 // Perform tail call to the entry.
891 __ TailCallExternalReference( 891 __ TailCallExternalReference(
892 ExternalReference(IC_Utility(IC::kLoadElementWithInterceptor), 892 ExternalReference(
893 masm->isolate()), 893 Runtime::FunctionForId(Runtime::kLoadElementWithInterceptor),
894 masm->isolate()),
894 2, 1); 895 2, 1);
895 896
896 __ bind(&slow); 897 __ bind(&slow);
897 PropertyAccessCompiler::TailCallBuiltin( 898 PropertyAccessCompiler::TailCallBuiltin(
898 masm, PropertyAccessCompiler::MissBuiltin(Code::KEYED_LOAD_IC)); 899 masm, PropertyAccessCompiler::MissBuiltin(Code::KEYED_LOAD_IC));
899 } 900 }
900 901
901 902
902 void LoadIndexedStringStub::Generate(MacroAssembler* masm) { 903 void LoadIndexedStringStub::Generate(MacroAssembler* masm) {
903 // Return address is on the stack. 904 // Return address is on the stack.
(...skipping 1419 matching lines...) Expand 10 before | Expand all | Expand 10 after
2323 void CallICStub::GenerateMiss(MacroAssembler* masm) { 2324 void CallICStub::GenerateMiss(MacroAssembler* masm) {
2324 FrameScope scope(masm, StackFrame::INTERNAL); 2325 FrameScope scope(masm, StackFrame::INTERNAL);
2325 2326
2326 // Push the receiver and the function and feedback info. 2327 // Push the receiver and the function and feedback info.
2327 __ Push(rdi); 2328 __ Push(rdi);
2328 __ Push(rbx); 2329 __ Push(rbx);
2329 __ Integer32ToSmi(rdx, rdx); 2330 __ Integer32ToSmi(rdx, rdx);
2330 __ Push(rdx); 2331 __ Push(rdx);
2331 2332
2332 // Call the entry. 2333 // Call the entry.
2333 IC::UtilityId id = GetICState() == DEFAULT ? IC::kCallIC_Miss 2334 Runtime::FunctionId id = GetICState() == DEFAULT
2334 : IC::kCallIC_Customization_Miss; 2335 ? Runtime::kCallIC_Miss
2336 : Runtime::kCallIC_Customization_Miss;
2335 2337
2336 ExternalReference miss = ExternalReference(IC_Utility(id), masm->isolate()); 2338 ExternalReference miss =
2339 ExternalReference(Runtime::FunctionForId(id), masm->isolate());
2337 __ CallExternalReference(miss, 3); 2340 __ CallExternalReference(miss, 3);
2338 2341
2339 // Move result to edi and exit the internal frame. 2342 // Move result to edi and exit the internal frame.
2340 __ movp(rdi, rax); 2343 __ movp(rdi, rax);
2341 } 2344 }
2342 2345
2343 2346
2344 bool CEntryStub::NeedsImmovableCode() { 2347 bool CEntryStub::NeedsImmovableCode() {
2345 return false; 2348 return false;
2346 } 2349 }
(...skipping 1506 matching lines...) Expand 10 before | Expand all | Expand 10 after
3853 __ ret(0); 3856 __ ret(0);
3854 3857
3855 __ bind(&miss); 3858 __ bind(&miss);
3856 GenerateMiss(masm); 3859 GenerateMiss(masm);
3857 } 3860 }
3858 3861
3859 3862
3860 void CompareICStub::GenerateMiss(MacroAssembler* masm) { 3863 void CompareICStub::GenerateMiss(MacroAssembler* masm) {
3861 { 3864 {
3862 // Call the runtime system in a fresh internal frame. 3865 // Call the runtime system in a fresh internal frame.
3863 ExternalReference miss = 3866 ExternalReference miss = ExternalReference(
3864 ExternalReference(IC_Utility(IC::kCompareIC_Miss), isolate()); 3867 Runtime::FunctionForId(Runtime::kCompareIC_Miss), isolate());
3865 3868
3866 FrameScope scope(masm, StackFrame::INTERNAL); 3869 FrameScope scope(masm, StackFrame::INTERNAL);
3867 __ Push(rdx); 3870 __ Push(rdx);
3868 __ Push(rax); 3871 __ Push(rax);
3869 __ Push(rdx); 3872 __ Push(rdx);
3870 __ Push(rax); 3873 __ Push(rax);
3871 __ Push(Smi::FromInt(op())); 3874 __ Push(Smi::FromInt(op()));
3872 __ CallExternalReference(miss, 3); 3875 __ CallExternalReference(miss, 3);
3873 3876
3874 // Compute the entry point of the rewritten stub. 3877 // Compute the entry point of the rewritten stub.
(...skipping 1557 matching lines...) Expand 10 before | Expand all | Expand 10 after
5432 kStackSpace, nullptr, return_value_operand, NULL); 5435 kStackSpace, nullptr, return_value_operand, NULL);
5433 } 5436 }
5434 5437
5435 5438
5436 #undef __ 5439 #undef __
5437 5440
5438 } // namespace internal 5441 } // namespace internal
5439 } // namespace v8 5442 } // namespace v8
5440 5443
5441 #endif // V8_TARGET_ARCH_X64 5444 #endif // V8_TARGET_ARCH_X64
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698