Changeset 248929 in webkit


Ignore:
Timestamp:
Aug 20, 2019, 6:13:02 PM (6 years ago)
Author:
mark.lam@apple.com
Message:

Remove superfluous size argument to allocateCell() for fixed size objects.
https://bugs.webkit.org/show_bug.cgi?id=200958

Reviewed by Yusuke Suzuki.

The size is already automatically computed by the allocateCell() template's default
arguments. Removing these superfluous arguments will make it easier for us to
grep for cases where we do allocate variable size cells (for later analysis work).

  • jsc.cpp:

(JSC::Masquerader::create):
(JSCMemoryFootprint::create):

  • tools/JSDollarVM.cpp:

(JSC::JSDollarVMCallFrame::create):
(JSC::Element::create):
(JSC::Root::create):
(JSC::SimpleObject::create):
(JSC::ImpureGetter::create):
(JSC::CustomGetter::create):
(JSC::DOMJITNode::create):
(JSC::DOMJITGetter::create):
(JSC::DOMJITGetterComplex::create):
(JSC::DOMJITFunctionObject::create):
(JSC::DOMJITCheckSubClassObject::create):
(JSC::DOMJITGetterBaseJSObject::create):
(JSC::JSTestCustomGetterSetter::create):
(JSC::WasmStreamingParser::create):

