diff options
author | Lorry Tar Creator <lorry-tar-importer@lorry> | 2016-04-10 09:28:39 +0000 |
---|---|---|
committer | Lorry Tar Creator <lorry-tar-importer@lorry> | 2016-04-10 09:28:39 +0000 |
commit | 32761a6cee1d0dee366b885b7b9c777e67885688 (patch) | |
tree | d6bec92bebfb216f4126356e55518842c2f476a1 /Source/JavaScriptCore/runtime/StructureRareData.h | |
parent | a4e969f4965059196ca948db781e52f7cfebf19e (diff) | |
download | WebKitGtk-tarball-32761a6cee1d0dee366b885b7b9c777e67885688.tar.gz |
webkitgtk-2.4.11webkitgtk-2.4.11
Diffstat (limited to 'Source/JavaScriptCore/runtime/StructureRareData.h')
-rw-r--r-- | Source/JavaScriptCore/runtime/StructureRareData.h | 46 |
1 files changed, 16 insertions, 30 deletions
diff --git a/Source/JavaScriptCore/runtime/StructureRareData.h b/Source/JavaScriptCore/runtime/StructureRareData.h index 0310b18c3..c6798823d 100644 --- a/Source/JavaScriptCore/runtime/StructureRareData.h +++ b/Source/JavaScriptCore/runtime/StructureRareData.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2013, 2014 Apple Inc. All rights reserved. + * Copyright (C) 2013 Apple Inc. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -29,60 +29,46 @@ #include "ClassInfo.h" #include "JSCell.h" #include "JSTypeInfo.h" -#include "PropertyOffset.h" -#include "PropertySlot.h" namespace JSC { -class JSPropertyNameEnumerator; +class JSPropertyNameIterator; class Structure; -class ObjectToStringAdaptiveStructureWatchpoint; -class ObjectToStringAdaptiveInferredPropertyValueWatchpoint; -class StructureRareData final : public JSCell { +class StructureRareData : public JSCell { + friend class Structure; public: - typedef JSCell Base; - static const unsigned StructureFlags = Base::StructureFlags | StructureIsImmortal; - static StructureRareData* create(VM&, Structure*); - - static const bool needsDestruction = true; - static void destroy(JSCell*); + static StructureRareData* clone(VM&, const StructureRareData* other); static void visitChildren(JSCell*, SlotVisitor&); static Structure* createStructure(VM&, JSGlobalObject*, JSValue prototype); + // Returns true if this StructureRareData should also be cloned when cloning the owner Structure. + bool needsCloning() const { return false; } + Structure* previousID() const; - void setPreviousID(VM&, Structure*); + void setPreviousID(VM&, Structure* transition, Structure*); void clearPreviousID(); JSString* objectToStringValue() const; - void setObjectToStringValue(ExecState*, VM&, Structure* baseStructure, JSString* value, PropertySlot toStringTagSymbolSlot); + void setObjectToStringValue(VM&, const JSCell* owner, JSString* value); - JSPropertyNameEnumerator* cachedPropertyNameEnumerator() const; - void setCachedPropertyNameEnumerator(VM&, JSPropertyNameEnumerator*); + JSPropertyNameIterator* enumerationCache(); + void setEnumerationCache(VM&, const Structure* owner, JSPropertyNameIterator* value); DECLARE_EXPORT_INFO; private: - friend class Structure; - friend class ObjectToStringAdaptiveStructureWatchpoint; - friend class ObjectToStringAdaptiveInferredPropertyValueWatchpoint; - - void clearObjectToStringValue(); - StructureRareData(VM&, Structure*); + StructureRareData(VM&, const StructureRareData*); + + static const unsigned StructureFlags = OverridesVisitChildren | JSCell::StructureFlags; WriteBarrier<Structure> m_previous; WriteBarrier<JSString> m_objectToStringValue; - WriteBarrier<JSPropertyNameEnumerator> m_cachedPropertyNameEnumerator; - - typedef HashMap<PropertyOffset, RefPtr<WatchpointSet>, WTF::IntHash<PropertyOffset>, WTF::UnsignedWithZeroKeyHashTraits<PropertyOffset>> PropertyWatchpointMap; - std::unique_ptr<PropertyWatchpointMap> m_replacementWatchpointSets; - Bag<ObjectToStringAdaptiveStructureWatchpoint> m_objectToStringAdaptiveWatchpointSet; - std::unique_ptr<ObjectToStringAdaptiveInferredPropertyValueWatchpoint> m_objectToStringAdaptiveInferredValueWatchpoint; - bool m_giveUpOnObjectToStringValueCache; + WriteBarrier<JSPropertyNameIterator> m_enumerationCache; }; } // namespace JSC |