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 2724 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
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 | 2739 // static |
2740 void Builtins::Generate_AllocateInNewSpace(MacroAssembler* masm) { | 2740 void Builtins::Generate_AllocateInNewSpace(MacroAssembler* masm) { |
2741 // ----------- S t a t e ------------- | 2741 // ----------- S t a t e ------------- |
2742 // -- a0 : requested object size (untagged) | 2742 // -- a0 : requested object size (untagged) |
2743 // -- ra : return address | 2743 // -- ra : return address |
2744 // ----------------------------------- | 2744 // ----------------------------------- |
2745 Label runtime; | |
2746 __ Allocate(a0, v0, a1, a2, &runtime, NO_ALLOCATION_FLAGS); | |
2747 __ Ret(); | |
2748 | |
2749 __ bind(&runtime); | |
2750 __ SmiTag(a0); | 2745 __ SmiTag(a0); |
2751 __ Push(a0); | 2746 __ Push(a0); |
2752 __ Move(cp, Smi::FromInt(0)); | 2747 __ Move(cp, Smi::FromInt(0)); |
2753 __ TailCallRuntime(Runtime::kAllocateInNewSpace); | 2748 __ TailCallRuntime(Runtime::kAllocateInNewSpace); |
2754 } | 2749 } |
2755 | 2750 |
2756 // static | 2751 // static |
2757 void Builtins::Generate_AllocateInOldSpace(MacroAssembler* masm) { | 2752 void Builtins::Generate_AllocateInOldSpace(MacroAssembler* masm) { |
2758 // ----------- S t a t e ------------- | 2753 // ----------- S t a t e ------------- |
2759 // -- a0 : requested object size (untagged) | 2754 // -- a0 : requested object size (untagged) |
2760 // -- ra : return address | 2755 // -- ra : return address |
2761 // ----------------------------------- | 2756 // ----------------------------------- |
2762 Label runtime; | |
2763 __ Allocate(a0, v0, a1, a2, &runtime, PRETENURE); | |
2764 __ Ret(); | |
2765 | |
2766 __ bind(&runtime); | |
2767 __ SmiTag(a0); | 2757 __ SmiTag(a0); |
2768 __ Move(a1, Smi::FromInt(AllocateTargetSpace::encode(OLD_SPACE))); | 2758 __ Move(a1, Smi::FromInt(AllocateTargetSpace::encode(OLD_SPACE))); |
2769 __ Push(a0, a1); | 2759 __ Push(a0, a1); |
2770 __ Move(cp, Smi::FromInt(0)); | 2760 __ Move(cp, Smi::FromInt(0)); |
2771 __ TailCallRuntime(Runtime::kAllocateInTargetSpace); | 2761 __ TailCallRuntime(Runtime::kAllocateInTargetSpace); |
2772 } | 2762 } |
2773 | 2763 |
2774 void Builtins::Generate_ArgumentsAdaptorTrampoline(MacroAssembler* masm) { | 2764 void Builtins::Generate_ArgumentsAdaptorTrampoline(MacroAssembler* masm) { |
2775 // State setup as expected by MacroAssembler::InvokePrologue. | 2765 // State setup as expected by MacroAssembler::InvokePrologue. |
2776 // ----------- S t a t e ------------- | 2766 // ----------- S t a t e ------------- |
(...skipping 125 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2902 } | 2892 } |
2903 } | 2893 } |
2904 | 2894 |
2905 | 2895 |
2906 #undef __ | 2896 #undef __ |
2907 | 2897 |
2908 } // namespace internal | 2898 } // namespace internal |
2909 } // namespace v8 | 2899 } // namespace v8 |
2910 | 2900 |
2911 #endif // V8_TARGET_ARCH_MIPS | 2901 #endif // V8_TARGET_ARCH_MIPS |
OLD | NEW |