+void Structure::dump(PrintStream& out) const
+{
+ out.print(RawPointer(this), ":[", classInfo()->className, ", {");
+
+ Vector<Structure*, 8> structures;
+ Structure* structure;
+ PropertyTable* table;
+
+ const_cast<Structure*>(this)->findStructuresAndMapForMaterialization(
+ structures, structure, table);
+
+ CommaPrinter comma;
+
+ if (table) {
+ PropertyTable::iterator iter = table->begin();
+ PropertyTable::iterator end = table->end();
+ for (; iter != end; ++iter) {
+ out.print(comma, iter->key, ":", static_cast<int>(iter->offset));
+ if (iter->specificValue) {
+ DumpContext dummyContext;
+ out.print("=>", RawPointer(iter->specificValue.get()));
+ }
+ }
+
+ structure->m_lock.unlock();
+ }
+
+ for (unsigned i = structures.size(); i--;) {
+ Structure* structure = structures[i];
+ if (!structure->m_nameInPrevious)
+ continue;
+ out.print(comma, structure->m_nameInPrevious.get(), ":", static_cast<int>(structure->m_offset));
+ if (structure->m_specificValueInPrevious) {
+ DumpContext dummyContext;
+ out.print("=>", RawPointer(structure->m_specificValueInPrevious.get()));
+ }
+ }
+
+ out.print("}, ", IndexingTypeDump(indexingType()));
+
+ if (m_prototype.get().isCell())
+ out.print(", Proto:", RawPointer(m_prototype.get().asCell()));
+
+ out.print("]");
+}
+
+void Structure::dumpInContext(PrintStream& out, DumpContext* context) const
+{
+ if (context)
+ context->structures.dumpBrief(this, out);
+ else
+ dump(out);
+}
+
+void Structure::dumpBrief(PrintStream& out, const CString& string) const
+{
+ out.print("%", string, ":", classInfo()->className);
+}
+
+void Structure::dumpContextHeader(PrintStream& out)
+{
+ out.print("Structures:");
+}
+