| 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_X87 | 5 #if V8_TARGET_ARCH_X87 |
| 6 | 6 |
| 7 #include "src/code-factory.h" | 7 #include "src/code-factory.h" |
| 8 #include "src/codegen.h" | 8 #include "src/codegen.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 2636 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2647 __ Jump(masm->isolate()->builtins()->ConstructedNonConstructable(), | 2647 __ Jump(masm->isolate()->builtins()->ConstructedNonConstructable(), |
| 2648 RelocInfo::CODE_TARGET); | 2648 RelocInfo::CODE_TARGET); |
| 2649 } | 2649 } |
| 2650 | 2650 |
| 2651 // static | 2651 // static |
| 2652 void Builtins::Generate_AllocateInNewSpace(MacroAssembler* masm) { | 2652 void Builtins::Generate_AllocateInNewSpace(MacroAssembler* masm) { |
| 2653 // ----------- S t a t e ------------- | 2653 // ----------- S t a t e ------------- |
| 2654 // -- edx : requested object size (untagged) | 2654 // -- edx : requested object size (untagged) |
| 2655 // -- esp[0] : return address | 2655 // -- esp[0] : return address |
| 2656 // ----------------------------------- | 2656 // ----------------------------------- |
| 2657 Label runtime; | |
| 2658 __ Allocate(edx, eax, ecx, edi, &runtime, NO_ALLOCATION_FLAGS); | |
| 2659 __ Ret(); | |
| 2660 | |
| 2661 __ bind(&runtime); | |
| 2662 __ SmiTag(edx); | 2657 __ SmiTag(edx); |
| 2663 __ PopReturnAddressTo(ecx); | 2658 __ PopReturnAddressTo(ecx); |
| 2664 __ Push(edx); | 2659 __ Push(edx); |
| 2665 __ PushReturnAddressFrom(ecx); | 2660 __ PushReturnAddressFrom(ecx); |
| 2666 __ Move(esi, Smi::FromInt(0)); | 2661 __ Move(esi, Smi::FromInt(0)); |
| 2667 __ TailCallRuntime(Runtime::kAllocateInNewSpace); | 2662 __ TailCallRuntime(Runtime::kAllocateInNewSpace); |
| 2668 } | 2663 } |
| 2669 | 2664 |
| 2670 // static | 2665 // static |
| 2671 void Builtins::Generate_AllocateInOldSpace(MacroAssembler* masm) { | 2666 void Builtins::Generate_AllocateInOldSpace(MacroAssembler* masm) { |
| 2672 // ----------- S t a t e ------------- | 2667 // ----------- S t a t e ------------- |
| 2673 // -- edx : requested object size (untagged) | 2668 // -- edx : requested object size (untagged) |
| 2674 // -- esp[0] : return address | 2669 // -- esp[0] : return address |
| 2675 // ----------------------------------- | 2670 // ----------------------------------- |
| 2676 Label runtime; | |
| 2677 __ Allocate(edx, eax, ecx, edi, &runtime, PRETENURE); | |
| 2678 __ Ret(); | |
| 2679 | |
| 2680 __ bind(&runtime); | |
| 2681 __ SmiTag(edx); | 2671 __ SmiTag(edx); |
| 2682 __ PopReturnAddressTo(ecx); | 2672 __ PopReturnAddressTo(ecx); |
| 2683 __ Push(edx); | 2673 __ Push(edx); |
| 2684 __ Push(Smi::FromInt(AllocateTargetSpace::encode(OLD_SPACE))); | 2674 __ Push(Smi::FromInt(AllocateTargetSpace::encode(OLD_SPACE))); |
| 2685 __ PushReturnAddressFrom(ecx); | 2675 __ PushReturnAddressFrom(ecx); |
| 2686 __ Move(esi, Smi::FromInt(0)); | 2676 __ Move(esi, Smi::FromInt(0)); |
| 2687 __ TailCallRuntime(Runtime::kAllocateInTargetSpace); | 2677 __ TailCallRuntime(Runtime::kAllocateInTargetSpace); |
| 2688 } | 2678 } |
| 2689 | 2679 |
| 2690 void Builtins::Generate_ArgumentsAdaptorTrampoline(MacroAssembler* masm) { | 2680 void Builtins::Generate_ArgumentsAdaptorTrampoline(MacroAssembler* masm) { |
| (...skipping 248 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2939 // And "return" to the OSR entry point of the function. | 2929 // And "return" to the OSR entry point of the function. |
| 2940 __ ret(0); | 2930 __ ret(0); |
| 2941 } | 2931 } |
| 2942 | 2932 |
| 2943 | 2933 |
| 2944 #undef __ | 2934 #undef __ |
| 2945 } // namespace internal | 2935 } // namespace internal |
| 2946 } // namespace v8 | 2936 } // namespace v8 |
| 2947 | 2937 |
| 2948 #endif // V8_TARGET_ARCH_X87 | 2938 #endif // V8_TARGET_ARCH_X87 |
| OLD | NEW |