KJS::List Class Reference
Native list type. More...
#include <list.h>
Collaboration diagram for KJS::List:

Public Member Functions | |
List () | |
List (bool needsMarking) | |
~List () | |
List (const List &b) | |
List & | operator= (const List &) |
void | append (const Value &val) |
void | append (ValueImp *val) |
void | clear () |
List | copy () const |
List | copyTail () const |
bool | isEmpty () const |
int | size () const |
ListIterator | begin () const |
ListIterator | end () const |
Value | at (int i) const |
Value | operator[] (int i) const |
ValueImp * | impAt (int i) const |
void | mark () |
Static Public Member Functions | |
static const List & | empty () |
Detailed Description
Native list type.List is a native ECMAScript type. List values are only used for intermediate results of expression evaluation and cannot be stored as properties of objects.
The list is explicitly shared. Note that while copyTail() returns a copy of the list the referenced objects are still shared.
Definition at line 48 of file list.h.
Member Function Documentation
|
Append an object to the end of the list.
Definition at line 66 of file list.h. References KJS::Value::imp(). Referenced by KJS::RegExpObjectImp::arrayOfMatches(), KJS::StringProtoFuncImp::call(), KJS::ObjectObjectImp::call(), KJS::FunctionProtoFuncImp::call(), KJS::ArrayProtoFuncImp::call(), copy(), copyTail(), KJS::Error::create(), KJS::RegExpNode::evaluate(), KJS::ArgumentListNode::evaluateList(), KJS::NumberImp::toObject(), KJS::StringImp::toObject(), and KJS::BooleanImp::toObject(). |
|
Remove all elements from the list.
Definition at line 238 of file list.cpp. References KJS::ListImpBase::size, and KJS::ListImpBase::valueRefCount. |
|
Make a copy of the list.
Definition at line 281 of file list.cpp. References append(), and KJS::inlineValuesSize. Referenced by KJS::ActivationImp::ActivationImp(), and copyTail(). |
|
Make a copy of the list, omitting the first element.
Definition at line 302 of file list.cpp. References append(), copy(), and KJS::inlineValuesSize. Referenced by KJS::FunctionProtoFuncImp::call(). |
|
Definition at line 86 of file list.h. Referenced by KJS::ArgumentsImp::ArgumentsImp(), KJS::StringObjectImp::call(), KJS::ObjectObjectImp::call(), KJS::NumberObjectImp::call(), KJS::NumberProtoFuncImp::call(), KJS::BooleanObjectImp::call(), KJS::RegExpObjectImp::construct(), KJS::ObjectObjectImp::construct(), KJS::NumberObjectImp::construct(), and KJS::ErrorObjectImp::construct(). |
|
Definition at line 90 of file list.h. Referenced by KJS::ArgumentsImp::ArgumentsImp(), KJS::StringObjectFuncImp::call(), KJS::NumberProtoFuncImp::call(), KJS::MathFuncImp::call(), KJS::GlobalFuncImp::call(), KJS::DateObjectFuncImp::call(), KJS::ArrayProtoFuncImp::call(), KJS::StringObjectImp::construct(), KJS::RegExpObjectImp::construct(), KJS::FunctionObjectImp::construct(), KJS::DateObjectImp::construct(), KJS::BooleanObjectImp::construct(), KJS::ArrayObjectImp::construct(), and end(). |
|
Definition at line 186 of file list.h. Referenced by KJS::ArgumentsImp::ArgumentsImp(), KJS::ArrayInstanceImp::ArrayInstanceImp(), KJS::StringObjectFuncImp::call(), KJS::StringProtoFuncImp::call(), KJS::ArrayProtoFuncImp::call(), KJS::StringObjectImp::construct(), KJS::ObjectObjectImp::construct(), and KJS::BooleanObjectImp::construct(). |
|
Definition at line 187 of file list.h. References size(). Referenced by KJS::ArgumentsImp::ArgumentsImp(), KJS::StringObjectFuncImp::call(), KJS::StringProtoFuncImp::call(), and KJS::ArrayProtoFuncImp::call(). |
|
Retrieve an element at an indexed position. If you want to iterate trough the whole list using KJS::ListIterator will be faster.
|
|
Equivalent to at.
|
|
Returns a pointer to a static instance of an empty list. Useful if a function has a KJS::List parameter. Definition at line 322 of file list.cpp. Referenced by KJS::StringProtoFuncImp::call(), KJS::ArrayProtoFuncImp::call(), KJS::FunctionObjectImp::construct(), KJS::ObjectImp::defaultValue(), KJS::PropertyValueNode::evaluate(), KJS::ObjectLiteralNode::evaluate(), KJS::ArrayNode::evaluate(), and KJS::ElementNode::evaluate(). |
The documentation for this class was generated from the following files: