X-Git-Url: https://git.saurik.com/apple/javascriptcore.git/blobdiff_plain/93a3786624b2768d89bfa27e46598dc64e2fb70a..40a37d088818fc2fbeba2ef850dbcaaf294befbf:/dfg/DFGStructureAbstractValue.h diff --git a/dfg/DFGStructureAbstractValue.h b/dfg/DFGStructureAbstractValue.h index fb5dfda..10e476c 100644 --- a/dfg/DFGStructureAbstractValue.h +++ b/dfg/DFGStructureAbstractValue.h @@ -26,12 +26,11 @@ #ifndef DFGStructureAbstractValue_h #define DFGStructureAbstractValue_h -#include - #if ENABLE(DFG_JIT) #include "JSCell.h" #include "SpeculatedType.h" +#include "DumpContext.h" #include "StructureSet.h" namespace JSC { namespace DFG { @@ -282,6 +281,15 @@ public: return speculationFromStructure(m_structure); } + bool isValidOffset(PropertyOffset offset) + { + if (isTop()) + return false; + if (isClear()) + return true; + return m_structure->isValidOffset(offset); + } + bool hasSingleton() const { return isNeitherClearNorTop(); @@ -298,7 +306,7 @@ public: return m_structure == other.m_structure; } - void dump(PrintStream& out) const + void dumpInContext(PrintStream& out, DumpContext* context) const { if (isTop()) { out.print("TOP"); @@ -307,10 +315,15 @@ public: out.print("["); if (m_structure) - out.print(RawPointer(m_structure), "(", m_structure->classInfo()->className, ")"); + out.print(inContext(*m_structure, context)); out.print("]"); } + void dump(PrintStream& out) const + { + dumpInContext(out, 0); + } + private: static Structure* topValue() { return reinterpret_cast(1); }