RESOLVED FIXED13388
[js-collector-tweaks] Shrink FunctionImp / DeclaredFunctionImp by 4 bytes
https://bugs.webkit.org/show_bug.cgi?id=13388
Summary [js-collector-tweaks] Shrink FunctionImp / DeclaredFunctionImp by 4 bytes
Maciej Stachowiak
Reported 2007-04-18 00:58:41 PDT
Shrink FunctionImp / DeclaredFunctionImp by 4 bytes, by moving parameter list to function body. This enables further optimizations.
Attachments
08-js-gc-function-shrink.patch.txt (13.19 KB, patch)
2007-04-18 00:59 PDT, Maciej Stachowiak
darin: review+
Maciej Stachowiak
Comment 1 2007-04-18 00:59:25 PDT
Created attachment 14069 [details] 08-js-gc-function-shrink.patch.txt
Darin Adler
Comment 2 2007-04-18 11:27:14 PDT
Comment on attachment 14069 [details] 08-js-gc-function-shrink.patch.txt +UString FunctionBodyNode::paramString() const +{ + UString s; I think you want to start with an empty string here, rather than a null string. + for(ParameterNode *p = param.get(); p != 0L; p = p->nextParam()) Missing a space after for (I know this is copy and paste), and 0L is no better than 0. + for(ParameterNode *p = param.get(); p != 0L; p = p->nextParam()) Again. + Parameter() {}; No semicolon here. Do we really need a Parameter type? How about just using Vector<Identifier>? + Identifier paramName(int pos) const { return m_parameters[pos].name; } Should be size_t rather than int. r=me
Maciej Stachowiak
Comment 3 2007-04-18 15:04:50 PDT
(In reply to comment #2) > > Do we really need a Parameter type? How about just using Vector<Identifier>? > I considered this, but Maks Orlovich's symbol table changes in the KDE version of KJS add more fields to Parameter. Agreed on your other comments.
Note You need to log in before you can comment on or make changes to this bug.