OLD | NEW |
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_ARM64 | 7 #if V8_TARGET_ARCH_ARM64 |
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 3032 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3043 | 3043 |
3044 if (!FLAG_trace_ic) { | 3044 if (!FLAG_trace_ic) { |
3045 // We are going megamorphic. If the feedback is a JSFunction, it is fine | 3045 // We are going megamorphic. If the feedback is a JSFunction, it is fine |
3046 // to handle it here. More complex cases are dealt with in the runtime. | 3046 // to handle it here. More complex cases are dealt with in the runtime. |
3047 __ AssertNotSmi(x4); | 3047 __ AssertNotSmi(x4); |
3048 __ JumpIfNotObjectType(x4, x5, x5, JS_FUNCTION_TYPE, &miss); | 3048 __ JumpIfNotObjectType(x4, x5, x5, JS_FUNCTION_TYPE, &miss); |
3049 __ Add(x4, feedback_vector, | 3049 __ Add(x4, feedback_vector, |
3050 Operand::UntagSmiAndScale(index, kPointerSizeLog2)); | 3050 Operand::UntagSmiAndScale(index, kPointerSizeLog2)); |
3051 __ LoadRoot(x5, Heap::kmegamorphic_symbolRootIndex); | 3051 __ LoadRoot(x5, Heap::kmegamorphic_symbolRootIndex); |
3052 __ Str(x5, FieldMemOperand(x4, FixedArray::kHeaderSize)); | 3052 __ Str(x5, FieldMemOperand(x4, FixedArray::kHeaderSize)); |
| 3053 // We have to update statistics for runtime profiling. |
| 3054 const int with_types_offset = |
| 3055 FixedArray::OffsetOfElementAt(TypeFeedbackVector::kWithTypesIndex); |
| 3056 __ Ldr(x4, FieldMemOperand(feedback_vector, with_types_offset)); |
| 3057 __ Subs(x4, x4, Operand(Smi::FromInt(1))); |
| 3058 __ Str(x4, FieldMemOperand(feedback_vector, with_types_offset)); |
| 3059 const int generic_offset = |
| 3060 FixedArray::OffsetOfElementAt(TypeFeedbackVector::kGenericCountIndex); |
| 3061 __ Ldr(x4, FieldMemOperand(feedback_vector, generic_offset)); |
| 3062 __ Adds(x4, x4, Operand(Smi::FromInt(1))); |
| 3063 __ Str(x4, FieldMemOperand(feedback_vector, generic_offset)); |
3053 __ B(&slow_start); | 3064 __ B(&slow_start); |
3054 } | 3065 } |
3055 | 3066 |
3056 // We are here because tracing is on or we are going monomorphic. | 3067 // We are here because tracing is on or we are going monomorphic. |
3057 __ bind(&miss); | 3068 __ bind(&miss); |
3058 GenerateMiss(masm); | 3069 GenerateMiss(masm); |
3059 | 3070 |
3060 // the slow case | 3071 // the slow case |
3061 __ bind(&slow_start); | 3072 __ bind(&slow_start); |
3062 | 3073 |
(...skipping 1997 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5060 MemOperand(fp, 6 * kPointerSize), | 5071 MemOperand(fp, 6 * kPointerSize), |
5061 NULL); | 5072 NULL); |
5062 } | 5073 } |
5063 | 5074 |
5064 | 5075 |
5065 #undef __ | 5076 #undef __ |
5066 | 5077 |
5067 } } // namespace v8::internal | 5078 } } // namespace v8::internal |
5068 | 5079 |
5069 #endif // V8_TARGET_ARCH_ARM64 | 5080 #endif // V8_TARGET_ARCH_ARM64 |
OLD | NEW |