mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2026-04-19 02:10:26 +00:00
LibJS: Collapse handler/finalizer into single exception handler target
After replacing the runtime unwind context stack with explicit completion records for try/finally dispatch, the distinction between "handler" (catch) and "finalizer" (finally) in the exception handler table is no longer meaningful at runtime. handle_exception() checked handler first, then finalizer, but they did the exact same thing (set the PC). When both were present, the finalizer was dead code. Collapse both fields into a single handler_offset (now non-optional, since an entry always has a target), remove the finalizer concept from BasicBlock, UnwindContext, and ExceptionHandlers, and simplify handle_exception() to a direct assignment.
This commit is contained in:
parent
4fa4ecf31b
commit
720fd567b1
Notes:
github-actions[bot]
2026-02-09 15:37:14 +00:00
Author: https://github.com/awesomekling
Commit: 720fd567b1
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/7846
7 changed files with 14 additions and 36 deletions
|
|
@ -81,11 +81,10 @@ void Executable::dump() const
|
|||
warnln("");
|
||||
warnln("Exception handlers:");
|
||||
for (auto& handlers : exception_handlers) {
|
||||
warnln(" from {:4x} to {:4x} handler {:4x} finalizer {:4x}",
|
||||
warnln(" from {:4x} to {:4x} handler {:4x}",
|
||||
handlers.start_offset,
|
||||
handlers.end_offset,
|
||||
handlers.handler_offset.value_or(0),
|
||||
handlers.finalizer_offset.value_or(0));
|
||||
handlers.handler_offset);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue