* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
- * 3. Neither the name of Apple Computer, Inc. ("Apple") nor the names of
+ * 3. Neither the name of Apple Inc. ("Apple") nor the names of
* its contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
#include "JSObject.h"
#include "JSString.h"
-#include "Operations.h"
#include "PropertyNameArray.h"
+#include <memory>
namespace JSC {
static Structure* createStructure(VM& vm, JSGlobalObject* globalObject, JSValue prototype)
{
- return Structure::create(vm, globalObject, prototype, TypeInfo(CompoundType, OverridesVisitChildren), &s_info);
+ return Structure::create(vm, globalObject, prototype, TypeInfo(CompoundType, StructureFlags), info());
}
static void visitChildren(JSCell*, SlotVisitor&);
void setCachedPrototypeChain(VM& vm, StructureChain* cachedPrototypeChain) { m_cachedPrototypeChain.set(vm, this, cachedPrototypeChain); }
StructureChain* cachedPrototypeChain() { return m_cachedPrototypeChain.get(); }
- static JS_EXPORTDATA const ClassInfo s_info;
+ DECLARE_EXPORT_INFO;
protected:
- void finishCreation(ExecState* exec, PropertyNameArrayData* propertyNameArrayData, JSObject* object)
+ static const unsigned StructureFlags = OverridesVisitChildren | StructureIsImmortal;
+
+ void finishCreation(VM& vm, PropertyNameArrayData* propertyNameArrayData, JSObject* object)
{
- Base::finishCreation(exec->vm());
+ Base::finishCreation(vm);
PropertyNameArrayData::PropertyNameVector& propertyNameVector = propertyNameArrayData->propertyNameVector();
for (size_t i = 0; i < m_jsStringsSize; ++i)
- m_jsStrings[i].set(exec->vm(), this, jsOwnedString(exec, propertyNameVector[i].string()));
+ m_jsStrings[i].set(vm, this, jsOwnedString(&vm, propertyNameVector[i].string()));
m_cachedStructureInlineCapacity = object->structure()->inlineCapacity();
}
uint32_t m_numCacheableSlots;
uint32_t m_jsStringsSize;
unsigned m_cachedStructureInlineCapacity;
- OwnArrayPtr<WriteBarrier<Unknown> > m_jsStrings;
+ std::unique_ptr<WriteBarrier<Unknown>[]> m_jsStrings;
};
ALWAYS_INLINE JSPropertyNameIterator* Register::propertyNameIterator() const
return m_enumerationCache.get();
}
- inline void StructureRareData::setEnumerationCache(VM& vm, const Structure* owner, JSPropertyNameIterator* value)
+ inline void StructureRareData::setEnumerationCache(VM& vm, JSPropertyNameIterator* value)
{
- m_enumerationCache.set(vm, owner, value);
+ m_enumerationCache.set(vm, this, value);
}
} // namespace JSC