Lines Matching full:rope
70 // A Rope is a string composed of a set of substrings.
71 class Rope : public RefCounted<Rope> {
73 // A Rope is composed from a set of smaller strings called Fibers.
74 // Each Fiber in a rope is either UString::Rep or another Rope.
79 Fiber(Rope* rope) : m_value(reinterpret_cast<intptr_t>(rope) | 1) {}
86 rope()->deref();
96 rope()->ref();
106 Rope* r = rope();
113 Rope* rope() { return reinterpret_cast<Rope*>(m_value & ~1); }
122 // Creates a Rope comprising of 'ropeLength' Fibers.
123 // The Rope is constructed in an uninitialized state - initialize must be called for each Fiber in the Rope.
124 static PassRefPtr<Rope> createOrNull(unsigned ropeLength)
127 if (tryFastMalloc(sizeof(Rope) + (ropeLength - 1) * sizeof(Fiber)).getValue(allocation))
128 return adoptRef(new (allocation) Rope(ropeLength));
132 ~Rope();
160 Rope(unsigned ropeLength) : m_ropeLength(ropeLength), m_stringLength(0) {}
192 JSString(JSGlobalData* globalData, PassRefPtr<JSString::Rope> rope)
194 , m_stringLength(rope->stringLength())
197 m_fibers[0] = rope.releaseRef();
286 // If this is a rope, m_value should be null -
287 // if this is not a rope, m_value should be non-null.
314 m_fibers[index++] = Rope::Fiber(string.rep()->ref());
336 m_fibers[index++] = Rope::Fiber(u.rep()->ref());
359 // A string is represented either by a UString or a Rope.
363 mutable Rope::Fiber m_fibers[s_maxInternalRopeLength];