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 2253 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2264 | 2264 |
2265 if (!FLAG_trace_ic) { | 2265 if (!FLAG_trace_ic) { |
2266 // We are going megamorphic. If the feedback is a JSFunction, it is fine | 2266 // We are going megamorphic. If the feedback is a JSFunction, it is fine |
2267 // to handle it here. More complex cases are dealt with in the runtime. | 2267 // to handle it here. More complex cases are dealt with in the runtime. |
2268 __ AssertNotSmi(ecx); | 2268 __ AssertNotSmi(ecx); |
2269 __ CmpObjectType(ecx, JS_FUNCTION_TYPE, ecx); | 2269 __ CmpObjectType(ecx, JS_FUNCTION_TYPE, ecx); |
2270 __ j(not_equal, &miss); | 2270 __ j(not_equal, &miss); |
2271 __ mov(FieldOperand(ebx, edx, times_half_pointer_size, | 2271 __ mov(FieldOperand(ebx, edx, times_half_pointer_size, |
2272 FixedArray::kHeaderSize), | 2272 FixedArray::kHeaderSize), |
2273 Immediate(TypeFeedbackVector::MegamorphicSentinel(isolate))); | 2273 Immediate(TypeFeedbackVector::MegamorphicSentinel(isolate))); |
| 2274 // We have to update statistics for runtime profiling. |
| 2275 const int with_types_offset = |
| 2276 FixedArray::OffsetOfElementAt(TypeFeedbackVector::kWithTypesIndex); |
| 2277 __ sub(FieldOperand(ebx, with_types_offset), Immediate(Smi::FromInt(1))); |
| 2278 const int generic_offset = |
| 2279 FixedArray::OffsetOfElementAt(TypeFeedbackVector::kGenericCountIndex); |
| 2280 __ add(FieldOperand(ebx, generic_offset), Immediate(Smi::FromInt(1))); |
2274 __ jmp(&slow_start); | 2281 __ jmp(&slow_start); |
2275 } | 2282 } |
2276 | 2283 |
2277 // We are here because tracing is on or we are going monomorphic. | 2284 // We are here because tracing is on or we are going monomorphic. |
2278 __ bind(&miss); | 2285 __ bind(&miss); |
2279 GenerateMiss(masm); | 2286 GenerateMiss(masm); |
2280 | 2287 |
2281 // the slow case | 2288 // the slow case |
2282 __ bind(&slow_start); | 2289 __ bind(&slow_start); |
2283 | 2290 |
(...skipping 2450 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4734 Operand(ebp, 7 * kPointerSize), | 4741 Operand(ebp, 7 * kPointerSize), |
4735 NULL); | 4742 NULL); |
4736 } | 4743 } |
4737 | 4744 |
4738 | 4745 |
4739 #undef __ | 4746 #undef __ |
4740 | 4747 |
4741 } } // namespace v8::internal | 4748 } } // namespace v8::internal |
4742 | 4749 |
4743 #endif // V8_TARGET_ARCH_IA32 | 4750 #endif // V8_TARGET_ARCH_IA32 |
OLD | NEW |