RESOLVED DUPLICATE of bug 113448 113442
Cache preprocessor results when generating bindings
https://bugs.webkit.org/show_bug.cgi?id=113442
Summary Cache preprocessor results when generating bindings
Tony Chang
Reported 2013-03-27 14:32:16 PDT
Cache preprocessor results when generating bindings
Attachments
Patch (2.38 KB, patch)
2013-03-27 14:35 PDT, Tony Chang
no flags
Patch for landing (2.20 KB, patch)
2013-03-27 14:40 PDT, Tony Chang
no flags
Patch (2.37 KB, patch)
2013-03-27 14:55 PDT, Tony Chang
no flags
Tony Chang
Comment 1 2013-03-27 14:35:37 PDT
Kentaro Hara
Comment 2 2013-03-27 14:38:45 PDT
Comment on attachment 195397 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=195397&action=review LGTM. Thanks for fixing the issue. > Source/WebCore/bindings/scripts/preprocessor.pm:67 > + return @{$preprocessorCache{$fileName}} if $preprocessorCache{$fileName}; Nit: You can write this at the beginning of the method.
Nico Weber
Comment 3 2013-03-27 14:40:17 PDT
Comment on attachment 195397 [details] Patch Cool, thanks! Might want to mention that this is safe because defines etc don't change between preprocessor invocations.
Tony Chang
Comment 4 2013-03-27 14:40:36 PDT
Created attachment 195398 [details] Patch for landing
Tony Chang
Comment 5 2013-03-27 14:40:58 PDT
Comment on attachment 195398 [details] Patch for landing Making sure all the bots are green before landing.
Tony Chang
Comment 6 2013-03-27 14:42:06 PDT
(In reply to comment #3) > (From update of attachment 195397 [details]) > Cool, thanks! > > Might want to mention that this is safe because defines etc don't change between preprocessor invocations. Yeah. I also considered somehow adding the command line and @defines to the hash key, but I don't know perl that well. Suggestions welcome.
Kentaro Hara
Comment 7 2013-03-27 14:45:26 PDT
(In reply to comment #6) > (In reply to comment #3) > > (From update of attachment 195397 [details] [details]) > > Cool, thanks! > > > > Might want to mention that this is safe because defines etc don't change between preprocessor invocations. > > Yeah. I also considered somehow adding the command line and @defines to the hash key, but I don't know perl that well. Suggestions welcome. $defines and $preprocessor are simple strings, so I guess you can simply concatenate them with $fileName.
Tony Chang
Comment 8 2013-03-27 14:55:39 PDT
Tony Chang
Comment 9 2013-03-27 14:55:57 PDT
(In reply to comment #7) > (In reply to comment #6) > > (In reply to comment #3) > > > (From update of attachment 195397 [details] [details] [details]) > > > Cool, thanks! > > > > > > Might want to mention that this is safe because defines etc don't change between preprocessor invocations. > > > > Yeah. I also considered somehow adding the command line and @defines to the hash key, but I don't know perl that well. Suggestions welcome. > > $defines and $preprocessor are simple strings, so I guess you can simply concatenate them with $fileName. Good idea, that works.
Tony Chang
Comment 10 2013-03-27 15:17:31 PDT
Scott's patch is better. *** This bug has been marked as a duplicate of bug 113448 ***
Note You need to log in before you can comment on or make changes to this bug.