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 3185 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3196 DCHECK(expr->AllocationSiteFeedbackSlot().ToInt() == | 3196 DCHECK(expr->AllocationSiteFeedbackSlot().ToInt() == |
3197 expr->CallNewFeedbackSlot().ToInt() + 1); | 3197 expr->CallNewFeedbackSlot().ToInt() + 1); |
3198 } | 3198 } |
3199 | 3199 |
3200 __ Move(r2, FeedbackVector()); | 3200 __ Move(r2, FeedbackVector()); |
3201 __ mov(r3, Operand(SmiFromSlot(expr->CallNewFeedbackSlot()))); | 3201 __ mov(r3, Operand(SmiFromSlot(expr->CallNewFeedbackSlot()))); |
3202 | 3202 |
3203 CallConstructStub stub(isolate(), RECORD_CONSTRUCTOR_TARGET); | 3203 CallConstructStub stub(isolate(), RECORD_CONSTRUCTOR_TARGET); |
3204 __ Call(stub.GetCode(), RelocInfo::CONSTRUCT_CALL); | 3204 __ Call(stub.GetCode(), RelocInfo::CONSTRUCT_CALL); |
3205 PrepareForBailoutForId(expr->ReturnId(), TOS_REG); | 3205 PrepareForBailoutForId(expr->ReturnId(), TOS_REG); |
| 3206 // Restore context register. |
| 3207 __ ldr(cp, MemOperand(fp, StandardFrameConstants::kContextOffset)); |
3206 context()->Plug(r0); | 3208 context()->Plug(r0); |
3207 } | 3209 } |
3208 | 3210 |
3209 | 3211 |
3210 void FullCodeGenerator::EmitSuperConstructorCall(Call* expr) { | 3212 void FullCodeGenerator::EmitSuperConstructorCall(Call* expr) { |
3211 SuperCallReference* super_call_ref = | 3213 SuperCallReference* super_call_ref = |
3212 expr->expression()->AsSuperCallReference(); | 3214 expr->expression()->AsSuperCallReference(); |
3213 DCHECK_NOT_NULL(super_call_ref); | 3215 DCHECK_NOT_NULL(super_call_ref); |
3214 | 3216 |
3215 EmitLoadSuperConstructor(super_call_ref); | 3217 EmitLoadSuperConstructor(super_call_ref); |
(...skipping 29 matching lines...) Expand all Loading... |
3245 } | 3247 } |
3246 | 3248 |
3247 __ Move(r2, FeedbackVector()); | 3249 __ Move(r2, FeedbackVector()); |
3248 __ mov(r3, Operand(SmiFromSlot(expr->CallFeedbackSlot()))); | 3250 __ mov(r3, Operand(SmiFromSlot(expr->CallFeedbackSlot()))); |
3249 | 3251 |
3250 CallConstructStub stub(isolate(), SUPER_CALL_RECORD_TARGET); | 3252 CallConstructStub stub(isolate(), SUPER_CALL_RECORD_TARGET); |
3251 __ Call(stub.GetCode(), RelocInfo::CONSTRUCT_CALL); | 3253 __ Call(stub.GetCode(), RelocInfo::CONSTRUCT_CALL); |
3252 | 3254 |
3253 RecordJSReturnSite(expr); | 3255 RecordJSReturnSite(expr); |
3254 | 3256 |
| 3257 // Restore context register. |
| 3258 __ ldr(cp, MemOperand(fp, StandardFrameConstants::kContextOffset)); |
3255 context()->Plug(r0); | 3259 context()->Plug(r0); |
3256 } | 3260 } |
3257 | 3261 |
3258 | 3262 |
3259 void FullCodeGenerator::EmitIsSmi(CallRuntime* expr) { | 3263 void FullCodeGenerator::EmitIsSmi(CallRuntime* expr) { |
3260 ZoneList<Expression*>* args = expr->arguments(); | 3264 ZoneList<Expression*>* args = expr->arguments(); |
3261 DCHECK(args->length() == 1); | 3265 DCHECK(args->length() == 1); |
3262 | 3266 |
3263 VisitForAccumulatorValue(args->at(0)); | 3267 VisitForAccumulatorValue(args->at(0)); |
3264 | 3268 |
(...skipping 882 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4147 __ b(ne, &loop); | 4151 __ b(ne, &loop); |
4148 } | 4152 } |
4149 | 4153 |
4150 __ bind(&args_set_up); | 4154 __ bind(&args_set_up); |
4151 __ ldr(r1, MemOperand(sp, r0, LSL, kPointerSizeLog2)); | 4155 __ ldr(r1, MemOperand(sp, r0, LSL, kPointerSizeLog2)); |
4152 __ LoadRoot(r2, Heap::kUndefinedValueRootIndex); | 4156 __ LoadRoot(r2, Heap::kUndefinedValueRootIndex); |
4153 | 4157 |
4154 CallConstructStub stub(isolate(), SUPER_CONSTRUCTOR_CALL); | 4158 CallConstructStub stub(isolate(), SUPER_CONSTRUCTOR_CALL); |
4155 __ Call(stub.GetCode(), RelocInfo::CONSTRUCT_CALL); | 4159 __ Call(stub.GetCode(), RelocInfo::CONSTRUCT_CALL); |
4156 | 4160 |
4157 __ Drop(1); | 4161 // Restore context register. |
| 4162 __ ldr(cp, MemOperand(fp, StandardFrameConstants::kContextOffset)); |
4158 | 4163 |
4159 context()->Plug(result_register()); | 4164 context()->DropAndPlug(1, r0); |
4160 } | 4165 } |
4161 | 4166 |
4162 | 4167 |
4163 void FullCodeGenerator::EmitRegExpConstructResult(CallRuntime* expr) { | 4168 void FullCodeGenerator::EmitRegExpConstructResult(CallRuntime* expr) { |
4164 RegExpConstructResultStub stub(isolate()); | 4169 RegExpConstructResultStub stub(isolate()); |
4165 ZoneList<Expression*>* args = expr->arguments(); | 4170 ZoneList<Expression*>* args = expr->arguments(); |
4166 DCHECK(args->length() == 3); | 4171 DCHECK(args->length() == 3); |
4167 VisitForStackValue(args->at(0)); | 4172 VisitForStackValue(args->at(0)); |
4168 VisitForStackValue(args->at(1)); | 4173 VisitForStackValue(args->at(1)); |
4169 VisitForAccumulatorValue(args->at(2)); | 4174 VisitForAccumulatorValue(args->at(2)); |
(...skipping 1191 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5361 DCHECK(interrupt_address == | 5366 DCHECK(interrupt_address == |
5362 isolate->builtins()->OsrAfterStackCheck()->entry()); | 5367 isolate->builtins()->OsrAfterStackCheck()->entry()); |
5363 return OSR_AFTER_STACK_CHECK; | 5368 return OSR_AFTER_STACK_CHECK; |
5364 } | 5369 } |
5365 | 5370 |
5366 | 5371 |
5367 } // namespace internal | 5372 } // namespace internal |
5368 } // namespace v8 | 5373 } // namespace v8 |
5369 | 5374 |
5370 #endif // V8_TARGET_ARCH_ARM | 5375 #endif // V8_TARGET_ARCH_ARM |
OLD | NEW |