WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
117614
Function names on Object.prototype should be common identifiers
https://bugs.webkit.org/show_bug.cgi?id=117614
Summary
Function names on Object.prototype should be common identifiers
Ryosuke Niwa
Reported
2013-06-13 16:11:54 PDT
Function names on Object.prototype should be common identifiers
Attachments
Fixes the bug
(16.30 KB, patch)
2013-06-13 16:17 PDT
,
Ryosuke Niwa
darin
: review+
Details
Formatted Diff
Diff
View All
Add attachment
proposed patch, testcase, etc.
Ryosuke Niwa
Comment 1
2013-06-13 16:17:06 PDT
Created
attachment 204649
[details]
Fixes the bug
Darin Adler
Comment 2
2013-06-13 17:39:11 PDT
Comment on
attachment 204649
[details]
Fixes the bug View in context:
https://bugs.webkit.org/attachment.cgi?id=204649&action=review
> Source/JavaScriptCore/runtime/JSObject.h:1472 > +#define JSC_NATIVE_INTRINSIC_FUNCTION_IDENT(jsName, cppName, attributes, length, intrinsic) \
We can do this without a second macro. We just need this inline function: inline Identifier makeIdentifier(ExecState* exec, const char* name) { return Identifier(exec, name); } inline Identifier makeIdentifier(ExecState*, const Identifier& identifier) { return identifier; } Then change the existing macro to use this function instead of calling the Identifier constructor directly. I’d love to not add a new macro. I also have no idea why this is a macro instead of an inline function in the first place.
Ryosuke Niwa
Comment 3
2013-06-14 13:36:14 PDT
Comment on
attachment 204649
[details]
Fixes the bug View in context:
https://bugs.webkit.org/attachment.cgi?id=204649&action=review
>> Source/JavaScriptCore/runtime/JSObject.h:1472 >> +#define JSC_NATIVE_INTRINSIC_FUNCTION_IDENT(jsName, cppName, attributes, length, intrinsic) \ > > We can do this without a second macro. We just need this inline function: > > inline Identifier makeIdentifier(ExecState* exec, const char* name) > { > return Identifier(exec, name); > } > > inline Identifier makeIdentifier(ExecState*, const Identifier& identifier) > { > return identifier; > } > > Then change the existing macro to use this function instead of calling the Identifier constructor directly. I’d love to not add a new macro. I also have no idea why this is a macro instead of an inline function in the first place.
Done.
Ryosuke Niwa
Comment 4
2013-06-14 13:36:41 PDT
Committed
r151605
: <
http://trac.webkit.org/changeset/151605
>
Ryosuke Niwa
Comment 5
2013-12-17 21:09:13 PST
This was 3-6% improvement on various Dromaeo CSS query tests:
https://perf.webkit.org/#mode=charts&chartList=%5B%5B%22mac-mountainlion%22%2C%22Dromaeo%2Fcssquery-dojo%3ARuns%22%5D%2C%5B%22mac-mountainlion%22%2C%22Dromaeo%2Fcssquery-jquery%3ARuns%22%5D%2C%5B%22mac-mountainlion%22%2C%22Dromaeo%2Fcssquery-prototype%3ARuns%22%5D%2C%5B%22mac-lion%22%2C%22Dromaeo%2Fcssquery-prototype%3ARuns%22%5D%5D&days=209&zoom=%5B1370938426131.5286%2C1371950721246.015%5D
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug