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

Unified Diff: src/stub-cache.cc

Issue 160041: Stub Cache: speed up load callback accessor by allocating data handle on stack. (Closed)
Patch Set: . Created 11 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 side-by-side diff with in-line comments
Download patch
« src/ia32/stub-cache-ia32.cc ('K') | « src/ia32/stub-cache-ia32.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/stub-cache.cc
diff --git a/src/stub-cache.cc b/src/stub-cache.cc
index 7ca2677d58bba1c9f7b002f7203d5b4d560152db..859514885af73bc90352a1164a6c6b853ffd8248 100644
--- a/src/stub-cache.cc
+++ b/src/stub-cache.cc
@@ -736,22 +736,22 @@ Handle<Code> ComputeCallMiss(int argc) {
Object* LoadCallbackProperty(Arguments args) {
Handle<JSObject> recv = args.at<JSObject>(0);
- AccessorInfo* callback = AccessorInfo::cast(args[1]);
+ Handle<JSObject> holder = args.at<JSObject>(1);
+ AccessorInfo* callback = AccessorInfo::cast(args[2]);
+ Handle<Object> data = args.at<Object>(3);
Christian Plesner Hansen 2009/07/24 07:33:25 A further optimization could be to change the impl
Vitaly Repeshko 2009/07/24 13:45:38 Sure. After this patch is in, I was going to exper
Address getter_address = v8::ToCData<Address>(callback->getter());
antonm 2009/07/23 21:12:58 maybe compile getter_address into stub as well? A
Vitaly Repeshko 2009/07/24 13:45:38 I think this essentially means moving a few instru
Vitaly Repeshko 2009/07/24 15:43:56 Anton pointed out in offline discussion that we st
v8::AccessorGetter fun = FUNCTION_CAST<v8::AccessorGetter>(getter_address);
ASSERT(fun != NULL);
- Handle<String> name = args.at<String>(2);
- Handle<JSObject> holder = args.at<JSObject>(3);
- HandleScope scope;
- Handle<Object> data(callback->data());
- LOG(ApiNamedPropertyAccess("load", *recv, *name));
+ Handle<String> name = args.at<String>(4);
// NOTE: If we can align the structure of an AccessorInfo with the
// locations of the arguments to this function maybe we don't have
// to explicitly create the structure but can just pass a pointer
// into the stack.
+ LOG(ApiNamedPropertyAccess("load", *recv, *name));
iposva 2009/07/24 00:30:07 Do you really intend to log for every single prope
Christian Plesner Hansen 2009/07/24 07:33:25 I agree. It looks like we're already losing perfo
Vitaly Repeshko 2009/07/24 13:45:38 Well, this does cost us a bit, but I'm not sure I
v8::AccessorInfo info(v8::Utils::ToLocal(recv),
v8::Utils::ToLocal(data),
v8::Utils::ToLocal(holder));
+ HandleScope scope;
antonm 2009/07/23 21:12:58 maybe move scope just before entering fun? for ex
iposva 2009/07/24 00:30:07 And where would the result handle on the next line
antonm 2009/07/24 02:43:21 Correct me if I'm wrong, but v8::Handle::Handle()
Christian Plesner Hansen 2009/07/24 07:33:25 If you move the handle scope into the inner scope
antonm 2009/07/24 08:59:34 Aha, stupid me.
v8::Handle<v8::Value> result;
{
// Leaving JavaScript.
« src/ia32/stub-cache-ia32.cc ('K') | « src/ia32/stub-cache-ia32.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698