[parser] Skip redundant re-parsed RegExp validation [v8/v8 : main]

0 views
Skip to first unread message

Marco Vitale (Gerrit)

unread,
Mar 16, 2026, 10:29:33 AM (14 hours ago) Mar 16
to Toon Verwaest, Jakob Linke, chrom...@appspot.gserviceaccount.com, marja...@chromium.org, v8-re...@googlegroups.com
Attention needed from Jakob Linke and Toon Verwaest

New activity on the change

Open in Gerrit

Related details

Attention is currently required from:
  • Jakob Linke
  • Toon Verwaest
Submit Requirements:
  • requirement is not satisfiedCode-Owners
  • requirement is not satisfiedCode-Review
  • requirement is not satisfiedReview-Enforcement
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
Gerrit-MessageType: comment
Gerrit-Project: v8/v8
Gerrit-Branch: main
Gerrit-Change-Id: I16ca3bcd385c596bd70b84e0e3876549360de503
Gerrit-Change-Number: 7665887
Gerrit-PatchSet: 3
Gerrit-Owner: Marco Vitale <mrc...@chromium.org>
Gerrit-Reviewer: Jakob Linke <jgr...@chromium.org>
Gerrit-Reviewer: Toon Verwaest <verw...@chromium.org>
Gerrit-Attention: Toon Verwaest <verw...@chromium.org>
Gerrit-Attention: Jakob Linke <jgr...@chromium.org>
Gerrit-Comment-Date: Mon, 16 Mar 2026 14:29:28 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: No
unsatisfied_requirement
open
diffy

Toon Verwaest (Gerrit)

unread,
Mar 16, 2026, 12:02:54 PM (12 hours ago) Mar 16
to Marco Vitale, Jakob Linke, chrom...@appspot.gserviceaccount.com, marja...@chromium.org, v8-re...@googlegroups.com
Attention needed from Jakob Linke and Marco Vitale

Toon Verwaest voted and added 2 comments

Votes added by Toon Verwaest

Code-Review+1

2 comments

Patchset-level comments
File-level comment, Patchset 3 (Latest):
Toon Verwaest . resolved

lgtm with nit about comment

File src/parsing/parser-base.h
Line 2066, Patchset 3 (Latest): // Lazy compilation implies this function already passed the PreParser.
Toon Verwaest . unresolved

This isn't entirely technically correct. It was either parsed or preparsed. Either way, the ParseBase has seen this literal before and has already called ValidateRegExpLiteral on it.

Open in Gerrit

Related details

Attention is currently required from:
  • Jakob Linke
  • Marco Vitale
Submit Requirements:
  • requirement satisfiedCode-Owners
  • requirement satisfiedCode-Review
  • requirement is not satisfiedNo-Unresolved-Comments
  • requirement satisfiedReview-Enforcement
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
Gerrit-MessageType: comment
Gerrit-Project: v8/v8
Gerrit-Branch: main
Gerrit-Change-Id: I16ca3bcd385c596bd70b84e0e3876549360de503
Gerrit-Change-Number: 7665887
Gerrit-PatchSet: 3
Gerrit-Owner: Marco Vitale <mrc...@chromium.org>
Gerrit-Reviewer: Jakob Linke <jgr...@chromium.org>
Gerrit-Reviewer: Toon Verwaest <verw...@chromium.org>
Gerrit-Attention: Marco Vitale <mrc...@chromium.org>
Gerrit-Attention: Jakob Linke <jgr...@chromium.org>
Gerrit-Comment-Date: Mon, 16 Mar 2026 16:02:50 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
satisfied_requirement
unsatisfied_requirement
open
diffy

Marco Vitale (Gerrit)

unread,
Mar 16, 2026, 1:18:03 PM (11 hours ago) Mar 16
to Toon Verwaest, Jakob Linke, chrom...@appspot.gserviceaccount.com, marja...@chromium.org, v8-re...@googlegroups.com
Attention needed from Jakob Linke

Marco Vitale voted and added 1 comment

Votes added by Marco Vitale

Auto-Submit+1
Commit-Queue+2

1 comment

File src/parsing/parser-base.h
Line 2066, Patchset 3: // Lazy compilation implies this function already passed the PreParser.
Toon Verwaest . resolved

