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

Side by Side Diff: src/x64/code-stubs-x64.cc

Issue 2188993003: [stubs] Port CreateWeakCellStub to turbofan (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Fix stack overflow Created 4 years, 4 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
OLDNEW
1 // Copyright 2013 the V8 project authors. All rights reserved. 1 // Copyright 2013 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_X64 5 #if V8_TARGET_ARCH_X64
6 6
7 #include "src/code-stubs.h" 7 #include "src/code-stubs.h"
8 #include "src/api-arguments.h" 8 #include "src/api-arguments.h"
9 #include "src/bootstrapper.h" 9 #include "src/bootstrapper.h"
10 #include "src/codegen.h" 10 #include "src/codegen.h"
(...skipping 1148 matching lines...) Expand 10 before | Expand all | Expand 10 after
1159 // rdi : the function to call 1159 // rdi : the function to call
1160 FrameScope scope(masm, StackFrame::INTERNAL); 1160 FrameScope scope(masm, StackFrame::INTERNAL);
1161 1161
1162 // Number-of-arguments register must be smi-tagged to call out. 1162 // Number-of-arguments register must be smi-tagged to call out.
1163 __ Integer32ToSmi(rax, rax); 1163 __ Integer32ToSmi(rax, rax);
1164 __ Push(rax); 1164 __ Push(rax);
1165 __ Push(rdi); 1165 __ Push(rdi);
1166 __ Integer32ToSmi(rdx, rdx); 1166 __ Integer32ToSmi(rdx, rdx);
1167 __ Push(rdx); 1167 __ Push(rdx);
1168 __ Push(rbx); 1168 __ Push(rbx);
1169 __ Push(rsi);
1169 1170
1170 __ CallStub(stub); 1171 __ CallStub(stub);
1171 1172
1173 __ Pop(rsi);
1172 __ Pop(rbx); 1174 __ Pop(rbx);
1173 __ Pop(rdx); 1175 __ Pop(rdx);
1174 __ Pop(rdi); 1176 __ Pop(rdi);
1175 __ Pop(rax); 1177 __ Pop(rax);
1176 __ SmiToInteger32(rax, rax); 1178 __ SmiToInteger32(rax, rax);
1177 } 1179 }
1178 1180
1179 1181
1180 static void GenerateRecordCallTarget(MacroAssembler* masm) { 1182 static void GenerateRecordCallTarget(MacroAssembler* masm) {
1181 // Cache the called function in a feedback vector slot. Cache states 1183 // Cache the called function in a feedback vector slot. Cache states
(...skipping 277 matching lines...) Expand 10 before | Expand all | Expand 10 after
1459 // Store the function. Use a stub since we need a frame for allocation. 1461 // Store the function. Use a stub since we need a frame for allocation.
1460 // rbx - vector 1462 // rbx - vector
1461 // rdx - slot (needs to be in smi form) 1463 // rdx - slot (needs to be in smi form)
1462 // rdi - function 1464 // rdi - function
1463 { 1465 {
1464 FrameScope scope(masm, StackFrame::INTERNAL); 1466 FrameScope scope(masm, StackFrame::INTERNAL);
1465 CreateWeakCellStub create_stub(isolate); 1467 CreateWeakCellStub create_stub(isolate);
1466 1468
1467 __ Integer32ToSmi(rdx, rdx); 1469 __ Integer32ToSmi(rdx, rdx);
1468 __ Push(rdi); 1470 __ Push(rdi);
1471 __ Push(rsi);
1469 __ CallStub(&create_stub); 1472 __ CallStub(&create_stub);
1473 __ Pop(rsi);
1470 __ Pop(rdi); 1474 __ Pop(rdi);
1471 } 1475 }
1472 1476
1473 __ jmp(&call_function); 1477 __ jmp(&call_function);
1474 1478
1475 // We are here because tracing is on or we encountered a MISS case we can't 1479 // We are here because tracing is on or we encountered a MISS case we can't
1476 // handle here. 1480 // handle here.
1477 __ bind(&miss); 1481 __ bind(&miss);
1478 GenerateMiss(masm); 1482 GenerateMiss(masm);
1479 1483
(...skipping 3725 matching lines...) Expand 10 before | Expand all | Expand 10 after
5205 kStackUnwindSpace, nullptr, return_value_operand, 5209 kStackUnwindSpace, nullptr, return_value_operand,
5206 NULL); 5210 NULL);
5207 } 5211 }
5208 5212
5209 #undef __ 5213 #undef __
5210 5214
5211 } // namespace internal 5215 } // namespace internal
5212 } // namespace v8 5216 } // namespace v8
5213 5217
5214 #endif // V8_TARGET_ARCH_X64 5218 #endif // V8_TARGET_ARCH_X64
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698