[Laszlo-dev] Plan for platform-independent .lzo's (LPP-7184)

Max Carlson max at openlaszlo.org
Wed Oct 7 06:38:34 PDT 2009


I agree - let's do the least-effort way for now, and hope swf8 can be 
phased out relatively soon!

P T Withington wrote:
> I think the question is whether to keep supporting swf8 the way it 
> currently is (where it's code generator is mostly a duplicate of the new 
> way) or to try to integrate it into the new way (which would mean 
> re-modularizing the existing code generator).  I tend toward the former, 
> as it is a least-effort, because I assume swf8 will eventually be phased 
> out.  OTOH, if you think swf8 will have to be maintained for a long 
> time, the latter approach would be less effort in the long run (although 
> more up front).
> 
> On 2009-10-07, at 04:41, Max Carlson wrote:
> 
>> This sounds like a fine plan - and a great way to clean up the 
>> compiler and make it easier to support other runtimes in the future.  
>> One comment: we'll need to support swf8 for a while because some of 
>> our biggest users require it.
>>
>> P T Withington wrote:
>>> 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.
>>
>> -- 
>> Regards,
>> Max Carlson
>> OpenLaszlo.org
> 

-- 
Regards,
Max Carlson
OpenLaszlo.org


More information about the Laszlo-dev mailing list