Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 1dff2312b262450f33a2a8b4f4a2f1008e60be63
      
https://github.com/WebKit/WebKit/commit/1dff2312b262450f33a2a8b4f4a2f1008e60be63
  Author: Sosuke Suzuki <[email protected]>
  Date:   2026-06-25 (Thu, 25 Jun 2026)

  Changed paths:
    M Source/JavaScriptCore/parser/Parser.cpp

  Log Message:
  -----------
  [JSC] Create a save point in `parseAssignmentExpression` only when it may be 
consumed
https://bugs.webkit.org/show_bug.cgi?id=317710

Reviewed by Yusuke Suzuki.

Similar to 315637@main. Parser::parseAssignmentExpression unconditionally 
creates
a save point, but it is consumed only when re-parsing as an arrow function
(maybeValidArrowFunctionStart) or as a destructuring pattern 
(maybeAssignmentPattern).
For expressions starting with a numeric/string/template/regexp literal or a 
unary
operator, both flags are false and the ~100 byte parser/lexer state copy is 
wasted.
Since this function runs once per assignment expression (array elements, call
arguments, etc.), skip the copy when neither flag is set.

* Source/JavaScriptCore/parser/Parser.cpp:
(JSC::Parser<LexerType>::parseAssignmentExpression):

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



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

Reply via email to