Bug 104082 - [V8] Replace String::New("symbol") with String::NewSymbol("symbol") (part 2)
Summary: [V8] Replace String::New("symbol") with String::NewSymbol("symbol") (part 2)
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-12-04 21:01 PST by Kentaro Hara
Modified: 2012-12-05 11:40 PST (History)
5 users (show)

See Also:


Attachments
Patch (11.64 KB, patch)
2012-12-04 21:03 PST, 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-12-04 21:01:33 PST
V8 can look up symbols faster than strings.
Comment 1 Kentaro Hara 2012-12-04 21:03:24 PST
Created attachment 177661 [details]
Patch
Comment 2 Adam Barth 2012-12-04 21:07:10 PST
Comment on attachment 177661 [details]
Patch

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

> Source/WebCore/bindings/v8/custom/V8ArrayBufferViewCustom.cpp:40
> +    v8::Handle<v8::String> key = v8::String::NewSymbol(hiddenCopyMethodName);

What is hiddenCopyMethodName all about?  Why doesn't this just use V8HiddenValueNames?
Comment 3 Adam Barth 2012-12-04 21:08:04 PST
@haraken: Would you be willing to make a followup patch to switch from the ad-hoc constant to V8HiddenPropertyName?
Comment 4 Kentaro Hara 2012-12-04 21:08:29 PST
(In reply to comment #3)
> @haraken: Would you be willing to make a followup patch to switch from the ad-hoc constant to V8HiddenPropertyName?

Sure!
Comment 5 WebKit Review Bot 2012-12-05 00:02:27 PST
Comment on attachment 177661 [details]
Patch

Clearing flags on attachment: 177661

Committed r136645: <http://trac.webkit.org/changeset/136645>
Comment 6 WebKit Review Bot 2012-12-05 00:02:32 PST
All reviewed patches have been landed.  Closing bug.
Comment 7 Kenneth Russell 2012-12-05 11:40:44 PST
Ulan added the optimization to ArrayBufferView; while I reviewed it, I didn't know about V8HiddenPropertyName. Sorry about that.