Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: fbc22bbf25c369ba0f730613b6956310bf2dabb3
https://github.com/WebKit/WebKit/commit/fbc22bbf25c369ba0f730613b6956310bf2dabb3
Author: Vassili Bykov <[email protected]>
Date: 2026-06-22 (Mon, 22 Jun 2026)
Changed paths:
M Source/JavaScriptCore/parser/Parser.cpp
Log Message:
-----------
[JSC] Create a save point only if actually checking for "use strict"
https://bugs.webkit.org/show_bug.cgi?id=317599
rdar://180322283
Reviewed by Yusuke Suzuki.
In the existing code, Parser::parseSourceElements unconditionally creates a
save point.
A save point is only necessary if shouldCheckForUseStrict is true, and in the
majority
of cases (parsing statement blocks), that flag is false and the save point is
unused.
Creating a save point involves copying almost 100 bytes of parser and lexer
state,
so let's only do that when necessary.
Covered by existing tests.
Canonical link: https://commits.webkit.org/315637@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications