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

Side by Side Diff: src/ia32/builtins-ia32.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/heap/spaces.cc ('k') | src/interface-descriptors.h » ('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_IA32 5 #if V8_TARGET_ARCH_IA32
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 2606 matching lines...) Expand 10 before | Expand all | Expand 10 after
2617 __ Jump(masm->isolate()->builtins()->ConstructedNonConstructable(), 2617 __ Jump(masm->isolate()->builtins()->ConstructedNonConstructable(),
2618 RelocInfo::CODE_TARGET); 2618 RelocInfo::CODE_TARGET);
2619 } 2619 }
2620 2620
2621 // static 2621 // static
2622 void Builtins::Generate_AllocateInNewSpace(MacroAssembler* masm) { 2622 void Builtins::Generate_AllocateInNewSpace(MacroAssembler* masm) {
2623 // ----------- S t a t e ------------- 2623 // ----------- S t a t e -------------
2624 // -- edx : requested object size (untagged) 2624 // -- edx : requested object size (untagged)
2625 // -- esp[0] : return address 2625 // -- esp[0] : return address
2626 // ----------------------------------- 2626 // -----------------------------------
2627 Label runtime;
2628 __ Allocate(edx, eax, ecx, edi, &runtime, NO_ALLOCATION_FLAGS);
2629 __ Ret();
2630
2631 __ bind(&runtime);
2632 __ SmiTag(edx); 2627 __ SmiTag(edx);
2633 __ PopReturnAddressTo(ecx); 2628 __ PopReturnAddressTo(ecx);
2634 __ Push(edx); 2629 __ Push(edx);
2635 __ PushReturnAddressFrom(ecx); 2630 __ PushReturnAddressFrom(ecx);
2636 __ Move(esi, Smi::FromInt(0)); 2631 __ Move(esi, Smi::FromInt(0));
2637 __ TailCallRuntime(Runtime::kAllocateInNewSpace); 2632 __ TailCallRuntime(Runtime::kAllocateInNewSpace);
2638 } 2633 }
2639 2634
2640 // static 2635 // static
2641 void Builtins::Generate_AllocateInOldSpace(MacroAssembler* masm) { 2636 void Builtins::Generate_AllocateInOldSpace(MacroAssembler* masm) {
2642 // ----------- S t a t e ------------- 2637 // ----------- S t a t e -------------
2643 // -- edx : requested object size (untagged) 2638 // -- edx : requested object size (untagged)
2644 // -- esp[0] : return address 2639 // -- esp[0] : return address
2645 // ----------------------------------- 2640 // -----------------------------------
2646 Label runtime;
2647 __ Allocate(edx, eax, ecx, edi, &runtime, PRETENURE);
2648 __ Ret();
2649
2650 __ bind(&runtime);
2651 __ SmiTag(edx); 2641 __ SmiTag(edx);
2652 __ PopReturnAddressTo(ecx); 2642 __ PopReturnAddressTo(ecx);
2653 __ Push(edx); 2643 __ Push(edx);
2654 __ Push(Smi::FromInt(AllocateTargetSpace::encode(OLD_SPACE))); 2644 __ Push(Smi::FromInt(AllocateTargetSpace::encode(OLD_SPACE)));
2655 __ PushReturnAddressFrom(ecx); 2645 __ PushReturnAddressFrom(ecx);
2656 __ Move(esi, Smi::FromInt(0)); 2646 __ Move(esi, Smi::FromInt(0));
2657 __ TailCallRuntime(Runtime::kAllocateInTargetSpace); 2647 __ TailCallRuntime(Runtime::kAllocateInTargetSpace);
2658 } 2648 }
2659 2649
2660 void Builtins::Generate_ArgumentsAdaptorTrampoline(MacroAssembler* masm) { 2650 void Builtins::Generate_ArgumentsAdaptorTrampoline(MacroAssembler* masm) {
(...skipping 247 matching lines...) Expand 10 before | Expand all | Expand 10 after
2908 // And "return" to the OSR entry point of the function. 2898 // And "return" to the OSR entry point of the function.
2909 __ ret(0); 2899 __ ret(0);
2910 } 2900 }
2911 2901
2912 2902
2913 #undef __ 2903 #undef __
2914 } // namespace internal 2904 } // namespace internal
2915 } // namespace v8 2905 } // namespace v8
2916 2906
2917 #endif // V8_TARGET_ARCH_IA32 2907 #endif // V8_TARGET_ARCH_IA32
OLDNEW
« no previous file with comments | « src/heap/spaces.cc ('k') | src/interface-descriptors.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698