[Laszlo-dev] For Review: Change 20080107-ptw-n Summary: Implement `is` operator
P T Withington
ptw at pobox.com
Tue Jan 8 06:13:42 PST 2008
I checked this in so I can start on LPP-5336. If you have comments, I
will address them in a subsequent patch. When I finish 5336, you
should integrate from trunk to devildog.
On 2008-01-07, at 16:10 EST, P T Withington wrote:
> Change 20080107-ptw-n by ptw at dueling-banjos.local 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: dda at ddanderson.com (pending)
> QA Reviewer: henry.minsky at gmail.com (pending)
> Doc Reviewer: lou at louiorio.com (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
More information about the Laszlo-dev
mailing list