On Tue, May 11, 2010 at 3:41 PM, P T Withington <[email protected]>wrote:

> Comments:
>
> 1) Seems like LINK_PROPERTY and INTERMEDIATE_PROPERTY are mutually
> exclusive.  Perhaps they should be a single, multi-valued flag instead of
> boolean?
>


> 2) In Compiler.java, we really need to try to avoid having
> runtime-dependent code in the tag compiler.  It should either be applicable
> to all runtimes, or moved into the runtime back-end if possible.  If that's
> not possible, we need to file a bug to fix the modularity any time we do
> introduce runtime-dependent code into the tag compiler, because it really
> should be just an LZX -> .lzs translator; it should not know anything about
> the target runtime.
>
> 3) I'm not sure the re-modularization of LibraryWriter and
> IntermediateWriter is finished?  Does that need to be part of this change?
>

Yeah, IntermediateWriter is not quite done, it needs to write out the canvas
attributes and probably something else, but LibraryWriter still works, I
believe,  so I think I'll get this in now so I can then move on to writing
the 'fat binaries' lzos, to make the as3 compiles faster. Writing the whole
app out as an
intermediate JS file is a lower priority but may still be useful if we're
still too crunched for heap space (on Windows)  and need to fully exit the
tag compiler before calling the script compiler in a
new JVM.





> 4) ScriptCompiler seems not to have changed, but you changed the copyright?
>
> Otherwise approved!
>
> On 2010-05-09, at 00:11, Henry Minsky wrote:
>
> >
> > one file  was missing from the changeset
> >
> > Change 20100507-hqm-p by [email protected] on 2010-05-07 11:13:40 EDT
> >    in /Users/hqm/openlaszlo/trunk
> >    for http://svn.openlaszlo.org/openlaszlo/trunk
> >
> > Summary:  modify SWF9Writer to pass smaller chunks of javascript to
> script compiler
> >
> > New Features:
> >
> > Bugs Fixed: LPP-8978
> >
> > Technical Reviewer: ptw
> > QA Reviewer: max
> > Doc Reviewer: (pending)
> >
> > Documentation:
> >
> > Release Notes:
> >
> > Overview:
> >
> > For swf10 compiles, instead of building one large javascript string
> > and passing it to the script compiler, this sends each chunk of script
> > that is passed to a persistent instance of the script compiler.
> >
> > Calls to CompilationEnvironemnt.compileScript (hence to
> SWF9Writer.addScript)
> > are sent down to a new "compileBlock" method in sc.Compiler.
> >
> >
> > Details:
> >
> > This implements a new subclass of sc.Compiler, sc.SWF10Compiler.
> >
> > Instead of a monolithic call to sc.Compiler.compile(), a SWF10 compile
> > is initialized with a call to
> >
> > sc.SWF10Compiler.startSWF10App()
> >
> > then blocks of script are compiled via calls to compileBlock()
> >
> > and the finalization is done with a call to finishSWF10App(). This
> > creates any needed interstitials and global var declarations, as well
> > as the main app boilerplate.
> >
> > The flex compiler is then called.
> >
> > + SWF9Generator has some things refactored into new methods:
> >
> > makeInterstitials()
> > writeGlobalTUnitsToAS3()
> > writeMainTranslationUnit()
> > callFlexCompiler()
> >
> > - a persistent pointer to a script parser and to the "main translation
> unit" is kept around so that
> > it can be reused for each call to compileBlock().
> >
> > - the "classes" table, which kept a copy of all class defs in order to
> create interstitials,
> > is now called "classConstructors", and only keeps a copy of the AST
> subtree that is the class
> > constructor. The tree is diked out of it's parent using the deepCopy
> method.
> >
> >
> >
> > Tests:
> >
> > smokecheck, lzpix, test/snippets/import-class-and-view.lzx
> >
> > A compile of the customer app now requires about 200-400 MB less of
> memory.
> >
> > The app can be compiled in non-debug mode with 640MB max heap (down from
> 800MB)
> > In backtrace mode, it requires 1000MB max heap (down from 1400MB).
> >
> >
> >
> >
> >
> > Files:
> > A       WEB-INF/lps/server/src/org/openlaszlo/sc/SWF10Compiler.java
> > M       WEB-INF/lps/server/src/org/openlaszlo/sc/SWF9External.java
> > M       WEB-INF/lps/server/src/org/openlaszlo/sc/ScriptCompiler.java
> > M       WEB-INF/lps/server/src/org/openlaszlo/sc/SWF9Generator.java
> > M       WEB-INF/lps/server/src/org/openlaszlo/sc/TranslationUnit.java
> > M
> WEB-INF/lps/server/src/org/openlaszlo/compiler/ToplevelCompiler.java
> > M       WEB-INF/lps/server/src/org/openlaszlo/compiler/LibraryWriter.java
> > M
> WEB-INF/lps/server/src/org/openlaszlo/compiler/CompilationEnvironment.java
> > A
> WEB-INF/lps/server/src/org/openlaszlo/compiler/IntermediateWriter.java
> > M       WEB-INF/lps/server/src/org/openlaszlo/compiler/Compiler.java
> > M       WEB-INF/lps/server/src/org/openlaszlo/compiler/Main.java
> > M       WEB-INF/lps/server/src/org/openlaszlo/compiler/SWF9Writer.java
> > M       WEB-INF/lps/server/src/org/openlaszlo/compiler/ViewSchema.java
> >
> >
> > Changeset:
> http://svn.openlaszlo.org/openlaszlo/patches/20100507-hqm-p.tar
> >
>
>


-- 
Henry Minsky
Software Architect
[email protected]

Reply via email to