Bug 822858 - Fix printing of lazy protos in type inference spew. r=bhackett, a=bajaj
authorBill McCloskey <wmccloskey@mozilla.com>
Tue, 08 Jan 2013 16:49:28 -0800
changeset 127081 3d197fdb4b987a95cc6b085fed24195033991408
parent 127080 5c4c8602cf4455444c9fc5db1f50ade7866b8ab8
child 127082 3b1ce7ca16b27ed6a2ff0713b80749f5dc3e01f7
push id2151
push userlsblakk@mozilla.com
push dateTue, 19 Feb 2013 18:06:57 +0000
treeherdermozilla-beta@4952e88741ec [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbhackett, bajaj
bugs822858
milestone20.0a2
Bug 822858 - Fix printing of lazy protos in type inference spew. r=bhackett, a=bajaj
js/src/jsinfer.cpp
--- a/js/src/jsinfer.cpp
+++ b/js/src/jsinfer.cpp
@@ -3596,19 +3596,21 @@ TypeObject::clearNewScript(JSContext *cx
     js_free(savedNewScript);
 
     markStateChange(cx);
 }
 
 void
 TypeObject::print()
 {
+    TaggedProto tagged(proto);
     printf("%s : %s",
            TypeObjectString(this),
-           proto ? TypeString(Type::ObjectType(proto)) : "(null)");
+           tagged.isObject() ? TypeString(Type::ObjectType(proto))
+                            : (tagged.isLazy() ? "(lazy)" : "(null)"));
 
     if (unknownProperties()) {
         printf(" unknown");
     } else {
         if (!hasAnyFlags(OBJECT_FLAG_NON_PACKED_ARRAY))
             printf(" packed");
         if (!hasAnyFlags(OBJECT_FLAG_NON_DENSE_ARRAY))
             printf(" dense");