2 // { dg-additional-options "-Wno-return-type" }
5 typedef __SIZE_TYPE__ size_t;
7 inline void* operator new(std::size_t, void* __p) throw() {
10 class Noncopyable { };
11 struct CollectorCell { };
12 template<typename T> class PassRefPtr {
14 T* releaseRef() const { }
16 template <typename T> class NonNullPassRefPtr {
18 template <class U> NonNullPassRefPtr(const PassRefPtr<U>& o)
19 : m_ptr(o.releaseRef()) { }
27 static void storeVPtrs();
29 class JSCell : public Noncopyable {
30 friend class JSObject;
31 friend class JSGlobalData;
34 class JSObject : public JSCell {
36 explicit JSObject(NonNullPassRefPtr<Structure>);
37 static PassRefPtr<Structure> createStructure(JSValue prototype) { }
39 class JSByteArray : public JSObject {
40 friend class JSGlobalData;
41 enum VPtrStealingHackType { VPtrStealingHack };
42 JSByteArray(VPtrStealingHackType)
43 : JSObject(createStructure(jsNull())), m_classInfo(0) { }
44 const ClassInfo* m_classInfo;
46 void JSGlobalData::storeVPtrs() {
48 void* storage = &cell;
49 JSCell* jsByteArray = new (storage) JSByteArray(JSByteArray::VPtrStealingHack);
50 jsByteArray->~JSCell();