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

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

Issue 23699002: load ics for js api accessors (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: as discussed Created 7 years, 3 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/arm/stub-cache-arm.cc ('k') | src/ic.cc » ('j') | src/ic.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/ia32/stub-cache-ia32.cc
diff --git a/src/ia32/stub-cache-ia32.cc b/src/ia32/stub-cache-ia32.cc
index 9aa7baec095f1ba7877b74169b8eeed4ad54c484..af4095812a1177cea4c4bcf4c99e58dcd7d54efd 100644
--- a/src/ia32/stub-cache-ia32.cc
+++ b/src/ia32/stub-cache-ia32.cc
@@ -1261,7 +1261,7 @@ Register BaseLoadStubCompiler::CallbackHandlerFrontend(
Handle<JSObject> holder,
Handle<Name> name,
Label* success,
- Handle<ExecutableAccessorInfo> callback) {
+ Handle<Object> callback) {
Label miss;
Register reg = HandlerFrontendHeader(object, object_reg, holder, name, &miss);
@@ -1356,6 +1356,34 @@ void BaseLoadStubCompiler::GenerateLoadField(Register reg,
void BaseLoadStubCompiler::GenerateLoadCallback(
Register reg,
+ const CallOptimization& call_optimization) {
+ ASSERT(call_optimization.is_simple_api_call());
+ ASSERT(!scratch3().is(reg));
+ ASSERT(!receiver().is(reg));
+
+ // copy return value
+ __ mov(scratch3(), Operand(esp, 0));
+ // assign stack space for the call arguments
Michael Starzinger 2013/09/04 16:32:31 nit: Capitalize and punctuate comments.
+ __ sub(esp, Immediate((kFastApiCallArguments + 1) * kPointerSize));
+ // Move the return address on top of the stack.
+ __ mov(Operand(esp, 0), scratch3());
+
+ int argc = 0;
+ int api_call_argc = argc + kFastApiCallArguments;
+ // write holder to stack frame
+ Register holder =
+ call_optimization.expected_receiver_type().is_null() ?
Michael Starzinger 2013/09/04 16:32:31 We should just always use receiver() here, because
+ receiver() : reg;
+ __ mov(Operand(esp, 1 * kPointerSize), holder);
+ // write receiver to stack frame
+ __ mov(Operand(esp, (api_call_argc + 1) * kPointerSize), receiver());
+
+ GenerateFastApiCall(masm(), call_optimization, argc);
+}
+
+
+void BaseLoadStubCompiler::GenerateLoadCallback(
+ Register reg,
Handle<ExecutableAccessorInfo> callback) {
// Insert additional parameters into the stack frame above return address.
ASSERT(!scratch3().is(reg));
« no previous file with comments | « src/arm/stub-cache-arm.cc ('k') | src/ic.cc » ('j') | src/ic.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698