RC-Paves3-build / plovr

Automatically exported from code.google.com/p/plovr
0 stars 0 forks source link

Apply defines in RAW mode #33

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
It would probably require adding a generated file at the end of each module to 
overrides it's defines.

Original issue reported on code.google.com by mieli...@gmail.com on 5 Feb 2011 at 10:00

GoogleCodeExporter commented 8 years ago
Hmm, this is tricky because currently, RAW mode is superfast because it does 
not entail running the Compiler at all.

I suspect that SIMPLE mode with pretty-print enabled would get you pretty 
close, though?

Original comment by bolinf...@gmail.com on 11 Feb 2011 at 8:01

GoogleCodeExporter commented 8 years ago
Yes, exactly because RAW is fast I was tempted to have defines in RAW mode 
applied and indeed I ended with SIMPLE mode... other way would be to override 
defines in library code, but it's messy.

Agree it would be tricky... I'm not sure if it's doable in cross-browser way 
without patching sources on the fly, but for these with partial support for 
JS1.5 probably pre-creating them with __defineGetter__ would do (making them 
read-only).

BTW. Do you know if ideMode makes SIMPLE compilation faster?

Original comment by mieli...@gmail.com on 12 Feb 2011 at 5:44