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 (untagged) |
| 2731 // -- ra : return address |
| 2732 // ----------------------------------- |
| 2733 Label runtime; |
| 2734 __ Allocate(a0, v0, a1, a2, &runtime, NO_ALLOCATION_FLAGS); |
| 2735 __ Ret(); |
| 2736 |
| 2737 __ bind(&runtime); |
| 2738 __ SmiTag(a0); |
| 2739 __ Push(a0); |
| 2740 __ Move(cp, Smi::FromInt(0)); |
| 2741 __ TailCallRuntime(Runtime::kAllocateInNewSpace); |
| 2742 } |
| 2743 |
| 2744 // static |
| 2745 void Builtins::Generate_AllocateInOldSpace(MacroAssembler* masm) { |
| 2746 // ----------- S t a t e ------------- |
| 2747 // -- a0 : requested object size (untagged) |
| 2748 // -- ra : return address |
| 2749 // ----------------------------------- |
| 2750 Label runtime; |
| 2751 __ Allocate(a0, v0, a1, a2, &runtime, PRETENURE); |
| 2752 __ Ret(); |
| 2753 |
| 2754 __ bind(&runtime); |
| 2755 __ SmiTag(a0); |
| 2756 __ Move(a1, Smi::FromInt(AllocateTargetSpace::encode(OLD_SPACE))); |
| 2757 __ Push(a0, a1); |
| 2758 __ Move(cp, Smi::FromInt(0)); |
| 2759 __ TailCallRuntime(Runtime::kAllocateInTargetSpace); |
| 2760 } |
2727 | 2761 |
2728 void Builtins::Generate_ArgumentsAdaptorTrampoline(MacroAssembler* masm) { | 2762 void Builtins::Generate_ArgumentsAdaptorTrampoline(MacroAssembler* masm) { |
2729 // State setup as expected by MacroAssembler::InvokePrologue. | 2763 // State setup as expected by MacroAssembler::InvokePrologue. |
2730 // ----------- S t a t e ------------- | 2764 // ----------- S t a t e ------------- |
2731 // -- a0: actual arguments count | 2765 // -- a0: actual arguments count |
2732 // -- a1: function (passed through to callee) | 2766 // -- a1: function (passed through to callee) |
2733 // -- a2: expected arguments count | 2767 // -- a2: expected arguments count |
2734 // -- a3: new target (passed through to callee) | 2768 // -- a3: new target (passed through to callee) |
2735 // ----------------------------------- | 2769 // ----------------------------------- |
2736 | 2770 |
(...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2858 } | 2892 } |
2859 } | 2893 } |
2860 | 2894 |
2861 | 2895 |
2862 #undef __ | 2896 #undef __ |
2863 | 2897 |
2864 } // namespace internal | 2898 } // namespace internal |
2865 } // namespace v8 | 2899 } // namespace v8 |
2866 | 2900 |
2867 #endif // V8_TARGET_ARCH_MIPS64 | 2901 #endif // V8_TARGET_ARCH_MIPS64 |
OLD | NEW |