Changeset 59161 in webkit for trunk/JavaScriptCore/runtime/RopeImpl.h
- Timestamp:
- May 11, 2010, 11:42:46 AM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/JavaScriptCore/runtime/RopeImpl.h
r57932 r59161 47 47 } 48 48 49 void initializeFiber(unsigned &index, Fiber fiber)50 {51 m_fibers[index++] = fiber;52 fiber->ref();53 m_length += fiber->length();54 }55 56 unsigned fiberCount() { return m_fiberCount; }57 Fiber& fibers(unsigned index) { return m_fibers[index]; }58 59 ALWAYS_INLINE void deref() { m_refCountAndFlags -= s_refCountIncrement; if (!(m_refCountAndFlags & s_refCountMask)) destructNonRecursive(); }60 61 49 static bool isRope(Fiber fiber) 62 50 { … … 72 60 } 73 61 62 void initializeFiber(unsigned &index, Fiber fiber) 63 { 64 m_fibers[index++] = fiber; 65 fiber->ref(); 66 m_length += fiber->length(); 67 } 68 69 unsigned fiberCount() { return m_size; } 70 Fiber* fibers() { return m_fibers; } 71 72 ALWAYS_INLINE void deref() 73 { 74 m_refCountAndFlags -= s_refCountIncrement; 75 if (!(m_refCountAndFlags & s_refCountMask)) 76 destructNonRecursive(); 77 } 78 74 79 private: 75 RopeImpl(unsigned fiberCount) : StringImplBase(ConstructNonStringImpl), m_fiberCount(fiberCount) {} 80 RopeImpl(unsigned fiberCount) 81 : StringImplBase(ConstructNonStringImpl) 82 , m_size(fiberCount) 83 { 84 } 76 85 77 86 void destructNonRecursive(); … … 80 89 bool hasOneRef() { return (m_refCountAndFlags & s_refCountMask) == s_refCountIncrement; } 81 90 82 unsigned m_ fiberCount;91 unsigned m_size; 83 92 Fiber m_fibers[1]; 84 93 };
Note:
See TracChangeset
for help on using the changeset viewer.