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

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

Issue 1248303002: Unify runtime-style IC functions with Runtime intrinsics (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Review feedback 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 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/v8.h" 5 #include "src/v8.h"
6 6
7 #if V8_TARGET_ARCH_IA32 7 #if V8_TARGET_ARCH_IA32
8 8
9 #include "src/base/bits.h" 9 #include "src/base/bits.h"
10 #include "src/bootstrapper.h" 10 #include "src/bootstrapper.h"
(...skipping 671 matching lines...) Expand 10 before | Expand all | Expand 10 after
682 __ j(not_zero, &slow); 682 __ j(not_zero, &slow);
683 683
684 // Everything is fine, call runtime. 684 // Everything is fine, call runtime.
685 __ pop(scratch); 685 __ pop(scratch);
686 __ push(receiver); // receiver 686 __ push(receiver); // receiver
687 __ push(key); // key 687 __ push(key); // key
688 __ push(scratch); // return address 688 __ push(scratch); // return address
689 689
690 // Perform tail call to the entry. 690 // Perform tail call to the entry.
691 ExternalReference ref = ExternalReference( 691 ExternalReference ref = ExternalReference(
692 IC_Utility(IC::kLoadElementWithInterceptor), masm->isolate()); 692 Runtime::FunctionForId(Runtime::kLoadElementWithInterceptor),
693 masm->isolate());
693 __ TailCallExternalReference(ref, 2, 1); 694 __ TailCallExternalReference(ref, 2, 1);
694 695
695 __ bind(&slow); 696 __ bind(&slow);
696 PropertyAccessCompiler::TailCallBuiltin( 697 PropertyAccessCompiler::TailCallBuiltin(
697 masm, PropertyAccessCompiler::MissBuiltin(Code::KEYED_LOAD_IC)); 698 masm, PropertyAccessCompiler::MissBuiltin(Code::KEYED_LOAD_IC));
698 } 699 }
699 700
700 701
701 void LoadIndexedStringStub::Generate(MacroAssembler* masm) { 702 void LoadIndexedStringStub::Generate(MacroAssembler* masm) {
702 // Return address is on the stack. 703 // Return address is on the stack.
(...skipping 1736 matching lines...) Expand 10 before | Expand all | Expand 10 after
2439 2440
2440 void CallICStub::GenerateMiss(MacroAssembler* masm) { 2441 void CallICStub::GenerateMiss(MacroAssembler* masm) {
2441 FrameScope scope(masm, StackFrame::INTERNAL); 2442 FrameScope scope(masm, StackFrame::INTERNAL);
2442 2443
2443 // Push the function and feedback info. 2444 // Push the function and feedback info.
2444 __ push(edi); 2445 __ push(edi);
2445 __ push(ebx); 2446 __ push(ebx);
2446 __ push(edx); 2447 __ push(edx);
2447 2448
2448 // Call the entry. 2449 // Call the entry.
2449 IC::UtilityId id = GetICState() == DEFAULT ? IC::kCallIC_Miss 2450 Runtime::FunctionId id = GetICState() == DEFAULT
2450 : IC::kCallIC_Customization_Miss; 2451 ? Runtime::kCallIC_Miss
2452 : Runtime::kCallIC_Customization_Miss;
2451 2453
2452 ExternalReference miss = ExternalReference(IC_Utility(id), masm->isolate()); 2454 ExternalReference miss =
2455 ExternalReference(Runtime::FunctionForId(id), masm->isolate());
2453 __ CallExternalReference(miss, 3); 2456 __ CallExternalReference(miss, 3);
2454 2457
2455 // Move result to edi and exit the internal frame. 2458 // Move result to edi and exit the internal frame.
2456 __ mov(edi, eax); 2459 __ mov(edi, eax);
2457 } 2460 }
2458 2461
2459 2462
2460 bool CEntryStub::NeedsImmovableCode() { 2463 bool CEntryStub::NeedsImmovableCode() {
2461 return false; 2464 return false;
2462 } 2465 }
(...skipping 1435 matching lines...) Expand 10 before | Expand all | Expand 10 after
3898 __ ret(0); 3901 __ ret(0);
3899 3902
3900 __ bind(&miss); 3903 __ bind(&miss);
3901 GenerateMiss(masm); 3904 GenerateMiss(masm);
3902 } 3905 }
3903 3906
3904 3907
3905 void CompareICStub::GenerateMiss(MacroAssembler* masm) { 3908 void CompareICStub::GenerateMiss(MacroAssembler* masm) {
3906 { 3909 {
3907 // Call the runtime system in a fresh internal frame. 3910 // Call the runtime system in a fresh internal frame.
3908 ExternalReference miss = ExternalReference(IC_Utility(IC::kCompareIC_Miss), 3911 ExternalReference miss = ExternalReference(
3909 isolate()); 3912 Runtime::FunctionForId(Runtime::kCompareIC_Miss), isolate());
3910 FrameScope scope(masm, StackFrame::INTERNAL); 3913 FrameScope scope(masm, StackFrame::INTERNAL);
3911 __ push(edx); // Preserve edx and eax. 3914 __ push(edx); // Preserve edx and eax.
3912 __ push(eax); 3915 __ push(eax);
3913 __ push(edx); // And also use them as the arguments. 3916 __ push(edx); // And also use them as the arguments.
3914 __ push(eax); 3917 __ push(eax);
3915 __ push(Immediate(Smi::FromInt(op()))); 3918 __ push(Immediate(Smi::FromInt(op())));
3916 __ CallExternalReference(miss, 3); 3919 __ CallExternalReference(miss, 3);
3917 // Compute the entry point of the rewritten stub. 3920 // Compute the entry point of the rewritten stub.
3918 __ lea(edi, FieldOperand(eax, Code::kHeaderSize)); 3921 __ lea(edi, FieldOperand(eax, Code::kHeaderSize));
3919 __ pop(eax); 3922 __ pop(eax);
(...skipping 1565 matching lines...) Expand 10 before | Expand all | Expand 10 after
5485 Operand(ebp, 7 * kPointerSize), NULL); 5488 Operand(ebp, 7 * kPointerSize), NULL);
5486 } 5489 }
5487 5490
5488 5491
5489 #undef __ 5492 #undef __
5490 5493
5491 } // namespace internal 5494 } // namespace internal
5492 } // namespace v8 5495 } // namespace v8
5493 5496
5494 #endif // V8_TARGET_ARCH_IA32 5497 #endif // V8_TARGET_ARCH_IA32
OLDNEW
« src/arm64/code-stubs-arm64.cc ('K') | « src/debug.cc ('k') | src/ia32/debug-ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698