Change 20080107-ptw-n by [EMAIL PROTECTED] on 2008-01-07
15:41:52 EST
in /Users/ptw/OpenLaszlo/ringding-2
for http://svn.openlaszlo.org/openlaszlo/trunk
Summary: Implement `is` operator
Bugs Fixed:
LPP-3632 'Implement `is` operator'
Technical Reviewer: [EMAIL PROTECTED] (pending)
QA Reviewer: [EMAIL PROTECTED] (pending)
Doc Reviewer: [EMAIL PROTECTED] (pending)
Documentation:
We now implement the ECMAScript 4 `is` operator
Details:
lztest-class-impl: Use modern syntax, verify that `is` is
equivalent to `instanceof` and works properly for mixins.
Class: add runtime support for `is` operator on mixins
JavascriptGenerator, CodeGenerator, ParseTreePrinter, Parser: Add
support for `is` operator, which in JS1 runtimes is approximated
as: a is b => b['$lzsc$isa'] ? b.$lzsc$isa(a) : (a instanceof b),
relying on the runtime support in Class for $lzsc$isa.
ASTVisitor: remove the unused visitBinaryExpression
Tests:
Amended class-impl test to test that `is` is equivalent to
`instanceof` for classes and works properly for mixins.
Files:
M test/lztest/lztest-class-impl.lzx
M WEB-INF/lps/lfc/compiler/Class.lzs
M WEB-INF/lps/server/src/org/openlaszlo/sc/JavascriptGenerator.java
M WEB-INF/lps/server/src/org/openlaszlo/sc/ASTVisitor.java
M WEB-INF/lps/server/src/org/openlaszlo/sc/CodeGenerator.java
M WEB-INF/lps/server/src/org/openlaszlo/sc/ParseTreePrinter.java
M WEB-INF/lps/server/sc/src/org/openlaszlo/sc/Parser.jjt
Changeset: http://svn.openlaszlo.org/openlaszlo/patches/20080107-ptw-n.tar