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/JSStaticScopeObject.cpp

    r96446 r96831  
    3232namespace JSC {
    3333ASSERT_CLASS_FITS_IN_CELL(JSStaticScopeObject);
     34
     35const ClassInfo JSStaticScopeObject::s_info = { "Object", &Base::s_info, 0, 0, CREATE_METHOD_TABLE(JSStaticScopeObject) };
    3436
    3537void JSStaticScopeObject::visitChildren(JSCell* cell, SlotVisitor& visitor)
Note: See TracChangeset for help on using the changeset viewer.