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

Unified Diff: src/x64/code-stubs-x64.cc

Issue 1611313003: Revert of Array length reduction should throw in strict mode if it can't delete an element. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 11 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
« no previous file with comments | « src/runtime/runtime.h ('k') | src/x87/code-stubs-x87.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/x64/code-stubs-x64.cc
diff --git a/src/x64/code-stubs-x64.cc b/src/x64/code-stubs-x64.cc
index 476724335d2602159b4927def4f7c5c6da7adc68..7f976940b5a2213e505c3af0005405d9efb1dc8b 100644
--- a/src/x64/code-stubs-x64.cc
+++ b/src/x64/code-stubs-x64.cc
@@ -5368,11 +5368,11 @@
void CallApiGetterStub::Generate(MacroAssembler* masm) {
// ----------- S t a t e -------------
- // -- rsp[0] : return address
- // -- rsp[8] : name
- // -- rsp[16 .. (16 + kArgsLength*8)] : v8::PropertyCallbackInfo::args_
+ // -- rsp[0] : return address
+ // -- rsp[8] : name
+ // -- rsp[16 - kArgsLength*8] : PropertyCallbackArguments object
// -- ...
- // -- r8 : api_function_address
+ // -- r8 : api_function_address
// -----------------------------------
#if defined(__MINGW64__) || defined(_WIN64)
@@ -5388,25 +5388,23 @@
DCHECK(api_function_address.is(r8));
Register scratch = rax;
- // v8::PropertyCallbackInfo::args_ array and name handle.
- const int kStackUnwindSpace = PropertyCallbackArguments::kArgsLength + 1;
-
- // Allocate v8::PropertyCallbackInfo in non-GCed stack space.
+ // v8::Arguments::values_ and handler for name.
+ const int kStackSpace = PropertyCallbackArguments::kArgsLength + 1;
+
+ // Allocate v8::AccessorInfo in non-GCed stack space.
const int kArgStackSpace = 1;
- // Load address of v8::PropertyAccessorInfo::args_ array.
- __ leap(scratch, Operand(rsp, 2 * kPointerSize));
+ __ leap(name_arg, Operand(rsp, kPCOnStackSize));
PrepareCallApiFunction(masm, kArgStackSpace);
- // Create v8::PropertyCallbackInfo object on the stack and initialize
- // it's args_ field.
- Operand info_object = StackSpaceOperand(0);
- __ movp(info_object, scratch);
-
- __ leap(name_arg, Operand(scratch, -kPointerSize));
+ __ leap(scratch, Operand(name_arg, 1 * kPointerSize));
+
+ // v8::PropertyAccessorInfo::args_.
+ __ movp(StackSpaceOperand(0), scratch);
+
// The context register (rsi) has been saved in PrepareCallApiFunction and
// could be used to pass arguments.
- __ leap(accessor_info_arg, info_object);
+ __ leap(accessor_info_arg, StackSpaceOperand(0));
ExternalReference thunk_ref =
ExternalReference::invoke_accessor_getter_callback(isolate());
@@ -5416,12 +5414,13 @@
DCHECK(!api_function_address.is(accessor_info_arg) &&
!api_function_address.is(name_arg));
- // +3 is to skip prolog, return address and name handle.
- Operand return_value_operand(
- rbp, (PropertyCallbackArguments::kReturnValueOffset + 3) * kPointerSize);
+ // The name handler is counted as an argument.
+ StackArgumentsAccessor args(rbp, PropertyCallbackArguments::kArgsLength);
+ Operand return_value_operand = args.GetArgumentOperand(
+ PropertyCallbackArguments::kArgsLength - 1 -
+ PropertyCallbackArguments::kReturnValueOffset);
CallApiFunctionAndReturn(masm, api_function_address, thunk_ref, getter_arg,
- kStackUnwindSpace, nullptr, return_value_operand,
- NULL);
+ kStackSpace, nullptr, return_value_operand, NULL);
}
« no previous file with comments | « src/runtime/runtime.h ('k') | src/x87/code-stubs-x87.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698