| 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/bootstrapper.h" | 9 #include "src/bootstrapper.h" |
| 10 #include "src/code-stubs.h" | 10 #include "src/code-stubs.h" |
| (...skipping 3063 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3074 ParameterCount actual(argc); | 3074 ParameterCount actual(argc); |
| 3075 | 3075 |
| 3076 EmitLoadTypeFeedbackVector(masm, r2); | 3076 EmitLoadTypeFeedbackVector(masm, r2); |
| 3077 | 3077 |
| 3078 __ LoadGlobalFunction(Context::ARRAY_FUNCTION_INDEX, r4); | 3078 __ LoadGlobalFunction(Context::ARRAY_FUNCTION_INDEX, r4); |
| 3079 __ cmp(r1, r4); | 3079 __ cmp(r1, r4); |
| 3080 __ b(ne, &miss); | 3080 __ b(ne, &miss); |
| 3081 | 3081 |
| 3082 __ mov(r0, Operand(arg_count())); | 3082 __ mov(r0, Operand(arg_count())); |
| 3083 __ add(r4, r2, Operand::PointerOffsetFromSmiKey(r3)); | 3083 __ add(r4, r2, Operand::PointerOffsetFromSmiKey(r3)); |
| 3084 __ ldr(r2, FieldMemOperand(r4, FixedArray::kHeaderSize)); | 3084 __ ldr(r4, FieldMemOperand(r4, FixedArray::kHeaderSize)); |
| 3085 // Verify that r2 contains an AllocationSite | 3085 |
| 3086 __ AssertUndefinedOrAllocationSite(r2, r4); | 3086 // Verify that r4 contains an AllocationSite |
| 3087 __ ldr(r5, FieldMemOperand(r4, HeapObject::kMapOffset)); |
| 3088 __ CompareRoot(r5, Heap::kAllocationSiteMapRootIndex); |
| 3089 __ b(ne, &miss); |
| 3090 |
| 3091 __ mov(r2, r4); |
| 3087 ArrayConstructorStub stub(masm->isolate(), arg_count()); | 3092 ArrayConstructorStub stub(masm->isolate(), arg_count()); |
| 3088 __ TailCallStub(&stub); | 3093 __ TailCallStub(&stub); |
| 3089 | 3094 |
| 3090 __ bind(&miss); | 3095 __ bind(&miss); |
| 3091 GenerateMiss(masm, IC::kCallIC_Customization_Miss); | 3096 GenerateMiss(masm, IC::kCallIC_Customization_Miss); |
| 3092 | 3097 |
| 3093 // The slow case, we need this no matter what to complete a call after a miss. | 3098 // The slow case, we need this no matter what to complete a call after a miss. |
| 3094 CallFunctionNoFeedback(masm, | 3099 CallFunctionNoFeedback(masm, |
| 3095 arg_count(), | 3100 arg_count(), |
| 3096 true, | 3101 true, |
| (...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3143 | 3148 |
| 3144 __ bind(&extra_checks_or_miss); | 3149 __ bind(&extra_checks_or_miss); |
| 3145 Label miss; | 3150 Label miss; |
| 3146 | 3151 |
| 3147 __ CompareRoot(r4, Heap::kMegamorphicSymbolRootIndex); | 3152 __ CompareRoot(r4, Heap::kMegamorphicSymbolRootIndex); |
| 3148 __ b(eq, &slow_start); | 3153 __ b(eq, &slow_start); |
| 3149 __ CompareRoot(r4, Heap::kUninitializedSymbolRootIndex); | 3154 __ CompareRoot(r4, Heap::kUninitializedSymbolRootIndex); |
| 3150 __ b(eq, &miss); | 3155 __ b(eq, &miss); |
| 3151 | 3156 |
| 3152 if (!FLAG_trace_ic) { | 3157 if (!FLAG_trace_ic) { |
| 3153 // We are going megamorphic, and we don't want to visit the runtime. | 3158 // We are going megamorphic. If the feedback is a JSFunction, it is fine |
| 3159 // to handle it here. More complex cases are dealt with in the runtime. |
| 3160 __ AssertNotSmi(r4); |
| 3161 __ CompareObjectType(r4, r5, r5, JS_FUNCTION_TYPE); |
| 3162 __ b(ne, &miss); |
| 3154 __ add(r4, r2, Operand::PointerOffsetFromSmiKey(r3)); | 3163 __ add(r4, r2, Operand::PointerOffsetFromSmiKey(r3)); |
| 3155 __ LoadRoot(ip, Heap::kMegamorphicSymbolRootIndex); | 3164 __ LoadRoot(ip, Heap::kMegamorphicSymbolRootIndex); |
| 3156 __ str(ip, FieldMemOperand(r4, FixedArray::kHeaderSize)); | 3165 __ str(ip, FieldMemOperand(r4, FixedArray::kHeaderSize)); |
| 3157 __ jmp(&slow_start); | 3166 __ jmp(&slow_start); |
| 3158 } | 3167 } |
| 3159 | 3168 |
| 3160 // We are here because tracing is on or we are going monomorphic. | 3169 // We are here because tracing is on or we are going monomorphic. |
| 3161 __ bind(&miss); | 3170 __ bind(&miss); |
| 3162 GenerateMiss(masm, IC::kCallIC_Miss); | 3171 GenerateMiss(masm, IC::kCallIC_Miss); |
| 3163 | 3172 |
| (...skipping 2015 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5179 MemOperand(fp, 6 * kPointerSize), | 5188 MemOperand(fp, 6 * kPointerSize), |
| 5180 NULL); | 5189 NULL); |
| 5181 } | 5190 } |
| 5182 | 5191 |
| 5183 | 5192 |
| 5184 #undef __ | 5193 #undef __ |
| 5185 | 5194 |
| 5186 } } // namespace v8::internal | 5195 } } // namespace v8::internal |
| 5187 | 5196 |
| 5188 #endif // V8_TARGET_ARCH_ARM | 5197 #endif // V8_TARGET_ARCH_ARM |
| OLD | NEW |