[Laszlo-checkins] r8171 - openlaszlo/trunk/WEB-INF/lps/server/src/org/openlaszlo/sc

dda@openlaszlo.org dda at openlaszlo.org
Wed Mar 5 06:33:02 PST 2008


Author: dda
Date: 2008-03-05 06:32:46 -0800 (Wed, 05 Mar 2008)
New Revision: 8171

Modified:
   openlaszlo/trunk/WEB-INF/lps/server/src/org/openlaszlo/sc/ReferenceCollector.java
Log:
Change 20080304-dda-Q by dda at lester.local on 2008-03-04 10:32:20 EST
    in /Users/dda/laszlo/src/svn/openlaszlo/trunk
    for http://svn.openlaszlo.org/openlaszlo/trunk

Summary: In dependency calculation function, use bracket syntax rather than cast

New Features:

Bugs Fixed: LPP-5335

Technical Reviewer: ptw (pending)
QA Reviewer: (pending)
Doc Reviewer: (pending)

Documentation:

Release Notes:

Details:
    Previously, the new Compiler.dependenciesForExpression would
    produce an expression like: 

      obj.hasOwnProperty("$lsc$Fcn_dependencies") ? (obj cast Object).$lsc$Fcn_dependencies(this, obj, arg1)

    For consistency with other cases that must do 'typeless' references, this has been changed
    to use the bracket notation:
    
      obj.hasOwnProperty("$lsc$Fcn_dependencies") ? obj['$lsc$Fcn_dependencies'](this, obj, arg1)

Tests:
   Checked regressions:  (smokecheck, weather, lzpix) x (swf8, dhtml)
   The feature itself cannot be easily checked until this function is used
   within the new constraint framework.



Modified: openlaszlo/trunk/WEB-INF/lps/server/src/org/openlaszlo/sc/ReferenceCollector.java
===================================================================
--- openlaszlo/trunk/WEB-INF/lps/server/src/org/openlaszlo/sc/ReferenceCollector.java	2008-03-05 11:46:53 UTC (rev 8170)
+++ openlaszlo/trunk/WEB-INF/lps/server/src/org/openlaszlo/sc/ReferenceCollector.java	2008-03-05 14:32:46 UTC (rev 8171)
@@ -93,8 +93,8 @@
   }
 
   // callee.fn(args...) ->
-  //    callee.hasOwnProperty('$lsc$fn_dependencies') ?
-  //      (callee cast Object).$lsc$fn_dependencies(args...) : []
+  //    ('$lsc$fn_dependencies' in callee) ?
+  //      callee['$lsc$fn_dependencies'](args...) : []
   // If callee doesn't exist (i.e. original expression is just fn()),
   // then 'this' is assumed for callee.  If we don't downcast the callee
   // at the point of the call, on SWF9 we'd get compile errors
@@ -117,7 +117,7 @@
     map.put("_1", callee);
     map.put("_2", new Compiler.Splice(node.get(1).getChildren()));
 
-    return parser.substitute("_1.hasOwnProperty('" + depnm + "') ? (_1 cast Object)." + depnm + "(this, _1, _2) : []", map);
+    return parser.substitute("('" + depnm + "' in _1) ? _1['" + depnm + "'](this, _1, _2) : []", map);
   }
 
   // TODO: [2006-02-22 dda] Remove this 'subfunction' version soon.



More information about the Laszlo-checkins mailing list