Bug 80924 - [V8][Refactoring] Remove getCachedWrapperSlow() from V8Bindings.cpp
Summary: [V8][Refactoring] Remove getCachedWrapperSlow() from V8Bindings.cpp
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebCore JavaScript (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Kentaro Hara
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-03-12 18:46 PDT by Kentaro Hara
Modified: 2012-03-12 21:22 PDT (History)
4 users (show)

See Also:


Attachments
Patch (4.64 KB, patch)
2012-03-12 18:49 PDT, Kentaro Hara
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Kentaro Hara 2012-03-12 18:46:43 PDT
getCachedWrapperSlow() is called by getCachedWrapper() only, and getCachedWrapperSlow() just calls getCachedWrapperInline(). Thus, we can expand getCachedWrapperInline() into getCachedWrapper(), which removes getCachedWrapperSlow().
Comment 1 Kentaro Hara 2012-03-12 18:49:05 PDT
Created attachment 131487 [details]
Patch
Comment 2 Adam Barth 2012-03-12 19:09:44 PDT
Comment on attachment 131487 [details]
Patch

This doesn't slow things down by inlining too much code?
Comment 3 Kentaro Hara 2012-03-12 19:14:48 PDT
(In reply to comment #2)
> (From update of attachment 131487 [details])
> This doesn't slow things down by inlining too much code?

I confirmed no perf regression in DOM core tests of DROMAEO. I do not think this change increases the inlined code. This change just moves getCachedWrapperInline(), which had been already inlined.
Comment 4 Adam Barth 2012-03-12 19:17:12 PDT
Comment on attachment 131487 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=131487&action=review

> Source/WebCore/bindings/v8/V8DOMWrapper.h:-135
> -            return getCachedWrapperSlow(node);

This function used to be out-of-line, but I think that's fine.
Comment 5 Kentaro Hara 2012-03-12 19:18:10 PDT
(In reply to comment #4)
> > Source/WebCore/bindings/v8/V8DOMWrapper.h:-135
> > -            return getCachedWrapperSlow(node);
> 
> This function used to be out-of-line, but I think that's fine.

Ah, I got it. Thanks for the clarification. Let me land it.
Comment 6 WebKit Review Bot 2012-03-12 21:22:22 PDT
Comment on attachment 131487 [details]
Patch

Clearing flags on attachment: 131487

Committed r110536: <http://trac.webkit.org/changeset/110536>
Comment 7 WebKit Review Bot 2012-03-12 21:22:26 PDT
All reviewed patches have been landed.  Closing bug.