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+
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
Note You need to log in before you can comment on or make changes to this bug.