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_X87 | 7 #if V8_TARGET_ARCH_X87 |
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 1939 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1950 | 1950 |
1951 if (!FLAG_trace_ic) { | 1951 if (!FLAG_trace_ic) { |
1952 // We are going megamorphic. If the feedback is a JSFunction, it is fine | 1952 // We are going megamorphic. If the feedback is a JSFunction, it is fine |
1953 // to handle it here. More complex cases are dealt with in the runtime. | 1953 // to handle it here. More complex cases are dealt with in the runtime. |
1954 __ AssertNotSmi(ecx); | 1954 __ AssertNotSmi(ecx); |
1955 __ CmpObjectType(ecx, JS_FUNCTION_TYPE, ecx); | 1955 __ CmpObjectType(ecx, JS_FUNCTION_TYPE, ecx); |
1956 __ j(not_equal, &miss); | 1956 __ j(not_equal, &miss); |
1957 __ mov(FieldOperand(ebx, edx, times_half_pointer_size, | 1957 __ mov(FieldOperand(ebx, edx, times_half_pointer_size, |
1958 FixedArray::kHeaderSize), | 1958 FixedArray::kHeaderSize), |
1959 Immediate(TypeFeedbackVector::MegamorphicSentinel(isolate))); | 1959 Immediate(TypeFeedbackVector::MegamorphicSentinel(isolate))); |
| 1960 // We have to update statistics for runtime profiling. |
| 1961 const int with_types_offset = |
| 1962 FixedArray::OffsetOfElementAt(TypeFeedbackVector::kWithTypesIndex); |
| 1963 __ sub(FieldOperand(ebx, with_types_offset), Immediate(Smi::FromInt(1))); |
| 1964 const int generic_offset = |
| 1965 FixedArray::OffsetOfElementAt(TypeFeedbackVector::kGenericCountIndex); |
| 1966 __ add(FieldOperand(ebx, generic_offset), Immediate(Smi::FromInt(1))); |
1960 __ jmp(&slow_start); | 1967 __ jmp(&slow_start); |
1961 } | 1968 } |
1962 | 1969 |
1963 // We are here because tracing is on or we are going monomorphic. | 1970 // We are here because tracing is on or we are going monomorphic. |
1964 __ bind(&miss); | 1971 __ bind(&miss); |
1965 GenerateMiss(masm); | 1972 GenerateMiss(masm); |
1966 | 1973 |
1967 // the slow case | 1974 // the slow case |
1968 __ bind(&slow_start); | 1975 __ bind(&slow_start); |
1969 | 1976 |
(...skipping 2423 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4393 Operand(ebp, 7 * kPointerSize), | 4400 Operand(ebp, 7 * kPointerSize), |
4394 NULL); | 4401 NULL); |
4395 } | 4402 } |
4396 | 4403 |
4397 | 4404 |
4398 #undef __ | 4405 #undef __ |
4399 | 4406 |
4400 } } // namespace v8::internal | 4407 } } // namespace v8::internal |
4401 | 4408 |
4402 #endif // V8_TARGET_ARCH_X87 | 4409 #endif // V8_TARGET_ARCH_X87 |
OLD | NEW |