/*
- * Copyright (C) 2013 Apple Inc. All rights reserved.
+ * Copyright (C) 2013, 2015 Apple Inc. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
setMetadata(instruction, repository.m_tbaaKind, tbaaMetadata(repository));
}
+void AbstractHeap::dump(PrintStream& out) const
+{
+ out.print(heapName());
+ if (m_parent)
+ out.print("->", *m_parent);
+}
+
+void AbstractField::dump(PrintStream& out) const
+{
+ out.print(heapName(), "(", m_offset, ")");
+ if (parent())
+ out.print("->", *parent());
+}
+
IndexedAbstractHeap::IndexedAbstractHeap(LContext context, AbstractHeap* parent, const char* heapName, ptrdiff_t offset, size_t elementSize)
: m_heapForAnyIndex(parent, heapName)
, m_heapNameLength(strlen(heapName))
ASSERT(static_cast<size_t>(index) >= m_smallIndices.size());
if (UNLIKELY(!m_largeIndices))
- m_largeIndices = adoptPtr(new MapType());
+ m_largeIndices = std::make_unique<MapType>();
std::unique_ptr<AbstractField>& field = m_largeIndices->add(index, nullptr).iterator->value;
if (!field) {
RELEASE_ASSERT_NOT_REACHED();
}
+void IndexedAbstractHeap::dump(PrintStream& out) const
+{
+ out.print("Indexed:", atAnyIndex());
+}
+
NumberedAbstractHeap::NumberedAbstractHeap(LContext context, AbstractHeap* heap, const char* heapName)
: m_indexedHeap(context, heap, heapName, 0, 1)
{
{
}
+void NumberedAbstractHeap::dump(PrintStream& out) const
+{
+ out.print("Numbered: ", atAnyNumber());
+}
+
AbsoluteAbstractHeap::AbsoluteAbstractHeap(LContext context, AbstractHeap* heap, const char* heapName)
: m_indexedHeap(context, heap, heapName, 0, 1)
{
{
}
+void AbsoluteAbstractHeap::dump(PrintStream& out) const
+{
+ out.print("Absolute:", atAnyAddress());
+}
+
} } // namespace JSC::FTL
#endif // ENABLE(FTL_JIT)