1 | /*
|
---|
2 | * Copyright (C) 2008 Apple Inc. All Rights Reserved.
|
---|
3 | *
|
---|
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.
|
---|
8 | *
|
---|
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.
|
---|
13 | *
|
---|
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
|
---|
17 | *
|
---|
18 | */
|
---|
19 |
|
---|
20 | #ifndef RegExpMatchesArray_h
|
---|
21 | #define RegExpMatchesArray_h
|
---|
22 |
|
---|
23 | #include "JSArray.h"
|
---|
24 |
|
---|
25 | namespace JSC {
|
---|
26 |
|
---|
27 | class RegExpMatchesArray : public JSArray {
|
---|
28 | public:
|
---|
29 | RegExpMatchesArray(ExecState*, RegExpConstructorPrivate*);
|
---|
30 | virtual ~RegExpMatchesArray();
|
---|
31 |
|
---|
32 | private:
|
---|
33 | virtual bool getOwnPropertySlot(ExecState* exec, const Identifier& propertyName, PropertySlot& slot) { if (lazyCreationData()) fillArrayInstance(exec); return JSArray::getOwnPropertySlot(exec, propertyName, slot); }
|
---|
34 | virtual bool getOwnPropertySlot(ExecState* exec, unsigned propertyName, PropertySlot& slot) { if (lazyCreationData()) fillArrayInstance(exec); return JSArray::getOwnPropertySlot(exec, propertyName, slot); }
|
---|
35 | virtual void put(ExecState* exec, const Identifier& propertyName, JSValue* v, PutPropertySlot& slot) { if (lazyCreationData()) fillArrayInstance(exec); JSArray::put(exec, propertyName, v, slot); }
|
---|
36 | virtual void put(ExecState* exec, unsigned propertyName, JSValue* v) { if (lazyCreationData()) fillArrayInstance(exec); JSArray::put(exec, propertyName, v); }
|
---|
37 | virtual bool deleteProperty(ExecState* exec, const Identifier& propertyName) { if (lazyCreationData()) fillArrayInstance(exec); return JSArray::deleteProperty(exec, propertyName); }
|
---|
38 | virtual bool deleteProperty(ExecState* exec, unsigned propertyName) { if (lazyCreationData()) fillArrayInstance(exec); return JSArray::deleteProperty(exec, propertyName); }
|
---|
39 | virtual void getPropertyNames(ExecState* exec, PropertyNameArray& arr) { if (lazyCreationData()) fillArrayInstance(exec); JSArray::getPropertyNames(exec, arr); }
|
---|
40 |
|
---|
41 | void fillArrayInstance(ExecState*);
|
---|
42 | };
|
---|
43 |
|
---|
44 | }
|
---|
45 |
|
---|
46 | #endif // RegExpMatchesArray_h
|
---|