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

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

Issue 1910253005: [api] Expose FunctionCallbackInfo::NewTarget (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Added a TODO 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
« no previous file with comments | « src/ia32/builtins-ia32.cc ('k') | src/mips/builtins-mips.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/ia32/code-stubs-ia32.cc
diff --git a/src/ia32/code-stubs-ia32.cc b/src/ia32/code-stubs-ia32.cc
index 3a86e03cb13c1441443f37ee8e0eb576a8220707..badb2f9bee5daccaeb314cd21b4dd4aa9ffa72e1 100644
--- a/src/ia32/code-stubs-ia32.cc
+++ b/src/ia32/code-stubs-ia32.cc
@@ -5686,9 +5686,14 @@ void CallApiCallbackStub::Generate(MacroAssembler* masm) {
STATIC_ASSERT(FCA::kReturnValueDefaultValueIndex == 2);
STATIC_ASSERT(FCA::kIsolateIndex == 1);
STATIC_ASSERT(FCA::kHolderIndex == 0);
- STATIC_ASSERT(FCA::kArgsLength == 7);
+ STATIC_ASSERT(FCA::kNewTargetIndex == 7);
+ STATIC_ASSERT(FCA::kArgsLength == 8);
__ pop(return_address);
+
+ // new target
+ __ PushRoot(Heap::kUndefinedValueRootIndex);
+
// context save.
__ push(context);
@@ -5733,7 +5738,7 @@ void CallApiCallbackStub::Generate(MacroAssembler* masm) {
// Allocate the v8::Arguments structure in the arguments' space since
// it's not controlled by GC.
- const int kApiStackSpace = 4;
+ const int kApiStackSpace = 3;
PrepareCallApiFunction(masm, kApiArgc + kApiStackSpace);
@@ -5744,8 +5749,6 @@ void CallApiCallbackStub::Generate(MacroAssembler* masm) {
__ mov(ApiParameterOperand(3), scratch);
// FunctionCallbackInfo::length_.
__ Move(ApiParameterOperand(4), Immediate(argc()));
- // FunctionCallbackInfo::is_construct_call_.
- __ Move(ApiParameterOperand(5), Immediate(0));
// v8::InvocationCallback's argument.
__ lea(scratch, ApiParameterOperand(2));
@@ -5765,8 +5768,8 @@ void CallApiCallbackStub::Generate(MacroAssembler* masm) {
}
Operand return_value_operand(ebp, return_value_offset * kPointerSize);
int stack_space = 0;
- Operand is_construct_call_operand = ApiParameterOperand(5);
- Operand* stack_space_operand = &is_construct_call_operand;
+ Operand length_operand = ApiParameterOperand(4);
+ Operand* stack_space_operand = &length_operand;
stack_space = argc() + FCA::kArgsLength + 1;
stack_space_operand = nullptr;
CallApiFunctionAndReturn(masm, api_function_address, thunk_ref,
« no previous file with comments | « src/ia32/builtins-ia32.cc ('k') | src/mips/builtins-mips.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698