RESOLVED FIXED 29238
CodeGenerator.pm needs some cleaning up
https://bugs.webkit.org/show_bug.cgi?id=29238
Summary CodeGenerator.pm needs some cleaning up
Cameron McCormack (:heycam)
Reported 2009-09-13 18:51:04 PDT
A few things in CodeGenerator.pm can be cleaned up: * The ability to return multiple .idl files from ScanDirectory isn't needed. * File::Find can be used instead of ScanDirectory. * FindParentsRecursively can be done away with; this information can be collected while in AddMethodsConstantsAndAttributesFromParentClasses. * The recursion over ancestor interfaces in AddMethodsConstantsAndAttributesFromParentClasses and GetMethodsAndAttributesFromParentClasses can be factored out. * The searches for and parsing of .idl files can be factored out.
Attachments
Patch v1 (15.54 KB, patch)
2009-09-13 19:02 PDT, Cameron McCormack (:heycam)
no flags
Cameron McCormack (:heycam)
Comment 1 2009-09-13 19:02:16 PDT
Created attachment 39533 [details] Patch v1 Patch that simplifies CodeGenerator.pm as above.
Cameron McCormack (:heycam)
Comment 2 2009-09-13 19:07:41 PDT
I've tested that generated IDL files for all four binding targets are unchanged after this patch, btw.
Eric Seidel (no email)
Comment 3 2009-09-14 09:58:10 PDT
Comment on attachment 39533 [details] Patch v1 This is mostly a rubber stamp. But the change looks good as far as I can tell. I'm *so glad* to see someone working on this again. :) I'd still love to see us re-write this in python with a real parser (instead of regexps), but this it's good to see cleanup!
WebKit Commit Bot
Comment 4 2009-09-14 10:19:15 PDT
Comment on attachment 39533 [details] Patch v1 Clearing flags on attachment: 39533 Committed r48356: <http://trac.webkit.org/changeset/48356>
WebKit Commit Bot
Comment 5 2009-09-14 10:19:18 PDT
All reviewed patches have been landed. Closing bug.
Cameron McCormack (:heycam)
Comment 6 2009-09-14 16:05:34 PDT
(In reply to comment #3) > This is mostly a rubber stamp. You're trusting. :-) > But the change looks good as far as I can tell. I'm *so glad* to see someone > working on this again. :) I'd still love to see us re-write this in python > with a real parser (instead of regexps), but this it's good to see cleanup! Is there consensus that scripts should be rewritten in Python? It seems most of the scripts in WebKitTools/Scripts/ are Perl.
Eric Seidel (no email)
Comment 7 2009-09-14 16:30:20 PDT
(In reply to comment #6) > > But the change looks good as far as I can tell. I'm *so glad* to see someone > > working on this again. :) I'd still love to see us re-write this in python > > with a real parser (instead of regexps), but this it's good to see cleanup! > > Is there consensus that scripts should be rewritten in Python? It seems most > of the scripts in WebKitTools/Scripts/ are Perl. No. :) I don't think there is consensus about language choice. There is consensus that these scripts need love however. Most (all?) of the new scripting in WebKit has been done in python. But that's because much of the recent scripting has come from me or Googlers where python very much the standard language.
Note You need to log in before you can comment on or make changes to this bug.