Public Member Functions | Static Public Member Functions | Public Attributes | Static Public Attributes | Friends

JSString Struct Reference

#include <jsstr.h>

Collaboration diagram for JSString:

List of all members.

Public Member Functions

bool hasFlag (size_t flag) const
bool isDependent () const
bool isFlat () const
bool isDeflated () const
void setDeflated ()
bool isMutable () const
bool isAtomized () const
jscharchars ()
size_t length () const
bool empty () const
void getCharsAndLength (const jschar *&chars, size_t &length)
void getCharsAndEnd (const jschar *&chars, const jschar *&end)
void initFlat (jschar *chars, size_t length)
jscharflatChars () const
size_t flatLength () const
void reinitFlat (jschar *chars, size_t length)
void flatSetAtomized ()
void flatSetMutable ()
void flatClearMutable ()
void initDependent (JSString *bstr, size_t off, size_t len)
void reinitDependent (JSString *bstr, size_t off, size_t len)
JSStringdependentBase () const
jschardependentChars ()
size_t dependentStart () const
size_t dependentLength () const

Static Public Member Functions

static bool isUnitString (void *ptr)
static bool isIntString (void *ptr)
static bool isStatic (void *ptr)
static JSStringunitString (jschar c)
static JSStringgetUnitString (JSContext *cx, JSString *str, size_t index)
static JSStringintString (jsint i)

Public Attributes

size_t mLength
size_t mOffset
jsword mFlags
union {
   jschar *   mChars
   JSString *   mBase
}; 

Static Public Attributes

static const size_t DEPENDENT = ((size_t)1 << ( 1 ))
static const size_t MUTABLE = ((size_t)1 << ( 2 ))
static const size_t ATOMIZED = ((size_t)1 << ( 3 ))
static const size_t DEFLATED = ((size_t)1 << ( 4 ))
static const size_t MAX_LENGTH = (1 << 28) - 1
static JSString unitStringTable []
static JSString intStringTable []
static const char * deflatedIntStringTable []

Friends

class TraceRecorder
JSAtomjs_AtomizeString (JSContext *cx, JSString *str, uintN flags)
JSStringjs_ConcatStrings (JSContext *cx, JSString *left, JSString *right)

Member Function Documentation

jschar* JSString::chars (  )  [inline]
JSString* JSString::dependentBase (  )  const [inline]
jschar* JSString::dependentChars (  )  [inline]
size_t JSString::dependentLength (  )  const [inline]
size_t JSString::dependentStart (  )  const [inline]
bool JSString::empty (  )  const [inline]
jschar* JSString::flatChars (  )  const [inline]
void JSString::flatClearMutable (  )  [inline]
size_t JSString::flatLength (  )  const [inline]
void JSString::flatSetAtomized (  )  [inline]
void JSString::flatSetMutable (  )  [inline]
void JSString::getCharsAndEnd ( const jschar *&  chars,
const jschar *&  end 
) [inline]
void JSString::getCharsAndLength ( const jschar *&  chars,
size_t &  length 
) [inline]
static JSString* JSString::getUnitString ( JSContext cx,
JSString str,
size_t  index 
) [static]
bool JSString::hasFlag ( size_t  flag  )  const [inline]
void JSString::initDependent ( JSString bstr,
size_t  off,
size_t  len 
) [inline]
void JSString::initFlat ( jschar chars,
size_t  length 
) [inline]
static JSString* JSString::intString ( jsint  i  )  [static]
bool JSString::isAtomized (  )  const [inline]
bool JSString::isDeflated (  )  const [inline]
bool JSString::isDependent (  )  const [inline]
bool JSString::isFlat (  )  const [inline]
static bool JSString::isIntString ( void *  ptr  )  [inline, static]
bool JSString::isMutable (  )  const [inline]
static bool JSString::isStatic ( void *  ptr  )  [inline, static]
static bool JSString::isUnitString ( void *  ptr  )  [inline, static]
size_t JSString::length (  )  const [inline]
void JSString::reinitDependent ( JSString bstr,
size_t  off,
size_t  len 
) [inline]
void JSString::reinitFlat ( jschar chars,
size_t  length 
) [inline]
void JSString::setDeflated (  )  [inline]
static JSString* JSString::unitString ( jschar  c  )  [static]

Friends And Related Function Documentation

JSAtom* js_AtomizeString ( JSContext cx,
JSString str,
uintN  flags 
) [friend]
JSString* js_ConcatStrings ( JSContext cx,
JSString left,
JSString right 
) [friend]
friend class TraceRecorder [friend]

Member Data Documentation

union { ... }
const size_t JSString::ATOMIZED = ((size_t)1 << ( 3 )) [static]
const size_t JSString::DEFLATED = ((size_t)1 << ( 4 )) [static]
const char* JSString::deflatedIntStringTable[] [static]
const size_t JSString::DEPENDENT = ((size_t)1 << ( 1 )) [static]
const size_t JSString::MAX_LENGTH = (1 << 28) - 1 [static]
const size_t JSString::MUTABLE = ((size_t)1 << ( 2 )) [static]

The documentation for this struct was generated from the following file: