I have a change that is very close to solving the LZO problem, but is still 
failing the lzo regression test in `ant lztest`. I could use some help, because 
I have banged my head against this for 2 days with no progress.

The symptom is:

>      [exec] js: "test/lztest/lztest-lzo-main.js", line 547: uncaught 
> JavaScript runtime exception: ReferenceError: "$lzc$class_lzomixin" is not 
> defined.

There is an interstitial class being created that implements the `lzomixin` 
class.  I've put in print statements and can see that the compiler is compiling 
the `lzomixin` class before the interstitial class, yet in the resulting .js 
file, it is textually later!?!?! and as a result, bombs because it is not 
defined before used.

I'm pulling my hair out trying to figure out how the stuff could end up in the 
output file in a different order than how the Schema compiler writes it.  I 
fooled myself thinking that the script compiler re-ordered classes when it 
wrote them, but I can't find any such code anywhere.

Any chance you guys could take a look at this change and see if you can track 
it 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: Only emit mixins as interfaces when linking

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)

Details:

    Mixins eventually 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 we can't write them into an LZO.  Instead, we have to notice
    when we are linking and write them out then.

Tests:
    ant lztest

Files:
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