OLD | NEW |
---|---|
1 // Copyright 2013 the V8 project authors. All rights reserved. | 1 // Copyright 2013 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_ARM64 | 7 #if V8_TARGET_ARCH_ARM64 |
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 3212 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
3223 Register feedback_vector = x2; | 3223 Register feedback_vector = x2; |
3224 Register index = x3; | 3224 Register index = x3; |
3225 Register scratch = x4; | 3225 Register scratch = x4; |
3226 | 3226 |
3227 EmitLoadTypeFeedbackVector(masm, feedback_vector); | 3227 EmitLoadTypeFeedbackVector(masm, feedback_vector); |
3228 | 3228 |
3229 __ LoadGlobalFunction(Context::ARRAY_FUNCTION_INDEX, scratch); | 3229 __ LoadGlobalFunction(Context::ARRAY_FUNCTION_INDEX, scratch); |
3230 __ Cmp(function, scratch); | 3230 __ Cmp(function, scratch); |
3231 __ B(ne, &miss); | 3231 __ B(ne, &miss); |
3232 | 3232 |
3233 Register allocation_site = feedback_vector; | |
3234 __ Mov(x0, Operand(arg_count())); | 3233 __ Mov(x0, Operand(arg_count())); |
3235 | 3234 |
3236 __ Add(scratch, feedback_vector, | 3235 __ Add(scratch, feedback_vector, |
3237 Operand::UntagSmiAndScale(index, kPointerSizeLog2)); | 3236 Operand::UntagSmiAndScale(index, kPointerSizeLog2)); |
3238 __ Ldr(allocation_site, FieldMemOperand(scratch, FixedArray::kHeaderSize)); | 3237 __ Ldr(scratch, FieldMemOperand(scratch, FixedArray::kHeaderSize)); |
3239 | 3238 |
3240 // Verify that x2 contains an AllocationSite | 3239 // Verify that scratch contains an AllocationSite |
3241 __ AssertUndefinedOrAllocationSite(allocation_site, scratch); | 3240 Register map = x5; |
3241 __ Ldr(map, FieldMemOperand(scratch, AllocationSite::kMapOffset)); | |
Toon Verwaest
2014/07/28 14:11:38
HeapObject::kMapOffset?
(You don't know yet whethe
mvstanton
2014/07/28 16:02:50
Right, we will store in this slot the uninitialize
| |
3242 __ JumpIfNotRoot(map, Heap::kAllocationSiteMapRootIndex, &miss); | |
3243 | |
3244 Register allocation_site = feedback_vector; | |
3245 __ Mov(allocation_site, scratch); | |
3242 ArrayConstructorStub stub(masm->isolate(), arg_count()); | 3246 ArrayConstructorStub stub(masm->isolate(), arg_count()); |
3243 __ TailCallStub(&stub); | 3247 __ TailCallStub(&stub); |
3244 | 3248 |
3245 __ bind(&miss); | 3249 __ bind(&miss); |
3246 GenerateMiss(masm, IC::kCallIC_Customization_Miss); | 3250 GenerateMiss(masm, IC::kCallIC_Customization_Miss); |
3247 | 3251 |
3248 // The slow case, we need this no matter what to complete a call after a miss. | 3252 // The slow case, we need this no matter what to complete a call after a miss. |
3249 CallFunctionNoFeedback(masm, | 3253 CallFunctionNoFeedback(masm, |
3250 arg_count(), | 3254 arg_count(), |
3251 true, | 3255 true, |
(...skipping 2149 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
5401 MemOperand(fp, 6 * kPointerSize), | 5405 MemOperand(fp, 6 * kPointerSize), |
5402 NULL); | 5406 NULL); |
5403 } | 5407 } |
5404 | 5408 |
5405 | 5409 |
5406 #undef __ | 5410 #undef __ |
5407 | 5411 |
5408 } } // namespace v8::internal | 5412 } } // namespace v8::internal |
5409 | 5413 |
5410 #endif // V8_TARGET_ARCH_ARM64 | 5414 #endif // V8_TARGET_ARCH_ARM64 |
OLD | NEW |