Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1014)

Side by Side Diff: src/x87/builtins-x87.cc

Issue 1963583004: [turbofan] Initial version of allocation folding and write barrier elimination. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Jaros comments; Created 4 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « src/x64/builtins-x64.cc ('k') | test/cctest/compiler/test-simplified-lowering.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « src/x64/builtins-x64.cc ('k') | test/cctest/compiler/test-simplified-lowering.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698