Bug 103978

Summary: [V8] Remove IntegerCache::m_initialized
Product: WebKit Reporter: Kentaro Hara <haraken>
Component: WebCore JavaScriptAssignee: Kentaro Hara <haraken>
Status: RESOLVED FIXED    
Severity: Normal CC: abarth, japhet, webkit.review.bot
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch haraken: commit-queue-

Description Kentaro Hara 2012-12-04 00:26:09 PST
Thanks to r136479, we can now initialize V8 integers in IntegerCache's constructor. We can remove IntegerCache::m_initialized, which slightly improves performance.

BTW, v8Integer() looks much slower than JSC's one. (https://docs.google.com/a/google.com/spreadsheet/ccc?key=0ArGPzKNdEGeQdGItaF8yVVVMM2trS3R5VW1heDFmcGc#gid=2)
Comment 1 Kentaro Hara 2012-12-04 00:29:24 PST
Created attachment 177434 [details]
Patch
Comment 2 Kentaro Hara 2012-12-04 00:32:13 PST
I'll replace Persistent handles with ScopedPersistents in a follow-up patch.
Comment 3 Adam Barth 2012-12-04 10:09:27 PST
Comment on attachment 177434 [details]
Patch

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

> Source/WebCore/bindings/v8/V8ValueCache.cpp:103
> -void IntegerCache::createSmallIntegers(v8::Isolate* isolate)
> +IntegerCache::IntegerCache()

I probably would have passed in isolate to the constructor, but this is fine too.
Comment 4 Adam Barth 2012-12-04 10:09:35 PST
(In reply to comment #2)
> I'll replace Persistent handles with ScopedPersistents in a follow-up patch.

Thanks.
Comment 5 Kentaro Hara 2012-12-04 16:33:28 PST
Committed r136590: <http://trac.webkit.org/changeset/136590>
Comment 6 Kentaro Hara 2012-12-04 16:34:02 PST
Comment on attachment 177434 [details]
Patch

Landed manually.