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

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

Issue 445943002: CallIC must update type feedback info correctly. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
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 | « no previous file | src/ic.h » ('j') | src/ic.cc » ('J')
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 2437 matching lines...) Expand 10 before | Expand all | Expand 10 after
2448 __ bind(&extra_checks_or_miss); 2448 __ bind(&extra_checks_or_miss);
2449 Label miss; 2449 Label miss;
2450 2450
2451 __ mov(ecx, FieldOperand(ebx, edx, times_half_pointer_size, 2451 __ mov(ecx, FieldOperand(ebx, edx, times_half_pointer_size,
2452 FixedArray::kHeaderSize)); 2452 FixedArray::kHeaderSize));
2453 __ cmp(ecx, Immediate(TypeFeedbackInfo::MegamorphicSentinel(isolate))); 2453 __ cmp(ecx, Immediate(TypeFeedbackInfo::MegamorphicSentinel(isolate)));
2454 __ j(equal, &slow_start); 2454 __ j(equal, &slow_start);
2455 __ cmp(ecx, Immediate(TypeFeedbackInfo::UninitializedSentinel(isolate))); 2455 __ cmp(ecx, Immediate(TypeFeedbackInfo::UninitializedSentinel(isolate)));
2456 __ j(equal, &miss); 2456 __ j(equal, &miss);
2457 2457
2458 if (!FLAG_trace_ic) {
2459 // We are going megamorphic. If the feedback is a JSFunction, it is fine
Jakob Kummerow 2014/08/06 14:49:09 Removing optimizations is sad... is the type feedb
mvstanton 2014/08/06 15:32:33 That sounds good to me. I'll move this change to a
2460 // to handle it here. More complex cases are dealt with in the runtime.
2461 __ AssertNotSmi(ecx);
2462 __ CmpObjectType(ecx, JS_FUNCTION_TYPE, ecx);
2463 __ j(not_equal, &miss);
2464 __ mov(FieldOperand(ebx, edx, times_half_pointer_size,
2465 FixedArray::kHeaderSize),
2466 Immediate(TypeFeedbackInfo::MegamorphicSentinel(isolate)));
2467 __ jmp(&slow_start);
2468 }
2469
2470 // We are here because tracing is on or we are going monomorphic. 2458 // We are here because tracing is on or we are going monomorphic.
2471 __ bind(&miss); 2459 __ bind(&miss);
2472 GenerateMiss(masm, IC::kCallIC_Miss); 2460 GenerateMiss(masm, IC::kCallIC_Miss);
2473 2461
2474 // the slow case 2462 // the slow case
2475 __ bind(&slow_start); 2463 __ bind(&slow_start);
2476 2464
2477 // Check that the function really is a JavaScript function. 2465 // Check that the function really is a JavaScript function.
2478 __ JumpIfSmi(edi, &non_function); 2466 __ JumpIfSmi(edi, &non_function);
2479 2467
(...skipping 2525 matching lines...) Expand 10 before | Expand all | Expand 10 after
5005 Operand(ebp, 7 * kPointerSize), 4993 Operand(ebp, 7 * kPointerSize),
5006 NULL); 4994 NULL);
5007 } 4995 }
5008 4996
5009 4997
5010 #undef __ 4998 #undef __
5011 4999
5012 } } // namespace v8::internal 5000 } } // namespace v8::internal
5013 5001
5014 #endif // V8_TARGET_ARCH_IA32 5002 #endif // V8_TARGET_ARCH_IA32
OLDNEW
« no previous file with comments | « no previous file | src/ic.h » ('j') | src/ic.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698