[This is the mondo patch Henry and I have been working on to get the
new class regime shimmed under LzClass. We have enough working that
we are checking it in to make sure we are in sync. We know this
breaks DHTML and there are some rough edges in SWF. We plan to fix
that ASAP.]
Change 41991 by [EMAIL PROTECTED] on 2006/05/03 12:13:11 *pending*
Summary: Shim new class structure underneath it all
Bugs Fixed: Need a bug for this work
LPP-2029: Implement new class regime (partial)
LPP-1871 Compiler work to support 'new'
Technical Reviewer: hminsky (pending)
QA Reviewer: max (pending)
Doc Reviewer: ben (pending)
Details:
LaszloLibrary: Add remote debugger
LzRuntime: Add `make` trampoline for conventional
constructors. Turn off _dbg_log_all_writes.
Class: Fix debug printing of new classes. Optimize
nextMethod annotation. Name anonymous functions (for
debugging). Fix scaffolding to initialize _all_ prototypes of
a class before first instance is made. Rename Trait.make to
Trait.makeInterstitial, so trying to instantiate a bare trait
is an error (for now). Copy Trait.initialize (class
initializer) onto interstitial constructor so that it will be
run in proper order by Class.make (when a new class mixes in
the trait). Remove incorrect prototype filtering. Turn off
interstitial sharing until we understand when it is permissible.
core/Library: Remove .debug statements
LzClass.as: Turn into an adapter that connects the old way to
the new. Class calls NewClass.make to make constructor,
Class.__LzCallInherited uses nextMethod. Remove added Object
properties. Remove obsolete callInherited, instanceOf. Use
real traits.
LzNode.as: Pull initializer out of mvn to use new regime.
Turn LzNode.isExtendedBy into a LzNode class initialize
method. Add default setClassEvents and constructWithArgs
methods. Use Instance.addProperty when adding properties
dynamically to class prototype.
UserClass.as: Pull initializer out. Use real traits. Make
setClassEvents an
internal function of the initializer (but maybe it is a class
initializer?) Use Instance.addProperty when adding properties
dynamically to class prototype.
LzDataElement: Split into class and trait so trait can be
mixed in to LzDataset. Use trait class initialize method to
correctly install trait setters after setters created by
LzNode.
LzDataNode: Turn into a trait that is mixed in to LzDataText
and LzDataElement.
LzDataText: Use NewClass.make to mix in LzDataNode.
LzDataset: Eliminate cheesyMultipleInheritance. Use traits to
mix in LzDataElementTrait and LzDataNode while descending from
LzNode.
LzLibraryLoader, LzMediaLoader, LaszloEvents: constructor
becomes an initializer.
LzDebug: Look for _dbg_name on functions (name to be obsolete
eventually).
SWFwriter: Type-oh, noticed in passing.
CodeGenerator: Translate new into make, support #pragma
"passThrough=true" to escape.
JavascriptGenerator: Don't err for backtrace or profile
compiles (they don't work in DHTML yet, but we needed to build
backtrace compiles for debugging).
Tests: smokecheck, lztest/* LZPIz(swf)
Affected files ...
... //depot/lps-legals/WEB-INF/lps/lfc/LaszloLibrary.lzs#5 edit
... //depot/lps-legals/WEB-INF/lps/lfc/compiler/LzRuntime.lzs#12 edit
... //depot/lps-legals/WEB-INF/lps/lfc/core/Class.lzs#5 edit
... //depot/lps-legals/WEB-INF/lps/lfc/core/Library.lzs#6 edit
... //depot/lps-legals/WEB-INF/lps/lfc/core/LzClass.as#8 edit
... //depot/lps-legals/WEB-INF/lps/lfc/core/LzNode.as#9 edit
... //depot/lps-legals/WEB-INF/lps/lfc/core/UserClass.as#7 edit
... //depot/lps-legals/WEB-INF/lps/lfc/data/LzDataElement.lzs#4 edit
... //depot/lps-legals/WEB-INF/lps/lfc/data/LzDataNode.lzs#5 edit
... //depot/lps-legals/WEB-INF/lps/lfc/data/LzDataText.lzs#4 edit
... //depot/lps-legals/WEB-INF/lps/lfc/data/LzDataset.as#5 edit
... //depot/lps-legals/WEB-INF/lps/lfc/data/LzLibraryLoader.as#2 edit
... //depot/lps-legals/WEB-INF/lps/lfc/data/LzLoader.as#6 edit
... //depot/lps-legals/WEB-INF/lps/lfc/data/LzMediaLoader.as#4 edit
... //depot/lps-legals/WEB-INF/lps/lfc/debugger/LzDebug.as#7 edit
... //depot/lps-legals/WEB-INF/lps/lfc/debugger/LzFlashRemote.as#8 edit
... //depot/lps-legals/WEB-INF/lps/lfc/events/LaszloEvents.lzs#5 edit
... //depot/lps-legals/WEB-INF/lps/lfc/transformers/LzMakeLoad.as#4 edit
... //depot/lps-legals/WEB-INF/lps/lfc/views/LaszloCanvas.as#7 edit
... //depot/lps-legals/WEB-INF/lps/server/src/org/openlaszlo/compiler/
SWFWriter.java#22 edit
... //depot/lps-legals/WEB-INF/lps/server/src/org/openlaszlo/sc/
CodeGenerator.java#10 edit
... //depot/lps-legals/WEB-INF/lps/server/src/org/openlaszlo/sc/
JavascriptGenerator.java#18 edit
_______________________________________________
Laszlo-dev mailing list
[email protected]
http://www.openlaszlo.org/mailman/listinfo/laszlo-dev