Ignore:
Timestamp:
Dec 6, 2019, 4:33:58 PM (5 years ago)
Author:
[email protected]
Message:

[JSC] JSCallee should be in IsoSubspace
https://bugs.webkit.org/show_bug.cgi?id=204961

Reviewed by Mark Lam.

We should put JSCallee in IsoSubspace. Currently, we are also putting JSToWasmICCallee in IsoSusbapce
since it is a derived class of JSCallee, but I think we can remove this class completely. We are tracking
it in [1].

[1]: https://bugs.webkit.org/show_bug.cgi?id=204960

  • debugger/DebuggerScope.h:
  • interpreter/Interpreter.cpp:

(JSC::Interpreter::executeProgram):
(JSC::Interpreter::execute):

  • runtime/JSCallee.h:

(JSC::JSCallee::subspaceFor):

  • runtime/JSGlobalObject.h:

(JSC::JSGlobalObject::globalCallee):

  • runtime/VM.cpp:

(JSC::VM::VM):

  • runtime/VM.h:
  • wasm/js/JSToWasmICCallee.h:

(JSC::JSToWasmICCallee::function): Deleted.
(JSC::JSToWasmICCallee::JSToWasmICCallee): Deleted.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/JavaScriptCore/interpreter/Interpreter.cpp

    r251584 r253233  
    667667    auto throwScope = DECLARE_THROW_SCOPE(vm);
    668668    JSGlobalObject* globalObject = scope->globalObject(vm);
     669    JSCallee* globalCallee = globalObject->globalCallee();
    669670
    670671    ProgramExecutable* program = ProgramExecutable::create(globalObject, source);
     
    840841
    841842    ProtoCallFrame protoCallFrame;
    842     protoCallFrame.init(codeBlock, globalObject, JSCallee::create(vm, globalObject, scope), thisObj, 1);
     843    protoCallFrame.init(codeBlock, globalObject, globalCallee, thisObj, 1);
    843844
    844845    // Execute the code:
     
    11521153    ASSERT(codeBlock->numParameters() == 1); // 1 parameter for 'this'.
    11531154
     1155    JSCallee* callee = nullptr;
     1156    if (scope == globalObject->globalScope())
     1157        callee = globalObject->globalCallee();
     1158    else
     1159        callee = JSCallee::create(vm, globalObject, scope);
    11541160    ProtoCallFrame protoCallFrame;
    1155     protoCallFrame.init(codeBlock, globalObject, JSCallee::create(vm, globalObject, scope), thisValue, 1);
     1161    protoCallFrame.init(codeBlock, globalObject, callee, thisValue, 1);
    11561162
    11571163    // Execute the code:
Note: See TracChangeset for help on using the changeset viewer.