| 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/ast/scopes.h" | 7 #include "src/ast/scopes.h" |
| 8 #include "src/code-factory.h" | 8 #include "src/code-factory.h" |
| 9 #include "src/code-stubs.h" | 9 #include "src/code-stubs.h" |
| 10 #include "src/codegen.h" | 10 #include "src/codegen.h" |
| (...skipping 3010 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3021 | 3021 |
| 3022 // Load function and argument count into r1 and r0. | 3022 // Load function and argument count into r1 and r0. |
| 3023 __ mov(r0, Operand(arg_count)); | 3023 __ mov(r0, Operand(arg_count)); |
| 3024 __ ldr(r1, MemOperand(sp, arg_count * kPointerSize)); | 3024 __ ldr(r1, MemOperand(sp, arg_count * kPointerSize)); |
| 3025 | 3025 |
| 3026 // Record call targets in unoptimized code. | 3026 // Record call targets in unoptimized code. |
| 3027 __ EmitLoadTypeFeedbackVector(r2); | 3027 __ EmitLoadTypeFeedbackVector(r2); |
| 3028 __ mov(r3, Operand(SmiFromSlot(expr->CallNewFeedbackSlot()))); | 3028 __ mov(r3, Operand(SmiFromSlot(expr->CallNewFeedbackSlot()))); |
| 3029 | 3029 |
| 3030 CallConstructStub stub(isolate()); | 3030 CallConstructStub stub(isolate()); |
| 3031 __ Call(stub.GetCode(), RelocInfo::CONSTRUCT_CALL); | 3031 __ Call(stub.GetCode(), RelocInfo::CODE_TARGET); |
| 3032 PrepareForBailoutForId(expr->ReturnId(), TOS_REG); | 3032 PrepareForBailoutForId(expr->ReturnId(), TOS_REG); |
| 3033 // Restore context register. | 3033 // Restore context register. |
| 3034 __ ldr(cp, MemOperand(fp, StandardFrameConstants::kContextOffset)); | 3034 __ ldr(cp, MemOperand(fp, StandardFrameConstants::kContextOffset)); |
| 3035 context()->Plug(r0); | 3035 context()->Plug(r0); |
| 3036 } | 3036 } |
| 3037 | 3037 |
| 3038 | 3038 |
| 3039 void FullCodeGenerator::EmitSuperConstructorCall(Call* expr) { | 3039 void FullCodeGenerator::EmitSuperConstructorCall(Call* expr) { |
| 3040 SuperCallReference* super_call_ref = | 3040 SuperCallReference* super_call_ref = |
| 3041 expr->expression()->AsSuperCallReference(); | 3041 expr->expression()->AsSuperCallReference(); |
| (...skipping 14 matching lines...) Expand all Loading... |
| 3056 SetConstructCallPosition(expr, arg_count); | 3056 SetConstructCallPosition(expr, arg_count); |
| 3057 | 3057 |
| 3058 // Load new target into r3. | 3058 // Load new target into r3. |
| 3059 VisitForAccumulatorValue(super_call_ref->new_target_var()); | 3059 VisitForAccumulatorValue(super_call_ref->new_target_var()); |
| 3060 __ mov(r3, result_register()); | 3060 __ mov(r3, result_register()); |
| 3061 | 3061 |
| 3062 // Load function and argument count into r1 and r0. | 3062 // Load function and argument count into r1 and r0. |
| 3063 __ mov(r0, Operand(arg_count)); | 3063 __ mov(r0, Operand(arg_count)); |
| 3064 __ ldr(r1, MemOperand(sp, arg_count * kPointerSize)); | 3064 __ ldr(r1, MemOperand(sp, arg_count * kPointerSize)); |
| 3065 | 3065 |
| 3066 __ Call(isolate()->builtins()->Construct(), RelocInfo::CONSTRUCT_CALL); | 3066 __ Call(isolate()->builtins()->Construct(), RelocInfo::CODE_TARGET); |
| 3067 | 3067 |
| 3068 RecordJSReturnSite(expr); | 3068 RecordJSReturnSite(expr); |
| 3069 | 3069 |
| 3070 // Restore context register. | 3070 // Restore context register. |
| 3071 __ ldr(cp, MemOperand(fp, StandardFrameConstants::kContextOffset)); | 3071 __ ldr(cp, MemOperand(fp, StandardFrameConstants::kContextOffset)); |
| 3072 context()->Plug(r0); | 3072 context()->Plug(r0); |
| 3073 } | 3073 } |
| 3074 | 3074 |
| 3075 | 3075 |
| 3076 void FullCodeGenerator::EmitIsSmi(CallRuntime* expr) { | 3076 void FullCodeGenerator::EmitIsSmi(CallRuntime* expr) { |
| (...skipping 732 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3809 // Pre-decrement in order to skip receiver. | 3809 // Pre-decrement in order to skip receiver. |
| 3810 __ ldr(r4, MemOperand(r2, kPointerSize, NegPreIndex)); | 3810 __ ldr(r4, MemOperand(r2, kPointerSize, NegPreIndex)); |
| 3811 __ Push(r4); | 3811 __ Push(r4); |
| 3812 __ sub(r1, r1, Operand(1)); | 3812 __ sub(r1, r1, Operand(1)); |
| 3813 __ cmp(r1, Operand::Zero()); | 3813 __ cmp(r1, Operand::Zero()); |
| 3814 __ b(ne, &loop); | 3814 __ b(ne, &loop); |
| 3815 } | 3815 } |
| 3816 | 3816 |
| 3817 __ bind(&args_set_up); | 3817 __ bind(&args_set_up); |
| 3818 __ ldr(r1, MemOperand(sp, r0, LSL, kPointerSizeLog2)); | 3818 __ ldr(r1, MemOperand(sp, r0, LSL, kPointerSizeLog2)); |
| 3819 __ Call(isolate()->builtins()->Construct(), RelocInfo::CONSTRUCT_CALL); | 3819 __ Call(isolate()->builtins()->Construct(), RelocInfo::CODE_TARGET); |
| 3820 | 3820 |
| 3821 // Restore context register. | 3821 // Restore context register. |
| 3822 __ ldr(cp, MemOperand(fp, StandardFrameConstants::kContextOffset)); | 3822 __ ldr(cp, MemOperand(fp, StandardFrameConstants::kContextOffset)); |
| 3823 | 3823 |
| 3824 context()->DropAndPlug(1, r0); | 3824 context()->DropAndPlug(1, r0); |
| 3825 } | 3825 } |
| 3826 | 3826 |
| 3827 | 3827 |
| 3828 void FullCodeGenerator::EmitHasCachedArrayIndex(CallRuntime* expr) { | 3828 void FullCodeGenerator::EmitHasCachedArrayIndex(CallRuntime* expr) { |
| 3829 ZoneList<Expression*>* args = expr->arguments(); | 3829 ZoneList<Expression*>* args = expr->arguments(); |
| (...skipping 1175 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5005 DCHECK(interrupt_address == | 5005 DCHECK(interrupt_address == |
| 5006 isolate->builtins()->OsrAfterStackCheck()->entry()); | 5006 isolate->builtins()->OsrAfterStackCheck()->entry()); |
| 5007 return OSR_AFTER_STACK_CHECK; | 5007 return OSR_AFTER_STACK_CHECK; |
| 5008 } | 5008 } |
| 5009 | 5009 |
| 5010 | 5010 |
| 5011 } // namespace internal | 5011 } // namespace internal |
| 5012 } // namespace v8 | 5012 } // namespace v8 |
| 5013 | 5013 |
| 5014 #endif // V8_TARGET_ARCH_ARM | 5014 #endif // V8_TARGET_ARCH_ARM |
| OLD | NEW |