2 * Copyright (C) 2008 Apple Inc. All Rights Reserved.
4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Lesser General Public
6 * License as published by the Free Software Foundation; either
7 * version 2 of the License, or (at your option) any later version.
9 * This library is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * Lesser General Public License for more details.
14 * You should have received a copy of the GNU Lesser General Public
15 * License along with this library; if not, write to the Free Software
16 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
20 #ifndef RegExpMatchesArray_h
21 #define RegExpMatchesArray_h
27 class RegExpMatchesArray : public JSArray {
29 RegExpMatchesArray(ExecState*);
34 static RegExpMatchesArray* create(ExecState* exec, RegExpConstructorPrivate* ctorPrivate)
36 RegExpMatchesArray* regExp = new (allocateCell<RegExpMatchesArray>(*exec->heap())) RegExpMatchesArray(exec);
37 regExp->finishCreation(exec->globalData(), ctorPrivate);
40 virtual ~RegExpMatchesArray();
43 void finishCreation(JSGlobalData&, RegExpConstructorPrivate* data);
46 virtual bool getOwnPropertySlot(ExecState* exec, const Identifier& propertyName, PropertySlot& slot)
49 fillArrayInstance(exec);
50 return JSArray::getOwnPropertySlot(exec, propertyName, slot);
53 virtual bool getOwnPropertySlot(ExecState* exec, unsigned propertyName, PropertySlot& slot)
56 fillArrayInstance(exec);
57 return JSArray::getOwnPropertySlot(exec, propertyName, slot);
60 virtual bool getOwnPropertyDescriptor(ExecState* exec, const Identifier& propertyName, PropertyDescriptor& descriptor)
63 fillArrayInstance(exec);
64 return JSArray::getOwnPropertyDescriptor(exec, propertyName, descriptor);
67 virtual void put(ExecState* exec, const Identifier& propertyName, JSValue v, PutPropertySlot& slot)
70 fillArrayInstance(exec);
71 JSArray::put(exec, propertyName, v, slot);
74 virtual void put(ExecState* exec, unsigned propertyName, JSValue v)
77 fillArrayInstance(exec);
78 JSArray::put(exec, propertyName, v);
81 virtual bool deleteProperty(ExecState* exec, const Identifier& propertyName)
84 fillArrayInstance(exec);
85 return JSArray::deleteProperty(exec, propertyName);
88 virtual bool deleteProperty(ExecState* exec, unsigned propertyName)
91 fillArrayInstance(exec);
92 return JSArray::deleteProperty(exec, propertyName);
95 virtual void getOwnPropertyNames(ExecState* exec, PropertyNameArray& arr, EnumerationMode mode = ExcludeDontEnumProperties)
98 fillArrayInstance(exec);
99 JSArray::getOwnPropertyNames(exec, arr, mode);
102 void fillArrayInstance(ExecState*);
107 #endif // RegExpMatchesArray_h