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_MIPS | 7 #if V8_TARGET_ARCH_MIPS |
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 2842 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2853 if (!FLAG_trace_ic) { | 2853 if (!FLAG_trace_ic) { |
2854 // We are going megamorphic. If the feedback is a JSFunction, it is fine | 2854 // We are going megamorphic. If the feedback is a JSFunction, it is fine |
2855 // to handle it here. More complex cases are dealt with in the runtime. | 2855 // to handle it here. More complex cases are dealt with in the runtime. |
2856 __ AssertNotSmi(t0); | 2856 __ AssertNotSmi(t0); |
2857 __ GetObjectType(t0, t1, t1); | 2857 __ GetObjectType(t0, t1, t1); |
2858 __ Branch(&miss, ne, t1, Operand(JS_FUNCTION_TYPE)); | 2858 __ Branch(&miss, ne, t1, Operand(JS_FUNCTION_TYPE)); |
2859 __ sll(t0, a3, kPointerSizeLog2 - kSmiTagSize); | 2859 __ sll(t0, a3, kPointerSizeLog2 - kSmiTagSize); |
2860 __ Addu(t0, a2, Operand(t0)); | 2860 __ Addu(t0, a2, Operand(t0)); |
2861 __ LoadRoot(at, Heap::kmegamorphic_symbolRootIndex); | 2861 __ LoadRoot(at, Heap::kmegamorphic_symbolRootIndex); |
2862 __ sw(at, FieldMemOperand(t0, FixedArray::kHeaderSize)); | 2862 __ sw(at, FieldMemOperand(t0, FixedArray::kHeaderSize)); |
| 2863 // We have to update statistics for runtime profiling. |
| 2864 const int with_types_offset = |
| 2865 FixedArray::OffsetOfElementAt(TypeFeedbackVector::kWithTypesIndex); |
| 2866 __ lw(t0, FieldMemOperand(a2, with_types_offset)); |
| 2867 __ Subu(t0, t0, Operand(Smi::FromInt(1))); |
| 2868 __ sw(t0, FieldMemOperand(a2, with_types_offset)); |
| 2869 const int generic_offset = |
| 2870 FixedArray::OffsetOfElementAt(TypeFeedbackVector::kGenericCountIndex); |
| 2871 __ lw(t0, FieldMemOperand(a2, generic_offset)); |
| 2872 __ Addu(t0, t0, Operand(Smi::FromInt(1))); |
| 2873 __ sw(t0, FieldMemOperand(a2, generic_offset)); |
2863 __ Branch(&slow_start); | 2874 __ Branch(&slow_start); |
2864 } | 2875 } |
2865 | 2876 |
2866 // We are here because tracing is on or we are going monomorphic. | 2877 // We are here because tracing is on or we are going monomorphic. |
2867 __ bind(&miss); | 2878 __ bind(&miss); |
2868 GenerateMiss(masm); | 2879 GenerateMiss(masm); |
2869 | 2880 |
2870 // the slow case | 2881 // the slow case |
2871 __ bind(&slow_start); | 2882 __ bind(&slow_start); |
2872 // Check that the function is really a JavaScript function. | 2883 // Check that the function is really a JavaScript function. |
(...skipping 2025 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4898 MemOperand(fp, 6 * kPointerSize), | 4909 MemOperand(fp, 6 * kPointerSize), |
4899 NULL); | 4910 NULL); |
4900 } | 4911 } |
4901 | 4912 |
4902 | 4913 |
4903 #undef __ | 4914 #undef __ |
4904 | 4915 |
4905 } } // namespace v8::internal | 4916 } } // namespace v8::internal |
4906 | 4917 |
4907 #endif // V8_TARGET_ARCH_MIPS | 4918 #endif // V8_TARGET_ARCH_MIPS |
OLD | NEW |