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 #include "src/crankshaft/arm/lithium-codegen-arm.h" | 5 #include "src/crankshaft/arm/lithium-codegen-arm.h" |
6 | 6 |
7 #include "src/base/bits.h" | 7 #include "src/base/bits.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/crankshaft/arm/lithium-gap-resolver-arm.h" | 10 #include "src/crankshaft/arm/lithium-gap-resolver-arm.h" |
(...skipping 3621 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3632 ConstantPoolUnavailableScope constant_pool_unavailable(masm_); | 3632 ConstantPoolUnavailableScope constant_pool_unavailable(masm_); |
3633 __ add(target, target, Operand(Code::kHeaderSize - kHeapObjectTag)); | 3633 __ add(target, target, Operand(Code::kHeaderSize - kHeapObjectTag)); |
3634 } | 3634 } |
3635 __ Call(target); | 3635 __ Call(target); |
3636 } | 3636 } |
3637 generator.AfterCall(); | 3637 generator.AfterCall(); |
3638 } | 3638 } |
3639 } | 3639 } |
3640 | 3640 |
3641 | 3641 |
3642 void LCodeGen::DoCallJSFunction(LCallJSFunction* instr) { | |
3643 DCHECK(ToRegister(instr->function()).is(r1)); | |
3644 DCHECK(ToRegister(instr->result()).is(r0)); | |
3645 | |
3646 // Change context. | |
3647 __ ldr(cp, FieldMemOperand(r1, JSFunction::kContextOffset)); | |
3648 | |
3649 // Always initialize new target and number of actual arguments. | |
3650 __ LoadRoot(r3, Heap::kUndefinedValueRootIndex); | |
3651 __ mov(r0, Operand(instr->arity())); | |
3652 | |
3653 // Load the code entry address | |
3654 __ ldr(ip, FieldMemOperand(r1, JSFunction::kCodeEntryOffset)); | |
3655 __ Call(ip); | |
3656 | |
3657 RecordSafepointWithLazyDeopt(instr, RECORD_SIMPLE_SAFEPOINT); | |
3658 } | |
3659 | |
3660 | |
3661 void LCodeGen::DoCallNewArray(LCallNewArray* instr) { | 3642 void LCodeGen::DoCallNewArray(LCallNewArray* instr) { |
3662 DCHECK(ToRegister(instr->context()).is(cp)); | 3643 DCHECK(ToRegister(instr->context()).is(cp)); |
3663 DCHECK(ToRegister(instr->constructor()).is(r1)); | 3644 DCHECK(ToRegister(instr->constructor()).is(r1)); |
3664 DCHECK(ToRegister(instr->result()).is(r0)); | 3645 DCHECK(ToRegister(instr->result()).is(r0)); |
3665 | 3646 |
3666 __ mov(r0, Operand(instr->arity())); | 3647 __ mov(r0, Operand(instr->arity())); |
3667 if (instr->arity() == 1) { | 3648 if (instr->arity() == 1) { |
3668 // We only need the allocation site for the case we have a length argument. | 3649 // We only need the allocation site for the case we have a length argument. |
3669 // The case may bail out to the runtime, which will determine the correct | 3650 // The case may bail out to the runtime, which will determine the correct |
3670 // elements kind with the site. | 3651 // elements kind with the site. |
(...skipping 1818 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5489 void LCodeGen::DoStoreFrameContext(LStoreFrameContext* instr) { | 5470 void LCodeGen::DoStoreFrameContext(LStoreFrameContext* instr) { |
5490 Register context = ToRegister(instr->context()); | 5471 Register context = ToRegister(instr->context()); |
5491 __ str(context, MemOperand(fp, StandardFrameConstants::kContextOffset)); | 5472 __ str(context, MemOperand(fp, StandardFrameConstants::kContextOffset)); |
5492 } | 5473 } |
5493 | 5474 |
5494 | 5475 |
5495 #undef __ | 5476 #undef __ |
5496 | 5477 |
5497 } // namespace internal | 5478 } // namespace internal |
5498 } // namespace v8 | 5479 } // namespace v8 |
OLD | NEW |