Apparently ES6 gutted "arguments" property from class constructors and methods. Authors should also be able to define a property named "arguments"; e.g. class A { static arguments() {} } class B { static get arguments() {} }
Same goes for "caller".
Created attachment 277849 [details] Patch
Created attachment 277850 [details] Patch Patch for review
Created attachment 277851 [details] Patch Small improvement
Created attachment 277854 [details] Patch Remove debug code
I think define arguments property should be fixed in separate patch, we already has one https://bugs.webkit.org/show_bug.cgi?id=152985
Comment on attachment 277854 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=277854&action=review > LayoutTests/js/script-tests/class-method-and-constructor-properties.js:55 > + caller() { return 'value'; } How about staric ones?
(In reply to comment #7) > Comment on attachment 277854 [details] > Patch > > View in context: > https://bugs.webkit.org/attachment.cgi?id=277854&action=review > > > LayoutTests/js/script-tests/class-method-and-constructor-properties.js:55 > > + caller() { return 'value'; } > > How about staric ones? Oh, never mind. Didn't see the comment there
Comment on attachment 277854 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=277854&action=review > Source/JavaScriptCore/runtime/JSFunction.cpp:371 > + GetterSetter* errorGetterSetter = thisObject->jsExecutable()->isClassConstructorFunction() || thisObject->jsExecutable()->parseMode() == SourceParseMode::MethodMode Please add a static local helper function instead of duplicating the code.
(In reply to comment #9) > Comment on attachment 277854 [details] > Patch > > View in context: > https://bugs.webkit.org/attachment.cgi?id=277854&action=review > > > Source/JavaScriptCore/runtime/JSFunction.cpp:371 > > + GetterSetter* errorGetterSetter = thisObject->jsExecutable()->isClassConstructorFunction() || thisObject->jsExecutable()->parseMode() == SourceParseMode::MethodMode > > Please add a static local helper function instead of duplicating the code. Done
Committed r 200321: <http://trac.webkit.org/changeset/200321>
Closing the bug since the patch was landed in http://trac.webkit.org/changeset/200321.