class RegExpObject : public JSObject {
public:
- RegExpObject(PassRefPtr<Structure>, PassRefPtr<RegExp>);
+ RegExpObject(NonNullPassRefPtr<Structure>, NonNullPassRefPtr<RegExp>);
virtual ~RegExpObject();
void setRegExp(PassRefPtr<RegExp> r) { d->regExp = r; }
void setLastIndex(double lastIndex) { d->lastIndex = lastIndex; }
double lastIndex() const { return d->lastIndex; }
- JSValuePtr test(ExecState*, const ArgList&);
- JSValuePtr exec(ExecState*, const ArgList&);
+ JSValue test(ExecState*, const ArgList&);
+ JSValue exec(ExecState*, const ArgList&);
virtual bool getOwnPropertySlot(ExecState*, const Identifier& propertyName, PropertySlot&);
- virtual void put(ExecState*, const Identifier& propertyName, JSValuePtr, PutPropertySlot&);
+ virtual bool getOwnPropertyDescriptor(ExecState*, const Identifier&, PropertyDescriptor&);
+ virtual void put(ExecState*, const Identifier& propertyName, JSValue, PutPropertySlot&);
virtual const ClassInfo* classInfo() const { return &info; }
static const ClassInfo info;
- static PassRefPtr<Structure> createStructure(JSValuePtr prototype)
+ static PassRefPtr<Structure> createStructure(JSValue prototype)
{
- return Structure::create(prototype, TypeInfo(ObjectType));
+ return Structure::create(prototype, TypeInfo(ObjectType, StructureFlags), AnonymousSlotCount);
}
+ protected:
+ static const unsigned StructureFlags = OverridesGetOwnPropertySlot | JSObject::StructureFlags;
+
private:
bool match(ExecState*, const ArgList&);
virtual CallType getCallData(CallData&);
- struct RegExpObjectData {
- RegExpObjectData(PassRefPtr<RegExp> regExp, double lastIndex)
+ struct RegExpObjectData : FastAllocBase {
+ RegExpObjectData(NonNullPassRefPtr<RegExp> regExp, double lastIndex)
: regExp(regExp)
, lastIndex(lastIndex)
{
OwnPtr<RegExpObjectData> d;
};
- RegExpObject* asRegExpObject(JSValuePtr);
+ RegExpObject* asRegExpObject(JSValue);
- inline RegExpObject* asRegExpObject(JSValuePtr value)
+ inline RegExpObject* asRegExpObject(JSValue value)
{
ASSERT(asObject(value)->inherits(&RegExpObject::info));
return static_cast<RegExpObject*>(asObject(value));