Changeset 43259 in webkit for trunk/JavaScriptCore/parser/Nodes.h
- Timestamp:
- May 5, 2009, 4:09:52 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/JavaScriptCore/parser/Nodes.h
r43230 r43259 29 29 #include "Error.h" 30 30 #include "JITCode.h" 31 #include "Lexer.h" 31 32 #include "Opcode.h" 32 33 #include "ResultType.h" … … 35 36 #include <wtf/MathExtras.h> 36 37 #include <wtf/OwnPtr.h> 37 #include <wtf/Vector.h>38 38 39 39 #if PLATFORM(X86) && COMPILER(GCC) … … 103 103 }; 104 104 105 class ParserRefCounted : Noncopyable{105 class ParserRefCounted : public RefCounted<ParserRefCounted> { 106 106 protected: 107 107 ParserRefCounted(JSGlobalData*) JSC_FAST_CALL; … … 112 112 // Nonrecursive destruction. 113 113 virtual void releaseNodes(NodeReleaser&); 114 115 void ref() JSC_FAST_CALL; 116 void deref() JSC_FAST_CALL; 117 bool hasOneRef() JSC_FAST_CALL; 118 119 static void deleteNewObjects(JSGlobalData*) JSC_FAST_CALL; 120 121 private: 122 JSGlobalData* m_globalData; 123 }; 114 }; 115 116 #ifdef NDEBUG 117 inline ParserRefCounted::ParserRefCounted(JSGlobalData* globalData) 118 { 119 globalData->parserObjects.append(adoptRef(this)); 120 } 121 122 inline ParserRefCounted::~ParserRefCounted() 123 { 124 } 125 #endif 124 126 125 127 class Node : public ParserRefCounted { 126 128 public: 127 Node(JSGlobalData*) JSC_FAST_CALL; 129 Node(JSGlobalData* globalData) JSC_FAST_CALL 130 : ParserRefCounted(globalData) 131 , m_line(globalData->lexer->lineNumber()) 132 { 133 } 128 134 129 135 /*
Note:
See TracChangeset
for help on using the changeset viewer.