X-Git-Url: https://git.saurik.com/apple/javascriptcore.git/blobdiff_plain/81345200c95645a1b0d2635520f96ad55dfde63f..HEAD:/ftl/FTLAbstractHeap.h?ds=sidebyside diff --git a/ftl/FTLAbstractHeap.h b/ftl/FTLAbstractHeap.h index c3e2907..a19ce38 100644 --- a/ftl/FTLAbstractHeap.h +++ b/ftl/FTLAbstractHeap.h @@ -1,5 +1,5 @@ /* - * 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 @@ -34,7 +34,6 @@ #include #include #include -#include #include #include @@ -72,6 +71,11 @@ public: m_parent = parent; m_heapName = heapName; } + + void changeParent(AbstractHeap* parent) + { + m_parent = parent; + } AbstractHeap* parent() const { @@ -95,6 +99,8 @@ public: void decorateInstruction(LValue instruction, const AbstractHeapRepository&) const; + void dump(PrintStream&) const; + private: friend class AbstractHeapRepository; @@ -131,6 +137,8 @@ public: return m_offset; } + void dump(PrintStream&) const; + private: ptrdiff_t m_offset; }; @@ -153,6 +161,8 @@ public: TypedPointer baseIndex(Output& out, LValue base, LValue index, JSValue indexAsConstant = JSValue(), ptrdiff_t offset = 0); + void dump(PrintStream&) const; + private: const AbstractField& returnInitialized(AbstractField& field, ptrdiff_t index) { @@ -178,7 +188,7 @@ private: }; typedef HashMap, WTF::IntHash, WithoutZeroOrOneHashTraits> MapType; - OwnPtr m_largeIndices; + std::unique_ptr m_largeIndices; Vector m_largeIndexNames; }; @@ -197,6 +207,8 @@ public: const AbstractHeap& at(unsigned number) { return m_indexedHeap.at(number); } const AbstractHeap& operator[](unsigned number) { return at(number); } + void dump(PrintStream&) const; + private: // We use the fact that the indexed heap already has a superset of the @@ -218,6 +230,8 @@ public: const AbstractHeap& operator[](void* address) { return at(address); } + void dump(PrintStream&) const; + private: // The trick here is that the indexed heap is "indexed" by a pointer-width // integer. Pointers are themselves pointer-width integers. So we can reuse