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/codegen.h" | 7 #include "src/codegen.h" |
8 #include "src/debug/debug.h" | 8 #include "src/debug/debug.h" |
9 #include "src/deoptimizer.h" | 9 #include "src/deoptimizer.h" |
10 #include "src/full-codegen/full-codegen.h" | 10 #include "src/full-codegen/full-codegen.h" |
(...skipping 2649 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2660 __ Jump(masm->isolate()->builtins()->ConstructedNonConstructable(), | 2660 __ Jump(masm->isolate()->builtins()->ConstructedNonConstructable(), |
2661 RelocInfo::CODE_TARGET); | 2661 RelocInfo::CODE_TARGET); |
2662 } | 2662 } |
2663 | 2663 |
2664 // static | 2664 // static |
2665 void Builtins::Generate_AllocateInNewSpace(MacroAssembler* masm) { | 2665 void Builtins::Generate_AllocateInNewSpace(MacroAssembler* masm) { |
2666 // ----------- S t a t e ------------- | 2666 // ----------- S t a t e ------------- |
2667 // -- r1 : requested object size (untagged) | 2667 // -- r1 : requested object size (untagged) |
2668 // -- lr : return address | 2668 // -- lr : return address |
2669 // ----------------------------------- | 2669 // ----------------------------------- |
2670 Label runtime; | |
2671 __ Allocate(r1, r0, r2, r3, &runtime, NO_ALLOCATION_FLAGS); | |
2672 __ Ret(); | |
2673 | |
2674 __ bind(&runtime); | |
2675 __ SmiTag(r1); | 2670 __ SmiTag(r1); |
2676 __ Push(r1); | 2671 __ Push(r1); |
2677 __ Move(cp, Smi::FromInt(0)); | 2672 __ Move(cp, Smi::FromInt(0)); |
2678 __ TailCallRuntime(Runtime::kAllocateInNewSpace); | 2673 __ TailCallRuntime(Runtime::kAllocateInNewSpace); |
2679 } | 2674 } |
2680 | 2675 |
2681 // static | 2676 // static |
2682 void Builtins::Generate_AllocateInOldSpace(MacroAssembler* masm) { | 2677 void Builtins::Generate_AllocateInOldSpace(MacroAssembler* masm) { |
2683 // ----------- S t a t e ------------- | 2678 // ----------- S t a t e ------------- |
2684 // -- r1 : requested object size (untagged) | 2679 // -- r1 : requested object size (untagged) |
2685 // -- lr : return address | 2680 // -- lr : return address |
2686 // ----------------------------------- | 2681 // ----------------------------------- |
2687 Label runtime; | |
2688 __ Allocate(r1, r0, r2, r3, &runtime, PRETENURE); | |
2689 __ Ret(); | |
2690 | |
2691 __ bind(&runtime); | |
2692 __ SmiTag(r1); | 2682 __ SmiTag(r1); |
2693 __ Move(r2, Smi::FromInt(AllocateTargetSpace::encode(OLD_SPACE))); | 2683 __ Move(r2, Smi::FromInt(AllocateTargetSpace::encode(OLD_SPACE))); |
2694 __ Push(r1, r2); | 2684 __ Push(r1, r2); |
2695 __ Move(cp, Smi::FromInt(0)); | 2685 __ Move(cp, Smi::FromInt(0)); |
2696 __ TailCallRuntime(Runtime::kAllocateInTargetSpace); | 2686 __ TailCallRuntime(Runtime::kAllocateInTargetSpace); |
2697 } | 2687 } |
2698 | 2688 |
2699 void Builtins::Generate_ArgumentsAdaptorTrampoline(MacroAssembler* masm) { | 2689 void Builtins::Generate_ArgumentsAdaptorTrampoline(MacroAssembler* masm) { |
2700 // ----------- S t a t e ------------- | 2690 // ----------- S t a t e ------------- |
2701 // -- r0 : actual number of arguments | 2691 // -- r0 : actual number of arguments |
(...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2820 } | 2810 } |
2821 } | 2811 } |
2822 | 2812 |
2823 | 2813 |
2824 #undef __ | 2814 #undef __ |
2825 | 2815 |
2826 } // namespace internal | 2816 } // namespace internal |
2827 } // namespace v8 | 2817 } // namespace v8 |
2828 | 2818 |
2829 #endif // V8_TARGET_ARCH_ARM | 2819 #endif // V8_TARGET_ARCH_ARM |
OLD | NEW |