Looks good to me. I don't like the +1 "fudge factor", but I don't have an answer either.
On 2010-01-05, at 17:53, Henry Minsky wrote: > Change 20100105-hqm-n by [email protected] on 2010-01-05 17:30:43 EST > in /Users/hqm/openlaszlo/trunk > for http://svn.openlaszlo.org/openlaszlo/trunk > > Summary: improve memory usage of swf10 compiler > > New Features: > > Bugs Fixed: > > Technical Reviewer: ptw > QA Reviewer: max > Doc Reviewer: (pending) > > Documentation: > > Release Notes: > > Overview: > > > Details: > > SWF9Generator: > > + Iterate over the children of the top level node in the AST, running > the ParseTreePrinter over each child. This generates a list of > translation units for the child, and we iterate over this list, > writing the AS3 files, and then we reclaim as much memory as we can > from the translation units by nulling out their content pointers. (We > keep the TranslationUnit objects around because they contain the > classnames, which we need to build the flex compiler command line) > > Note that the "main" or "default" translation unit must be held and > emitted as the final action, because global definitions from all the > other translation units get poked into it. > > SWF9ParseTreePrinter: pass in a pointer to the 'default translation unit', > e.g., > the place where all globals get put. This comes from the loop in > SWF9Generator. > > > ParseTreePrinter: needed to check when DirectiveBlocks are emitted, because > otherwise > you get empty ones which then confuse the flex compiler with empty "{..}" > statements. > > TranslationUnit: there was some fencepost error in computing the maximum line > number > when doing insertion of one translation unit stream into another. Not sure > why, but I > fudged it. > > + added a method to clear out all the content of a > TranslationUnit,except for it's classname. Once a TU has been written > to it's file, we clear it's fields to reclaim memory. > > > > > Tests: > > ant runlzunit, tests run in all three runtimes > amazon in swf9,dhtml > calendar in swf9,dhtml > components sampler in swf9, dhtml, swf8 > > > Files: > M WEB-INF/bin/mxmlc > M WEB-INF/lps/server/src/org/openlaszlo/sc/SWF9Generator.java > M WEB-INF/lps/server/src/org/openlaszlo/sc/SWF9ParseTreePrinter.java > M WEB-INF/lps/server/src/org/openlaszlo/sc/ParseTreePrinter.java > M WEB-INF/lps/server/src/org/openlaszlo/sc/TranslationUnit.java > M build.properties > M build.xml > > Changeset: http://svn.openlaszlo.org/openlaszlo/patches/20100105-hqm-n.tar > > _______________________________________________ > Laszlo-reviews mailing list > [email protected] > http://www.openlaszlo.org/mailman/listinfo/laszlo-reviews _______________________________________________ Laszlo-reviews mailing list [email protected] http://www.openlaszlo.org/mailman/listinfo/laszlo-reviews
