[regexp] Fuse greedy character-class consume loops in the compiler [v8/v8 : main]

0 views
Skip to first unread message

Jakob Linke (Gerrit)

unread,
Jun 30, 2026, 5:11:31 AM (2 days ago) Jun 30
to Patrick Thier, chrom...@appspot.gserviceaccount.com, v8-s...@luci-project-accounts.iam.gserviceaccount.com, jgrube...@chromium.org, pthier...@chromium.org, v8-re...@googlegroups.com
Attention needed from Patrick Thier

New activity on the change

Open in Gerrit

Related details

Attention is currently required from:
  • Patrick Thier
Submit Requirements:
  • requirement 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: Ica135b86d505821e092711113b6a3d0449f2763e
Gerrit-Change-Number: 8021503
Gerrit-PatchSet: 3
Gerrit-Owner: Jakob Linke <jgr...@chromium.org>
Gerrit-Reviewer: Jakob Linke <jgr...@chromium.org>
Gerrit-Reviewer: Patrick Thier <pth...@chromium.org>
Gerrit-Attention: Patrick Thier <pth...@chromium.org>
Gerrit-Comment-Date: Tue, 30 Jun 2026 09:11:27 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: No
satisfied_requirement
unsatisfied_requirement
open
diffy

Patrick Thier (Gerrit)

unread,
Jun 30, 2026, 7:10:41 AM (2 days ago) Jun 30
to Jakob Linke, chrom...@appspot.gserviceaccount.com, v8-s...@luci-project-accounts.iam.gserviceaccount.com, jgrube...@chromium.org, pthier...@chromium.org, v8-re...@googlegroups.com
Attention needed from Jakob Linke

Patrick Thier added 3 comments

Patchset-level comments
File-level comment, Patchset 3 (Latest):
Patrick Thier . resolved

Unfortunately what I was afraid of seems to be true: It is very easy to miss cases that were previously supported with simple peephole.
E.g. cases I checked that this doesn't cover correctly:
`/[a]/` -> Doesn't get optimized to `SkipUntilChar`.
`/[a]/vi` -> Gets optimized to `SkipUntilBitInTable` whereas it was previously `SkipUntilCharAnd`.
In total I tried 3 patterns and all failed.

Also while trying out these patterns: It is not obvious at a glance why the optimizations fail. Please add more tracing.

File src/regexp/regexp-compiler.cc
Line 3827, Patchset 3 (Latest): if (!compiler->one_byte()) return false;
Patrick Thier . unresolved

This is a regression compared to the current implementation. All of the `Skip*` ops targeted by this CL support 2-byte.
Can this be fixed?

Line 3844, Patchset 3 (Latest): if (el.text_type() != TextElement::CLASS_RANGES) return false;
Patrick Thier . unresolved

This is also a regression.
E.g. `/a+/` right now produces a `SkipUntilChar`

Open in Gerrit

Related details

Attention is currently required from:
  • Jakob Linke
Submit Requirements:
    • requirement satisfiedCode-Owners
    • requirement is not satisfiedCode-Review
    • requirement is not satisfiedNo-Unresolved-Comments
    • 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: Ica135b86d505821e092711113b6a3d0449f2763e
    Gerrit-Change-Number: 8021503
    Gerrit-PatchSet: 3
    Gerrit-Owner: Jakob Linke <jgr...@chromium.org>
    Gerrit-Reviewer: Jakob Linke <jgr...@chromium.org>
    Gerrit-Reviewer: Patrick Thier <pth...@chromium.org>
    Gerrit-Attention: Jakob Linke <jgr...@chromium.org>
    Gerrit-Comment-Date: Tue, 30 Jun 2026 11:10:36 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: No
    satisfied_requirement
    unsatisfied_requirement
    open
    diffy

    chromeperf@appspot.gserviceaccount.com (Gerrit)

    unread,
    Jul 1, 2026, 12:45:40 PM (13 hours ago) Jul 1
    to Jakob Linke, Patrick Thier, v8-s...@luci-project-accounts.iam.gserviceaccount.com, jgrube...@chromium.org, pthier...@chromium.org, v8-re...@googlegroups.com
    Attention needed from Jakob Linke

    Message from chrom...@appspot.gserviceaccount.com

    📍 Job mac-m1_mini_2020-perf/jetstream-main.crossbench complete.

    See results at: https://pinpoint-dot-chromeperf.appspot.com/job/163c0ba3c90000

    Open in Gerrit

    Related details

    Attention is currently required from:
    • Jakob Linke
    Submit Requirements:
    • requirement satisfiedCode-Owners
    • requirement is not satisfiedCode-Review
    • requirement is not satisfiedNo-Unresolved-Comments
    • 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: Ica135b86d505821e092711113b6a3d0449f2763e
    Gerrit-Change-Number: 8021503
    Gerrit-PatchSet: 4
    Gerrit-Comment-Date: Wed, 01 Jul 2026 16:45:36 +0000
    Gerrit-HasComments: No
    Gerrit-Has-Labels: No
    satisfied_requirement
    unsatisfied_requirement
    open
    diffy

    chromeperf@appspot.gserviceaccount.com (Gerrit)

    unread,
    12:26 AM (2 hours ago) 12:26 AM
    to Jakob Linke, Patrick Thier, v8-s...@luci-project-accounts.iam.gserviceaccount.com, jgrube...@chromium.org, pthier...@chromium.org, v8-re...@googlegroups.com
    Attention needed from Jakob Linke

    Message from chrom...@appspot.gserviceaccount.com

    📍 Job mac-m1_mini_2020-perf/jetstream-main.crossbench complete.

    See results at: https://pinpoint-dot-chromeperf.appspot.com/job/1080b7adc90000

    Open in Gerrit

    Related details

    Attention is currently required from:
    • Jakob Linke
    Submit Requirements:
    • requirement satisfiedCode-Owners
    • requirement is not satisfiedCode-Review
    • requirement is not satisfiedNo-Unresolved-Comments
    • 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: Ica135b86d505821e092711113b6a3d0449f2763e
    Gerrit-Change-Number: 8021503
    Gerrit-PatchSet: 4
    Gerrit-Owner: Jakob Linke <jgr...@chromium.org>
    Gerrit-Reviewer: Jakob Linke <jgr...@chromium.org>
    Gerrit-Reviewer: Patrick Thier <pth...@chromium.org>
    Gerrit-Attention: Jakob Linke <jgr...@chromium.org>
    Gerrit-Comment-Date: Thu, 02 Jul 2026 04:26:19 +0000
    Gerrit-HasComments: No
    Gerrit-Has-Labels: No
    satisfied_requirement
    unsatisfied_requirement
    open
    diffy
    Reply all
    Reply to author
    Forward
    0 new messages