Location:
trunk/Source/JavaScriptCore
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/JavaScriptCore/ChangeLog

    r248927 r248929  
     12019-08-20  Mark Lam  <mark.lam@apple.com>
     2
     3        Remove superfluous size argument to allocateCell() for fixed size objects.
     4        https://bugs.webkit.org/show_bug.cgi?id=200958
     5
     6        Reviewed by Yusuke Suzuki.
     7
     8        The size is already automatically computed by the allocateCell() template's default
     9        arguments.  Removing these superfluous arguments will make it easier for us to
     10        grep for cases where we do allocate variable size cells (for later analysis work).
     11
     12        * jsc.cpp:
     13        (JSC::Masquerader::create):
     14        (JSCMemoryFootprint::create):
     15        * tools/JSDollarVM.cpp:
     16        (JSC::JSDollarVMCallFrame::create):
     17        (JSC::Element::create):
     18        (JSC::Root::create):
     19        (JSC::SimpleObject::create):
     20        (JSC::ImpureGetter::create):
     21        (JSC::CustomGetter::create):
     22        (JSC::DOMJITNode::create):
     23        (JSC::DOMJITGetter::create):
     24        (JSC::DOMJITGetterComplex::create):
     25        (JSC::DOMJITFunctionObject::create):
     26        (JSC::DOMJITCheckSubClassObject::create):
     27        (JSC::DOMJITGetterBaseJSObject::create):
     28        (JSC::JSTestCustomGetterSetter::create):
     29        (JSC::WasmStreamingParser::create):
     30
    1312019-08-20  Mark Lam  <mark.lam@apple.com>
    232
  • trunk/Source/JavaScriptCore/jsc.cpp

    r248846 r248929  
    11/*
    22 *  Copyright (C) 1999-2000 Harri Porten (porten@kde.org)
    3  *  Copyright (C) 2004-2018 Apple Inc. All rights reserved.
     3 *  Copyright (C) 2004-2019 Apple Inc. All rights reserved.
    44 *  Copyright (C) 2006 Bjoern Graf (bjoern.graf@gmail.com)
    55 *
     
    202202        globalObject->masqueradesAsUndefinedWatchpoint()->fireAll(vm, "Masquerading object allocated");
    203203        Structure* structure = createStructure(vm, globalObject, jsNull());
    204         Masquerader* result = new (NotNull, allocateCell<Masquerader>(vm.heap, sizeof(Masquerader))) Masquerader(vm, structure);
     204        Masquerader* result = new (NotNull, allocateCell<Masquerader>(vm.heap)) Masquerader(vm, structure);
    205205        result->finishCreation(vm);
    206206        return result;
     
    13931393    {
    13941394        Structure* structure = createStructure(vm, globalObject, jsNull());
    1395         JSCMemoryFootprint* footprint = new (NotNull, allocateCell<JSCMemoryFootprint>(vm.heap, sizeof(JSCMemoryFootprint))) JSCMemoryFootprint(vm, structure);
     1395        JSCMemoryFootprint* footprint = new (NotNull, allocateCell<JSCMemoryFootprint>(vm.heap)) JSCMemoryFootprint(vm, structure);
    13961396        footprint->finishCreation(vm);
    13971397        return footprint;
  • trunk/Source/JavaScriptCore/tools/JSDollarVM.cpp

    r248546 r248929  
    8080        JSGlobalObject* globalObject = exec->lexicalGlobalObject();
    8181        Structure* structure = createStructure(vm, globalObject, jsNull());
    82         JSDollarVMCallFrame* frame = new (NotNull, allocateCell<JSDollarVMCallFrame>(vm.heap, sizeof(JSDollarVMCallFrame))) JSDollarVMCallFrame(vm, structure);
     82        JSDollarVMCallFrame* frame = new (NotNull, allocateCell<JSDollarVMCallFrame>(vm.heap)) JSDollarVMCallFrame(vm, structure);
    8383        frame->finishCreation(vm, exec, requestedFrameIndex);
    8484        return frame;
     
    149149    {
    150150        Structure* structure = createStructure(vm, globalObject, jsNull());
    151         Element* element = new (NotNull, allocateCell<Element>(vm.heap, sizeof(Element))) Element(vm, structure);
     151        Element* element = new (NotNull, allocateCell<Element>(vm.heap)) Element(vm, structure);
    152152        element->finishCreation(vm, root);
    153153        return element;
     
    210210    {
    211211        Structure* structure = createStructure(vm, globalObject, jsNull());
    212         Root* root = new (NotNull, allocateCell<Root>(vm.heap, sizeof(Root))) Root(vm, structure);
     212        Root* root = new (NotNull, allocateCell<Root>(vm.heap)) Root(vm, structure);
    213213        root->finishCreation(vm);
    214214        return root;
     
    248248    {
    249249        Structure* structure = createStructure(vm, globalObject, jsNull());
    250         SimpleObject* simpleObject = new (NotNull, allocateCell<SimpleObject>(vm.heap, sizeof(SimpleObject))) SimpleObject(vm, structure);
     250        SimpleObject* simpleObject = new (NotNull, allocateCell<SimpleObject>(vm.heap)) SimpleObject(vm, structure);
    251251        simpleObject->finishCreation(vm);
    252252        return simpleObject;
     
    301301    static ImpureGetter* create(VM& vm, Structure* structure, JSObject* delegate)
    302302    {
    303         ImpureGetter* getter = new (NotNull, allocateCell<ImpureGetter>(vm.heap, sizeof(ImpureGetter))) ImpureGetter(vm, structure);
     303        ImpureGetter* getter = new (NotNull, allocateCell<ImpureGetter>(vm.heap)) ImpureGetter(vm, structure);
    304304        getter->finishCreation(vm, delegate);
    305305        return getter;
     
    363363    static CustomGetter* create(VM& vm, Structure* structure)
    364364    {
    365         CustomGetter* getter = new (NotNull, allocateCell<CustomGetter>(vm.heap, sizeof(CustomGetter))) CustomGetter(vm, structure);
     365        CustomGetter* getter = new (NotNull, allocateCell<CustomGetter>(vm.heap)) CustomGetter(vm, structure);
    366366        getter->finishCreation(vm);
    367367        return getter;
     
    556556    static DOMJITNode* create(VM& vm, Structure* structure)
    557557    {
    558         DOMJITNode* getter = new (NotNull, allocateCell<DOMJITNode>(vm.heap, sizeof(DOMJITNode))) DOMJITNode(vm, structure);
     558        DOMJITNode* getter = new (NotNull, allocateCell<DOMJITNode>(vm.heap)) DOMJITNode(vm, structure);
    559559        getter->finishCreation(vm);
    560560        return getter;
     
    590590    static DOMJITGetter* create(VM& vm, Structure* structure)
    591591    {
    592         DOMJITGetter* getter = new (NotNull, allocateCell<DOMJITGetter>(vm.heap, sizeof(DOMJITGetter))) DOMJITGetter(vm, structure);
     592        DOMJITGetter* getter = new (NotNull, allocateCell<DOMJITGetter>(vm.heap)) DOMJITGetter(vm, structure);
    593593        getter->finishCreation(vm);
    594594        return getter;
     
    673673    static DOMJITGetterComplex* create(VM& vm, JSGlobalObject* globalObject, Structure* structure)
    674674    {
    675         DOMJITGetterComplex* getter = new (NotNull, allocateCell<DOMJITGetterComplex>(vm.heap, sizeof(DOMJITGetterComplex))) DOMJITGetterComplex(vm, structure);
     675        DOMJITGetterComplex* getter = new (NotNull, allocateCell<DOMJITGetterComplex>(vm.heap)) DOMJITGetterComplex(vm, structure);
    676676        getter->finishCreation(vm, globalObject);
    677677        return getter;
     
    785785    static DOMJITFunctionObject* create(VM& vm, JSGlobalObject* globalObject, Structure* structure)
    786786    {
    787         DOMJITFunctionObject* object = new (NotNull, allocateCell<DOMJITFunctionObject>(vm.heap, sizeof(DOMJITFunctionObject))) DOMJITFunctionObject(vm, structure);
     787        DOMJITFunctionObject* object = new (NotNull, allocateCell<DOMJITFunctionObject>(vm.heap)) DOMJITFunctionObject(vm, structure);
    788788        object->finishCreation(vm, globalObject);
    789789        return object;
     
    856856    static DOMJITCheckSubClassObject* create(VM& vm, JSGlobalObject* globalObject, Structure* structure)
    857857    {
    858         DOMJITCheckSubClassObject* object = new (NotNull, allocateCell<DOMJITCheckSubClassObject>(vm.heap, sizeof(DOMJITCheckSubClassObject))) DOMJITCheckSubClassObject(vm, structure);
     858        DOMJITCheckSubClassObject* object = new (NotNull, allocateCell<DOMJITCheckSubClassObject>(vm.heap)) DOMJITCheckSubClassObject(vm, structure);
    859859        object->finishCreation(vm, globalObject);
    860860        return object;
     
    909909    static DOMJITGetterBaseJSObject* create(VM& vm, Structure* structure)
    910910    {
    911         DOMJITGetterBaseJSObject* getter = new (NotNull, allocateCell<DOMJITGetterBaseJSObject>(vm.heap, sizeof(DOMJITGetterBaseJSObject))) DOMJITGetterBaseJSObject(vm, structure);
     911        DOMJITGetterBaseJSObject* getter = new (NotNull, allocateCell<DOMJITGetterBaseJSObject>(vm.heap)) DOMJITGetterBaseJSObject(vm, structure);
    912912        getter->finishCreation(vm);
    913913        return getter;
     
    999999    static JSTestCustomGetterSetter* create(VM& vm, JSGlobalObject*, Structure* structure)
    10001000    {
    1001         JSTestCustomGetterSetter* result = new (NotNull, allocateCell<JSTestCustomGetterSetter>(vm.heap, sizeof(JSTestCustomGetterSetter))) JSTestCustomGetterSetter(vm, structure);
     1001        JSTestCustomGetterSetter* result = new (NotNull, allocateCell<JSTestCustomGetterSetter>(vm.heap)) JSTestCustomGetterSetter(vm, structure);
    10021002        result->finishCreation(vm);
    10031003        return result;
     
    11221122    {
    11231123        Structure* structure = createStructure(vm, globalObject, jsNull());
    1124         WasmStreamingParser* result = new (NotNull, allocateCell<WasmStreamingParser>(vm.heap, sizeof(WasmStreamingParser))) WasmStreamingParser(vm, structure);
     1124        WasmStreamingParser* result = new (NotNull, allocateCell<WasmStreamingParser>(vm.heap)) WasmStreamingParser(vm, structure);
    11251125        result->finishCreation(vm);
    11261126        return result;
Note: See TracChangeset for help on using the changeset viewer.