Change 20080112-dda-a by [EMAIL PROTECTED] on 2008-01-12 18:05:49 EST
in /Users/dda/laszlo/src/svn/openlaszlo/branches/devildog
for http://svn.openlaszlo.org/openlaszlo/branches/devildog
Summary: SWF9: move code outside classes to 'main' class.
New Features:
Bugs Fixed: LPP-5234
Technical Reviewer: ptw (pending)
QA Reviewer: hminsky (pending)
Doc Reviewer: (pending)
Documentation:
Release Notes:
Details:
This change is motivated by discussions with Henry on where to
put the main class.
The big change was to put everything that appears outside of a class
into the LFCApplication class (if we are building a
library), or the LzApplication class (if we are building an
application). We expect that these classes exist in the input stream.
If they do not we should throw an error - I'm not currently doing
that, but rather temporarily creating a class by that name to hold
this stuff - because the 'LzApplication' class is not currently being
created by the tag compiler. That code is marked by a TODO.
Since we're collecting code and later stuffing it into a particular
spot in the class, and to more nicely support the concept of
'top-level', this change adds the concept of 'insertStream markers'.
We already had the concept of collecting output into different
streams; now
when we encounter one of these insert stream markers, we can insert
the contents of a stream (for example the 'top-level stream' containing
stuff marked with #passthrough (toplevel:true)) at a certain
point. This substitution happens at the end of processing a
translation unit.
The smaller change was to fix the build to actually build LFC9.swc,
and put it in the right place. Building 'debug', 'profile' versions
etc. are ready to go in lps/lfc/build.xml, but are disabled for the
moment (marked by TODO) until we get the basics of building an
application end to end sorted out.
With this change, the LFC builds cleanly, and an application
with just a <canvas> and simple <script> builds cleanly,
modulo the warning about a missing 'LzApplication' class,
since we're adding that as discussed above.
Tests:
builds lfc as checked into the tree.
builds the simplest app <canvas><script>var x = 1;</script></canvas>
against the built lfc.
runs smoketest for SWF8, DHTML.
Files:
M WEB-INF/lps/lfc/build.xml
M WEB-INF/lps/server/src/org/openlaszlo/sc/JavascriptGenerator.java
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/TranslationUnit.java
M WEB-INF/lps/server/src/org/openlaszlo/sc/ParseTreePrinter.java
M build.properties
Changeset: http://svn.openlaszlo.org/openlaszlo/patches/20080112-dda-a.tar
--
Don Anderson
Java/C/C++, Berkeley DB, systems consultant
voice: 617-547-7881
email: [EMAIL PROTECTED]
www: http://www.ddanderson.com