[Laszlo-checkins] r13483 - openlaszlo/trunk/WEB-INF/lps/lfc/core

bargull@openlaszlo.org bargull at openlaszlo.org
Thu Mar 26 06:45:21 PDT 2009


Author: bargull
Date: 2009-03-26 06:45:17 -0700 (Thu, 26 Mar 2009)
New Revision: 13483

Modified:
   openlaszlo/trunk/WEB-INF/lps/lfc/core/LzNode.lzs
Log:
Change 20090326-bargull-0pK by bargull at dell--p4--2-53 on 2009-03-26 14:22:15
    in /home/Admin/src/svn/openlaszlo/trunk
    for http://svn.openlaszlo.org/openlaszlo/trunk

Summary: change instanceof to is

New Features:

Bugs Fixed: LPP-7905 (Noticable performance differences between OL 4.0.x and 4.2.x) (partial)

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

Documentation:

Release Notes:

Details:
Changed 'instanceof' to 'is' to avoid AS3 runtime errors on undefined objects.
Don't call __LZstoreAttr() on null values (saves two function calls, at least helpful for AVM1)
    

Tests:



Modified: openlaszlo/trunk/WEB-INF/lps/lfc/core/LzNode.lzs
===================================================================
--- openlaszlo/trunk/WEB-INF/lps/lfc/core/LzNode.lzs	2009-03-26 13:26:07 UTC (rev 13482)
+++ openlaszlo/trunk/WEB-INF/lps/lfc/core/LzNode.lzs	2009-03-26 13:45:17 UTC (rev 13483)
@@ -246,7 +246,7 @@
           // should just be installed as a declaration
           var setr = '$lzc$set_' + key;
           if (! this[setr]) {
-            if (val instanceof Function) {
+            if (val is Function) {
               this.addProperty(key, val);
             } else if (val !== void 0) {
               this[key] = val;
@@ -1059,7 +1059,7 @@
         // TODO: should already be declared, so we should just be
         // able to set it, but that doesn't work if this is a
         // method
-        if (val instanceof Function) { 
+        if (val is Function) {
           this.addProperty(a, val);
         } else if (val !== void 0) {
           this[a] = val;
@@ -1115,8 +1115,8 @@
     // now, we just collect the inits and constraints (once their
     // inheritance has been computed correctly above) and use the
     // existing $refs-like mechanism to install them.
-    this.__LZstoreAttr(inits, '$inits');
-    this.__LZstoreAttr(constraints, '$constraints');
+    if (inits != null) { this.__LZstoreAttr(inits, '$inits'); }
+    if (constraints != null) { this.__LZstoreAttr(constraints, '$constraints'); }
   }
 
   /**



More information about the Laszlo-checkins mailing list