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

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

Issue 443903002: Version 3.27.34.12 (merged r22693) (Closed) Base URL: https://v8.googlecode.com/svn/branches/3.27
Patch Set: Created 6 years, 4 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
« no previous file with comments | « src/arm64/code-stubs-arm64.cc ('k') | src/ic.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/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/bootstrapper.h" 9 #include "src/bootstrapper.h"
10 #include "src/code-stubs.h" 10 #include "src/code-stubs.h"
(...skipping 2466 matching lines...) Expand 10 before | Expand all | Expand 10 after
2477 int argc = state_.arg_count(); 2477 int argc = state_.arg_count();
2478 ParameterCount actual(argc); 2478 ParameterCount actual(argc);
2479 2479
2480 EmitLoadTypeFeedbackVector(masm, ebx); 2480 EmitLoadTypeFeedbackVector(masm, ebx);
2481 2481
2482 __ LoadGlobalFunction(Context::ARRAY_FUNCTION_INDEX, ecx); 2482 __ LoadGlobalFunction(Context::ARRAY_FUNCTION_INDEX, ecx);
2483 __ cmp(edi, ecx); 2483 __ cmp(edi, ecx);
2484 __ j(not_equal, &miss); 2484 __ j(not_equal, &miss);
2485 2485
2486 __ mov(eax, arg_count()); 2486 __ mov(eax, arg_count());
2487 __ mov(ebx, FieldOperand(ebx, edx, times_half_pointer_size, 2487 __ mov(ecx, FieldOperand(ebx, edx, times_half_pointer_size,
2488 FixedArray::kHeaderSize)); 2488 FixedArray::kHeaderSize));
2489
2489 // Verify that ecx contains an AllocationSite 2490 // Verify that ecx contains an AllocationSite
2490 __ AssertUndefinedOrAllocationSite(ebx); 2491 Factory* factory = masm->isolate()->factory();
2492 __ cmp(FieldOperand(ecx, HeapObject::kMapOffset),
2493 factory->allocation_site_map());
2494 __ j(not_equal, &miss);
2495
2496 __ mov(ebx, ecx);
2491 ArrayConstructorStub stub(masm->isolate(), arg_count()); 2497 ArrayConstructorStub stub(masm->isolate(), arg_count());
2492 __ TailCallStub(&stub); 2498 __ TailCallStub(&stub);
2493 2499
2494 __ bind(&miss); 2500 __ bind(&miss);
2495 GenerateMiss(masm, IC::kCallIC_Customization_Miss); 2501 GenerateMiss(masm, IC::kCallIC_Customization_Miss);
2496 2502
2497 // The slow case, we need this no matter what to complete a call after a miss. 2503 // The slow case, we need this no matter what to complete a call after a miss.
2498 CallFunctionNoFeedback(masm, 2504 CallFunctionNoFeedback(masm,
2499 arg_count(), 2505 arg_count(),
2500 true, 2506 true,
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
2551 Label miss; 2557 Label miss;
2552 2558
2553 __ mov(ecx, FieldOperand(ebx, edx, times_half_pointer_size, 2559 __ mov(ecx, FieldOperand(ebx, edx, times_half_pointer_size,
2554 FixedArray::kHeaderSize)); 2560 FixedArray::kHeaderSize));
2555 __ cmp(ecx, Immediate(TypeFeedbackInfo::MegamorphicSentinel(isolate))); 2561 __ cmp(ecx, Immediate(TypeFeedbackInfo::MegamorphicSentinel(isolate)));
2556 __ j(equal, &slow_start); 2562 __ j(equal, &slow_start);
2557 __ cmp(ecx, Immediate(TypeFeedbackInfo::UninitializedSentinel(isolate))); 2563 __ cmp(ecx, Immediate(TypeFeedbackInfo::UninitializedSentinel(isolate)));
2558 __ j(equal, &miss); 2564 __ j(equal, &miss);
2559 2565
2560 if (!FLAG_trace_ic) { 2566 if (!FLAG_trace_ic) {
2561 // We are going megamorphic, and we don't want to visit the runtime. 2567 // We are going megamorphic. If the feedback is a JSFunction, it is fine
2568 // to handle it here. More complex cases are dealt with in the runtime.
2569 __ AssertNotSmi(ecx);
2570 __ CmpObjectType(ecx, JS_FUNCTION_TYPE, ecx);
2571 __ j(not_equal, &miss);
2562 __ mov(FieldOperand(ebx, edx, times_half_pointer_size, 2572 __ mov(FieldOperand(ebx, edx, times_half_pointer_size,
2563 FixedArray::kHeaderSize), 2573 FixedArray::kHeaderSize),
2564 Immediate(TypeFeedbackInfo::MegamorphicSentinel(isolate))); 2574 Immediate(TypeFeedbackInfo::MegamorphicSentinel(isolate)));
2565 __ jmp(&slow_start); 2575 __ jmp(&slow_start);
2566 } 2576 }
2567 2577
2568 // We are here because tracing is on or we are going monomorphic. 2578 // We are here because tracing is on or we are going monomorphic.
2569 __ bind(&miss); 2579 __ bind(&miss);
2570 GenerateMiss(masm, IC::kCallIC_Miss); 2580 GenerateMiss(masm, IC::kCallIC_Miss);
2571 2581
(...skipping 2513 matching lines...) Expand 10 before | Expand all | Expand 10 after
5085 Operand(ebp, 7 * kPointerSize), 5095 Operand(ebp, 7 * kPointerSize),
5086 NULL); 5096 NULL);
5087 } 5097 }
5088 5098
5089 5099
5090 #undef __ 5100 #undef __
5091 5101
5092 } } // namespace v8::internal 5102 } } // namespace v8::internal
5093 5103
5094 #endif // V8_TARGET_ARCH_IA32 5104 #endif // V8_TARGET_ARCH_IA32
OLDNEW
« no previous file with comments | « src/arm64/code-stubs-arm64.cc ('k') | src/ic.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698