[INFER] Ignore bogus lazy arguments type in TypeConstraintTransformThis.
authorBrian Hackett <bhackett1024@gmail.com>
Thu, 26 May 2011 13:47:33 -0700
changeset 75114 1252c464553e3f838cf932a6fcb6092b270bc94b
parent 75113 6ad7f6da94cb0531ec121193c07ffd8f264f516e
child 75115 0f02561d061c13d9de7f777c0539b951171b1271
push id2
push userbsmedberg@mozilla.com
push dateFri, 19 Aug 2011 14:38:13 +0000
milestone6.0a1
[INFER] Ignore bogus lazy arguments type in TypeConstraintTransformThis.
js/src/jsinfer.cpp
--- a/js/src/jsinfer.cpp
+++ b/js/src/jsinfer.cpp
@@ -879,17 +879,17 @@ GetPropertyObject(JSContext *cx, JSScrip
         object = script->getTypeNewObject(cx, JSProto_Boolean);
         break;
 
       case TYPE_STRING:
         object = script->getTypeNewObject(cx, JSProto_String);
         break;
 
       default:
-        /* undefined and null do not have properties. */
+        /* undefined, null and lazy arguments do not have properties. */
         return NULL;
     }
 
     if (!object)
         cx->compartment->types.setPendingNukeTypes(cx);
     return object;
 }
 
@@ -1282,17 +1282,17 @@ TypeConstraintTransformThis::newType(JSC
         break;
       case TYPE_BOOLEAN:
         object = script->getTypeNewObject(cx, JSProto_Boolean);
         break;
       case TYPE_STRING:
         object = script->getTypeNewObject(cx, JSProto_String);
         break;
       default:
-        JS_NOT_REACHED("Bad type");
+        return;
     }
 
     if (!object) {
         cx->compartment->types.setPendingNukeTypes(cx);
         return;
     }
 
     target->addType(cx, (jstype) object);
@@ -3876,17 +3876,16 @@ ScriptAnalysis::analyzeTypesBytecode(JSC
 
       case JSOP_EXCEPTION:
         pushed[0].addType(cx, TYPE_UNKNOWN);
         break;
 
       case JSOP_DELPROP:
       case JSOP_DELELEM:
       case JSOP_DELNAME:
-        /* TODO: watch for deletes on the global object. */
         pushed[0].addType(cx, TYPE_BOOLEAN);
         break;
 
       case JSOP_LEAVEBLOCKEXPR:
         poppedTypes(pc, 0)->addSubset(cx, script, &pushed[0]);
         break;
 
       case JSOP_CASE: