RESOLVED FIXED 67174
Unzip initialization lists and constructors in JSCell hierarchy (4/7)
https://bugs.webkit.org/show_bug.cgi?id=67174
Summary Unzip initialization lists and constructors in JSCell hierarchy (4/7)
Mark Hahnenberg
Reported 2011-08-29 18:36:58 PDT
This is the fourth level of the unzipping process described in https://bugs.webkit.org/show_bug.cgi?id=66567.
Attachments
Patch (91.76 KB, patch)
2011-08-30 13:53 PDT, Mark Hahnenberg
no flags
Patch (91.77 KB, patch)
2011-08-30 14:58 PDT, Mark Hahnenberg
no flags
Patch (91.77 KB, patch)
2011-08-31 11:34 PDT, Mark Hahnenberg
no flags
Patch (83.88 KB, patch)
2011-08-31 18:22 PDT, Mark Hahnenberg
no flags
Patch (84.83 KB, patch)
2011-08-31 19:10 PDT, Mark Hahnenberg
no flags
Fixing review issues (84.97 KB, patch)
2011-09-01 09:04 PDT, Mark Hahnenberg
no flags
Resetting test bindings results (88.72 KB, patch)
2011-09-01 10:31 PDT, Mark Hahnenberg
no flags
Random improvement (88.36 KB, patch)
2011-09-01 12:34 PDT, Mark Hahnenberg
no flags
Patch (99.50 KB, patch)
2011-09-01 15:54 PDT, Mark Hahnenberg
no flags
Mark Hahnenberg
Comment 1 2011-08-30 13:53:33 PDT
Mark Hahnenberg
Comment 2 2011-08-30 14:58:26 PDT
Gustavo Noronha (kov)
Comment 3 2011-08-31 07:30:00 PDT
Mark Hahnenberg
Comment 4 2011-08-31 11:34:04 PDT
Darin Adler
Comment 5 2011-08-31 16:39:32 PDT
Comment on attachment 105803 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=105803&action=review > Source/JavaScriptCore/runtime/JSArray.h:77 > + static JSArray* create(JSGlobalData&, Structure*, unsigned initialLength, ArrayCreationMode createMode); The argument name here, createMode, is not helpful and should be omitted. > Source/JavaScriptCore/runtime/JSFunction.h:55 > + static JSFunction* create(ExecState*, JSGlobalObject*, Structure*, int length, const Identifier& name, NativeFunction); Is making these functions non-inline a good choice speed-wise? > Source/JavaScriptCore/runtime/JSStaticScopeObject.h:53 > + void finishCreation(ExecState* exec, const Identifier& ident, JSValue value, unsigned attributes) Normally we try not to abbreviate. So the name here would be identifier rather than ident.
Mark Hahnenberg
Comment 6 2011-08-31 18:22:55 PDT
Mark Hahnenberg
Comment 7 2011-08-31 19:10:57 PDT
Darin Adler
Comment 8 2011-09-01 08:36:56 PDT
Comment on attachment 105882 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=105882&action=review > Source/JavaScriptCore/API/JSCallbackObjectFunctions.h:82 > +void JSCallbackObject<Parent>::finishCreation(JSGlobalData& globalData) > +{ > + UNUSED_PARAM(globalData); Why not just leave the parameter name out instead? That’s the best way to mark an argument as unused in C++ functions. > Source/JavaScriptCore/runtime/DateInstance.cpp:46 > + finishCreation(exec->globalData(), jsNumber(timeClip(time))); I would think we’d want the jsNumber function call inside the finishCreation function.
Mark Hahnenberg
Comment 9 2011-09-01 09:04:10 PDT
Created attachment 105975 [details] Fixing review issues
Mark Hahnenberg
Comment 10 2011-09-01 10:31:08 PDT
Created attachment 105990 [details] Resetting test bindings results
Mark Hahnenberg
Comment 11 2011-09-01 12:34:08 PDT
Created attachment 106010 [details] Random improvement
Oliver Hunt
Comment 12 2011-09-01 14:49:08 PDT
Comment on attachment 106010 [details] Random improvement View in context: https://bugs.webkit.org/attachment.cgi?id=106010&action=review Hmmm, there are no changelogs :-( > Source/JavaScriptCore/runtime/InternalFunction.cpp:47 > + finishCreation(*globalData, globalObject, name); Is it intentional the InternalFunction retains the finishCreation in its constructor?
Mark Hahnenberg
Comment 13 2011-09-01 14:57:46 PDT
> Hmmm, there are no changelogs :-( Hmm dunno what happened to them…they were in earlier versions of the patch lol. > Is it intentional the InternalFunction retains the finishCreation in its constructor? Yep. It had its own isolated version of constructorBody() before, and now it's being changed to finishCreation(). InternalFunction is on the 4th level of the hierarchy below JSCell. If you look at its immediate superclass, JSObjectWithGlobalObject, its finishCreation() was removed from the constructor, meaning that it needs to be pushed down into the constructor body of InternalFunction.
Mark Hahnenberg
Comment 14 2011-09-01 15:54:46 PDT
WebKit Review Bot
Comment 15 2011-09-01 16:48:31 PDT
Comment on attachment 106051 [details] Patch Clearing flags on attachment: 106051 Committed r94364: <http://trac.webkit.org/changeset/94364>
WebKit Review Bot
Comment 16 2011-09-01 16:48:37 PDT
All reviewed patches have been landed. Closing bug.
Note You need to log in before you can comment on or make changes to this bug.