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

Issue 118118: Store fast property index in stubs generated for interceptor loads (Closed)

Created:
11 years, 6 months ago by antonm
Modified:
9 years, 4 months ago
CC:
v8-dev
Visibility:
Public.

Description

In case of holder with fast properties that allows to fetch the property immediately if holder has this property or saves binary search on holder if property doesn't belong to holder. Of course, in the cases when named getter returns nothing. That gives ~20% for dom benchmark/Document Object String Get, speeds up overall dom_perf (not dramatically) and overall score for peacekeeper. Strange, but DOM part of peacekeepr runs somewhat slower. Committed: http://code.google.com/p/v8/source/detail?r=2093

Patch Set 1 #

Total comments: 24

Patch Set 2 : '' #

Total comments: 1
Unified diffs Side-by-side diffs Delta from patch set Stats (+90 lines, -6 lines) Patch
M src/objects.cc View 1 2 chunks +69 lines, -5 lines 0 comments Download
M src/objects-inl.h View 1 1 chunk +18 lines, -0 lines 1 comment Download
M src/stub-cache.cc View 1 chunk +3 lines, -1 line 0 comments Download

Messages

Total messages: 5 (0 generated)
antonm
11 years, 6 months ago (2009-06-02 16:09:16 UTC) #1
Mads Ager (chromium)
LGTM when the following comments have been addressed. This is good stuff. Also, you should ...
11 years, 6 months ago (2009-06-02 17:14:04 UTC) #2
antonm
Thanks a lot for review, Mads! http://codereview.chromium.org/118118/diff/1/4 File src/ia32/stub-cache-ia32.cc (right): http://codereview.chromium.org/118118/diff/1/4#newcode363 Line 363: // TODO(367): ...
11 years, 6 months ago (2009-06-02 18:14:46 UTC) #3
Kasper Lund
LGTM. http://codereview.chromium.org/118118/diff/1006/1009 File src/objects-inl.h (right): http://codereview.chromium.org/118118/diff/1006/1009#newcode2558 Line 2558: // TODO(antonm): do we want to do ...
11 years, 6 months ago (2009-06-02 18:27:16 UTC) #4
Mads Ager (chromium)
11 years, 6 months ago (2009-06-03 05:56:27 UTC) #5
Still LGTM!

http://codereview.chromium.org/118118/diff/1/7
File src/objects-inl.h (right):

http://codereview.chromium.org/118118/diff/1/7#newcode2558
Line 2558: // TODO(antonm): do we want to do any shortcuts for global object?
On 2009/06/02 18:14:46, antonm wrote:
> On 2009/06/02 17:14:04, Mads Ager wrote:
> > I'm not sure I understand this TODO.  Could you elaborate (and potentially
> file
> > a bug report and use the number)?
> 
> Sure.  The code below is pretty close to
JSObject::LocalLookupRealNamedProperty,
> but doesn't have the check IsJSGlobalProxy() (cf. with the method), so I
wonder
> if it should be here as well.
>
> BTW, what do you think about it?

Ah, I understand now, thanks.  I don't think the shortcutting for the
JSGlobalProxy matters much for the current use of interceptors in chromium. 
However, the shortcutting is easy to do, so it probably makes sense to add it. 
If we add the shortcutting for the JSGlobalProxy here, we have to make sure to
add it to GetInterceptorPropertyWithLookupHint as well so we use the hint on the
right object.  It is fine to leave that for another changelist.

http://codereview.chromium.org/118118/diff/1/3
File src/objects.cc (right):

http://codereview.chromium.org/118118/diff/1/3#newcode5621
Line 5621: JSObject* receiver, String* name, PropertyAttributes* attributes) {
On 2009/06/02 18:14:46, antonm wrote:
> On 2009/06/02 17:14:04, Mads Ager wrote:
> > Use one line per argument here (as in GetInterceptorPropertyWithLookupHint)?
> 
> The problem is that if formatted as method_name(arg1,
>                                                 arg2
> 
> it goes out of 80 limit.  What would you say about this variant?

In that case, I normally do:

method_name(
    arg1,
    arg2,
    ...)

Powered by Google App Engine
This is Rietveld 408576698