| 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 2722 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2733 | 2733 |
| 2734 if (!FLAG_trace_ic) { | 2734 if (!FLAG_trace_ic) { |
| 2735 // We are going megamorphic. If the feedback is a JSFunction, it is fine | 2735 // We are going megamorphic. If the feedback is a JSFunction, it is fine |
| 2736 // to handle it here. More complex cases are dealt with in the runtime. | 2736 // to handle it here. More complex cases are dealt with in the runtime. |
| 2737 __ AssertNotSmi(r4); | 2737 __ AssertNotSmi(r4); |
| 2738 __ CompareObjectType(r4, r5, r5, JS_FUNCTION_TYPE); | 2738 __ CompareObjectType(r4, r5, r5, JS_FUNCTION_TYPE); |
| 2739 __ b(ne, &miss); | 2739 __ b(ne, &miss); |
| 2740 __ add(r4, r2, Operand::PointerOffsetFromSmiKey(r3)); | 2740 __ add(r4, r2, Operand::PointerOffsetFromSmiKey(r3)); |
| 2741 __ LoadRoot(ip, Heap::kmegamorphic_symbolRootIndex); | 2741 __ LoadRoot(ip, Heap::kmegamorphic_symbolRootIndex); |
| 2742 __ str(ip, FieldMemOperand(r4, FixedArray::kHeaderSize)); | 2742 __ str(ip, FieldMemOperand(r4, FixedArray::kHeaderSize)); |
| 2743 // We have to update statistics for runtime profiling. |
| 2744 const int with_types_offset = |
| 2745 FixedArray::OffsetOfElementAt(TypeFeedbackVector::kWithTypesIndex); |
| 2746 __ ldr(r4, FieldMemOperand(r2, with_types_offset)); |
| 2747 __ sub(r4, r4, Operand(Smi::FromInt(1))); |
| 2748 __ str(r4, FieldMemOperand(r2, with_types_offset)); |
| 2749 const int generic_offset = |
| 2750 FixedArray::OffsetOfElementAt(TypeFeedbackVector::kGenericCountIndex); |
| 2751 __ ldr(r4, FieldMemOperand(r2, generic_offset)); |
| 2752 __ add(r4, r4, Operand(Smi::FromInt(1))); |
| 2753 __ str(r4, FieldMemOperand(r2, generic_offset)); |
| 2743 __ jmp(&slow_start); | 2754 __ jmp(&slow_start); |
| 2744 } | 2755 } |
| 2745 | 2756 |
| 2746 // We are here because tracing is on or we are going monomorphic. | 2757 // We are here because tracing is on or we are going monomorphic. |
| 2747 __ bind(&miss); | 2758 __ bind(&miss); |
| 2748 GenerateMiss(masm); | 2759 GenerateMiss(masm); |
| 2749 | 2760 |
| 2750 // the slow case | 2761 // the slow case |
| 2751 __ bind(&slow_start); | 2762 __ bind(&slow_start); |
| 2752 // Check that the function is really a JavaScript function. | 2763 // Check that the function is really a JavaScript function. |
| (...skipping 1955 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4708 MemOperand(fp, 6 * kPointerSize), | 4719 MemOperand(fp, 6 * kPointerSize), |
| 4709 NULL); | 4720 NULL); |
| 4710 } | 4721 } |
| 4711 | 4722 |
| 4712 | 4723 |
| 4713 #undef __ | 4724 #undef __ |
| 4714 | 4725 |
| 4715 } } // namespace v8::internal | 4726 } } // namespace v8::internal |
| 4716 | 4727 |
| 4717 #endif // V8_TARGET_ARCH_ARM | 4728 #endif // V8_TARGET_ARCH_ARM |
| OLD | NEW |