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 2643 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2654 RelocInfo::CODE_TARGET); | 2654 RelocInfo::CODE_TARGET); |
2655 } | 2655 } |
2656 | 2656 |
2657 // Called Construct on an Object that doesn't have a [[Construct]] internal | 2657 // Called Construct on an Object that doesn't have a [[Construct]] internal |
2658 // method. | 2658 // method. |
2659 __ bind(&non_constructor); | 2659 __ bind(&non_constructor); |
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 |
| 2665 void Builtins::Generate_AllocateInNewSpace(MacroAssembler* masm) { |
| 2666 // ----------- S t a t e ------------- |
| 2667 // -- r1 : requested object size (untagged) |
| 2668 // -- lr : return address |
| 2669 // ----------------------------------- |
| 2670 Label runtime; |
| 2671 __ Allocate(r1, r0, r2, r3, &runtime, NO_ALLOCATION_FLAGS); |
| 2672 __ Ret(); |
| 2673 |
| 2674 __ bind(&runtime); |
| 2675 __ SmiTag(r1); |
| 2676 __ Push(r1); |
| 2677 __ Move(cp, Smi::FromInt(0)); |
| 2678 __ TailCallRuntime(Runtime::kAllocateInNewSpace); |
| 2679 } |
| 2680 |
| 2681 // static |
| 2682 void Builtins::Generate_AllocateInOldSpace(MacroAssembler* masm) { |
| 2683 // ----------- S t a t e ------------- |
| 2684 // -- r1 : requested object size (untagged) |
| 2685 // -- lr : return address |
| 2686 // ----------------------------------- |
| 2687 Label runtime; |
| 2688 __ Allocate(r1, r0, r2, r3, &runtime, PRETENURE); |
| 2689 __ Ret(); |
| 2690 |
| 2691 __ bind(&runtime); |
| 2692 __ SmiTag(r1); |
| 2693 __ Move(r2, Smi::FromInt(AllocateTargetSpace::encode(OLD_SPACE))); |
| 2694 __ Push(r1, r2); |
| 2695 __ Move(cp, Smi::FromInt(0)); |
| 2696 __ TailCallRuntime(Runtime::kAllocateInTargetSpace); |
| 2697 } |
2664 | 2698 |
2665 void Builtins::Generate_ArgumentsAdaptorTrampoline(MacroAssembler* masm) { | 2699 void Builtins::Generate_ArgumentsAdaptorTrampoline(MacroAssembler* masm) { |
2666 // ----------- S t a t e ------------- | 2700 // ----------- S t a t e ------------- |
2667 // -- r0 : actual number of arguments | 2701 // -- r0 : actual number of arguments |
2668 // -- r1 : function (passed through to callee) | 2702 // -- r1 : function (passed through to callee) |
2669 // -- r2 : expected number of arguments | 2703 // -- r2 : expected number of arguments |
2670 // -- r3 : new target (passed through to callee) | 2704 // -- r3 : new target (passed through to callee) |
2671 // ----------------------------------- | 2705 // ----------------------------------- |
2672 | 2706 |
2673 Label invoke, dont_adapt_arguments, stack_overflow; | 2707 Label invoke, dont_adapt_arguments, stack_overflow; |
(...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2786 } | 2820 } |
2787 } | 2821 } |
2788 | 2822 |
2789 | 2823 |
2790 #undef __ | 2824 #undef __ |
2791 | 2825 |
2792 } // namespace internal | 2826 } // namespace internal |
2793 } // namespace v8 | 2827 } // namespace v8 |
2794 | 2828 |
2795 #endif // V8_TARGET_ARCH_ARM | 2829 #endif // V8_TARGET_ARCH_ARM |
OLD | NEW |