- if (isObject() && asObject(*this)->butterfly())
- out.print("->", RawPointer(asObject(*this)->butterfly()));
- out.print(
- " (", RawPointer(asCell()->structure()), ": ", asCell()->structure()->classInfo()->className,
- ", ", IndexingTypeDump(asCell()->structure()->indexingTypeIncludingHistory()), ")");
+ out.print(" (", inContext(*structure, context), ")");
+ }
+#if USE(JSVALUE64)
+ out.print(", ID: ", asCell()->structureID());
+#endif
+ } else if (isTrue())
+ out.print("True");
+ else if (isFalse())
+ out.print("False");
+ else if (isNull())
+ out.print("Null");
+ else if (isUndefined())
+ out.print("Undefined");
+ else
+ out.print("INVALID");
+}
+
+void JSValue::dumpForBacktrace(PrintStream& out) const
+{
+ if (!*this)
+ out.print("<JSValue()>");
+ else if (isInt32())
+ out.printf("%d", asInt32());
+ else if (isDouble())
+ out.printf("%lf", asDouble());
+ else if (isCell()) {
+ if (asCell()->inherits(JSString::info())) {
+ JSString* string = jsCast<JSString*>(asCell());
+ const StringImpl* impl = string->tryGetValueImpl();
+ if (impl)
+ out.print("\"", impl, "\"");
+ else
+ out.print("(unresolved string)");
+ } else if (asCell()->inherits(Structure::info())) {
+ out.print("Structure[ ", asCell()->structure()->classInfo()->className);
+#if USE(JSVALUE64)
+ out.print(" ID: ", asCell()->structureID());
+#endif
+ out.print("]: ", RawPointer(asCell()));
+ } else {
+ out.print("Cell[", asCell()->structure()->classInfo()->className);
+#if USE(JSVALUE64)
+ out.print(" ID: ", asCell()->structureID());
+#endif
+ out.print("]: ", RawPointer(asCell()));