Ignore:
Timestamp:
Aug 17, 2008, 1:23:49 PM (17 years ago)
Author:
[email protected]
Message:

JavaScriptCore:

2008-08-17 Geoffrey Garen <[email protected]>

Reviewed by Cameron Zwarich.

Made room for a free word in JSCell.


SunSpider says no change.


I changed JSCallbackObjectData, Arguments, JSArray, and RegExpObject to
store auxiliary data in a secondary structure.

I changed InternalFunction to store the function's name in the property
map.


I changed JSGlobalObjectData to use a virtual destructor, so WebCore's
JSDOMWindowBaseData could inherit from it safely. (It's a strange design
for JSDOMWindowBase to allocate an object that JSGlobalObject deletes,
but that's really our only option, given the size constraint.)


I also added a bunch of compile-time ASSERTs, and removed lots of comments
in JSObject.h because they were often out of date, and they got in the
way of reading what was actually going on.


Also renamed JSArray::getLength to JSArray::length, to match our style
guidelines.

WebCore:

2008-08-17 Geoffrey Garen <[email protected]>

Reviewed by Cameron Zwarich.

Made room for a free word in JSCell.


Changed JSDOMWindowBase to store its auxiliary data in a subclass of
JSGlobalData, so the two could share a pointer.


Added a bunch of ASSERTs, to help catch over-sized objects.

WebKit/mac:

2008-08-17 Geoffrey Garen <[email protected]>

Reviewed by Cameron Zwarich.

Made room for a free word in JSCell.


(Updated for JavaScriptCore changes.)

File:
1 edited

Legend:

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

    r35027 r35807  
    3636        virtual ~RegExpObject();
    3737
    38         void setRegExp(PassRefPtr<RegExp> r) { m_regExp = r; }
    39         RegExp* regExp() const { return m_regExp.get(); }
     38        void setRegExp(PassRefPtr<RegExp> r) { d->regExp = r; }
     39        RegExp* regExp() const { return d->regExp.get(); }
    4040
    4141        JSValue* test(ExecState*, const ArgList&);
     
    5050        static const ClassInfo info;
    5151
    52         void setLastIndex(double lastIndex) { m_lastIndex = lastIndex; }
     52        void setLastIndex(double lastIndex) { d->lastIndex = lastIndex; }
    5353
    5454    private:
     
    5656
    5757        virtual CallType getCallData(CallData&);
     58       
     59        struct RegExpObjectData {
     60            RegExpObjectData(PassRefPtr<RegExp> regExp_, double lastIndex_)
     61                : regExp(regExp_)
     62                , lastIndex(lastIndex_)
     63            {
     64            }
    5865
    59         RefPtr<RegExp> m_regExp;
    60         double m_lastIndex;
     66            RefPtr<RegExp> regExp;
     67            double lastIndex;
     68        };
     69       
     70        OwnPtr<RegExpObjectData> d;
    6171    };
    6272
Note: See TracChangeset for help on using the changeset viewer.