GenericVisitor:
-    assert len == 2 || len == 3;
+    assert (node instanceof ASTFunctionExpression) ? len == 2 : len == 3;

What about named function expressions?


On 1/28/2011 7:46 PM, P T Withington wrote:
[I am going to check this in and start a build for Yuwen to test against.  I've 
verified that lztest passes and that I can lzo-compile future/lzmail/main.lzx, 
which is where it was failing for Yuwen previously.  Obviously there is more 
testing to be done on his part to verify things function correctly.  Henry, I'd 
still like your technical review; and thanks for the help in tracking this 
down!]

Change ptw-20110127-5Th by [email protected] on 2011-01-27 11:03:43 EST
     in /Users/ptw/OpenLaszlo/trunk-3
     for http://svn.openlaszlo.org/openlaszlo/trunk

Summary: Record compilation of mixin to interface in an LZO in the LZO schema

Bugs Fixed:  LPP-9691 Child nodes not created for instance classes when created 
in LZO

Technical Reviewer: [email protected] (pending)
QA Reviewer: [email protected] (pending)

Overview:

     Mixins have to be written out as 'interfaces' so that all the
     interstitials that implement them can refer to them in their
     'implements' clause, but we can't have more than one copy, so when
     we write them into and LZO, we need some way to communicate that
     to the linker.  The solution implemented here is to write out to
     the LZO schema the mixin as a mixin (so clients of the LZO can
     compute interstitials) and also as an interface, to indicate that
     the interface is already in the LZO script and should not be
     re-emitted at link time.

Details:

     Transformer:  Checkpointing some experimental work done while
     debugging this issue for future use.

     GenericVisitor:  Improve assertion

     ViewSchema:  An interface that duplicates a mixin indicates the
     mixin has already been compiled.

     ClassModel: For mixins, output both the mixin and the
     corresponding interface to LZO's.  Always compile mixins to
     (script) interfaces.

Tests:
     ant lztest, Jade compile: (cd client; ant -Drelease.id=999
     build-libraries; cd future/lzmail;  lzc --debug main.lzx)

Files:
M       WEB-INF/lps/server/src/org/openlaszlo/sc/Transformer.java
M       WEB-INF/lps/server/src/org/openlaszlo/sc/Compiler.java
M       WEB-INF/lps/server/src/org/openlaszlo/sc/GenericVisitor.java
M       WEB-INF/lps/server/src/org/openlaszlo/compiler/ViewSchema.java
M       WEB-INF/lps/server/src/org/openlaszlo/compiler/ClassModel.java

Changeset: http://svn.openlaszlo.org/openlaszlo/patches/ptw-20110127-5Th.tar


Reply via email to