#ifndef DFGStructureAbstractValue_h
#define DFGStructureAbstractValue_h
-#include <wtf/Platform.h>
-
#if ENABLE(DFG_JIT)
#include "JSCell.h"
#include "SpeculatedType.h"
+#include "DumpContext.h"
#include "StructureSet.h"
namespace JSC { namespace DFG {
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();
return m_structure == other.m_structure;
}
- void dump(PrintStream& out) const
+ void dumpInContext(PrintStream& out, DumpContext* context) const
{
if (isTop()) {
out.print("TOP");
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<Structure*>(1); }