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 #if V8_TARGET_ARCH_ARM | 5 #if V8_TARGET_ARCH_ARM |
6 | 6 |
7 #include "src/code-factory.h" | 7 #include "src/code-factory.h" |
8 #include "src/code-stubs.h" | 8 #include "src/code-stubs.h" |
9 #include "src/codegen.h" | 9 #include "src/codegen.h" |
10 #include "src/compiler.h" | 10 #include "src/compiler.h" |
(...skipping 3173 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3184 | 3184 |
3185 // Call the construct call builtin that handles allocation and | 3185 // Call the construct call builtin that handles allocation and |
3186 // constructor invocation. | 3186 // constructor invocation. |
3187 SetConstructCallPosition(expr); | 3187 SetConstructCallPosition(expr); |
3188 | 3188 |
3189 // Load function and argument count into r1 and r0. | 3189 // Load function and argument count into r1 and r0. |
3190 __ mov(r0, Operand(arg_count)); | 3190 __ mov(r0, Operand(arg_count)); |
3191 __ ldr(r1, MemOperand(sp, arg_count * kPointerSize)); | 3191 __ ldr(r1, MemOperand(sp, arg_count * kPointerSize)); |
3192 | 3192 |
3193 // Record call targets in unoptimized code. | 3193 // Record call targets in unoptimized code. |
3194 if (FLAG_pretenuring_call_new) { | |
3195 EnsureSlotContainsAllocationSite(expr->AllocationSiteFeedbackSlot()); | |
3196 DCHECK(expr->AllocationSiteFeedbackSlot().ToInt() == | |
3197 expr->CallNewFeedbackSlot().ToInt() + 1); | |
3198 } | |
3199 | |
3200 __ Move(r2, FeedbackVector()); | 3194 __ Move(r2, FeedbackVector()); |
3201 __ mov(r3, Operand(SmiFromSlot(expr->CallNewFeedbackSlot()))); | 3195 __ mov(r3, Operand(SmiFromSlot(expr->CallNewFeedbackSlot()))); |
3202 | 3196 |
3203 CallConstructStub stub(isolate(), RECORD_CONSTRUCTOR_TARGET); | 3197 CallConstructStub stub(isolate(), RECORD_CONSTRUCTOR_TARGET); |
3204 __ Call(stub.GetCode(), RelocInfo::CONSTRUCT_CALL); | 3198 __ Call(stub.GetCode(), RelocInfo::CONSTRUCT_CALL); |
3205 PrepareForBailoutForId(expr->ReturnId(), TOS_REG); | 3199 PrepareForBailoutForId(expr->ReturnId(), TOS_REG); |
3206 // Restore context register. | 3200 // Restore context register. |
3207 __ ldr(cp, MemOperand(fp, StandardFrameConstants::kContextOffset)); | 3201 __ ldr(cp, MemOperand(fp, StandardFrameConstants::kContextOffset)); |
3208 context()->Plug(r0); | 3202 context()->Plug(r0); |
3209 } | 3203 } |
(...skipping 20 matching lines...) Expand all Loading... |
3230 | 3224 |
3231 // Load original constructor into r4. | 3225 // Load original constructor into r4. |
3232 VisitForAccumulatorValue(super_call_ref->new_target_var()); | 3226 VisitForAccumulatorValue(super_call_ref->new_target_var()); |
3233 __ mov(r4, result_register()); | 3227 __ mov(r4, result_register()); |
3234 | 3228 |
3235 // Load function and argument count into r1 and r0. | 3229 // Load function and argument count into r1 and r0. |
3236 __ mov(r0, Operand(arg_count)); | 3230 __ mov(r0, Operand(arg_count)); |
3237 __ ldr(r1, MemOperand(sp, arg_count * kPointerSize)); | 3231 __ ldr(r1, MemOperand(sp, arg_count * kPointerSize)); |
3238 | 3232 |
3239 // Record call targets in unoptimized code. | 3233 // Record call targets in unoptimized code. |
3240 if (FLAG_pretenuring_call_new) { | |
3241 UNREACHABLE(); | |
3242 /* TODO(dslomov): support pretenuring. | |
3243 EnsureSlotContainsAllocationSite(expr->AllocationSiteFeedbackSlot()); | |
3244 DCHECK(expr->AllocationSiteFeedbackSlot().ToInt() == | |
3245 expr->CallNewFeedbackSlot().ToInt() + 1); | |
3246 */ | |
3247 } | |
3248 | |
3249 __ Move(r2, FeedbackVector()); | 3234 __ Move(r2, FeedbackVector()); |
3250 __ mov(r3, Operand(SmiFromSlot(expr->CallFeedbackSlot()))); | 3235 __ mov(r3, Operand(SmiFromSlot(expr->CallFeedbackSlot()))); |
3251 | 3236 |
3252 CallConstructStub stub(isolate(), SUPER_CALL_RECORD_TARGET); | 3237 CallConstructStub stub(isolate(), SUPER_CALL_RECORD_TARGET); |
3253 __ Call(stub.GetCode(), RelocInfo::CONSTRUCT_CALL); | 3238 __ Call(stub.GetCode(), RelocInfo::CONSTRUCT_CALL); |
3254 | 3239 |
3255 RecordJSReturnSite(expr); | 3240 RecordJSReturnSite(expr); |
3256 | 3241 |
3257 // Restore context register. | 3242 // Restore context register. |
3258 __ ldr(cp, MemOperand(fp, StandardFrameConstants::kContextOffset)); | 3243 __ ldr(cp, MemOperand(fp, StandardFrameConstants::kContextOffset)); |
(...skipping 2018 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5277 DCHECK(interrupt_address == | 5262 DCHECK(interrupt_address == |
5278 isolate->builtins()->OsrAfterStackCheck()->entry()); | 5263 isolate->builtins()->OsrAfterStackCheck()->entry()); |
5279 return OSR_AFTER_STACK_CHECK; | 5264 return OSR_AFTER_STACK_CHECK; |
5280 } | 5265 } |
5281 | 5266 |
5282 | 5267 |
5283 } // namespace internal | 5268 } // namespace internal |
5284 } // namespace v8 | 5269 } // namespace v8 |
5285 | 5270 |
5286 #endif // V8_TARGET_ARCH_ARM | 5271 #endif // V8_TARGET_ARCH_ARM |
OLD | NEW |