RESOLVED FIXED 25612
Add support for feature conditionals in the generated JSC bindings code
https://bugs.webkit.org/show_bug.cgi?id=25612
Summary Add support for feature conditionals in the generated JSC bindings code
Simon Hausmann
Reported 2009-05-07 01:50:53 PDT
Currently features in IDL files are configured through preprocessor macros. The patches attached to this bug report add support for moving these #ifdefs into the generated code, making the generated code independent from the features are code generation time.
Attachments
Patch for moving feature #ifdefs into generated JSC bindings code (6.58 KB, patch)
2009-05-07 01:52 PDT, Simon Hausmann
no flags
Patch to add support for feature #ifdefs in the genertaed tag factory code (4.57 KB, patch)
2009-05-07 01:53 PDT, Simon Hausmann
no flags
Patch to add support for feature #ifdefs in the genertaed tag factory code (take 2) (5.95 KB, patch)
2009-05-24 11:17 PDT, Simon Hausmann
vestbo: review+
Simon Hausmann
Comment 1 2009-05-07 01:52:20 PDT
Created attachment 30093 [details] Patch for moving feature #ifdefs into generated JSC bindings code This patch adds support for the conditional attribute for IDL attributes, which places feature #ifdefs into the generated code, replacing #ifdefs in the IDL files.
Simon Hausmann
Comment 2 2009-05-07 01:53:29 PDT
Created attachment 30094 [details] Patch to add support for feature #ifdefs in the genertaed tag factory code This patch allows moving #ifdefs in the tagnames.in files into the generated tag factory code.
Simon Hausmann
Comment 3 2009-05-07 02:02:24 PDT
Comment on attachment 30094 [details] Patch to add support for feature #ifdefs in the genertaed tag factory code Clearing review, this patch doesn't work entirely anymore. Will update soon.
Maciej Stachowiak
Comment 4 2009-05-21 20:06:08 PDT
It might be good for Sam to look at this. Sounds like a good idea.
Eric Seidel (no email)
Comment 5 2009-05-21 20:21:46 PDT
Won't we still end up re-generating the code every time you change FEATURE_DEFINES? We'll certainly do a full recompile (at least in xcode/gcc land), so this savings seems minimal. It's not necessarily a bad idea though.
Simon Hausmann
Comment 6 2009-05-22 08:50:22 PDT
(In reply to comment #5) > Won't we still end up re-generating the code every time you change > FEATURE_DEFINES? We'll certainly do a full recompile (at least in xcode/gcc > land), so this savings seems minimal. It's not necessarily a bad idea though. Yes, that is currently the case. However my long term goal is to have generated files that can be used with different configurations without the need to re-generate them. The generation can take a long time on older platforms :). We're _almost_ there with the existing #ifdef's that exist for example for the SVG files. AFAICS it's just a few IDL files that need tweaking :)
Maciej Stachowiak
Comment 7 2009-05-22 21:31:47 PDT
Comment on attachment 30093 [details] Patch for moving feature #ifdefs into generated JSC bindings code Looks good.
Simon Hausmann
Comment 8 2009-05-24 11:11:37 PDT
Comment on attachment 30093 [details] Patch for moving feature #ifdefs into generated JSC bindings code Thanks for the review, landed this one in r44116. Keeping the bug open though because of the pending tags patch.
Simon Hausmann
Comment 9 2009-05-24 11:17:06 PDT
Created attachment 30631 [details] Patch to add support for feature #ifdefs in the genertaed tag factory code (take 2)
Laszlo Gombos
Comment 10 2009-05-24 12:41:30 PDT
(In reply to comment #8) > (From update of attachment 30093 [details] [review]) > Thanks for the review, landed this one in r44116. Keeping the bug open though > because of the pending tags patch. > JSDOMWindow.cpp fails to build for me, when VIDEO is off after changeset 44116. generated/release/JSDOMWindow.cpp:91:32: error: JSHTMLAudioElement.h: No such file or directory generated/release/JSDOMWindow.cpp:125:32: error: JSHTMLMediaElement.h: No such file or directory generated/release/JSDOMWindow.cpp:149:32: error: JSHTMLVideoElement.h: No such file or directory generated/release/JSDOMWindow.cpp:151:26: error: JSMediaError.h: No such file or directory #include's might need guards as well.
Simon Hausmann
Comment 11 2009-05-25 05:36:35 PDT
(In reply to comment #10) > (In reply to comment #8) > > (From update of attachment 30093 [details] [review] [review]) > > Thanks for the review, landed this one in r44116. Keeping the bug open though > > because of the pending tags patch. > > > > JSDOMWindow.cpp fails to build for me, when VIDEO is off after changeset 44116. > > generated/release/JSDOMWindow.cpp:91:32: error: JSHTMLAudioElement.h: No such > file or directory > generated/release/JSDOMWindow.cpp:125:32: error: JSHTMLMediaElement.h: No such > file or directory > generated/release/JSDOMWindow.cpp:149:32: error: JSHTMLVideoElement.h: No such > file or directory > generated/release/JSDOMWindow.cpp:151:26: error: JSMediaError.h: No such file > or directory > > #include's might need guards as well. > Well spotted, fixed in r44126.
Simon Hausmann
Comment 12 2009-05-25 05:39:25 PDT
Landed in r44128
Note You need to log in before you can comment on or make changes to this bug.