Henry if you can sanity-check this, I'll check it in for Max to test.
Change 20091203-ptw-c by [email protected] on 2009-12-03 11:22:46 EST
in /Users/ptw/OpenLaszlo/trunk-2
for http://svn.openlaszlo.org/openlaszlo/trunk
Summary: Prevent collisions in compressed script
Bugs Fixed: LPP-8634 LZOs don't properly init attributes
Technical Reviewer: hminsky (pending)
QA Reviewer: max (pending)
Overview:
The local variable renamer (compressor) was not checking for
collisions with existing variable names.
The renamer now checks that the name it picked is not in the known
or free set. As a compression optimization, we now use base36 for
the register 'names'. As an optimization for .lzo's, we start the
lzo names at 10 so they are less likely to collide with
application names. Finally, as a debug optimization, we don't
annotate internal variable names.
Tests:
Compiled test case for dhtml with and without .lzo-ing the library
and compared the output. It is identical other than a timestamp.
Files:
M WEB-INF/lps/server/src/org/openlaszlo/sc/JavascriptGenerator.java
M WEB-INF/lps/server/src/org/openlaszlo/sc/JavascriptCompressor.java
Changeset: http://svn.openlaszlo.org/openlaszlo/patches/20091203-ptw-c.tar
_______________________________________________
Laszlo-reviews mailing list
[email protected]
http://www.openlaszlo.org/mailman/listinfo/laszlo-reviews