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 3512 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3523 // Convert the object to an integer. | 3523 // Convert the object to an integer. |
3524 Label done_convert; | 3524 Label done_convert; |
3525 __ JumpIfSmi(r0, &done_convert); | 3525 __ JumpIfSmi(r0, &done_convert); |
3526 __ Push(r0); | 3526 __ Push(r0); |
3527 __ CallRuntime(Runtime::kToInteger); | 3527 __ CallRuntime(Runtime::kToInteger); |
3528 __ bind(&done_convert); | 3528 __ bind(&done_convert); |
3529 context()->Plug(r0); | 3529 context()->Plug(r0); |
3530 } | 3530 } |
3531 | 3531 |
3532 | 3532 |
3533 void FullCodeGenerator::EmitToName(CallRuntime* expr) { | |
3534 ZoneList<Expression*>* args = expr->arguments(); | |
3535 DCHECK_EQ(1, args->length()); | |
3536 | |
3537 // Load the argument into r0 and convert it. | |
3538 VisitForAccumulatorValue(args->at(0)); | |
3539 | |
3540 Label convert, done_convert; | |
3541 __ JumpIfSmi(r0, &convert); | |
3542 STATIC_ASSERT(FIRST_NAME_TYPE == FIRST_TYPE); | |
3543 __ CompareObjectType(r0, r1, r1, LAST_NAME_TYPE); | |
3544 __ b(ls, &done_convert); | |
3545 __ bind(&convert); | |
3546 __ Push(r0); | |
3547 __ CallRuntime(Runtime::kToName); | |
3548 __ bind(&done_convert); | |
3549 context()->Plug(r0); | |
3550 } | |
3551 | |
3552 | |
3553 void FullCodeGenerator::EmitStringCharFromCode(CallRuntime* expr) { | 3533 void FullCodeGenerator::EmitStringCharFromCode(CallRuntime* expr) { |
3554 ZoneList<Expression*>* args = expr->arguments(); | 3534 ZoneList<Expression*>* args = expr->arguments(); |
3555 DCHECK(args->length() == 1); | 3535 DCHECK(args->length() == 1); |
3556 VisitForAccumulatorValue(args->at(0)); | 3536 VisitForAccumulatorValue(args->at(0)); |
3557 | 3537 |
3558 Label done; | 3538 Label done; |
3559 StringCharFromCodeGenerator generator(r0, r1); | 3539 StringCharFromCodeGenerator generator(r0, r1); |
3560 generator.GenerateFast(masm_); | 3540 generator.GenerateFast(masm_); |
3561 __ jmp(&done); | 3541 __ jmp(&done); |
3562 | 3542 |
(...skipping 1308 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4871 DCHECK(interrupt_address == | 4851 DCHECK(interrupt_address == |
4872 isolate->builtins()->OsrAfterStackCheck()->entry()); | 4852 isolate->builtins()->OsrAfterStackCheck()->entry()); |
4873 return OSR_AFTER_STACK_CHECK; | 4853 return OSR_AFTER_STACK_CHECK; |
4874 } | 4854 } |
4875 | 4855 |
4876 | 4856 |
4877 } // namespace internal | 4857 } // namespace internal |
4878 } // namespace v8 | 4858 } // namespace v8 |
4879 | 4859 |
4880 #endif // V8_TARGET_ARCH_ARM | 4860 #endif // V8_TARGET_ARCH_ARM |
OLD | NEW |