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_ARM | 7 #if V8_TARGET_ARCH_ARM |
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 2694 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2705 | 2705 |
2706 if (!FLAG_trace_ic) { | 2706 if (!FLAG_trace_ic) { |
2707 // We are going megamorphic. If the feedback is a JSFunction, it is fine | 2707 // We are going megamorphic. If the feedback is a JSFunction, it is fine |
2708 // to handle it here. More complex cases are dealt with in the runtime. | 2708 // to handle it here. More complex cases are dealt with in the runtime. |
2709 __ AssertNotSmi(r4); | 2709 __ AssertNotSmi(r4); |
2710 __ CompareObjectType(r4, r5, r5, JS_FUNCTION_TYPE); | 2710 __ CompareObjectType(r4, r5, r5, JS_FUNCTION_TYPE); |
2711 __ b(ne, &miss); | 2711 __ b(ne, &miss); |
2712 __ add(r4, r2, Operand::PointerOffsetFromSmiKey(r3)); | 2712 __ add(r4, r2, Operand::PointerOffsetFromSmiKey(r3)); |
2713 __ LoadRoot(ip, Heap::kmegamorphic_symbolRootIndex); | 2713 __ LoadRoot(ip, Heap::kmegamorphic_symbolRootIndex); |
2714 __ str(ip, FieldMemOperand(r4, FixedArray::kHeaderSize)); | 2714 __ str(ip, FieldMemOperand(r4, FixedArray::kHeaderSize)); |
| 2715 // We have to update statistics for runtime profiling. |
| 2716 const int with_types_offset = |
| 2717 FixedArray::OffsetOfElementAt(TypeFeedbackVector::kWithTypesIndex); |
| 2718 __ ldr(r4, FieldMemOperand(r2, with_types_offset)); |
| 2719 __ sub(r4, r4, Operand(Smi::FromInt(1))); |
| 2720 __ str(r4, FieldMemOperand(r2, with_types_offset)); |
| 2721 const int generic_offset = |
| 2722 FixedArray::OffsetOfElementAt(TypeFeedbackVector::kGenericCountIndex); |
| 2723 __ ldr(r4, FieldMemOperand(r2, generic_offset)); |
| 2724 __ add(r4, r4, Operand(Smi::FromInt(1))); |
| 2725 __ str(r4, FieldMemOperand(r2, generic_offset)); |
2715 __ jmp(&slow_start); | 2726 __ jmp(&slow_start); |
2716 } | 2727 } |
2717 | 2728 |
2718 // We are here because tracing is on or we are going monomorphic. | 2729 // We are here because tracing is on or we are going monomorphic. |
2719 __ bind(&miss); | 2730 __ bind(&miss); |
2720 GenerateMiss(masm); | 2731 GenerateMiss(masm); |
2721 | 2732 |
2722 // the slow case | 2733 // the slow case |
2723 __ bind(&slow_start); | 2734 __ bind(&slow_start); |
2724 // Check that the function is really a JavaScript function. | 2735 // Check that the function is really a JavaScript function. |
(...skipping 1953 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4678 MemOperand(fp, 6 * kPointerSize), | 4689 MemOperand(fp, 6 * kPointerSize), |
4679 NULL); | 4690 NULL); |
4680 } | 4691 } |
4681 | 4692 |
4682 | 4693 |
4683 #undef __ | 4694 #undef __ |
4684 | 4695 |
4685 } } // namespace v8::internal | 4696 } } // namespace v8::internal |
4686 | 4697 |
4687 #endif // V8_TARGET_ARCH_ARM | 4698 #endif // V8_TARGET_ARCH_ARM |
OLD | NEW |