| OLD | NEW |
| 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 2215 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2226 __ bind(&extra_checks_or_miss); | 2226 __ bind(&extra_checks_or_miss); |
| 2227 Label miss; | 2227 Label miss; |
| 2228 | 2228 |
| 2229 __ mov(ecx, FieldOperand(ebx, edx, times_half_pointer_size, | 2229 __ mov(ecx, FieldOperand(ebx, edx, times_half_pointer_size, |
| 2230 FixedArray::kHeaderSize)); | 2230 FixedArray::kHeaderSize)); |
| 2231 __ cmp(ecx, Immediate(TypeFeedbackVector::MegamorphicSentinel(isolate))); | 2231 __ cmp(ecx, Immediate(TypeFeedbackVector::MegamorphicSentinel(isolate))); |
| 2232 __ j(equal, &slow_start); | 2232 __ j(equal, &slow_start); |
| 2233 __ cmp(ecx, Immediate(TypeFeedbackVector::UninitializedSentinel(isolate))); | 2233 __ cmp(ecx, Immediate(TypeFeedbackVector::UninitializedSentinel(isolate))); |
| 2234 __ j(equal, &miss); | 2234 __ j(equal, &miss); |
| 2235 | 2235 |
| 2236 if (!FLAG_trace_ic) { | |
| 2237 // We are going megamorphic. If the feedback is a JSFunction, it is fine | |
| 2238 // to handle it here. More complex cases are dealt with in the runtime. | |
| 2239 __ AssertNotSmi(ecx); | |
| 2240 __ CmpObjectType(ecx, JS_FUNCTION_TYPE, ecx); | |
| 2241 __ j(not_equal, &miss); | |
| 2242 __ mov(FieldOperand(ebx, edx, times_half_pointer_size, | |
| 2243 FixedArray::kHeaderSize), | |
| 2244 Immediate(TypeFeedbackVector::MegamorphicSentinel(isolate))); | |
| 2245 __ jmp(&slow_start); | |
| 2246 } | |
| 2247 | |
| 2248 // We are here because tracing is on or we are going monomorphic. | 2236 // We are here because tracing is on or we are going monomorphic. |
| 2249 __ bind(&miss); | 2237 __ bind(&miss); |
| 2250 GenerateMiss(masm); | 2238 GenerateMiss(masm); |
| 2251 | 2239 |
| 2252 // the slow case | 2240 // the slow case |
| 2253 __ bind(&slow_start); | 2241 __ bind(&slow_start); |
| 2254 | 2242 |
| 2255 // Check that the function really is a JavaScript function. | 2243 // Check that the function really is a JavaScript function. |
| 2256 __ JumpIfSmi(edi, &non_function); | 2244 __ JumpIfSmi(edi, &non_function); |
| 2257 | 2245 |
| (...skipping 2444 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4702 Operand(ebp, 7 * kPointerSize), | 4690 Operand(ebp, 7 * kPointerSize), |
| 4703 NULL); | 4691 NULL); |
| 4704 } | 4692 } |
| 4705 | 4693 |
| 4706 | 4694 |
| 4707 #undef __ | 4695 #undef __ |
| 4708 | 4696 |
| 4709 } } // namespace v8::internal | 4697 } } // namespace v8::internal |
| 4710 | 4698 |
| 4711 #endif // V8_TARGET_ARCH_IA32 | 4699 #endif // V8_TARGET_ARCH_IA32 |
| OLD | NEW |