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

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

Issue 2090723005: [builtins] New frame type for exits to C++ builtins (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Add missing condition in SafeStackFrameIter::frame() Created 4 years, 5 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') | src/x64/macro-assembler-x64.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 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 1557 matching lines...) Expand 10 before | Expand all | Expand 10 after
1568 const int kArgExtraStackSpace = 0; 1568 const int kArgExtraStackSpace = 0;
1569 const int kMaxRegisterResultSize = 2; 1569 const int kMaxRegisterResultSize = 2;
1570 #endif // _WIN64 1570 #endif // _WIN64
1571 1571
1572 // Enter the exit frame that transitions from JavaScript to C++. 1572 // Enter the exit frame that transitions from JavaScript to C++.
1573 int arg_stack_space = 1573 int arg_stack_space =
1574 kArgExtraStackSpace + 1574 kArgExtraStackSpace +
1575 (result_size() <= kMaxRegisterResultSize ? 0 : result_size()); 1575 (result_size() <= kMaxRegisterResultSize ? 0 : result_size());
1576 if (argv_in_register()) { 1576 if (argv_in_register()) {
1577 DCHECK(!save_doubles()); 1577 DCHECK(!save_doubles());
1578 DCHECK(!is_builtin_exit());
1578 __ EnterApiExitFrame(arg_stack_space); 1579 __ EnterApiExitFrame(arg_stack_space);
1579 // Move argc into r14 (argv is already in r15). 1580 // Move argc into r14 (argv is already in r15).
1580 __ movp(r14, rax); 1581 __ movp(r14, rax);
1581 } else { 1582 } else {
1582 __ EnterExitFrame(arg_stack_space, save_doubles()); 1583 __ EnterExitFrame(
1584 arg_stack_space, save_doubles(),
1585 is_builtin_exit() ? StackFrame::BUILTIN_EXIT : StackFrame::EXIT);
1583 } 1586 }
1584 1587
1585 // rbx: pointer to builtin function (C callee-saved). 1588 // rbx: pointer to builtin function (C callee-saved).
1586 // rbp: frame pointer of exit frame (restored after C call). 1589 // rbp: frame pointer of exit frame (restored after C call).
1587 // rsp: stack pointer (restored after C call). 1590 // rsp: stack pointer (restored after C call).
1588 // r14: number of arguments including receiver (C callee-saved). 1591 // r14: number of arguments including receiver (C callee-saved).
1589 // r15: argv pointer (C callee-saved). 1592 // r15: argv pointer (C callee-saved).
1590 1593
1591 // Check stack alignment. 1594 // Check stack alignment.
1592 if (FLAG_debug_code) { 1595 if (FLAG_debug_code) {
(...skipping 3623 matching lines...) Expand 10 before | Expand all | Expand 10 after
5216 kStackUnwindSpace, nullptr, return_value_operand, 5219 kStackUnwindSpace, nullptr, return_value_operand,
5217 NULL); 5220 NULL);
5218 } 5221 }
5219 5222
5220 #undef __ 5223 #undef __
5221 5224
5222 } // namespace internal 5225 } // namespace internal
5223 } // namespace v8 5226 } // namespace v8
5224 5227
5225 #endif // V8_TARGET_ARCH_X64 5228 #endif // V8_TARGET_ARCH_X64
OLDNEW
« no previous file with comments | « src/x64/builtins-x64.cc ('k') | src/x64/macro-assembler-x64.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698