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

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

Issue 898013003: CallIC MISS handler doesn't need receiver. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: REBASE. Created 5 years, 10 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/arm64/code-stubs-arm64.cc ('k') | src/ic/ic.h » ('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/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 2358 matching lines...) Expand 10 before | Expand all | Expand 10 after
2369 __ CmpObjectType(edi, JS_FUNCTION_TYPE, ecx); 2369 __ CmpObjectType(edi, JS_FUNCTION_TYPE, ecx);
2370 __ j(not_equal, &slow); 2370 __ j(not_equal, &slow);
2371 __ jmp(&have_js_function); 2371 __ jmp(&have_js_function);
2372 2372
2373 // Unreachable 2373 // Unreachable
2374 __ int3(); 2374 __ int3();
2375 } 2375 }
2376 2376
2377 2377
2378 void CallICStub::GenerateMiss(MacroAssembler* masm) { 2378 void CallICStub::GenerateMiss(MacroAssembler* masm) {
2379 // Get the receiver of the function from the stack; 1 ~ return address. 2379 FrameScope scope(masm, StackFrame::INTERNAL);
2380 __ mov(ecx, Operand(esp, (arg_count() + 1) * kPointerSize));
2381 2380
2382 { 2381 // Push the function and feedback info.
2383 FrameScope scope(masm, StackFrame::INTERNAL); 2382 __ push(edi);
2383 __ push(ebx);
2384 __ push(edx);
2384 2385
2385 // Push the receiver and the function and feedback info. 2386 // Call the entry.
2386 __ push(ecx); 2387 IC::UtilityId id = GetICState() == DEFAULT ? IC::kCallIC_Miss
2387 __ push(edi); 2388 : IC::kCallIC_Customization_Miss;
2388 __ push(ebx);
2389 __ push(edx);
2390 2389
2391 // Call the entry. 2390 ExternalReference miss = ExternalReference(IC_Utility(id), masm->isolate());
2392 IC::UtilityId id = GetICState() == DEFAULT ? IC::kCallIC_Miss 2391 __ CallExternalReference(miss, 3);
2393 : IC::kCallIC_Customization_Miss;
2394 2392
2395 ExternalReference miss = ExternalReference(IC_Utility(id), 2393 // Move result to edi and exit the internal frame.
2396 masm->isolate()); 2394 __ mov(edi, eax);
2397 __ CallExternalReference(miss, 4);
2398
2399 // Move result to edi and exit the internal frame.
2400 __ mov(edi, eax);
2401 }
2402 } 2395 }
2403 2396
2404 2397
2405 bool CEntryStub::NeedsImmovableCode() { 2398 bool CEntryStub::NeedsImmovableCode() {
2406 return false; 2399 return false;
2407 } 2400 }
2408 2401
2409 2402
2410 void CodeStub::GenerateStubsAheadOfTime(Isolate* isolate) { 2403 void CodeStub::GenerateStubsAheadOfTime(Isolate* isolate) {
2411 CEntryStub::GenerateAheadOfTime(isolate); 2404 CEntryStub::GenerateAheadOfTime(isolate);
(...skipping 2693 matching lines...) Expand 10 before | Expand all | Expand 10 after
5105 ApiParameterOperand(2), kStackSpace, nullptr, 5098 ApiParameterOperand(2), kStackSpace, nullptr,
5106 Operand(ebp, 7 * kPointerSize), NULL); 5099 Operand(ebp, 7 * kPointerSize), NULL);
5107 } 5100 }
5108 5101
5109 5102
5110 #undef __ 5103 #undef __
5111 5104
5112 } } // namespace v8::internal 5105 } } // namespace v8::internal
5113 5106
5114 #endif // V8_TARGET_ARCH_IA32 5107 #endif // V8_TARGET_ARCH_IA32
OLDNEW
« no previous file with comments | « src/arm64/code-stubs-arm64.cc ('k') | src/ic/ic.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698