X-Git-Url: https://git.saurik.com/apple/javascriptcore.git/blobdiff_plain/f9bf01c6616d5ddcf65b13b33cedf9e387ff7a63..ed1e77d3adeb83d26fd1dfb16dd84cabdcefd250:/runtime/RegExpMatchesArray.h diff --git a/runtime/RegExpMatchesArray.h b/runtime/RegExpMatchesArray.h index 38d3cb4..669dd39 100644 --- a/runtime/RegExpMatchesArray.h +++ b/runtime/RegExpMatchesArray.h @@ -21,73 +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 bool getOwnPropertyDescriptor(ExecState* exec, const Identifier& propertyName, PropertyDescriptor& descriptor) - { - if (lazyCreationData()) - fillArrayInstance(exec); - return JSArray::getOwnPropertyDescriptor(exec, propertyName, descriptor); - } - - 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 getOwnPropertyNames(ExecState* exec, PropertyNameArray& arr, EnumerationMode mode = ExcludeDontEnumProperties) - { - if (lazyCreationData()) - fillArrayInstance(exec); - JSArray::getOwnPropertyNames(exec, arr, mode); - } - - void fillArrayInstance(ExecState*); -}; +JSArray* createRegExpMatchesArray(ExecState*, JSString*, RegExp*, MatchResult); +Structure* createRegExpMatchesArrayStructure(VM&, JSGlobalObject&); }