~oif-team/ubuntu/natty/qt4-x11/xi2.1

« back to all changes in this revision

Viewing changes to src/3rdparty/webkit/JavaScriptCore/runtime/RegExpObject.h

  • Committer: Bazaar Package Importer
  • Author(s): Alessandro Ghersi
  • Date: 2009-11-02 18:30:08 UTC
  • mfrom: (1.2.2 upstream)
  • mto: (15.2.5 experimental)
  • mto: This revision was merged to the branch mainline in revision 88.
  • Revision ID: james.westby@ubuntu.com-20091102183008-b6a4gcs128mvfb3m
Tags: upstream-4.6.0~beta1
ImportĀ upstreamĀ versionĀ 4.6.0~beta1

Show diffs side-by-side

added added

removed removed

Lines of Context:
28
28
 
29
29
    class RegExpObject : public JSObject {
30
30
    public:
31
 
        RegExpObject(PassRefPtr<Structure>, PassRefPtr<RegExp>);
 
31
        RegExpObject(NonNullPassRefPtr<Structure>, NonNullPassRefPtr<RegExp>);
32
32
        virtual ~RegExpObject();
33
33
 
34
34
        void setRegExp(PassRefPtr<RegExp> r) { d->regExp = r; }
37
37
        void setLastIndex(double lastIndex) { d->lastIndex = lastIndex; }
38
38
        double lastIndex() const { return d->lastIndex; }
39
39
 
40
 
        JSValuePtr test(ExecState*, const ArgList&);
41
 
        JSValuePtr exec(ExecState*, const ArgList&);
 
40
        JSValue test(ExecState*, const ArgList&);
 
41
        JSValue exec(ExecState*, const ArgList&);
42
42
 
43
43
        virtual bool getOwnPropertySlot(ExecState*, const Identifier& propertyName, PropertySlot&);
44
 
        virtual void put(ExecState*, const Identifier& propertyName, JSValuePtr, PutPropertySlot&);
 
44
        virtual bool getOwnPropertyDescriptor(ExecState*, const Identifier&, PropertyDescriptor&);
 
45
        virtual void put(ExecState*, const Identifier& propertyName, JSValue, PutPropertySlot&);
45
46
 
46
47
        virtual const ClassInfo* classInfo() const { return &info; }
47
48
        static const ClassInfo info;
48
49
 
49
 
        static PassRefPtr<Structure> createStructure(JSValuePtr prototype)
 
50
        static PassRefPtr<Structure> createStructure(JSValue prototype)
50
51
        {
51
 
            return Structure::create(prototype, TypeInfo(ObjectType));
 
52
            return Structure::create(prototype, TypeInfo(ObjectType, HasDefaultMark | HasDefaultGetPropertyNames));
52
53
        }
53
54
 
54
55
    private:
56
57
 
57
58
        virtual CallType getCallData(CallData&);
58
59
 
59
 
        struct RegExpObjectData {
60
 
            RegExpObjectData(PassRefPtr<RegExp> regExp, double lastIndex)
 
60
        struct RegExpObjectData : FastAllocBase {
 
61
            RegExpObjectData(NonNullPassRefPtr<RegExp> regExp, double lastIndex)
61
62
                : regExp(regExp)
62
63
                , lastIndex(lastIndex)
63
64
            {
70
71
        OwnPtr<RegExpObjectData> d;
71
72
    };
72
73
 
73
 
    RegExpObject* asRegExpObject(JSValuePtr);
 
74
    RegExpObject* asRegExpObject(JSValue);
74
75
 
75
 
    inline RegExpObject* asRegExpObject(JSValuePtr value)
 
76
    inline RegExpObject* asRegExpObject(JSValue value)
76
77
    {
77
78
        ASSERT(asObject(value)->inherits(&RegExpObject::info));
78
79
        return static_cast<RegExpObject*>(asObject(value));