[Laszlo-reviews] For Review: Change 20100624-hqm-f Summary: allow swf10-platform-specific lzo's to compile with references to external libraries
P T Withington
ptw at laszlosystems.com
Fri Jun 25 05:49:12 PDT 2010
Comments:
1) In ViewSchema#630 you could move the (! modelOnly) test first to be more efficient.
Otherwise, approved.
Please reopen to me to integrate to 4.8 once you have checked in.
On 2010-06-24, at 20:03, Henry Minsky wrote:
> Change 20100624-hqm-f by hqm at new-host-4.home on 2010-06-24 17:46:24 EDT
> in /Users/hqm/openlaszlo/trunk2
> for http://svn.openlaszlo.org/openlaszlo/trunk
>
> Summary: allow swf10-platform-specific lzo's to compile with references to external libraries
>
> New Features:
>
> Bugs Fixed:
>
> Technical Reviewer: ptw
> QA Reviewer: mdemmon
> Doc Reviewer: (pending)
>
> Documentation:
>
> Release Notes:
>
> Overview:
>
> This allows platform-specific library lzo's for swf10 to be compiled , even if they reference
> external classes from other libraries whcih themselves are not already compiled down to swf10 .swc lzo's.
>
> For example, you can compile a library for swf10 which subclasses classes from the components/lz/* libraries, even
> if we cannot yet compile the components/lz libraries down to a standalone swf10 lzo.
>
>
>
> CompilationEnvironment.java:
>
> + created addClassModel() method, which is used to declare a class to
> link against but which will not be included in an as3 .swc library.
>
> + Add compilingExternalLibrary flag
>
>
> ClassModel.java:
>
> + in emitClassDeclaration, 'dynamically bind' the
> env.compilingExternalLibrary flag to the value of modelOnly, so that
> all anonymous subclasses from a class will obey the modelOnly
> behavior.
>
> ViewSchema.java:
>
> + Avoid duplicate class defs, by making toLZX() only emit class
> interface def from schema if class is not marked modelOnly. External
> class interface defs will already be available via the <include> that
> is at the start of the lzo.
>
> SWF9External.java:
>
> + Take an explicit "blacklist" of external class names, to exclude from the
> .swc library
>
>
> Details:
>
>
> Tests:
>
> compile lzo which subclasses external library class, for swf10
> cd test/testlzo
>
> lzc -c --runtime=swf10 libdir/libwithbutton.lzx
> lzc --runtime=swf10 mainwithbutton.lzx
>
> verify that mainwithbutton.lzx?lzr=swf10&debug=true appears in browser, with three buttons,
> all clickable
>
>
> Files:
> M WEB-INF/lps/server/src/org/openlaszlo/sc/SWF9External.java
> M WEB-INF/lps/server/src/org/openlaszlo/sc/SWF10Compiler.java
> M WEB-INF/lps/server/src/org/openlaszlo/sc/SWF9Generator.java
> M WEB-INF/lps/server/src/org/openlaszlo/compiler/ObjectWriter.java
> M WEB-INF/lps/server/src/org/openlaszlo/compiler/ViewSchema.java
> M WEB-INF/lps/server/src/org/openlaszlo/compiler/LibraryWriter.java
> M WEB-INF/lps/server/src/org/openlaszlo/compiler/CompilationEnvironment.java
> M WEB-INF/lps/server/src/org/openlaszlo/compiler/NodeModel.java
> M WEB-INF/lps/server/src/org/openlaszlo/compiler/SWF9Writer.java
> M WEB-INF/lps/server/src/org/openlaszlo/compiler/ClassModel.java
>
>
> Changeset: http://svn.openlaszlo.org/openlaszlo/patches/20100624-hqm-f.tar
More information about the Laszlo-reviews
mailing list