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

    r96673 r96831  
    320320    {
    321321#if ENABLE(GC_VALIDATION)
     322        ASSERT(sizeof(T) == T::s_info.cellSize);
    322323        ASSERT(!heap.globalData()->isInitializingObject());
    323324        heap.globalData()->setInitializingObject(true);
Note: See TracChangeset for help on using the changeset viewer.