This isn't entirely technically correct. It was either parsed or preparsed. Either way, the ParseBase has seen this literal before and has already called ValidateRegExpLiteral on it.

Marco Vitale

Done

Open in Gerrit

Related details

Attention is currently required from:
  • Jakob Linke
Submit Requirements:
    • requirement satisfiedCode-Owners
    • requirement satisfiedCode-Review
    • requirement satisfiedReview-Enforcement
    Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
    Gerrit-MessageType: comment
    Gerrit-Project: v8/v8
    Gerrit-Branch: main
    Gerrit-Change-Id: I16ca3bcd385c596bd70b84e0e3876549360de503
    Gerrit-Change-Number: 7665887
    Gerrit-PatchSet: 4
    Gerrit-Owner: Marco Vitale <mrc...@chromium.org>
    Gerrit-Reviewer: Jakob Linke <jgr...@chromium.org>
    Gerrit-Reviewer: Marco Vitale <mrc...@chromium.org>
    Gerrit-Attention: Jakob Linke <jgr...@chromium.org>
    Gerrit-Comment-Date: Mon, 16 Mar 2026 17:17:59 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: Yes
    Comment-In-Reply-To: Toon Verwaest <verw...@chromium.org>
    satisfied_requirement
    open
    diffy

    V8 LUCI CQ (Gerrit)

    unread,
    Mar 16, 2026, 3:08:00 PM (9 hours ago) Mar 16
    to Marco Vitale, Toon Verwaest, Jakob Linke, chrom...@appspot.gserviceaccount.com, marja...@chromium.org, v8-re...@googlegroups.com

    V8 LUCI CQ submitted the change with unreviewed changes

    Unreviewed changes

    3 is the latest approved patch-set.
    The change was submitted with unreviewed changes in the following files:

    ```
    The name of the file: src/parsing/parser-base.h
    Insertions: 1, Deletions: 3.

    @@ -2063,9 +2063,7 @@
    RegExpFlags flags,
    RegExpError* regexp_error) {
    if (this->flags().is_lazy_compile()) {
    - // Lazy compilation implies this function already passed the PreParser.
    - // Since the PreParser throws early SyntaxErrors for invalid RegExp
    - // literals, we know they are guaranteed to be valid here.
    + // Lazy compilation implies this has already been validated.
    return true;
    }

    ```

    Change information

    Commit message:
    [parser] Skip redundant re-parsed RegExp validation

    During lazy compilation, the full parser redundantly re-validates the
    syntax of RegExp literals. However, a SharedFunctionInfo can only be
    created if the function's source code was successfully parsed during a
    previous compilation phase.

    This yields a 6% performance gain for prismjs-startup-es6 on Jetstream3.
    Change-Id: I16ca3bcd385c596bd70b84e0e3876549360de503
    Bug: 493189218
    Commit-Queue: Marco Vitale <mrc...@chromium.org>
    Reviewed-by: Toon Verwaest <verw...@chromium.org>
    Auto-Submit: Marco Vitale <mrc...@chromium.org>
    Cr-Commit-Position: refs/heads/main@{#105834}
    Files:
    • M src/parsing/parser-base.h
    Change size: XS
    Delta: 1 file changed, 5 insertions(+), 2 deletions(-)
    Branch: refs/heads/main
    Submit Requirements:
    • requirement satisfiedCode-Review: +1 by Toon Verwaest
    Open in Gerrit
    Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
    Gerrit-MessageType: merged
    Gerrit-Project: v8/v8
    Gerrit-Branch: main
    Gerrit-Change-Id: I16ca3bcd385c596bd70b84e0e3876549360de503
    Gerrit-Change-Number: 7665887
    Gerrit-PatchSet: 5
    Gerrit-Owner: Marco Vitale <mrc...@chromium.org>
    Gerrit-Reviewer: Jakob Linke <jgr...@chromium.org>
    Gerrit-Reviewer: Marco Vitale <mrc...@chromium.org>
    Gerrit-Reviewer: Toon Verwaest <verw...@chromium.org>
    open
    diffy
    satisfied_requirement
    Reply all
    Reply to author
    Forward
    0 new messages