X-Git-Url: https://git.saurik.com/apple/javascriptcore.git/blobdiff_plain/ba379fdc102753d6be2c4d937058fe40257329fe..ed1e77d3adeb83d26fd1dfb16dd84cabdcefd250:/runtime/RegExpMatchesArray.h diff --git a/runtime/RegExpMatchesArray.h b/runtime/RegExpMatchesArray.h index 9ae18b9..669dd39 100644 --- a/runtime/RegExpMatchesArray.h +++ b/runtime/RegExpMatchesArray.h @@ -21,66 +21,13 @@ #define RegExpMatchesArray_h #include "JSArray.h" +#include "JSGlobalObject.h" +#include "RegExpObject.h" namespace JSC { - class RegExpMatchesArray : public JSArray { - public: - RegExpMatchesArray(ExecState*, RegExpConstructorPrivate*); - virtual ~RegExpMatchesArray(); - - private: - virtual bool getOwnPropertySlot(ExecState* exec, const Identifier& propertyName, PropertySlot& slot) - { - if (lazyCreationData()) - fillArrayInstance(exec); - return JSArray::getOwnPropertySlot(exec, propertyName, slot); - } - - virtual bool getOwnPropertySlot(ExecState* exec, unsigned propertyName, PropertySlot& slot) - { - if (lazyCreationData()) - fillArrayInstance(exec); - return JSArray::getOwnPropertySlot(exec, propertyName, slot); - } - - virtual void put(ExecState* exec, const Identifier& propertyName, JSValue v, PutPropertySlot& slot) - { - if (lazyCreationData()) - fillArrayInstance(exec); - JSArray::put(exec, propertyName, v, slot); - } - - virtual void put(ExecState* exec, unsigned propertyName, JSValue v) - { - if (lazyCreationData()) - fillArrayInstance(exec); - JSArray::put(exec, propertyName, v); - } - - virtual bool deleteProperty(ExecState* exec, const Identifier& propertyName) - { - if (lazyCreationData()) - fillArrayInstance(exec); - return JSArray::deleteProperty(exec, propertyName); - } - - virtual bool deleteProperty(ExecState* exec, unsigned propertyName) - { - if (lazyCreationData()) - fillArrayInstance(exec); - return JSArray::deleteProperty(exec, propertyName); - } - - virtual void getPropertyNames(ExecState* exec, PropertyNameArray& arr) - { - if (lazyCreationData()) - fillArrayInstance(exec); - JSArray::getPropertyNames(exec, arr); - } - - void fillArrayInstance(ExecState*); -}; +JSArray* createRegExpMatchesArray(ExecState*, JSString*, RegExp*, MatchResult); +Structure* createRegExpMatchesArrayStructure(VM&, JSGlobalObject&); }