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

    r96406 r96831  
    4242        &ClassName::visitChildren, \
    4343        &ClassName::getCallData \
    44     }
     44    }, \
     45    sizeof(ClassName)
    4546
    4647    struct ClassInfo {
     
    8081
    8182        MethodTable methodTable;
     83
     84        size_t cellSize;
    8285    };
    8386
Note: See TracChangeset for help on using the changeset viewer.