Changeset 35807 in webkit for trunk/JavaScriptCore/kjs/JSArray.h


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/JSArray.h

    r35806 r35807  
    3030
    3131    struct ArrayStorage {
     32        unsigned m_length;
    3233        unsigned m_vectorLength;
    3334        unsigned m_numValuesInVector;
     
    4950        static const ClassInfo info;
    5051
    51         unsigned getLength() const { return m_length; }
     52        unsigned length() const { return m_storage->m_length; }
    5253        void setLength(unsigned); // OK to use on new arrays, but not if it might be a RegExpMatchArray.
    5354
     
    9293        void checkConsistency(ConsistencyCheckType = NormalConsistencyCheck);
    9394
    94         unsigned m_length;
    9595        unsigned m_fastAccessCutoff;
    9696        ArrayStorage* m_storage;
Note: See TracChangeset for help on using the changeset viewer.