Changeset 76248 in webkit for trunk/Source/JavaScriptCore
- Timestamp:
- Jan 20, 2011, 8:30:54 AM (14 years ago)
- Location:
- trunk/Source/JavaScriptCore
- Files:
-
- 72 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/JavaScriptCore/API/JSClassRef.h
r65104 r76248 35 35 #include <wtf/HashMap.h> 36 36 37 struct StaticValueEntry : FastAllocBase { 37 struct StaticValueEntry { 38 WTF_MAKE_FAST_ALLOCATED; 39 public: 38 40 StaticValueEntry(JSObjectGetPropertyCallback _getProperty, JSObjectSetPropertyCallback _setProperty, JSPropertyAttributes _attributes) 39 41 : getProperty(_getProperty), setProperty(_setProperty), attributes(_attributes) … … 46 48 }; 47 49 48 struct StaticFunctionEntry : FastAllocBase { 50 struct StaticFunctionEntry { 51 WTF_MAKE_FAST_ALLOCATED; 52 public: 49 53 StaticFunctionEntry(JSObjectCallAsFunctionCallback _callAsFunction, JSPropertyAttributes _attributes) 50 54 : callAsFunction(_callAsFunction), attributes(_attributes) … … 63 67 // An OpaqueJSClass (JSClass) is created without a context, so it can be used with any context, even across context groups. 64 68 // This structure holds data members that vary across context groups. 65 struct OpaqueJSClassContextData : Noncopyable { 69 struct OpaqueJSClassContextData { 70 WTF_MAKE_NONCOPYABLE(OpaqueJSClassContextData); WTF_MAKE_FAST_ALLOCATED; 71 public: 66 72 OpaqueJSClassContextData(OpaqueJSClass*); 67 73 ~OpaqueJSClassContextData(); -
trunk/Source/JavaScriptCore/API/JSObjectRef.cpp
r71375 r76248 481 481 } 482 482 483 struct OpaqueJSPropertyNameArray : FastAllocBase { 483 struct OpaqueJSPropertyNameArray { 484 WTF_MAKE_FAST_ALLOCATED; 485 public: 484 486 OpaqueJSPropertyNameArray(JSGlobalData* globalData) 485 487 : refCount(0) -
trunk/Source/JavaScriptCore/ChangeLog
r76214 r76248 1 2011-01-20 Zoltan Horvath <[email protected]> 2 3 Reviewed by Csaba Osztrogonác. 4 5 Refactoring of the custom allocation framework 6 https://bugs.webkit.org/show_bug.cgi?id=49897 7 8 Inheriting from FastAllocBase can result in objects getting larger (bug #33896, #46589). 9 The modification replaces Noncopyable and FastAllocBase classes and these inherits with their 10 equivalent macro implementation at the necessary places. 11 12 * wtf/FastAllocBase.h: Turn FastAllocBase's implementation into a macro. 13 1 14 2011-01-20 Mark Rowe <[email protected]> 2 15 -
trunk/Source/JavaScriptCore/assembler/LinkBuffer.h
r73321 r76248 51 51 // * The value referenced by a DataLabel may be set. 52 52 // 53 class LinkBuffer : public Noncopyable { 53 class LinkBuffer { 54 WTF_MAKE_NONCOPYABLE(LinkBuffer); 54 55 typedef MacroAssemblerCodeRef CodeRef; 55 56 typedef MacroAssemblerCodePtr CodePtr; -
trunk/Source/JavaScriptCore/bytecode/CodeBlock.h
r72442 r76248 243 243 #endif 244 244 245 class CodeBlock : public FastAllocBase { 245 class CodeBlock { 246 WTF_MAKE_FAST_ALLOCATED; 246 247 friend class JIT; 247 248 protected: … … 579 580 SymbolTable* m_symbolTable; 580 581 581 struct RareData : FastAllocBase { 582 struct RareData { 583 WTF_MAKE_FAST_ALLOCATED; 584 public: 582 585 Vector<HandlerInfo> m_exceptionHandlers; 583 586 … … 600 603 #endif 601 604 }; 605 #if PLATFORM(WIN) 606 friend void WTF::deleteOwnedPtr<RareData>(RareData*); 607 #endif 602 608 OwnPtr<RareData> m_rareData; 603 609 }; -
trunk/Source/JavaScriptCore/bytecode/Instruction.h
r64943 r76248 55 55 56 56 // Structure used by op_get_by_id_self_list and op_get_by_id_proto_list instruction to hold data off the main opcode stream. 57 struct PolymorphicAccessStructureList : FastAllocBase { 57 struct PolymorphicAccessStructureList { 58 WTF_MAKE_FAST_ALLOCATED; 59 public: 58 60 struct PolymorphicStubInfo { 59 61 bool isChain; -
trunk/Source/JavaScriptCore/bytecode/SamplingTool.h
r48905 r76248 143 143 144 144 #if ENABLE(OPCODE_SAMPLING) 145 class CallRecord : public Noncopyable { 145 class CallRecord { 146 WTF_MAKE_NONCOPYABLE(CallRecord); 146 147 public: 147 148 CallRecord(SamplingTool* samplingTool) … … 173 174 }; 174 175 #else 175 class CallRecord : public Noncopyable { 176 class CallRecord { 177 WTF_MAKE_NONCOPYABLE(CallRecord); 176 178 public: 177 179 CallRecord(SamplingTool*) -
trunk/Source/JavaScriptCore/bytecompiler/BytecodeGenerator.h
r75408 r76248 41 41 #include "Debugger.h" 42 42 #include "Nodes.h" 43 #include <wtf/FastAllocBase.h>44 43 #include <wtf/PassRefPtr.h> 45 44 #include <wtf/SegmentedVector.h> … … 86 85 }; 87 86 88 class BytecodeGenerator : public FastAllocBase { 87 class BytecodeGenerator { 88 WTF_MAKE_FAST_ALLOCATED; 89 89 public: 90 90 typedef DeclarationStacks::VarStack VarStack; -
trunk/Source/JavaScriptCore/bytecompiler/RegisterID.h
r45891 r76248 31 31 32 32 #include <wtf/Assertions.h> 33 #include <wtf/Noncopyable.h>34 33 #include <wtf/VectorTraits.h> 35 34 36 35 namespace JSC { 37 36 38 class RegisterID : public Noncopyable { 37 class RegisterID { 38 WTF_MAKE_NONCOPYABLE(RegisterID); 39 39 public: 40 40 RegisterID() -
trunk/Source/JavaScriptCore/interpreter/CachedCall.h
r70703 r76248 33 33 34 34 namespace JSC { 35 class CachedCall : public Noncopyable { 35 class CachedCall { 36 WTF_MAKE_NONCOPYABLE(CachedCall); WTF_MAKE_FAST_ALLOCATED; 36 37 public: 37 38 CachedCall(CallFrame* callFrame, JSFunction* function, int argCount) -
trunk/Source/JavaScriptCore/interpreter/Interpreter.h
r72360 r76248 31 31 32 32 #include "ArgList.h" 33 #include "FastAllocBase.h"34 33 #include "JSCell.h" 35 34 #include "JSValue.h" … … 66 65 enum { MaxLargeThreadReentryDepth = 256, MaxSmallThreadReentryDepth = 32 }; 67 66 68 class Interpreter : public FastAllocBase { 67 class Interpreter { 68 WTF_MAKE_FAST_ALLOCATED; 69 69 friend class JIT; 70 70 friend class CachedCall; -
trunk/Source/JavaScriptCore/interpreter/Register.h
r60392 r76248 32 32 #include "JSValue.h" 33 33 #include <wtf/Assertions.h> 34 #include <wtf/FastAllocBase.h>35 34 #include <wtf/VectorTraits.h> 36 35 … … 48 47 typedef ExecState CallFrame; 49 48 50 class Register : public WTF::FastAllocBase { 49 class Register { 50 WTF_MAKE_FAST_ALLOCATED; 51 51 public: 52 52 Register(); -
trunk/Source/JavaScriptCore/interpreter/RegisterFile.h
r76193 r76248 90 90 class JSGlobalObject; 91 91 92 class RegisterFile : public Noncopyable { 92 class RegisterFile { 93 WTF_MAKE_NONCOPYABLE(RegisterFile); 93 94 friend class JIT; 94 95 public: -
trunk/Source/JavaScriptCore/parser/Lexer.h
r76177 r76248 38 38 class RegExp; 39 39 40 class Lexer : public Noncopyable { 40 class Lexer { 41 WTF_MAKE_NONCOPYABLE(Lexer); WTF_MAKE_FAST_ALLOCATED; 41 42 public: 42 43 // Character manipulation functions. -
trunk/Source/JavaScriptCore/parser/Nodes.h
r75408 r76248 1377 1377 }; 1378 1378 1379 struct ScopeNodeData : FastAllocBase { 1379 struct ScopeNodeData { 1380 WTF_MAKE_FAST_ALLOCATED; 1381 public: 1380 1382 typedef DeclarationStacks::VarStack VarStack; 1381 1383 typedef DeclarationStacks::FunctionStack FunctionStack; … … 1473 1475 1474 1476 class FunctionParameters : public Vector<Identifier>, public RefCounted<FunctionParameters> { 1477 WTF_MAKE_FAST_ALLOCATED; 1475 1478 public: 1476 1479 static PassRefPtr<FunctionParameters> create(ParameterNode* firstParameter) { return adoptRef(new FunctionParameters(firstParameter)); } -
trunk/Source/JavaScriptCore/parser/Parser.h
r76129 r76248 46 46 template <typename T> struct ParserArenaData : ParserArenaDeletable { T data; }; 47 47 48 class Parser : public Noncopyable { 48 class Parser { 49 WTF_MAKE_NONCOPYABLE(Parser); WTF_MAKE_FAST_ALLOCATED; 49 50 public: 51 Parser() { } 50 52 template <class ParsedNode> 51 53 PassRefPtr<ParsedNode> parse(JSGlobalObject* lexicalGlobalObject, Debugger*, ExecState*, const SourceCode& source, FunctionParameters*, JSParserStrictness strictness, JSObject** exception); -
trunk/Source/JavaScriptCore/parser/ParserArena.h
r65177 r76248 35 35 class ParserArenaRefCounted; 36 36 37 class IdentifierArena : public FastAllocBase { 37 class IdentifierArena { 38 WTF_MAKE_FAST_ALLOCATED; 38 39 public: 39 40 ALWAYS_INLINE const Identifier& makeIdentifier(JSGlobalData*, const UChar* characters, size_t length); … … 60 61 } 61 62 62 class ParserArena : Noncopyable { 63 class ParserArena { 64 WTF_MAKE_NONCOPYABLE(ParserArena); 63 65 public: 64 66 ParserArena(); -
trunk/Source/JavaScriptCore/pcre/pcre_exec.cpp
r75247 r76248 113 113 }; 114 114 115 struct MatchFrame : FastAllocBase { 115 struct MatchFrame { 116 WTF_MAKE_FAST_ALLOCATED; 117 public: 116 118 ReturnLocation returnLocation; 117 119 struct MatchFrame* previousFrame; -
trunk/Source/JavaScriptCore/profiler/CallIdentifier.h
r72592 r76248 29 29 30 30 #include <runtime/UString.h> 31 #include "FastAllocBase.h"32 31 #include <wtf/text/CString.h> 33 32 #include <wtf/text/StringHash.h> … … 35 34 namespace JSC { 36 35 37 struct CallIdentifier : public FastAllocBase { 36 struct CallIdentifier { 37 WTF_MAKE_FAST_ALLOCATED; 38 public: 38 39 UString m_name; 39 40 UString m_url; -
trunk/Source/JavaScriptCore/profiler/Profiler.h
r72351 r76248 45 45 struct CallIdentifier; 46 46 47 class Profiler : public FastAllocBase { 47 class Profiler { 48 WTF_MAKE_FAST_ALLOCATED; 48 49 public: 49 50 static Profiler** enabledProfilerReference() -
trunk/Source/JavaScriptCore/runtime/ArgList.h
r60392 r76248 26 26 #include "Register.h" 27 27 #include <wtf/HashSet.h> 28 #include <wtf/Noncopyable.h>29 28 #include <wtf/Vector.h> 30 29 … … 33 32 class MarkStack; 34 33 35 class MarkedArgumentBuffer : public Noncopyable { 34 class MarkedArgumentBuffer { 35 WTF_MAKE_NONCOPYABLE(MarkedArgumentBuffer); 36 36 private: 37 37 static const unsigned inlineCapacity = 8; -
trunk/Source/JavaScriptCore/runtime/Arguments.h
r69516 r76248 34 34 namespace JSC { 35 35 36 struct ArgumentsData : Noncopyable { 36 struct ArgumentsData { 37 WTF_MAKE_NONCOPYABLE(ArgumentsData); WTF_MAKE_FAST_ALLOCATED; 38 public: 39 ArgumentsData() { } 37 40 JSActivation* activation; 38 41 -
trunk/Source/JavaScriptCore/runtime/BatchedTransitionOptimizer.h
r50704 r76248 28 28 #define BatchedTransitionOptimizer_h 29 29 30 #include <wtf/Noncopyable.h>31 30 #include "JSObject.h" 32 31 33 32 namespace JSC { 34 33 35 class BatchedTransitionOptimizer : public Noncopyable { 34 class BatchedTransitionOptimizer { 35 WTF_MAKE_NONCOPYABLE(BatchedTransitionOptimizer); 36 36 public: 37 37 BatchedTransitionOptimizer(JSObject* object) -
trunk/Source/JavaScriptCore/runtime/CommonIdentifiers.h
r69516 r76248 85 85 namespace JSC { 86 86 87 class CommonIdentifiers : public Noncopyable { 87 class CommonIdentifiers { 88 WTF_MAKE_NONCOPYABLE(CommonIdentifiers); WTF_MAKE_FAST_ALLOCATED; 88 89 private: 89 90 CommonIdentifiers(JSGlobalData*); -
trunk/Source/JavaScriptCore/runtime/Heap.h
r75855 r76248 46 46 enum OperationInProgress { NoOperation, Allocation, Collection }; 47 47 48 class Heap : public Noncopyable { 48 class Heap { 49 WTF_MAKE_NONCOPYABLE(Heap); 49 50 public: 50 51 void destroy(); -
trunk/Source/JavaScriptCore/runtime/JSGlobalObject.h
r74454 r76248 466 466 } 467 467 468 class DynamicGlobalObjectScope : public Noncopyable { 468 class DynamicGlobalObjectScope { 469 WTF_MAKE_NONCOPYABLE(DynamicGlobalObjectScope); 469 470 public: 470 471 DynamicGlobalObjectScope(CallFrame* callFrame, JSGlobalObject* dynamicGlobalObject); -
trunk/Source/JavaScriptCore/runtime/JSLock.h
r64585 r76248 54 54 enum JSLockBehavior { SilenceAssertionsOnly, LockForReal }; 55 55 56 class JSLock : public Noncopyable { 56 class JSLock { 57 WTF_MAKE_NONCOPYABLE(JSLock); 57 58 public: 58 59 JSLock(ExecState*); … … 90 91 JSLockBehavior m_lockBehavior; 91 92 92 class DropAllLocks : public Noncopyable { 93 class DropAllLocks { 94 WTF_MAKE_NONCOPYABLE(DropAllLocks); 93 95 public: 94 96 DropAllLocks(ExecState* exec); -
trunk/Source/JavaScriptCore/runtime/JSONObject.cpp
r74727 r76248 71 71 }; 72 72 73 class Stringifier : public Noncopyable { 73 class Stringifier { 74 WTF_MAKE_NONCOPYABLE(Stringifier); 74 75 public: 75 76 Stringifier(ExecState*, JSValue replacer, JSValue space); -
trunk/Source/JavaScriptCore/runtime/Lookup.h
r65104 r76248 54 54 typedef void (*PutFunction)(ExecState*, JSObject* baseObject, JSValue value); 55 55 56 class HashEntry : public FastAllocBase { 56 class HashEntry { 57 WTF_MAKE_FAST_ALLOCATED; 57 58 public: 58 59 void initialize(StringImpl* key, unsigned char attributes, intptr_t v1, intptr_t v2 -
trunk/Source/JavaScriptCore/runtime/MachineStackMarker.h
r75342 r76248 35 35 class MarkStack; 36 36 37 class MachineStackMarker : public Noncopyable { 37 class MachineStackMarker { 38 WTF_MAKE_NONCOPYABLE(MachineStackMarker); 38 39 public: 39 40 MachineStackMarker(Heap*); -
trunk/Source/JavaScriptCore/runtime/MarkStack.h
r74431 r76248 38 38 enum MarkSetProperties { MayContainNullValues, NoNullValues }; 39 39 40 class MarkStack : Noncopyable { 40 class MarkStack { 41 WTF_MAKE_NONCOPYABLE(MarkStack); 41 42 public: 42 43 MarkStack(void* jsArrayVPtr) -
trunk/Source/JavaScriptCore/runtime/MarkedSpace.h
r75855 r76248 64 64 }; 65 65 66 class MarkedSpace : public Noncopyable { 66 class MarkedSpace { 67 WTF_MAKE_NONCOPYABLE(MarkedSpace); 67 68 public: 68 69 MarkedSpace(JSGlobalData*); -
trunk/Source/JavaScriptCore/runtime/RegExpConstructor.h
r59941 r76248 32 32 struct RegExpConstructorPrivate; 33 33 34 struct RegExpConstructorPrivate : FastAllocBase { 34 struct RegExpConstructorPrivate { 35 WTF_MAKE_FAST_ALLOCATED; 36 public: 35 37 // Global search cache / settings 36 38 RegExpConstructorPrivate() -
trunk/Source/JavaScriptCore/runtime/RegExpObject.h
r76180 r76248 59 59 bool match(ExecState*); 60 60 61 struct RegExpObjectData : FastAllocBase { 61 struct RegExpObjectData { 62 WTF_MAKE_FAST_ALLOCATED; 63 public: 62 64 RegExpObjectData(NonNullPassRefPtr<RegExp> regExp, double lastIndex) 63 65 : regExp(regExp) … … 69 71 double lastIndex; 70 72 }; 71 73 #if PLATFORM(WIN) 74 friend void WTF::deleteOwnedPtr<RegExpObjectData>(RegExpObjectData*); 75 #endif 72 76 OwnPtr<RegExpObjectData> d; 73 77 }; -
trunk/Source/JavaScriptCore/runtime/ScopeChain.h
r48774 r76248 22 22 #define ScopeChain_h 23 23 24 #include "FastAllocBase.h"24 #include <wtf/FastAllocBase.h> 25 25 26 26 namespace JSC { … … 32 32 class ScopeChainIterator; 33 33 34 class ScopeChainNode : public FastAllocBase { 34 class ScopeChainNode { 35 WTF_MAKE_FAST_ALLOCATED; 35 36 public: 36 37 ScopeChainNode(ScopeChainNode* next, JSObject* object, JSGlobalData* globalData, JSGlobalObject* globalObject, JSObject* globalThis) -
trunk/Source/JavaScriptCore/runtime/SmallStrings.cpp
r65286 r76248 41 41 } 42 42 43 class SmallStringsStorage : public Noncopyable { 43 class SmallStringsStorage { 44 WTF_MAKE_NONCOPYABLE(SmallStringsStorage); WTF_MAKE_FAST_ALLOCATED; 44 45 public: 45 46 SmallStringsStorage(); -
trunk/Source/JavaScriptCore/runtime/SmallStrings.h
r65104 r76248 38 38 class SmallStringsStorage; 39 39 40 class SmallStrings : public Noncopyable { 40 class SmallStrings { 41 WTF_MAKE_NONCOPYABLE(SmallStrings); WTF_MAKE_FAST_ALLOCATED; 41 42 public: 42 43 SmallStrings(); -
trunk/Source/JavaScriptCore/runtime/SymbolTable.h
r65104 r76248 123 123 124 124 class SharedSymbolTable : public SymbolTable, public RefCounted<SharedSymbolTable> { 125 WTF_MAKE_FAST_ALLOCATED; 125 126 public: 126 127 static PassRefPtr<SharedSymbolTable> create() { return adoptRef(new SharedSymbolTable); } -
trunk/Source/JavaScriptCore/runtime/WeakGCMap.h
r75443 r76248 36 36 // A HashMap whose get() function returns emptyValue() for cells awaiting destruction. 37 37 template<typename KeyType, typename MappedType> 38 class WeakGCMap : public FastAllocBase { 38 class WeakGCMap { 39 WTF_MAKE_FAST_ALLOCATED; 39 40 /* 40 41 Invariants: -
trunk/Source/JavaScriptCore/runtime/WeakGCPtr.h
r75443 r76248 29 29 #include "Heap.h" 30 30 #include "GCHandle.h" 31 #include <wtf/Noncopyable.h>32 31 33 32 namespace JSC { 34 33 35 34 // A smart pointer whose get() function returns 0 for cells awaiting destruction. 36 template <typename T> class WeakGCPtr : Noncopyable { 35 template <typename T> class WeakGCPtr { 36 WTF_MAKE_NONCOPYABLE(WeakGCPtr); 37 37 public: 38 38 WeakGCPtr() -
trunk/Source/JavaScriptCore/wtf/CrossThreadRefCounted.h
r62696 r76248 52 52 // owned by the original instance and all copies. 53 53 template<class T> 54 class CrossThreadRefCounted : public Noncopyable { 54 class CrossThreadRefCounted { 55 WTF_MAKE_NONCOPYABLE(CrossThreadRefCounted); 55 56 public: 56 57 static PassRefPtr<CrossThreadRefCounted<T> > create(T* data) -
trunk/Source/JavaScriptCore/wtf/DateMath.h
r74424 r76248 45 45 46 46 #include <math.h> 47 #include <stdint.h> 47 48 #include <string.h> 48 49 #include <time.h> … … 121 122 // Intentionally overridding the default tm of the system. 122 123 // The members of tm differ on various operating systems. 123 struct GregorianDateTime : Noncopyable { 124 struct GregorianDateTime { 125 WTF_MAKE_NONCOPYABLE(GregorianDateTime); 126 public: 124 127 GregorianDateTime() 125 128 : second(0) -
trunk/Source/JavaScriptCore/wtf/Deque.h
r60683 r76248 45 45 46 46 template<typename T> 47 class Deque : public FastAllocBase { 47 class Deque { 48 WTF_MAKE_FAST_ALLOCATED; 48 49 public: 49 50 typedef DequeIterator<T> iterator; -
trunk/Source/JavaScriptCore/wtf/FastAllocBase.h
r69943 r76248 33 33 // 34 34 // Provided functionality: 35 // Macro: WTF_MAKE_FAST_ALLOCATED 35 36 // namespace WTF { 36 // class FastAllocBase;37 37 // 38 38 // T* fastNew<T>(); … … 49 49 // 50 50 // Example usage: 51 // class Widget : public FastAllocBase { ... }; 51 // class Widget { 52 // WTF_MAKE_FAST_ALLOCATED 53 // ... 54 // }; 55 // 56 // struct Data { 57 // WTF_MAKE_FAST_ALLOCATED 58 // public: 59 // ... 60 // }; 52 61 // 53 62 // char* charPtr = fastNew<char>(); … … 83 92 #include "FastMalloc.h" 84 93 #include "TypeTraits.h" 85 86 namespace WTF {87 94 88 95 #define WTF_MAKE_FAST_ALLOCATED \ … … 116 123 ::WTF::fastFree(p); \ 117 124 } \ 118 private: 119 120 class FastAllocBase { 121 WTF_MAKE_FAST_ALLOCATED 122 }; 125 private: \ 126 typedef int ThisIsHereToForceASemicolonAfterThisMacro 127 128 namespace WTF { 123 129 124 130 // fastNew / fastDelete … … 411 417 } // namespace WTF 412 418 413 using WTF::FastAllocBase;414 419 using WTF::fastDeleteSkippingDestructor; 415 420 -
trunk/Source/JavaScriptCore/wtf/HashCountedSet.h
r56435 r76248 23 23 24 24 #include "Assertions.h" 25 #include "FastAllocBase.h"26 25 #include "HashMap.h" 27 26 #include "Vector.h" … … 30 29 31 30 template<typename Value, typename HashFunctions = typename DefaultHash<Value>::Hash, 32 typename Traits = HashTraits<Value> > class HashCountedSet : public FastAllocBase { 31 typename Traits = HashTraits<Value> > class HashCountedSet { 32 WTF_MAKE_FAST_ALLOCATED; 33 33 private: 34 34 typedef HashMap<Value, unsigned, HashFunctions, Traits> ImplType; -
trunk/Source/JavaScriptCore/wtf/HashMap.h
r55068 r76248 30 30 template<typename KeyArg, typename MappedArg, typename HashArg = typename DefaultHash<KeyArg>::Hash, 31 31 typename KeyTraitsArg = HashTraits<KeyArg>, typename MappedTraitsArg = HashTraits<MappedArg> > 32 class HashMap : public FastAllocBase { 32 class HashMap { 33 WTF_MAKE_FAST_ALLOCATED; 33 34 private: 34 35 typedef KeyTraitsArg KeyTraits; -
trunk/Source/JavaScriptCore/wtf/HashSet.h
r62138 r76248 36 36 37 37 template<typename ValueArg, typename HashArg = typename DefaultHash<ValueArg>::Hash, 38 typename TraitsArg = HashTraits<ValueArg> > class HashSet : public FastAllocBase { 38 typename TraitsArg = HashTraits<ValueArg> > class HashSet { 39 WTF_MAKE_FAST_ALLOCATED; 39 40 private: 40 41 typedef HashArg HashFunctions; -
trunk/Source/JavaScriptCore/wtf/ListHashSet.h
r65995 r76248 53 53 template<typename ValueArg, size_t inlineCapacity, typename HashArg> struct ListHashSetNodeHashFunctions; 54 54 55 template<typename ValueArg, size_t inlineCapacity = 256, typename HashArg = typename DefaultHash<ValueArg>::Hash> class ListHashSet : public FastAllocBase { 55 template<typename ValueArg, size_t inlineCapacity = 256, typename HashArg = typename DefaultHash<ValueArg>::Hash> class ListHashSet { 56 WTF_MAKE_FAST_ALLOCATED; 56 57 private: 57 58 typedef ListHashSetNode<ValueArg, inlineCapacity> Node; -
trunk/Source/JavaScriptCore/wtf/Locker.h
r45891 r76248 33 33 namespace WTF { 34 34 35 template <typename T> class Locker : public Noncopyable { 35 template <typename T> class Locker { 36 WTF_MAKE_NONCOPYABLE(Locker); 36 37 public: 37 38 Locker(T& lockable) : m_lockable(lockable) { m_lockable.lock(); } -
trunk/Source/JavaScriptCore/wtf/MessageQueue.h
r62551 r76248 49 49 // Essentially, MessageQueue acts as a queue of OwnPtr<DataType>. 50 50 template<typename DataType> 51 class MessageQueue : public Noncopyable { 51 class MessageQueue { 52 WTF_MAKE_NONCOPYABLE(MessageQueue); 52 53 public: 53 54 MessageQueue() : m_killed(false) { } -
trunk/Source/JavaScriptCore/wtf/Noncopyable.h
r69970 r76248 42 42 #endif 43 43 44 // We don't want argument-dependent lookup to pull in everything from the WTF45 // namespace when you use Noncopyable, so put it in its own namespace.46 47 #include "FastAllocBase.h"48 49 namespace WTFNoncopyable {50 51 class Noncopyable : public FastAllocBase {52 Noncopyable(const Noncopyable&);53 Noncopyable& operator=(const Noncopyable&);54 protected:55 Noncopyable() { }56 ~Noncopyable() { }57 };58 59 } // namespace WTFNoncopyable60 61 using WTFNoncopyable::Noncopyable;62 63 44 #endif // WTF_Noncopyable_h -
trunk/Source/JavaScriptCore/wtf/OwnArrayPtr.h
r69970 r76248 36 36 template<typename T> PassOwnArrayPtr<T> adoptArrayPtr(T*); 37 37 38 template <typename T> class OwnArrayPtr : public Noncopyable{38 template <typename T> class OwnArrayPtr { 39 39 public: 40 40 typedef T* PtrType; -
trunk/Source/JavaScriptCore/wtf/OwnFastMallocPtr.h
r55069 r76248 24 24 25 25 #include "FastMalloc.h" 26 #include "Noncopyable.h"27 26 28 27 namespace WTF { 29 28 30 template<class T> class OwnFastMallocPtr : public Noncopyable { 29 template<class T> class OwnFastMallocPtr { 30 WTF_MAKE_NONCOPYABLE(OwnFastMallocPtr); 31 31 public: 32 32 explicit OwnFastMallocPtr(T* ptr) : m_ptr(ptr) -
trunk/Source/JavaScriptCore/wtf/OwnPtr.h
r69970 r76248 23 23 24 24 #include "Assertions.h" 25 #include "Noncopyable.h"26 25 #include "NullPtr.h" 27 26 #include "OwnPtrCommon.h" … … 40 39 template<typename T> PassOwnPtr<T> adoptPtr(T*); 41 40 42 template<typename T> class OwnPtr : public Noncopyable{41 template<typename T> class OwnPtr { 43 42 public: 44 43 typedef typename RemovePointer<T>::Type ValueType; -
trunk/Source/JavaScriptCore/wtf/RefCounted.h
r68414 r76248 23 23 24 24 #include "Assertions.h" 25 #include "FastAllocBase.h" 25 26 #include "Noncopyable.h" 26 27 … … 132 133 #endif 133 134 134 template<typename T> class RefCounted : public RefCountedBase, public Noncopyable { 135 template<typename T> class RefCounted : public RefCountedBase { 136 WTF_MAKE_NONCOPYABLE(RefCounted); WTF_MAKE_FAST_ALLOCATED; 135 137 public: 136 138 void deref() … … 141 143 142 144 protected: 145 RefCounted() { } 143 146 ~RefCounted() 144 147 { -
trunk/Source/JavaScriptCore/wtf/RefPtr.h
r74695 r76248 37 37 enum HashTableDeletedValueType { HashTableDeletedValue }; 38 38 39 template<typename T> class RefPtr : public FastAllocBase { 39 template<typename T> class RefPtr { 40 WTF_MAKE_FAST_ALLOCATED; 40 41 public: 41 42 ALWAYS_INLINE RefPtr() : m_ptr(0) { } -
trunk/Source/JavaScriptCore/wtf/RefPtrHashMap.h
r75971 r76248 46 46 47 47 template<typename T, typename MappedArg, typename HashArg, typename KeyTraitsArg, typename MappedTraitsArg> 48 class HashMap<RefPtr<T>, MappedArg, HashArg, KeyTraitsArg, MappedTraitsArg> : public FastAllocBase { 48 class HashMap<RefPtr<T>, MappedArg, HashArg, KeyTraitsArg, MappedTraitsArg> { 49 WTF_MAKE_FAST_ALLOCATED; 49 50 private: 50 51 typedef KeyTraitsArg KeyTraits; -
trunk/Source/JavaScriptCore/wtf/ThreadIdentifierDataPthreads.h
r53714 r76248 32 32 #define ThreadIdentifierDataPthreads_h 33 33 34 #include <wtf/Noncopyable.h>35 34 #include <wtf/Threading.h> 36 35 … … 39 38 // Holds ThreadIdentifier in the thread-specific storage and employs pthreads-specific 2-pass destruction to reliably remove 40 39 // ThreadIdentifier from threadMap. It assumes regular ThreadSpecific types don't use multiple-pass destruction. 41 class ThreadIdentifierData : public Noncopyable { 40 class ThreadIdentifierData { 41 WTF_MAKE_NONCOPYABLE(ThreadIdentifierData); 42 42 public: 43 43 ~ThreadIdentifierData(); -
trunk/Source/JavaScriptCore/wtf/ThreadSafeShared.h
r61293 r76248 63 63 64 64 #include <wtf/Atomics.h> 65 #include <wtf/Noncopyable.h>66 65 #include <wtf/ThreadingPrimitives.h> 67 66 68 67 namespace WTF { 69 68 70 class ThreadSafeSharedBase : public Noncopyable { 69 class ThreadSafeSharedBase { 70 WTF_MAKE_NONCOPYABLE(ThreadSafeSharedBase); WTF_MAKE_FAST_ALLOCATED; 71 71 public: 72 72 ThreadSafeSharedBase(int initialRefCount = 1) -
trunk/Source/JavaScriptCore/wtf/ThreadSpecific.h
r66665 r76248 62 62 #endif 63 63 64 template<typename T> class ThreadSpecific : public Noncopyable { 64 template<typename T> class ThreadSpecific { 65 WTF_MAKE_NONCOPYABLE(ThreadSpecific); 65 66 public: 66 67 ThreadSpecific(); … … 85 86 86 87 #if USE(PTHREADS) || PLATFORM(QT) || PLATFORM(GTK) || OS(WINDOWS) 87 struct Data : Noncopyable { 88 struct Data { 89 WTF_MAKE_NONCOPYABLE(Data); 90 public: 88 91 Data(T* value, ThreadSpecific<T>* owner) : value(value), owner(owner) {} 89 92 #if PLATFORM(QT) -
trunk/Source/JavaScriptCore/wtf/ThreadSpecificWin.cpp
r41594 r76248 22 22 23 23 #include "ThreadSpecific.h" 24 #include <wtf/Noncopyable.h>25 24 26 25 #if USE(PTHREADS) -
trunk/Source/JavaScriptCore/wtf/Threading.cpp
r53714 r76248 31 31 namespace WTF { 32 32 33 struct NewThreadContext : FastAllocBase { 33 struct NewThreadContext { 34 WTF_MAKE_FAST_ALLOCATED; 35 public: 34 36 NewThreadContext(ThreadFunction entryPoint, void* data, const char* name) 35 37 : entryPoint(entryPoint) -
trunk/Source/JavaScriptCore/wtf/ThreadingPrimitives.h
r66531 r76248 35 35 36 36 #include <wtf/Assertions.h> 37 #include <wtf/FastAllocBase.h> 37 38 #include <wtf/Locker.h> 38 39 #include <wtf/Noncopyable.h> … … 97 98 #endif 98 99 99 class Mutex : public Noncopyable { 100 class Mutex { 101 WTF_MAKE_NONCOPYABLE(Mutex); WTF_MAKE_FAST_ALLOCATED; 100 102 public: 101 103 Mutex(); … … 114 116 typedef Locker<Mutex> MutexLocker; 115 117 116 class ReadWriteLock : public Noncopyable { 118 class ReadWriteLock { 119 WTF_MAKE_NONCOPYABLE(ReadWriteLock); 117 120 public: 118 121 ReadWriteLock(); … … 131 134 }; 132 135 133 class ThreadCondition : public Noncopyable { 136 class ThreadCondition { 137 WTF_MAKE_NONCOPYABLE(ThreadCondition); 134 138 public: 135 139 ThreadCondition(); -
trunk/Source/JavaScriptCore/wtf/Vector.h
r65311 r76248 278 278 279 279 template<typename T> 280 class VectorBufferBase : public Noncopyable { 280 class VectorBufferBase { 281 WTF_MAKE_NONCOPYABLE(VectorBufferBase); 281 282 public: 282 283 void allocateBuffer(size_t newCapacity) … … 489 490 490 491 template<typename T, size_t inlineCapacity = 0> 491 class Vector : public FastAllocBase { 492 class Vector { 493 WTF_MAKE_FAST_ALLOCATED; 492 494 private: 493 495 typedef VectorBuffer<T, inlineCapacity> Buffer; -
trunk/Source/JavaScriptCore/wtf/WTFThreadData.h
r75011 r76248 53 53 typedef HashMap<const char*, RefPtr<StringImpl>, PtrHash<const char*> > LiteralIdentifierTable; 54 54 55 class IdentifierTable : public FastAllocBase { 55 class IdentifierTable { 56 WTF_MAKE_FAST_ALLOCATED; 56 57 public: 57 58 ~IdentifierTable(); … … 86 87 typedef void (*AtomicStringTableDestructor)(AtomicStringTable*); 87 88 88 class WTFThreadData : public Noncopyable { 89 class WTFThreadData { 90 WTF_MAKE_NONCOPYABLE(WTFThreadData); 89 91 public: 90 92 WTFThreadData(); -
trunk/Source/JavaScriptCore/wtf/dtoa.cpp
r70198 r76248 415 415 } 416 416 417 struct P5Node : Noncopyable { 417 struct P5Node { 418 WTF_MAKE_NONCOPYABLE(P5Node); WTF_MAKE_FAST_ALLOCATED; 419 public: 420 P5Node() { } 418 421 BigInt val; 419 422 P5Node* next; -
trunk/Source/JavaScriptCore/wtf/gobject/GOwnPtr.h
r68516 r76248 42 42 template<> void freeOwnedGPtr<GFile>(GFile*); 43 43 44 template <typename T> class GOwnPtr : public Noncopyable { 44 template <typename T> class GOwnPtr { 45 WTF_MAKE_NONCOPYABLE(GOwnPtr); 45 46 public: 46 47 explicit GOwnPtr(T* ptr = 0) : m_ptr(ptr) { } -
trunk/Source/JavaScriptCore/wtf/text/StringBuffer.h
r68812 r76248 31 31 32 32 #include <wtf/Assertions.h> 33 #include <wtf/Noncopyable.h>34 33 #include <wtf/unicode/Unicode.h> 35 34 #include <limits> … … 37 36 namespace WTF { 38 37 39 class StringBuffer : public Noncopyable { 38 class StringBuffer { 39 WTF_MAKE_NONCOPYABLE(StringBuffer); 40 40 public: 41 41 explicit StringBuffer(unsigned length) -
trunk/Source/JavaScriptCore/wtf/text/StringImplBase.h
r58851 r76248 27 27 #define StringImplBase_h 28 28 29 #include <wtf/Noncopyable.h>30 29 #include <wtf/unicode/Unicode.h> 31 30 32 31 namespace WTF { 33 32 34 class StringImplBase : public Noncopyable { 33 class StringImplBase { 34 WTF_MAKE_NONCOPYABLE(StringImplBase); WTF_MAKE_FAST_ALLOCATED; 35 35 public: 36 36 bool isStringImpl() { return (m_refCountAndFlags & s_refCountInvalidForStringImpl) != s_refCountInvalidForStringImpl; } … … 45 45 BufferShared, 46 46 }; 47 48 using Noncopyable::operator new;49 void* operator new(size_t, void* inPlace) { ASSERT(inPlace); return inPlace; }50 47 51 48 // For SmallStringStorage, which allocates an array and uses an in-place new. -
trunk/Source/JavaScriptCore/wtf/unicode/Collator.h
r55120 r76248 30 30 #define WTF_Collator_h 31 31 32 #include <wtf/FastAllocBase.h> 32 33 #include <wtf/Noncopyable.h> 33 34 #include <wtf/PassOwnPtr.h> … … 40 41 namespace WTF { 41 42 42 class Collator : public Noncopyable { 43 class Collator { 44 WTF_MAKE_NONCOPYABLE(Collator); WTF_MAKE_FAST_ALLOCATED; 43 45 public: 44 46 enum Result { Equal = 0, Greater = 1, Less = -1 }; -
trunk/Source/JavaScriptCore/yarr/YarrInterpreter.h
r75602 r76248 300 300 }; 301 301 302 class ByteDisjunction : public FastAllocBase { 302 class ByteDisjunction { 303 WTF_MAKE_FAST_ALLOCATED; 303 304 public: 304 305 ByteDisjunction(unsigned numSubpatterns, unsigned frameSize) … … 313 314 }; 314 315 315 struct BytecodePattern : FastAllocBase { 316 struct BytecodePattern { 317 WTF_MAKE_FAST_ALLOCATED; 318 public: 316 319 BytecodePattern(PassOwnPtr<ByteDisjunction> body, Vector<ByteDisjunction*> allParenthesesInfo, YarrPattern& pattern, BumpPointerAllocator* allocator) 317 320 : m_body(body) -
trunk/Source/JavaScriptCore/yarr/YarrPattern.h
r75602 r76248 64 64 }; 65 65 66 struct CharacterClass : FastAllocBase { 66 struct CharacterClass { 67 WTF_MAKE_FAST_ALLOCATED; 68 public: 67 69 // All CharacterClass instances have to have the full set of matches and ranges, 68 70 // they may have an optional table for faster lookups (which must match the … … 205 207 }; 206 208 207 struct PatternAlternative : FastAllocBase { 209 struct PatternAlternative { 210 WTF_MAKE_FAST_ALLOCATED; 211 public: 208 212 PatternAlternative(PatternDisjunction* disjunction) 209 213 : m_parent(disjunction) … … 246 250 }; 247 251 248 struct PatternDisjunction : FastAllocBase { 252 struct PatternDisjunction { 253 WTF_MAKE_FAST_ALLOCATED; 254 public: 249 255 PatternDisjunction(PatternAlternative* parent = 0) 250 256 : m_parent(parent)
Note:
See TracChangeset
for help on using the changeset viewer.