X-Git-Url: https://git.saurik.com/apple/javascriptcore.git/blobdiff_plain/81345200c95645a1b0d2635520f96ad55dfde63f..ed1e77d3adeb83d26fd1dfb16dd84cabdcefd250:/runtime/IntendedStructureChain.h diff --git a/runtime/IntendedStructureChain.h b/runtime/IntendedStructureChain.h index a78188b..a0f5565 100644 --- a/runtime/IntendedStructureChain.h +++ b/runtime/IntendedStructureChain.h @@ -26,6 +26,7 @@ #ifndef IntendedStructureChain_h #define IntendedStructureChain_h +#include "ConstantStructureCheck.h" #include "Structure.h" #include @@ -39,7 +40,8 @@ struct DumpContext; class IntendedStructureChain : public RefCounted { public: - IntendedStructureChain(JSGlobalObject* globalObject, Structure* head); + IntendedStructureChain(JSGlobalObject* globalObject, JSValue prototype); + IntendedStructureChain(JSGlobalObject* globalObject, Structure*); IntendedStructureChain(CodeBlock* codeBlock, Structure* head, Structure* prototypeStructure); IntendedStructureChain(CodeBlock* codeBlock, Structure* head, StructureChain* chain); IntendedStructureChain(CodeBlock* codeBlock, Structure* head, StructureChain* chain, unsigned count); @@ -47,27 +49,36 @@ public: bool isStillValid() const; bool matches(StructureChain*) const; - StructureChain* chain(VM&) const; - bool mayInterceptStoreTo(VM&, StringImpl* uid); + bool mayInterceptStoreTo(UniquedStringImpl* uid); bool isNormalized(); - Structure* head() const { return m_head; } + bool takesSlowPathInDFGForImpureProperty(); + + JSValue prototype() const { return m_prototype; } size_t size() const { return m_vector.size(); } - Structure* at(size_t index) { return m_vector[index]; } - Structure* operator[](size_t index) { return at(index); } + Structure* at(size_t index) const { return m_vector[index]; } + Structure* operator[](size_t index) const { return at(index); } JSObject* terminalPrototype() const; Structure* last() const { return m_vector.last(); } + bool operator==(const IntendedStructureChain&) const; + bool operator!=(const IntendedStructureChain& other) const + { + return !(*this == other); + } + + void gatherChecks(ConstantStructureCheckVector&) const; + void visitChildren(SlotVisitor&); void dump(PrintStream&) const; void dumpInContext(PrintStream&, DumpContext*) const; private: JSGlobalObject* m_globalObject; - Structure* m_head; + JSValue m_prototype; Vector m_vector; };