Approved!

I compiled lzmail from lzo's with this change in place and there is only one 
remaining warning:

> Warning: with(this) added in execute: unknown parts of class hierarchy: 
> [Callback->LzEventable] and unaccounted refs: [undefined]

Could you file two bugs to follow up on?

1)  The compiler should treat `undefined` as a constant (and should emit `void 
0` in its place, for back-compatibility with ES3).  [That `undefined` was not 
an immutable constant in ES3 is now considered a spec. error, not a feature.]

2) Figure out what's going wrong with this script class (abstracted):

> class Callback extends LzEventable {
>     function execute(singleArg:*) {
>         if (singleArg !== undefined);
>     }
> }

On 2011-04-04, at 12:24, Donald Anderson wrote:

> Change dda-20110404-w9j by [email protected] on 2011-04-04 11:12:26 EDT
>    in /Users/dda/laszlo/src/svn/openlaszlo/trunk-c
>    for http://svn.openlaszlo.org/openlaszlo/trunk
> 
> Summary: Emit reference classes for the lfc
> 
> New Features:
> 
> Bugs Fixed: LPP-9835: with(this) still added for some functions that should 
> be handled via 'this.' binding.
> 
> Technical Reviewer: ptw (pending)
> QA Reviewer: (pending)
> Doc Reviewer: (pending)
> 
> Documentation:
> 
> Release Notes:
> 
> Overview:
>    - Added 'errorWithThis' option to force error when with(this) emitted.
> 
>    - Added a new test for this case.
> 
>    - Fixed the problem by emitting all reference classes.
> 
>    - Cleaned up what's emitted by reference classes, only method
>      signatures is needed.
> 
>    - Stop emitting globals for builtin classes (that was not done
>       previously).
> 
>    - Reworked prepare-lzo-test.sh so it's easy to add new tests.
> 
> Details:
>    test/lztest/lztest-lzo-main.lzx
>    test/lztest/lzodir/lzo-lib-withthis.lzx.proto:
>     - new lzo test file that uses pragma errorWithThis to
>       detect if with(this) generated
> 
>    WEB-INF/lps/server/src/org/openlaszlo/sc/Compiler.java
>    WEB-INF/lps/server/src/org/openlaszlo/sc/JavascriptGenerator.java
>     - added errorWithThis option to throw an error.  For now, this will be
>       used for testing specific test cases.
> 
>    WEB-INF/lps/schema/lfc-undeclared.lzx
>     - marked 'interface', 'mixin', 'class' as meta symbols.
> 
>    WEB-INF/lps/server/src/org/openlaszlo/js2doc/SchemaBuilder.java
>     - pass through 'metasym' attribute on classes.    
> 
>    WEB-INF/lps/server/src/org/openlaszlo/compiler/Compiler.java
>    WEB-INF/lps/server/src/org/openlaszlo/compiler/ViewSchema.java
>     - compile all builtin class models as reference classes.
> 
>    WEB-INF/lps/server/src/org/openlaszlo/compiler/NodeModel.java
>     - ignore 'metasym' attribute.
>     - made of list of which attributes can be ignored
> 
>    WEB-INF/lps/server/src/org/openlaszlo/compiler/ClassModel.java
>     - for builtin classes, do not emit a global for the class name
>     - for builtin classes, don't worry about constructor super args,
>        reference classes don't need them.
> 
>    build-tools/prepare-lzo-test.sh
>     - reorganized with shell functions to remove duplication
>     - set exit status for failed compilations
> 
> Tests:
>     - smoke, lztest, lzrununit
> 
> Files:
> M       test/lztest/lztest-lzo-main.lzx
> A       test/lztest/lzodir/lzo-lib-withthis.lzx.proto
> M       WEB-INF/lps/schema/lfc-undeclared.lzx
> M       WEB-INF/lps/server/src/org/openlaszlo/js2doc/SchemaBuilder.java
> M       WEB-INF/lps/server/src/org/openlaszlo/sc/JavascriptGenerator.java
> M       WEB-INF/lps/server/src/org/openlaszlo/sc/Compiler.java
> M       WEB-INF/lps/server/src/org/openlaszlo/compiler/ViewSchema.java
> M       WEB-INF/lps/server/src/org/openlaszlo/compiler/NodeModel.java
> M       WEB-INF/lps/server/src/org/openlaszlo/compiler/Compiler.java
> M       WEB-INF/lps/server/src/org/openlaszlo/compiler/ClassModel.java
> M       build-tools/prepare-lzo-test.sh
> 
> Changeset: http://svn.openlaszlo.org/openlaszlo/patches/dda-20110404-w9j.tar
> 
> 
> 
> --
> 
> Don Anderson
> Java/C/C++, Berkeley DB, systems consultant
> 
> voice: 617-306-2057
> email: [email protected]
> www: http://www.ddanderson.com
> blog: http://libdb.wordpress.com
> 
> 
> 
> 
> 


Reply via email to