Ignore:
Timestamp:
Jun 28, 2008, 5:09:26 PM (17 years ago)
Author:
[email protected]
Message:

2008-06-28 Sam Weinig <[email protected]>

Rubber-stamped by Darin Adler.

Splits RegExpConstructor and RegExpPrototype out of RegExpObject.h/cpp

  • DerivedSources.make:
  • GNUmakefile.am:
  • JavaScriptCore.pri:
  • JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
  • JavaScriptCore.xcodeproj/project.pbxproj:
  • JavaScriptCoreSources.bkl:
  • VM/Machine.cpp:
  • kjs/AllInOneFile.cpp:
  • kjs/JSGlobalObject.cpp:
  • kjs/RegExpConstructor.cpp: Copied from kjs/RegExpObject.cpp.
  • kjs/RegExpConstructor.h: Copied from kjs/RegExpObject.h.
  • kjs/RegExpObject.cpp:
  • kjs/RegExpObject.h:
  • kjs/RegExpPrototype.cpp: Copied from kjs/RegExpObject.cpp.
  • kjs/RegExpPrototype.h: Copied from kjs/RegExpObject.h.
  • kjs/StringPrototype.cpp:
  • kjs/internal.cpp:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/JavaScriptCore/kjs/RegExpObject.h

    r34855 r34863  
    2222#define RegExpObject_h
    2323
    24 #include "JSFunction.h"
    2524#include "JSObject.h"
    2625#include "regexp.h"
    2726
    2827namespace KJS {
    29 
    30     class FunctionPrototype;
    31     class ObjectPrototype;
    32     struct RegExpConstructorPrivate;
    33 
    34     class RegExpPrototype : public JSObject {
    35     public:
    36         RegExpPrototype(ExecState*, ObjectPrototype*, FunctionPrototype*);
    37 
    38         virtual const ClassInfo* classInfo() const { return &info; }
    39         static const ClassInfo info;
    40     };
    4128
    4229    class RegExpObject : public JSObject {
     
    7259    };
    7360
    74     class RegExpConstructor : public InternalFunction {
    75     public:
    76         enum { Dollar1, Dollar2, Dollar3, Dollar4, Dollar5, Dollar6, Dollar7, Dollar8, Dollar9,
    77                Input, Multiline, LastMatch, LastParen, LeftContext, RightContext };
     61} // namespace KJS
    7862
    79         RegExpConstructor(ExecState*, FunctionPrototype*, RegExpPrototype*);
    80 
    81         virtual void put(ExecState*, const Identifier&, JSValue*);
    82         void putValueProperty(ExecState*, int token, JSValue*);
    83         virtual bool getOwnPropertySlot(ExecState*, const Identifier&, PropertySlot&);
    84         JSValue* getValueProperty(ExecState*, int token) const;
    85 
    86         static const ClassInfo info;
    87 
    88         void performMatch(RegExp*, const UString&, int startOffset, int& position, int& length, int** ovector = 0);
    89         JSObject* arrayOfMatches(ExecState*) const;
    90         const UString& input() const;
    91 
    92     private:
    93         virtual ConstructType getConstructData(ConstructData&);
    94         virtual CallType getCallData(CallData&);
    95         virtual const ClassInfo* classInfo() const { return &info; }
    96 
    97         JSValue* getBackref(ExecState*, unsigned) const;
    98         JSValue* getLastParen(ExecState*) const;
    99         JSValue* getLeftContext(ExecState*) const;
    100         JSValue* getRightContext(ExecState*) const;
    101 
    102         OwnPtr<RegExpConstructorPrivate> d;
    103     };
    104 
    105 } // namespace
    106 
    107 #endif
     63#endif // RegExpObject_h
Note: See TracChangeset for help on using the changeset viewer.