Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: f6f27b7f2bf68a14ceae0b77b08830deb705b9a7
      
https://github.com/WebKit/WebKit/commit/f6f27b7f2bf68a14ceae0b77b08830deb705b9a7
  Author: Yusuke Suzuki <[email protected]>
  Date:   2026-04-16 (Thu, 16 Apr 2026)

  Changed paths:
    M Source/JavaScriptCore/llint/InPlaceInterpreter.asm
    M Source/JavaScriptCore/llint/InPlaceInterpreter64.asm
    M Source/JavaScriptCore/wasm/WasmIPIntSlowPaths.cpp
    M Source/JavaScriptCore/wasm/WasmIPIntSlowPaths.h
    M Source/JavaScriptCore/wasm/debugger/WasmDebugServerUtilities.cpp
    M Source/JavaScriptCore/wasm/debugger/WasmDebugServerUtilities.h
    M Source/JavaScriptCore/wasm/debugger/WasmExecutionHandler.cpp
    M Source/JavaScriptCore/wasm/debugger/WasmExecutionHandler.h
    M Source/JavaScriptCore/wasm/debugger/WasmQueryHandler.cpp

  Log Message:
  -----------
  [JSC] Remove PL from IPInt
https://bugs.webkit.org/show_bug.cgi?id=312339
rdar://174798744

Reviewed by Yijia Huang and Dan Hecht.

IPInt is using a register for PL (pointer-to-locals) to accelerate
access to wasm locals. But this is not necessary if we carefully
organize locals layout since we can use cfr.
Now, we use the layout like this

    [  ...           ]
    [ return address ]
    [ previous cfr   ] <- cfr
    [ callee save    ]
    [ callee save    ]
    [ callee save    ]
    [ callee save    ]
    [ local 0        ]
    [ local 1        ]
    [ local 2        ]
    [ ...            ]
    [ rethrow 0      ]
    [ rethrow 1      ]
    [ rethrow 2      ]
    [ ...            ]

Then cfr to local is always constant offset, so we can quickly access to
locals from cfr. Also this makes frame a bit cleaner as we no longer
have PL which is relying on CFR. So JSPI's save / restore do not need to
care about this register.

We introduce IPInt::FrameAccess to offer consistent access mechanism for
locals and rethrow slots.

* Source/JavaScriptCore/llint/InPlaceInterpreter.asm:
* Source/JavaScriptCore/llint/InPlaceInterpreter64.asm:
* Source/JavaScriptCore/wasm/WasmIPIntSlowPaths.cpp:
(JSC::IPInt::FrameAccess::localBase):
(JSC::IPInt::FrameAccess::localSlot):
(JSC::IPInt::FrameAccess::rethrowSlot):
(JSC::IPInt::FrameAccess::stackEnd):
(JSC::IPInt::buildEntryBufferForLoopOSR):
(JSC::IPInt::WASM_IPINT_EXTERN_CPP_DECL):
(JSC::IPInt::displayWasmDebugState):
* Source/JavaScriptCore/wasm/WasmIPIntSlowPaths.h:
(JSC::IPInt::FrameAccess::FrameAccess):
* Source/JavaScriptCore/wasm/debugger/WasmDebugServerUtilities.cpp:
(JSC::Wasm::StopData::StopData):
(JSC::Wasm::StopData::dump const):
(JSC::Wasm::localsFromFrame): Deleted.
* Source/JavaScriptCore/wasm/debugger/WasmDebugServerUtilities.h:
(JSC::Wasm::DebugState::setBreakpointStopData):
(JSC::Wasm::DebugState::setTrapStopData):
* Source/JavaScriptCore/wasm/debugger/WasmExecutionHandler.cpp:
(JSC::Wasm::ExecutionHandler::handleDebuggerTrapIfNeeded):
* Source/JavaScriptCore/wasm/debugger/WasmExecutionHandler.h:
* Source/JavaScriptCore/wasm/debugger/WasmQueryHandler.cpp:
(JSC::Wasm::QueryHandler::handleWasmLocal):

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



To unsubscribe from these emails, change your notification settings at 
https://github.com/WebKit/WebKit/settings/notifications

Reply via email to