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 (tagged) | |
2668 // -- cp : context | |
2669 // ----------------------------------- | |
2670 __ AssertSmi(r1); | |
2671 | |
2672 Label runtime; | |
2673 __ SmiUntag(r1); | |
2674 __ Allocate(r1, r0, r2, r3, &runtime, NO_ALLOCATION_FLAGS); | |
2675 __ Ret(); | |
2676 | |
2677 __ bind(&runtime); | |
2678 __ SmiTag(r1); | |
2679 __ Push(r1); | |
2680 __ TailCallRuntime(Runtime::kAllocateInNewSpace); | |
2681 } | |
2682 | |
2683 // static | |
2684 void Builtins::Generate_AllocateInOldSpace(MacroAssembler* masm) { | |
2685 // ----------- S t a t e ------------- | |
2686 // -- r1 : requested object size (tagged) | |
2687 // -- cp : context | |
2688 // ----------------------------------- | |
2689 __ AssertSmi(r1); | |
2690 | |
2691 Label runtime; | |
2692 __ SmiUntag(r1); | |
2693 __ Allocate(r1, r0, r2, r3, &runtime, PRETENURE); | |
2694 __ Ret(); | |
2695 | |
2696 __ bind(&runtime); | |
2697 __ SmiTag(r1); | |
2698 __ Push(r1); | |
2699 __ Push(Smi::FromInt(AllocateTargetSpace::encode(OLD_SPACE))); | |
2700 __ TailCallRuntime(Runtime::kAllocateInTargetSpace); | |
2701 } | |
2702 | 2664 |
2703 void Builtins::Generate_ArgumentsAdaptorTrampoline(MacroAssembler* masm) { | 2665 void Builtins::Generate_ArgumentsAdaptorTrampoline(MacroAssembler* masm) { |
2704 // ----------- S t a t e ------------- | 2666 // ----------- S t a t e ------------- |
2705 // -- r0 : actual number of arguments | 2667 // -- r0 : actual number of arguments |
2706 // -- r1 : function (passed through to callee) | 2668 // -- r1 : function (passed through to callee) |
2707 // -- r2 : expected number of arguments | 2669 // -- r2 : expected number of arguments |
2708 // -- r3 : new target (passed through to callee) | 2670 // -- r3 : new target (passed through to callee) |
2709 // ----------------------------------- | 2671 // ----------------------------------- |
2710 | 2672 |
2711 Label invoke, dont_adapt_arguments, stack_overflow; | 2673 Label invoke, dont_adapt_arguments, stack_overflow; |
(...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2824 } | 2786 } |
2825 } | 2787 } |
2826 | 2788 |
2827 | 2789 |
2828 #undef __ | 2790 #undef __ |
2829 | 2791 |
2830 } // namespace internal | 2792 } // namespace internal |
2831 } // namespace v8 | 2793 } // namespace v8 |
2832 | 2794 |
2833 #endif // V8_TARGET_ARCH_ARM | 2795 #endif // V8_TARGET_ARCH_ARM |
OLD | NEW |