Ignore:
Timestamp:
Apr 13, 2022, 2:01:19 PM (3 years ago)
Author:
[email protected]
Message:

[JSC] Remove DeprecatedCallFrameForDebugger
https://bugs.webkit.org/show_bug.cgi?id=239045

Reviewed by Devin Rousso.

We should not enlarge sizeof(JSGlobalObject) by having DeprecatedCallFrameForDebugger which is only used for Debugger, and it is used
only when we have an error when evaluating top-level SyntaxError. This patch removes it: we introduce EmptyTopLevelCallFrameForDebugger
which can be constructed on stack and we use it instead of DeprecatedCallFrameForDebugger.

  • Source/JavaScriptCore/debugger/Debugger.cpp:

(JSC::Debugger::updateCallFrame):
(JSC::EmptyTopLevelCallFrameForDebugger::EmptyTopLevelCallFrameForDebugger):
(JSC::EmptyTopLevelCallFrameForDebugger::asCallFrame):
(JSC::Debugger::exception):

  • Source/JavaScriptCore/debugger/DebuggerCallFrame.cpp:

(JSC::DebuggerCallFrame::create):
(JSC::DebuggerCallFrame::positionForCallFrame):

  • Source/JavaScriptCore/interpreter/CallFrame.cpp:

(JSC::CallFrame::convertToStackOverflowFrame):
(JSC::CallFrame::initDeprecatedCallFrameForDebugger): Deleted.

  • Source/JavaScriptCore/interpreter/CallFrame.h:

(JSC::CallFrame::isEmptyTopLevelCallFrameForDebugger const):
(JSC::CallFrame::isDeprecatedCallFrameForDebugger const): Deleted.

  • Source/JavaScriptCore/interpreter/Interpreter.cpp:

(JSC::Interpreter::notifyDebuggerOfExceptionToBeThrown):

  • Source/JavaScriptCore/runtime/JSGlobalObject.cpp:

(JSC::JSGlobalObject::init):
(JSC::JSGlobalObject::deprecatedCallFrameForDebugger): Deleted.

  • Source/JavaScriptCore/runtime/JSGlobalObject.h:
  • Source/JavaScriptCore/runtime/VM.cpp:

(JSC::VM::throwException):

Canonical link: https://commits.webkit.org/249603@main

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/JavaScriptCore/debugger/DebuggerCallFrame.cpp

    r292487 r292830  
    6767    }
    6868
    69     if (callFrame->isDeprecatedCallFrameForDebugger()) {
     69    if (callFrame->isEmptyTopLevelCallFrameForDebugger()) {
    7070        ShadowChicken::Frame emptyFrame;
    7171        RELEASE_ASSERT(!emptyFrame.isTailDeleted);
     
    321321{
    322322    LineAndColumnFunctor functor;
     323    if (!callFrame)
     324        return TextPosition(OrdinalNumber::fromOneBasedInt(0), OrdinalNumber::fromOneBasedInt(0));
    323325    StackVisitor::visit(callFrame, vm, functor);
    324326    return TextPosition(OrdinalNumber::fromOneBasedInt(functor.line()), OrdinalNumber::fromOneBasedInt(functor.column()));
Note: See TracChangeset for help on using the changeset viewer.