Currently our .lzo technology which allows you to write a compressed, linkable library from a library of LZX, only works for the swf8 platform. We'd like to make this technology work across all platforms.

Here's a rough sketch of how I plan to do this:

Make a new subclass of JavascriptGenerator, DHTMLGenerator, and move the JS1-specific transforms into that subclass. DHTMLGenerator will be parallel to SWF9Generator, which is already a subclass of JavascriptGenerator. There may be some simplifications I can make there, because some of the methods of SWF9Generator are just there to undo JS1-specific transforms that shouldn't have been in the superclass in the first place.

[If we wanted to continue to maintain swf8 as a platform, it would make sense to make a new subclass of JavascriptGenerator, SWF8Generator, and move only the byte-code generation from CodeGenerator to there, leaving behind the duplicate platform- independent tranformations that are in CodeGenerator.]

Once JavascriptGenerator is not longer making platform-specific transformations, make another subclass, LZSGenerator, that generates the script portion of .lzo's. This will output to the 'lzs' platform, the extended Javascript that our script compiler takes as an input. It will also handle the minimizing of internal variable names and the compression of the output.

Comments and input welcome.

Reply via email to