[regexp] Assemble from BC: Implement bytecodes generated by peephole opt [v8/v8 : main]

0 views
Skip to first unread message

Patrick Thier (Gerrit)

unread,
Sep 2, 2025, 12:36:13 PM (5 days ago) Sep 2
to Jakob Linke, V8 LUCI CQ, jgrube...@chromium.org, pthier...@chromium.org, v8-re...@googlegroups.com
Attention needed from Jakob Linke

Patrick Thier added 1 comment

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

PTAL

Open in Gerrit

Related details

Attention is currently required from:
  • Jakob Linke
Submit Requirements:
  • requirement satisfiedCode-Owners
  • requirement is not satisfiedCode-Review
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: Ic1a0df162a73f85cff515aa92ee146877371a62d
Gerrit-Change-Number: 6907597
Gerrit-PatchSet: 1
Gerrit-Owner: Patrick Thier <pth...@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, 02 Sep 2025 16:36:08 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
satisfied_requirement
unsatisfied_requirement
open
diffy

Jakob Linke (Gerrit)

unread,
Sep 4, 2025, 1:09:10 AM (3 days ago) Sep 4
to Patrick Thier, V8 LUCI CQ, jgrube...@chromium.org, pthier...@chromium.org, v8-re...@googlegroups.com
Attention needed from Patrick Thier

Jakob Linke voted and added 4 comments

Votes added by Jakob Linke

Code-Review+1

4 comments

File src/regexp/regexp-code-generator.cc
Line 300, Patchset 1 (Latest): std::memset(nibble_table->begin(), 0, nibble_table->length());
Jakob Linke . unresolved

Let's DCHECK the nibble_table size is as expected.

Line 306, Patchset 1 (Latest): const int bit = i * kBitsPerByte + j;
Jakob Linke . unresolved

nit: consider `bit_index` to clarify.

Line 309, Patchset 1 (Latest): int lo_nibble = bit & 0x0f;
Jakob Linke . unresolved

A short comment please that mentions the relation between the bit index and ascii char code.

File src/regexp/regexp-macro-assembler-tracer.cc
Line 459, Patchset 1 (Latest): "SkipUntilChar(cp_offset=%d, advance_by=%d, char1=0x%04x%s, "
Jakob Linke . unresolved

OrChar

Open in Gerrit

Related details

Attention is currently required from:
  • Patrick Thier
Submit Requirements:
  • requirement satisfiedCode-Owners
  • requirement satisfiedCode-Review
  • requirement is not satisfiedNo-Unresolved-Comments
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: Ic1a0df162a73f85cff515aa92ee146877371a62d
Gerrit-Change-Number: 6907597
Gerrit-PatchSet: 1
Gerrit-Owner: Patrick Thier <pth...@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: Thu, 04 Sep 2025 05:09:05 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
satisfied_requirement
unsatisfied_requirement
open
diffy

Patrick Thier (Gerrit)

unread,
Sep 4, 2025, 3:46:48 AM (3 days ago) Sep 4
to Jakob Linke, V8 LUCI CQ, jgrube...@chromium.org, pthier...@chromium.org, v8-re...@googlegroups.com

Patrick Thier added 4 comments

File src/regexp/regexp-code-generator.cc
Line 300, Patchset 1: std::memset(nibble_table->begin(), 0, nibble_table->length());
Jakob Linke . resolved

Let's DCHECK the nibble_table size is as expected.

Patrick Thier

Done

Line 306, Patchset 1: const int bit = i * kBitsPerByte + j;
Jakob Linke . resolved

nit: consider `bit_index` to clarify.

Patrick Thier

Done

Line 309, Patchset 1: int lo_nibble = bit & 0x0f;
Jakob Linke . resolved

A short comment please that mentions the relation between the bit index and ascii char code.

Patrick Thier

Done

File src/regexp/regexp-macro-assembler-tracer.cc
Line 459, Patchset 1: "SkipUntilChar(cp_offset=%d, advance_by=%d, char1=0x%04x%s, "
Jakob Linke . resolved

OrChar

Patrick Thier

Done

Open in Gerrit

Related details

