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

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

Issue 418023002: CallIC customization stubs must accept that a vector slot is cleared. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: CallIC feedback slots don't contain smis. 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
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 2237 matching lines...) Expand 10 before | Expand all | Expand 10 after
2248 ParameterCount actual(argc); 2248 ParameterCount actual(argc);
2249 2249
2250 EmitLoadTypeFeedbackVector(masm, rbx); 2250 EmitLoadTypeFeedbackVector(masm, rbx);
2251 __ SmiToInteger32(rdx, rdx); 2251 __ SmiToInteger32(rdx, rdx);
2252 2252
2253 __ LoadGlobalFunction(Context::ARRAY_FUNCTION_INDEX, rcx); 2253 __ LoadGlobalFunction(Context::ARRAY_FUNCTION_INDEX, rcx);
2254 __ cmpp(rdi, rcx); 2254 __ cmpp(rdi, rcx);
2255 __ j(not_equal, &miss); 2255 __ j(not_equal, &miss);
2256 2256
2257 __ movp(rax, Immediate(arg_count())); 2257 __ movp(rax, Immediate(arg_count()));
2258 __ movp(rbx, FieldOperand(rbx, rdx, times_pointer_size, 2258 __ movp(rcx, FieldOperand(rbx, rdx, times_pointer_size,
2259 FixedArray::kHeaderSize)); 2259 FixedArray::kHeaderSize));
2260 // Verify that ecx contains an AllocationSite
2261 Factory* factory = masm->isolate()->factory();
2262 __ Cmp(FieldOperand(rcx, HeapObject::kMapOffset),
2263 factory->allocation_site_map());
2264 __ j(not_equal, &miss);
2260 2265
2261 // Verify that ecx contains an AllocationSite 2266 __ movp(rbx, rcx);
2262 __ AssertUndefinedOrAllocationSite(rbx);
2263 ArrayConstructorStub stub(masm->isolate(), arg_count()); 2267 ArrayConstructorStub stub(masm->isolate(), arg_count());
2264 __ TailCallStub(&stub); 2268 __ TailCallStub(&stub);
2265 2269
2266 __ bind(&miss); 2270 __ bind(&miss);
2267 GenerateMiss(masm, IC::kCallIC_Customization_Miss); 2271 GenerateMiss(masm, IC::kCallIC_Customization_Miss);
2268 2272
2269 // The slow case, we need this no matter what to complete a call after a miss. 2273 // The slow case, we need this no matter what to complete a call after a miss.
2270 CallFunctionNoFeedback(masm, 2274 CallFunctionNoFeedback(masm,
2271 arg_count(), 2275 arg_count(),
2272 true, 2276 true,
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
2326 Label miss; 2330 Label miss;
2327 2331
2328 __ movp(rcx, FieldOperand(rbx, rdx, times_pointer_size, 2332 __ movp(rcx, FieldOperand(rbx, rdx, times_pointer_size,
2329 FixedArray::kHeaderSize)); 2333 FixedArray::kHeaderSize));
2330 __ Cmp(rcx, TypeFeedbackInfo::MegamorphicSentinel(isolate)); 2334 __ Cmp(rcx, TypeFeedbackInfo::MegamorphicSentinel(isolate));
2331 __ j(equal, &slow_start); 2335 __ j(equal, &slow_start);
2332 __ Cmp(rcx, TypeFeedbackInfo::UninitializedSentinel(isolate)); 2336 __ Cmp(rcx, TypeFeedbackInfo::UninitializedSentinel(isolate));
2333 __ j(equal, &miss); 2337 __ j(equal, &miss);
2334 2338
2335 if (!FLAG_trace_ic) { 2339 if (!FLAG_trace_ic) {
2336 // We are going megamorphic, and we don't want to visit the runtime. 2340 // We are going megamorphic. If the feedback is a JSFunction, it is fine
2341 // to handle it here. More complex cases are dealt with in the runtime.
2342 __ AssertNotSmi(rcx);
2343 __ CmpObjectType(rcx, JS_FUNCTION_TYPE, rcx);
2344 __ j(not_equal, &miss);
2337 __ Move(FieldOperand(rbx, rdx, times_pointer_size, 2345 __ Move(FieldOperand(rbx, rdx, times_pointer_size,
2338 FixedArray::kHeaderSize), 2346 FixedArray::kHeaderSize),
2339 TypeFeedbackInfo::MegamorphicSentinel(isolate)); 2347 TypeFeedbackInfo::MegamorphicSentinel(isolate));
2340 __ jmp(&slow_start); 2348 __ jmp(&slow_start);
2341 } 2349 }
2342 2350
2343 // We are here because tracing is on or we are going monomorphic. 2351 // We are here because tracing is on or we are going monomorphic.
2344 __ bind(&miss); 2352 __ bind(&miss);
2345 GenerateMiss(masm, IC::kCallIC_Miss); 2353 GenerateMiss(masm, IC::kCallIC_Miss);
2346 2354
(...skipping 2575 matching lines...) Expand 10 before | Expand all | Expand 10 after
4922 return_value_operand, 4930 return_value_operand,
4923 NULL); 4931 NULL);
4924 } 4932 }
4925 4933
4926 4934
4927 #undef __ 4935 #undef __
4928 4936
4929 } } // namespace v8::internal 4937 } } // namespace v8::internal
4930 4938
4931 #endif // V8_TARGET_ARCH_X64 4939 #endif // V8_TARGET_ARCH_X64
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698