Change 20080108-dda-X by [EMAIL PROTECTED] on 2008-01-08 16:51:26 EST
in /Users/dda/laszlo/src/svn/openlaszlo/branches/devildog
for http://svn.openlaszlo.org/openlaszlo/branches/devildog
Summary: SWF9: Added support for 'cast' and 'is'
New Features:
Bugs Fixed: LPP-5336
Technical Reviewer: ptw (pending)
QA Reviewer: hminsky (pending)
Doc Reviewer: (pending)
Documentation:
Release Notes:
Details:
Building on support in trunk just added for 'cast' and 'is', this
change
allows these keywords to be passed through and emitted as is to
the third
party compiler.
SWF9Generator.java: intercept JavascriptGenerator implementation
of 'cast'
and 'is' so they are not handled directly within the compiler, but
left alone.
SWF9ParseTreePrinter.java: added knowledge of 'cast' and 'is'
operators
to emit these as is.
Tests:
1) Imported a few tests that use cast/is from lztest-class-impl.lzx
into
a private copy of LzNode.js:
var xf1 = ( (new Sundae()) cast Vanilla instanceof Number );
var xt1 = ( (new Number()) cast Object instanceof Number );
var xf2 = ( (new Sundae()) cast Vanilla is Number );
var xt2 = ( (new Number()) cast Object is Number );
(along with modified versions of Sundae and Vanilla).
Verified that these compiled and emitted the same in the output
files
fed to the third party compiler.
2) did smoketest
Files:
M WEB-INF/lps/server/src/org/openlaszlo/sc/SWF9Generator.java
M WEB-INF/lps/server/src/org/openlaszlo/sc/
SWF9ParseTreePrinter.java
Changeset: http://svn.openlaszlo.org/openlaszlo/patches/20080108-dda-X.tar
--
Don Anderson
Java/C/C++, Berkeley DB, systems consultant
voice: 617-547-7881
email: [EMAIL PROTECTED]
www: http://www.ddanderson.com