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

Unified Diff: src/x64/stub-cache-x64.cc

Issue 16642003: add a default value for return value (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: comments addressed Created 7 years, 6 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/stub-cache-ia32.cc ('k') | test/cctest/test-api.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/x64/stub-cache-x64.cc
diff --git a/src/x64/stub-cache-x64.cc b/src/x64/stub-cache-x64.cc
index bc3df68a8858c73de780072818e7a50d17668364..06d8f7108b0505abe6db83c750d38cf228457156 100644
--- a/src/x64/stub-cache-x64.cc
+++ b/src/x64/stub-cache-x64.cc
@@ -449,12 +449,13 @@ static void GenerateFastApiCall(MacroAssembler* masm,
// (first fast api call extra argument)
// -- rsp[24] : api call data
// -- rsp[32] : isolate
- // -- rsp[40] : ReturnValue
+ // -- rsp[40] : ReturnValue default value
+ // -- rsp[48] : ReturnValue
//
- // -- rsp[48] : last argument
+ // -- rsp[56] : last argument
// -- ...
- // -- rsp[(argc + 5) * 8] : first argument
- // -- rsp[(argc + 6) * 8] : receiver
+ // -- rsp[(argc + 6) * 8] : first argument
+ // -- rsp[(argc + 7) * 8] : receiver
// -----------------------------------
// Get the function and setup the context.
Handle<JSFunction> function = optimization.constant_function();
@@ -477,9 +478,10 @@ static void GenerateFastApiCall(MacroAssembler* masm,
__ movq(Operand(rsp, 4 * kPointerSize), kScratchRegister);
__ LoadRoot(kScratchRegister, Heap::kUndefinedValueRootIndex);
__ movq(Operand(rsp, 5 * kPointerSize), kScratchRegister);
+ __ movq(Operand(rsp, 6 * kPointerSize), kScratchRegister);
// Prepare arguments.
- STATIC_ASSERT(kFastApiCallArguments == 5);
+ STATIC_ASSERT(kFastApiCallArguments == 6);
__ lea(rbx, Operand(rsp, kFastApiCallArguments * kPointerSize));
// Function address is a foreign pointer outside V8's heap.
@@ -1305,6 +1307,7 @@ void BaseLoadStubCompiler::GenerateLoadCallback(
}
__ LoadRoot(kScratchRegister, Heap::kUndefinedValueRootIndex);
__ push(kScratchRegister); // return value
+ __ push(kScratchRegister); // return value default
__ PushAddress(ExternalReference::isolate_address(isolate()));
__ push(name()); // name
// Save a pointer to where we pushed the arguments pointer. This will be
@@ -1337,8 +1340,8 @@ void BaseLoadStubCompiler::GenerateLoadCallback(
const int kArgStackSpace = 1;
__ PrepareCallApiFunction(kArgStackSpace, returns_handle);
- STATIC_ASSERT(PropertyCallbackArguments::kArgsLength == 5);
- __ lea(rax, Operand(name_arg, 5 * kPointerSize));
+ STATIC_ASSERT(PropertyCallbackArguments::kArgsLength == 6);
+ __ lea(rax, Operand(name_arg, 6 * kPointerSize));
// v8::AccessorInfo::args_.
__ movq(StackSpaceOperand(0), rax);
@@ -1350,7 +1353,7 @@ void BaseLoadStubCompiler::GenerateLoadCallback(
__ CallApiFunctionAndReturn(getter_address,
kStackSpace,
returns_handle,
- 4);
+ 5);
}
« no previous file with comments | « src/ia32/stub-cache-ia32.cc ('k') | test/cctest/test-api.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698