Ignore:
Timestamp:
Oct 6, 2011, 10:42:50 AM (14 years ago)
Author:
[email protected]
Message:

JSC objects need to know their own cell size at runtime.
https://bugs.webkit.org/show_bug.cgi?id=69390

Reviewed by Geoffrey Garen.

Added the cellSize field to ClassInfo and the static calculation of
size of each class to the CREATE_METHOD_TABLE macro, which will be
renamed in a followup patch to make its name match its broader use.

Also added a few ClassInfo structs so that each object that is allocated has its
correct size.

Changed JSByteArray s_defaultInfo to s_info so that the template will get the
correct ClassInfo struct from it when it's allocated.

  • runtime/JSByteArray.cpp:
  • runtime/JSByteArray.h:
  • runtime/JSCell.h:

(JSC::allocateCell):

  • runtime/JSNotAnObject.cpp:
  • runtime/JSNotAnObject.h:
  • runtime/JSObject.cpp:
  • runtime/JSObject.h:

(JSC::JSCell::cellSize):

  • runtime/JSStaticScopeObject.cpp:
  • runtime/JSStaticScopeObject.h:
  • runtime/StrictEvalActivation.cpp:
  • runtime/StrictEvalActivation.h:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/JavaScriptCore/runtime/JSByteArray.h

    r95901 r96831  
    8787        }
    8888
    89         static Structure* createStructure(JSGlobalData&, JSGlobalObject*, JSValue prototype, const JSC::ClassInfo* = &s_defaultInfo);
     89        static Structure* createStructure(JSGlobalData&, JSGlobalObject*, JSValue prototype, const JSC::ClassInfo* = &s_info);
    9090
    9191        virtual bool getOwnPropertySlot(JSC::ExecState*, const JSC::Identifier& propertyName, JSC::PropertySlot&);
     
    9797        virtual void getOwnPropertyNames(JSC::ExecState*, JSC::PropertyNameArray&, EnumerationMode mode = ExcludeDontEnumProperties);
    9898
    99         static const ClassInfo s_defaultInfo;
     99        static const ClassInfo s_info;
    100100       
    101101        size_t length() const { return m_storage->length(); }
Note: See TracChangeset for help on using the changeset viewer.