Approved for QA...

Regards,
Max Carlson
OpenLaszlo.org

On 4/13/10 8:13 AM, P T Withington wrote:
UPDATE:  Per review discussion, warnings about incorrect constraint 
dependencies are disabled (until we have a way for the LZX programmer to 
address those warnings).  Retained is the compatibility of being able to 
constrain to a method without dependencies in swf10, even if the method is on a 
sealed class.  The previous component changes have been reverted.

---

Change 20100409-ptw-7 by [email protected] on 2010-04-09 13:47:40 EDT
     in /Users/ptw/OpenLaszlo/trunk
     for http://svn.openlaszlo.org/openlaszlo/trunk

Summary: Make constraints and dependencies more debuggable and compatible

Bugs Fixed: LPP-7344 Attepting to constrain a non-LzEventable object property 
gives ActionScript error in SWF9

Technical Reviewer: [email protected] (pending)
QA Reviewer: hminsky, max (pending)

Overview:

     Removed the type declaration from LzDelegate so that a more
     friendly error can be displayed.  Added code in debug mode to
     validate property and function dependencies.  Added (but commented
     out for now) code to warn when the compiler fails to create a
     proper dependency for a constraint.  A future change will enable
     this warning, once we have implemented a way for the LZX
     programmer to address the warning (by clarifying the dependencies
     of the constraint).

Details:

     regression: Noticed in passing: Use modern data type declaration
     rather than coercion in constraint.

     LzNode: Take greater care installing dependencies.  Don't try to
     install dependencies on non-LzEventables.  Ensure that despite
     failing dependencies, the constraint is at least evaluated once
     (for backward compatibility with swf8 behavior).  Added (but
     commented out for now) debug mode code to give warnings that
     relate the dependency errors to the constraint the user wrote.

     LaszloEvents: Revert to runtime type-checking of LzDelegate
     arguments.  swf8 allows delegates on non-LzEventable for
     compatibility with the swf8 kernel, but all other runtimes will
     refuse to create delegates if the context is not an LzEventable or
     the method is not a method.  Similarly, delegates will only be
     registered on LzEventable events in the modern runtimes.  Also
     repaired LzDelegate#_dbg_name_ to work with the new __events
     Array.

     LzRuntime: Add support for verifying reference dependencies and
     calculating method dependencies carefully.

     ReferenceCollector: Collect annotations for debug mode to support
     more intelligible error messages.  Removed obsolete 'subfunction'
     API, no longer used.  Added `pureFunctions` filter to reduce
     irrelevant dependency computations.

     *Generator: Remove obsolete #pragma "constraintFunction" support.

     Compiler, NodeModel: Rework dependencies computation to support
     better debugging.

Tests:
     Test case from bug.  Smokecheck.  Calendar, LzPix, Amazon,
     Animation demos

Files:
M       test/smoke/regression.lzl
M       WEB-INF/lps/lfc/core/LzNode.lzs
M       WEB-INF/lps/lfc/events/LaszloEvents.lzs
M       WEB-INF/lps/lfc/compiler/LzRuntime.lzs
M       WEB-INF/lps/server/src/org/openlaszlo/sc/ReferenceCollector.java
M       WEB-INF/lps/server/src/org/openlaszlo/sc/JavascriptGenerator.java
M       WEB-INF/lps/server/src/org/openlaszlo/sc/Compiler.java
M       WEB-INF/lps/server/src/org/openlaszlo/sc/CodeGenerator.java
M       WEB-INF/lps/server/src/org/openlaszlo/compiler/NodeModel.java

Changeset: http://svn.openlaszlo.org/openlaszlo/patches/20100409-ptw-7.tar

Reply via email to