summaryrefslogtreecommitdiff
path: root/Source/JavaScriptCore/runtime/RegExpMatchesArray.h
diff options
context:
space:
mode:
authorSimon Hausmann <simon.hausmann@nokia.com>2012-02-03 09:55:33 +0100
committerSimon Hausmann <simon.hausmann@nokia.com>2012-02-03 09:55:33 +0100
commitcd44dc59cdfc39534aef4d417e9f3c412e3be139 (patch)
tree8d89889ba95ed6ec9322e733846cc9cce9d7dff1 /Source/JavaScriptCore/runtime/RegExpMatchesArray.h
parentd11f84f5b5cdc0d92a08af01b13472fdd5f9acb9 (diff)
downloadqtwebkit-cd44dc59cdfc39534aef4d417e9f3c412e3be139.tar.gz
Imported WebKit commit fce473cb4d55aa9fe9d0b0322a2fffecb731b961 (http://svn.webkit.org/repository/webkit/trunk@106560)
Diffstat (limited to 'Source/JavaScriptCore/runtime/RegExpMatchesArray.h')
-rw-r--r--Source/JavaScriptCore/runtime/RegExpMatchesArray.h30
1 files changed, 16 insertions, 14 deletions
diff --git a/Source/JavaScriptCore/runtime/RegExpMatchesArray.h b/Source/JavaScriptCore/runtime/RegExpMatchesArray.h
index a0a8a8e98..c34920d8d 100644
--- a/Source/JavaScriptCore/runtime/RegExpMatchesArray.h
+++ b/Source/JavaScriptCore/runtime/RegExpMatchesArray.h
@@ -31,30 +31,29 @@ namespace JSC {
public:
typedef JSArray Base;
- static RegExpMatchesArray* create(ExecState* exec, RegExpConstructorPrivate* ctorPrivate)
+ static RegExpMatchesArray* create(ExecState* exec, const RegExpConstructorPrivate& ctorPrivate)
{
RegExpMatchesArray* regExp = new (NotNull, allocateCell<RegExpMatchesArray>(*exec->heap())) RegExpMatchesArray(exec);
regExp->finishCreation(exec->globalData(), ctorPrivate);
return regExp;
}
- ~RegExpMatchesArray();
static void destroy(JSCell*);
- static JS_EXPORTDATA const ClassInfo s_info;
-
+ static const ClassInfo s_info;
+
static Structure* createStructure(JSGlobalData& globalData, JSGlobalObject* globalObject, JSValue prototype)
{
return Structure::create(globalData, globalObject, prototype, TypeInfo(ObjectType, StructureFlags), &s_info);
}
-
+
protected:
- void finishCreation(JSGlobalData&, RegExpConstructorPrivate* data);
+ void finishCreation(JSGlobalData&, const RegExpConstructorPrivate& data);
private:
static bool getOwnPropertySlot(JSCell* cell, ExecState* exec, const Identifier& propertyName, PropertySlot& slot)
{
RegExpMatchesArray* thisObject = jsCast<RegExpMatchesArray*>(cell);
- if (thisObject->subclassData())
+ if (!thisObject->m_didFillArrayInstance)
thisObject->fillArrayInstance(exec);
return JSArray::getOwnPropertySlot(thisObject, exec, propertyName, slot);
}
@@ -62,7 +61,7 @@ namespace JSC {
static bool getOwnPropertySlotByIndex(JSCell* cell, ExecState* exec, unsigned propertyName, PropertySlot& slot)
{
RegExpMatchesArray* thisObject = jsCast<RegExpMatchesArray*>(cell);
- if (thisObject->subclassData())
+ if (!thisObject->m_didFillArrayInstance)
thisObject->fillArrayInstance(exec);
return JSArray::getOwnPropertySlotByIndex(thisObject, exec, propertyName, slot);
}
@@ -70,7 +69,7 @@ namespace JSC {
static bool getOwnPropertyDescriptor(JSObject* object, ExecState* exec, const Identifier& propertyName, PropertyDescriptor& descriptor)
{
RegExpMatchesArray* thisObject = jsCast<RegExpMatchesArray*>(object);
- if (thisObject->subclassData())
+ if (!thisObject->m_didFillArrayInstance)
thisObject->fillArrayInstance(exec);
return JSArray::getOwnPropertyDescriptor(thisObject, exec, propertyName, descriptor);
}
@@ -78,7 +77,7 @@ namespace JSC {
static void put(JSCell* cell, ExecState* exec, const Identifier& propertyName, JSValue v, PutPropertySlot& slot)
{
RegExpMatchesArray* thisObject = jsCast<RegExpMatchesArray*>(cell);
- if (thisObject->subclassData())
+ if (!thisObject->m_didFillArrayInstance)
thisObject->fillArrayInstance(exec);
JSArray::put(thisObject, exec, propertyName, v, slot);
}
@@ -86,7 +85,7 @@ namespace JSC {
static void putByIndex(JSCell* cell, ExecState* exec, unsigned propertyName, JSValue v)
{
RegExpMatchesArray* thisObject = jsCast<RegExpMatchesArray*>(cell);
- if (thisObject->subclassData())
+ if (!thisObject->m_didFillArrayInstance)
thisObject->fillArrayInstance(exec);
JSArray::putByIndex(thisObject, exec, propertyName, v);
}
@@ -94,7 +93,7 @@ namespace JSC {
static bool deleteProperty(JSCell* cell, ExecState* exec, const Identifier& propertyName)
{
RegExpMatchesArray* thisObject = jsCast<RegExpMatchesArray*>(cell);
- if (thisObject->subclassData())
+ if (!thisObject->m_didFillArrayInstance)
thisObject->fillArrayInstance(exec);
return JSArray::deleteProperty(thisObject, exec, propertyName);
}
@@ -102,7 +101,7 @@ namespace JSC {
static bool deletePropertyByIndex(JSCell* cell, ExecState* exec, unsigned propertyName)
{
RegExpMatchesArray* thisObject = jsCast<RegExpMatchesArray*>(cell);
- if (thisObject->subclassData())
+ if (!thisObject->m_didFillArrayInstance)
thisObject->fillArrayInstance(exec);
return JSArray::deletePropertyByIndex(thisObject, exec, propertyName);
}
@@ -110,12 +109,15 @@ namespace JSC {
static void getOwnPropertyNames(JSObject* object, ExecState* exec, PropertyNameArray& arr, EnumerationMode mode = ExcludeDontEnumProperties)
{
RegExpMatchesArray* thisObject = jsCast<RegExpMatchesArray*>(object);
- if (thisObject->subclassData())
+ if (!thisObject->m_didFillArrayInstance)
thisObject->fillArrayInstance(exec);
JSArray::getOwnPropertyNames(thisObject, exec, arr, mode);
}
void fillArrayInstance(ExecState*);
+
+ RegExpResult m_regExpResult;
+ bool m_didFillArrayInstance;
};
}