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_MIPS | 5 #if V8_TARGET_ARCH_MIPS |
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 2718 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2729 RelocInfo::CODE_TARGET); | 2729 RelocInfo::CODE_TARGET); |
2730 } | 2730 } |
2731 | 2731 |
2732 // Called Construct on an Object that doesn't have a [[Construct]] internal | 2732 // Called Construct on an Object that doesn't have a [[Construct]] internal |
2733 // method. | 2733 // method. |
2734 __ bind(&non_constructor); | 2734 __ bind(&non_constructor); |
2735 __ Jump(masm->isolate()->builtins()->ConstructedNonConstructable(), | 2735 __ Jump(masm->isolate()->builtins()->ConstructedNonConstructable(), |
2736 RelocInfo::CODE_TARGET); | 2736 RelocInfo::CODE_TARGET); |
2737 } | 2737 } |
2738 | 2738 |
| 2739 // static |
| 2740 void Builtins::Generate_AllocateInNewSpace(MacroAssembler* masm) { |
| 2741 // ----------- S t a t e ------------- |
| 2742 // -- a0 : requested object size (untagged) |
| 2743 // -- ra : return address |
| 2744 // ----------------------------------- |
| 2745 Label runtime; |
| 2746 __ Allocate(a0, v0, a1, a2, &runtime, NO_ALLOCATION_FLAGS); |
| 2747 __ Ret(); |
| 2748 |
| 2749 __ bind(&runtime); |
| 2750 __ SmiTag(a0); |
| 2751 __ Push(a0); |
| 2752 __ Move(cp, Smi::FromInt(0)); |
| 2753 __ TailCallRuntime(Runtime::kAllocateInNewSpace); |
| 2754 } |
| 2755 |
| 2756 // static |
| 2757 void Builtins::Generate_AllocateInOldSpace(MacroAssembler* masm) { |
| 2758 // ----------- S t a t e ------------- |
| 2759 // -- a0 : requested object size (untagged) |
| 2760 // -- ra : return address |
| 2761 // ----------------------------------- |
| 2762 Label runtime; |
| 2763 __ Allocate(a0, v0, a1, a2, &runtime, PRETENURE); |
| 2764 __ Ret(); |
| 2765 |
| 2766 __ bind(&runtime); |
| 2767 __ SmiTag(a0); |
| 2768 __ Move(a1, Smi::FromInt(AllocateTargetSpace::encode(OLD_SPACE))); |
| 2769 __ Push(a0, a1); |
| 2770 __ Move(cp, Smi::FromInt(0)); |
| 2771 __ TailCallRuntime(Runtime::kAllocateInTargetSpace); |
| 2772 } |
2739 | 2773 |
2740 void Builtins::Generate_ArgumentsAdaptorTrampoline(MacroAssembler* masm) { | 2774 void Builtins::Generate_ArgumentsAdaptorTrampoline(MacroAssembler* masm) { |
2741 // State setup as expected by MacroAssembler::InvokePrologue. | 2775 // State setup as expected by MacroAssembler::InvokePrologue. |
2742 // ----------- S t a t e ------------- | 2776 // ----------- S t a t e ------------- |
2743 // -- a0: actual arguments count | 2777 // -- a0: actual arguments count |
2744 // -- a1: function (passed through to callee) | 2778 // -- a1: function (passed through to callee) |
2745 // -- a2: expected arguments count | 2779 // -- a2: expected arguments count |
2746 // -- a3: new target (passed through to callee) | 2780 // -- a3: new target (passed through to callee) |
2747 // ----------------------------------- | 2781 // ----------------------------------- |
2748 | 2782 |
(...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2868 } | 2902 } |
2869 } | 2903 } |
2870 | 2904 |
2871 | 2905 |
2872 #undef __ | 2906 #undef __ |
2873 | 2907 |
2874 } // namespace internal | 2908 } // namespace internal |
2875 } // namespace v8 | 2909 } // namespace v8 |
2876 | 2910 |
2877 #endif // V8_TARGET_ARCH_MIPS | 2911 #endif // V8_TARGET_ARCH_MIPS |
OLD | NEW |