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_MIPS64 | 5 #if V8_TARGET_ARCH_MIPS64 |
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 2706 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2717 RelocInfo::CODE_TARGET); | 2717 RelocInfo::CODE_TARGET); |
2718 } | 2718 } |
2719 | 2719 |
2720 // Called Construct on an Object that doesn't have a [[Construct]] internal | 2720 // Called Construct on an Object that doesn't have a [[Construct]] internal |
2721 // method. | 2721 // method. |
2722 __ bind(&non_constructor); | 2722 __ bind(&non_constructor); |
2723 __ Jump(masm->isolate()->builtins()->ConstructedNonConstructable(), | 2723 __ Jump(masm->isolate()->builtins()->ConstructedNonConstructable(), |
2724 RelocInfo::CODE_TARGET); | 2724 RelocInfo::CODE_TARGET); |
2725 } | 2725 } |
2726 | 2726 |
| 2727 // static |
| 2728 void Builtins::Generate_AllocateInNewSpace(MacroAssembler* masm) { |
| 2729 // ----------- S t a t e ------------- |
| 2730 // -- a0 : requested object size (tagged) |
| 2731 // -- cp : context |
| 2732 // ----------------------------------- |
| 2733 __ AssertSmi(a0); |
| 2734 |
| 2735 Label runtime; |
| 2736 __ SmiUntag(a0); |
| 2737 __ Allocate(a0, v0, a1, a2, &runtime, NO_ALLOCATION_FLAGS); |
| 2738 __ Ret(); |
| 2739 |
| 2740 __ bind(&runtime); |
| 2741 __ SmiTag(a0); |
| 2742 __ Push(a0); |
| 2743 __ TailCallRuntime(Runtime::kAllocateInNewSpace); |
| 2744 } |
| 2745 |
| 2746 // static |
| 2747 void Builtins::Generate_AllocateInOldSpace(MacroAssembler* masm) { |
| 2748 // ----------- S t a t e ------------- |
| 2749 // -- a0 : requested object size (tagged) |
| 2750 // -- cp : context |
| 2751 // ----------------------------------- |
| 2752 __ AssertSmi(a0); |
| 2753 |
| 2754 Label runtime; |
| 2755 __ SmiUntag(a0); |
| 2756 __ Allocate(a0, v0, a1, a2, &runtime, PRETENURE); |
| 2757 __ Ret(); |
| 2758 |
| 2759 __ bind(&runtime); |
| 2760 __ SmiTag(a0); |
| 2761 __ Push(a0); |
| 2762 __ Push(Smi::FromInt(AllocateTargetSpace::encode(OLD_SPACE))); |
| 2763 __ TailCallRuntime(Runtime::kAllocateInTargetSpace); |
| 2764 } |
2727 | 2765 |
2728 void Builtins::Generate_ArgumentsAdaptorTrampoline(MacroAssembler* masm) { | 2766 void Builtins::Generate_ArgumentsAdaptorTrampoline(MacroAssembler* masm) { |
2729 // State setup as expected by MacroAssembler::InvokePrologue. | 2767 // State setup as expected by MacroAssembler::InvokePrologue. |
2730 // ----------- S t a t e ------------- | 2768 // ----------- S t a t e ------------- |
2731 // -- a0: actual arguments count | 2769 // -- a0: actual arguments count |
2732 // -- a1: function (passed through to callee) | 2770 // -- a1: function (passed through to callee) |
2733 // -- a2: expected arguments count | 2771 // -- a2: expected arguments count |
2734 // -- a3: new target (passed through to callee) | 2772 // -- a3: new target (passed through to callee) |
2735 // ----------------------------------- | 2773 // ----------------------------------- |
2736 | 2774 |
(...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2858 } | 2896 } |
2859 } | 2897 } |
2860 | 2898 |
2861 | 2899 |
2862 #undef __ | 2900 #undef __ |
2863 | 2901 |
2864 } // namespace internal | 2902 } // namespace internal |
2865 } // namespace v8 | 2903 } // namespace v8 |
2866 | 2904 |
2867 #endif // V8_TARGET_ARCH_MIPS64 | 2905 #endif // V8_TARGET_ARCH_MIPS64 |
OLD | NEW |