Attention set is empty
Submit Requirements:
  • requirement satisfiedCode-Owners
  • requirement satisfiedCode-Review
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: Ic1a0df162a73f85cff515aa92ee146877371a62d
Gerrit-Change-Number: 6907597
Gerrit-PatchSet: 2
Gerrit-Owner: Patrick Thier <pth...@chromium.org>
Gerrit-Reviewer: Jakob Linke <jgr...@chromium.org>
Gerrit-Reviewer: Patrick Thier <pth...@chromium.org>
Gerrit-Comment-Date: Thu, 04 Sep 2025 07:46:44 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: Jakob Linke <jgr...@chromium.org>
satisfied_requirement
open
diffy

Patrick Thier (Gerrit)

unread,
Sep 4, 2025, 7:19:54 AM (3 days ago) Sep 4
to Jakob Linke, V8 LUCI CQ, jgrube...@chromium.org, pthier...@chromium.org, v8-re...@googlegroups.com

Patrick Thier voted Commit-Queue+2

Commit-Queue+2
Open in Gerrit

Related details

Attention set is empty
Submit Requirements:
  • requirement satisfiedCode-Owners
  • requirement satisfiedCode-Review
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: Ic1a0df162a73f85cff515aa92ee146877371a62d
Gerrit-Change-Number: 6907597
Gerrit-PatchSet: 3
Gerrit-Owner: Patrick Thier <pth...@chromium.org>
Gerrit-Reviewer: Jakob Linke <jgr...@chromium.org>
Gerrit-Reviewer: Patrick Thier <pth...@chromium.org>
Gerrit-Comment-Date: Thu, 04 Sep 2025 11:19:17 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
satisfied_requirement
open
diffy

V8 LUCI CQ (Gerrit)

unread,
Sep 4, 2025, 8:01:59 AM (3 days ago) Sep 4
to Patrick Thier, Jakob Linke, jgrube...@chromium.org, pthier...@chromium.org, v8-re...@googlegroups.com

V8 LUCI CQ submitted the change with unreviewed changes

Unreviewed changes

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

```
The name of the file: src/regexp/regexp-code-generator.cc
Insertions: 7, Deletions: 4.

The diff is too large to show. Please review the diff.
```
```
The name of the file: src/regexp/regexp-macro-assembler-tracer.cc
Insertions: 1, Deletions: 1.

The diff is too large to show. Please review the diff.
```

Change information

Commit message:
[regexp] Assemble from BC: Implement bytecodes generated by peephole opt

- Add default implementations for all bytecodes generated by peephole
optimization.
- Implement bytecodes generated by peephole optimization in
RegExpCodeGenerator
- Fallback in RegExpCodeGenerator is now marked UNREACHABLE. The whole
fallback mechanism will be removed in a follow-up.
- Remove --no-regexp-peephole-optimization from assemble-from-bytecode
test variants.

Drive-by: Ensure INIT macros in RegExpCodeGenerator are terminated by
semicolon.
Bug: 437003349
Change-Id: Ic1a0df162a73f85cff515aa92ee146877371a62d
Commit-Queue: Patrick Thier <pth...@chromium.org>
Reviewed-by: Jakob Linke <jgr...@chromium.org>
Cr-Commit-Position: refs/heads/main@{#102241}
Files:
  • M src/regexp/regexp-bytecode-generator.cc
  • M src/regexp/regexp-bytecode-generator.h
  • M src/regexp/regexp-code-generator.cc
  • M src/regexp/regexp-macro-assembler-tracer.cc
  • M src/regexp/regexp-macro-assembler-tracer.h
  • M src/regexp/regexp-macro-assembler.cc
  • M src/regexp/regexp-macro-assembler.h
  • M tools/testrunner/local/variants.py
Change size: L
Delta: 8 files changed, 321 insertions(+), 27 deletions(-)
Branch: refs/heads/main
Submit Requirements:
  • requirement satisfiedCode-Review: +1 by Jakob Linke
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: Ic1a0df162a73f85cff515aa92ee146877371a62d
Gerrit-Change-Number: 6907597
Gerrit-PatchSet: 4
Gerrit-Owner: Patrick Thier <pth...@chromium.org>
Gerrit-Reviewer: Jakob Linke <jgr...@chromium.org>
Gerrit-Reviewer: Patrick Thier <pth...@chromium.org>
open
diffy
satisfied_requirement
Reply all
Reply to author
Forward
0 new messages