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 2832 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2843 } | 2843 } |
2844 | 2844 |
2845 __ bind(&extra_checks_or_miss); | 2845 __ bind(&extra_checks_or_miss); |
2846 Label miss; | 2846 Label miss; |
2847 | 2847 |
2848 __ LoadRoot(at, Heap::kmegamorphic_symbolRootIndex); | 2848 __ LoadRoot(at, Heap::kmegamorphic_symbolRootIndex); |
2849 __ Branch(&slow_start, eq, t0, Operand(at)); | 2849 __ Branch(&slow_start, eq, t0, Operand(at)); |
2850 __ LoadRoot(at, Heap::kuninitialized_symbolRootIndex); | 2850 __ LoadRoot(at, Heap::kuninitialized_symbolRootIndex); |
2851 __ Branch(&miss, eq, t0, Operand(at)); | 2851 __ Branch(&miss, eq, t0, Operand(at)); |
2852 | 2852 |
2853 if (!FLAG_trace_ic) { | |
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. | |
2856 __ AssertNotSmi(t0); | |
2857 __ GetObjectType(t0, t1, t1); | |
2858 __ Branch(&miss, ne, t1, Operand(JS_FUNCTION_TYPE)); | |
2859 __ sll(t0, a3, kPointerSizeLog2 - kSmiTagSize); | |
2860 __ Addu(t0, a2, Operand(t0)); | |
2861 __ LoadRoot(at, Heap::kmegamorphic_symbolRootIndex); | |
2862 __ sw(at, FieldMemOperand(t0, FixedArray::kHeaderSize)); | |
2863 __ Branch(&slow_start); | |
2864 } | |
2865 | |
2866 // We are here because tracing is on or we are going monomorphic. | 2853 // We are here because tracing is on or we are going monomorphic. |
2867 __ bind(&miss); | 2854 __ bind(&miss); |
2868 GenerateMiss(masm); | 2855 GenerateMiss(masm); |
2869 | 2856 |
2870 // the slow case | 2857 // the slow case |
2871 __ bind(&slow_start); | 2858 __ bind(&slow_start); |
2872 // Check that the function is really a JavaScript function. | 2859 // Check that the function is really a JavaScript function. |
2873 // r1: pushed function (to be verified) | 2860 // r1: pushed function (to be verified) |
2874 __ JumpIfSmi(a1, &non_function); | 2861 __ JumpIfSmi(a1, &non_function); |
2875 | 2862 |
(...skipping 2022 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4898 MemOperand(fp, 6 * kPointerSize), | 4885 MemOperand(fp, 6 * kPointerSize), |
4899 NULL); | 4886 NULL); |
4900 } | 4887 } |
4901 | 4888 |
4902 | 4889 |
4903 #undef __ | 4890 #undef __ |
4904 | 4891 |
4905 } } // namespace v8::internal | 4892 } } // namespace v8::internal |
4906 | 4893 |
4907 #endif // V8_TARGET_ARCH_MIPS | 4894 #endif // V8_TARGET_ARCH_MIPS |
OLD | NEW |