Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 8aa3307b46af61b6f3f3dc7ee15df203f4146fe1
https://github.com/WebKit/WebKit/commit/8aa3307b46af61b6f3f3dc7ee15df203f4146fe1
Author: Vassili Bykov <[email protected]>
Date: 2026-08-03 (Mon, 03 Aug 2026)
Changed paths:
M Source/JavaScriptCore/parser/Lexer.cpp
M Source/JavaScriptCore/parser/Lexer.h
M Source/JavaScriptCore/parser/Parser.cpp
M Source/JavaScriptCore/parser/Parser.h
Log Message:
-----------
[JSC] Move two rarely-executed code paths out of the lexer and parser hot
functions
https://bugs.webkit.org/show_bug.cgi?id=320930
rdar://183964804
Reviewed by Yusuke Suzuki.
This patch moves seldom executed code out of two hot functions in Lexer and
Parser,
reducing the containing functions' register pressure and spill traffic and
improving
performance.
Lexer::lexWithoutClearingLineTerminator: the single-line comment scanner is
extracted into
the scanSingleLineComment() function.
Parser::parseAssignmentExpression(): the arrow-function candidate path and the
destructuring path are extracted as parseArrowFunctionCandidate() and
parseDestructuringAssignment().
Testing: no logic changes, covered by existing tests.
* Source/JavaScriptCore/parser/Lexer.cpp:
(JSC::Lexer<T>::scanSingleLineComment):
(JSC::Lexer<T>::lexWithoutClearingLineTerminator):
* Source/JavaScriptCore/parser/Lexer.h:
* Source/JavaScriptCore/parser/Parser.cpp:
(JSC::Parser<LexerType>::parseDestructuringAssignment):
(JSC::Parser<LexerType>::parseArrowFunctionCandidate):
(JSC::Parser<LexerType>::parseAssignmentExpression):
* Source/JavaScriptCore/parser/Parser.h:
Canonical link: https://commits.webkit.org/318507@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications