[UPDATED: Ok, with this update, the smokecheck passes and Amazon seems to work for me. I'd like to check this in so Henry/Don can work on porting it to devildog while Max/I continue debugging in trunk.]

Change 20080313-ptw-5 by [EMAIL PROTECTED] on 2008-03-13 10:54:50 EDT
    in /Users/ptw/OpenLaszlo/ringding-clean
    for http://svn.openlaszlo.org/openlaszlo/trunk

Summary: LZX classes as JS2 classes

New Features: The tag compiler now emits LZX classes as JS2 class declarations

Bugs Fixed:
LPP-1587 'ECMA4: Compile LZX declarations as JS declarations' (partial)

Technical Reviewer: [EMAIL PROTECTED] (pending)
QA Reviewer: [EMAIL PROTECTED] (pending)
Doc Reviewer: [EMAIL PROTECTED] (pending)

Release Notes:
    Classes defined using the <class name="name"> _must_ be referenced
    in script as `lz.name`, there will no longer be a global alias
    `name` that refers to the class implementing the tag.

    getAttribute is deprecated.  You should just reference the
    attribute directly.  getters are no longer supported.

Details:
    Highlights:  The tag compiler now emits user classes as a JS2
    class declaration.  UserClass.lzs is dead.  Setters are now just
    methods on a class with a distinctive name, so the whole setters
    table inheritance mechanism is gone.  Early/delayed setters is a
    private protocol between LzNode and LzView.  All classes have a
    uniform 'namespace' naming scheme: $lzc$class_<tagname>, old LFC
    class names are maintained for compatibility, but there are NO
    global class names any more.  All user code will have to be
    updated to use lz.<tagname> to address classes for `new` or
    `instanceof` tests.

    Every LFC Class: Use new static `attributes` mechanism, new
    setters methods naming scheme, remove old setters table.

    LzNode: Implement new static `attributes` mechanism.  Break out
    mergeAttributes and mergeChildren as class methods so they can be
    used by user classes.  Fetch default attributes from constructor.
    Install decls compiler can't detect.  Merge with instantiation
    attributes.  Use common merge subroutines.  Install namespace
    alias.  Remove all obsolete inherited hashes now that we use class
    inheritance to manage that.  Early/delayed setters are now a
    private protocol between Node and View.  No other classes should
    use these.  In applyArgs look for setters as methods.  Deprecate
    getAttribute, getters have not been supported for a long time.
    Update setAttribute to use setter methods.  Remove old setters
    mechanism.  Deprecate __LZaddSetter, __LZstoreRefs -- private
    protocol no longer supported.  Change options setters to create
    necessary inherited hash on the fly.

    UserClass: Empty, save for documentation and the placement kludge.

    LzDefs: Flatten inherited hash so we can dispense with
    _ignoreAttribute (and be portable!).

    LzView, LzCanvas: Cooperate with LzNode on early/late setters.

    LzState: Adapt to new user class implementation which may place
    state methods in the wrong place, and won't allow dynamically
    adding setters.

    TODO: Clean up the setter trampolines to be the actual setters
    and have the old public setXXX methods call them (with a
    deprecation warning where appropriate).

    Schema: intern types.

    JavascriptGenerator: Don't make checked nodes outside of a
    function context (you won't have a 'this').

    JavascriptGenerator, CodeGenerator: Temporarily turn of
    setAttribute inlining until it can be updated.

CommonGenerator: Translate declared attributes as having an undefined
    initial value.

    ScriptCompiler: Support for converting objects to script,
    including undefined values.

    ScriptClass: Complete implementation that writes out a class as a
    JS2 class declaration.

    ClassCompiler: Compile user classes to JS2 class declarations,
    which mostly involves mimicing the way UserClass used to
    initialize according to the various types of initial values,
    setters, and stateliness that you might have.

    CanvasCompiler, CompilationEnvironment, etc.: Eliminate vestigial
    support for case-insensitive runtimes

    NodeModel: Support class compilation by delaying conversion of
    bindings for attributes.

    ClassModel:  Support for (not yet used) merging of superclass
    attributes and setters.  Missing modelling of built-in classes.

Tests:
    smokecheck (minus broken test LPP-5610) passes in both runtimes,
    amazon runs in both runtimes

Files:
M      WEB-INF/lps/lfc/kernel/swf/LzLibrary.lzs
M      WEB-INF/lps/lfc/kernel/dhtml/LzLibrary.js
M      WEB-INF/lps/lfc/kernel/swf9/LzLibrary.lzs
M      WEB-INF/lps/lfc/kernel/LzLibraryCleanup.lzs
M      WEB-INF/lps/lfc/core/LzNode.lzs
M      WEB-INF/lps/lfc/core/UserClass.lzs
M      WEB-INF/lps/lfc/core/LzDefs.lzs
M      WEB-INF/lps/lfc/views/LzInputText.lzs
M      WEB-INF/lps/lfc/views/LzScript.lzs
M      WEB-INF/lps/lfc/views/LzText.lzs
M      WEB-INF/lps/lfc/views/LaszloView.lzs
M      WEB-INF/lps/lfc/views/LaszloCanvas.lzs
M      WEB-INF/lps/lfc/helpers/LzDataSelectionManager.lzs
M      WEB-INF/lps/lfc/helpers/LzCommand.lzs
M      WEB-INF/lps/lfc/helpers/LzSelectionManager.lzs
M      WEB-INF/lps/lfc/helpers/LzState.lzs
M      WEB-INF/lps/lfc/controllers/LzAnimatorGroup.lzs
M      WEB-INF/lps/lfc/controllers/LaszloLayout.lzs
M      WEB-INF/lps/lfc/controllers/LaszloAnimation.lzs
M      WEB-INF/lps/lfc/data/LzReplicationManager.lzs
M      WEB-INF/lps/lfc/data/platform/swf/LzConnectionDatasource.lzs
M      WEB-INF/lps/lfc/data/platform/swf/LzConnection.lzs
M      WEB-INF/lps/lfc/data/LzDatapointer.lzs
M      WEB-INF/lps/lfc/data/LzDataText.lzs
M      WEB-INF/lps/lfc/data/LzDataRequest.lzs
M      WEB-INF/lps/lfc/data/LzDataElement.lzs
M      WEB-INF/lps/lfc/data/LzDataProvider.lzs
M      WEB-INF/lps/lfc/data/LzDataset.lzs
M      WEB-INF/lps/lfc/data/LzDatapath.lzs
M      WEB-INF/lps/lfc/data/LzHTTPDatasource.lzs
M      WEB-INF/lps/lfc/data/LzParam.lzs
M      WEB-INF/lps/server/src/org/openlaszlo/xml/internal/Schema.java
M      WEB-INF/lps/server/src/org/openlaszlo/sc/JavascriptGenerator.java
M      WEB-INF/lps/server/src/org/openlaszlo/sc/CommonGenerator.java
M      WEB-INF/lps/server/src/org/openlaszlo/sc/ScriptCompiler.java
M      WEB-INF/lps/server/src/org/openlaszlo/sc/CodeGenerator.java
M      WEB-INF/lps/server/src/org/openlaszlo/sc/ScriptClass.java
M      WEB-INF/lps/server/src/org/openlaszlo/compiler/ClassCompiler.java
M WEB-INF/lps/server/src/org/openlaszlo/compiler/ CanvasCompiler.java M WEB-INF/lps/server/src/org/openlaszlo/compiler/ CompilationEnvironment.java
M      WEB-INF/lps/server/src/org/openlaszlo/compiler/NodeModel.java
M      WEB-INF/lps/server/src/org/openlaszlo/compiler/ClassModel.java

Changeset: http://svn.openlaszlo.org/openlaszlo/patches/20080313-ptw-5.tar

Reply via email to