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

Unified Diff: src/x64/builtins-x64.cc

Issue 1926023002: [turbofan] Run everything after representation selection concurrently. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 8 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 side-by-side diff with in-line comments
Download patch
Index: src/x64/builtins-x64.cc
diff --git a/src/x64/builtins-x64.cc b/src/x64/builtins-x64.cc
index 478ea193e6383f52c7813442c8429476cc09cd54..c2c61866e4b0535c680acdb7115b5b1c9859b818 100644
--- a/src/x64/builtins-x64.cc
+++ b/src/x64/builtins-x64.cc
@@ -2042,6 +2042,48 @@ static void LeaveArgumentsAdaptorFrame(MacroAssembler* masm) {
__ PushReturnAddressFrom(rcx);
}
+// static
+void Builtins::Generate_AllocateInNewSpace(MacroAssembler* masm) {
+ // ----------- S t a t e -------------
+ // -- rdx : requested object size (tagged)
+ // -- rsi : context
+ // -----------------------------------
+ __ AssertSmi(rdx);
+
+ Label runtime;
+ __ SmiToInteger64(rdx, rdx);
+ __ Allocate(rdx, rax, rcx, rdi, &runtime, NO_ALLOCATION_FLAGS);
+ __ Ret();
+
+ __ bind(&runtime);
+ __ Integer32ToSmi(rdx, rdx);
+ __ PopReturnAddressTo(rcx);
+ __ Push(rdx);
+ __ PushReturnAddressFrom(rcx);
+ __ TailCallRuntime(Runtime::kAllocateInNewSpace);
+}
+
+// static
+void Builtins::Generate_AllocateInOldSpace(MacroAssembler* masm) {
+ // ----------- S t a t e -------------
+ // -- rdx : requested object size (tagged)
+ // -- rsi : context
+ // -----------------------------------
+ __ AssertSmi(rdx);
+
+ Label runtime;
+ __ SmiToInteger64(rdx, rdx);
+ __ Allocate(rdx, rax, rcx, rdi, &runtime, PRETENURE);
+ __ Ret();
+
+ __ bind(&runtime);
+ __ Integer32ToSmi(rdx, rdx);
+ __ PopReturnAddressTo(rcx);
+ __ Push(rdx);
+ __ Push(Smi::FromInt(AllocateTargetSpace::encode(OLD_SPACE)));
+ __ PushReturnAddressFrom(rcx);
+ __ TailCallRuntime(Runtime::kAllocateInTargetSpace);
+}
void Builtins::Generate_ArgumentsAdaptorTrampoline(MacroAssembler* masm) {
// ----------- S t a t e -------------

Powered by Google App Engine
This is Rietveld 408576698