[maglev] String.p.slice(-1) optimization: add a missing String check [v8/v8 : main]

0 views
Skip to first unread message

Marja Hölttä (Gerrit)

unread,
3:55 AM (8 hours ago) 3:55 AM
to Victor Gomes, V8 LUCI CQ, leszek...@chromium.org, v8-re...@googlegroups.com, verwaes...@chromium.org, victorgo...@chromium.org
Attention needed from Victor Gomes

Marja Hölttä added 1 comment

Patchset-level comments
File-level comment, Patchset 1 (Latest):
Marja Hölttä . resolved

ptal

Open in Gerrit

Related details

Attention is currently required from:
  • Victor Gomes
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: Ic0b18527ccfc6f55705f80c853bfc0ba956c337e
Gerrit-Change-Number: 7075472
Gerrit-PatchSet: 1
Gerrit-Owner: Marja Hölttä <ma...@chromium.org>
Gerrit-Reviewer: Marja Hölttä <ma...@chromium.org>
Gerrit-Reviewer: Victor Gomes <victo...@chromium.org>
Gerrit-Attention: Victor Gomes <victo...@chromium.org>
Gerrit-Comment-Date: Thu, 23 Oct 2025 07:55:46 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
unsatisfied_requirement
open
diffy

Victor Gomes (Gerrit)

unread,
3:57 AM (8 hours ago) 3:57 AM
to Marja Hölttä, V8 LUCI CQ, leszek...@chromium.org, v8-re...@googlegroups.com, verwaes...@chromium.org, victorgo...@chromium.org
Attention needed from Marja Hölttä

Victor Gomes voted and added 2 comments

Votes added by Victor Gomes

Code-Review+1

2 comments

Patchset-level comments
Victor Gomes . resolved

LGTM!

File src/maglev/maglev-graph-builder.cc
Line 9530, Patchset 1 (Latest): if (!CanSpeculateCall()) return {};
Victor Gomes . unresolved

Nit: What's the value if the args.count() == 0? We can return it before the CanSpeculate condition.

Open in Gerrit

Related details

Attention is currently required from:
  • Marja Hölttä
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: Ic0b18527ccfc6f55705f80c853bfc0ba956c337e
Gerrit-Change-Number: 7075472
Gerrit-PatchSet: 1
Gerrit-Owner: Marja Hölttä <ma...@chromium.org>
Gerrit-Reviewer: Marja Hölttä <ma...@chromium.org>
Gerrit-Reviewer: Victor Gomes <victo...@chromium.org>
Gerrit-Attention: Marja Hölttä <ma...@chromium.org>
Gerrit-Comment-Date: Thu, 23 Oct 2025 07:57:23 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
satisfied_requirement
unsatisfied_requirement
open
diffy

Marja Hölttä (Gerrit)

unread,
4:34 AM (7 hours ago) 4:34 AM
to Victor Gomes, V8 LUCI CQ, leszek...@chromium.org, v8-re...@googlegroups.com, verwaes...@chromium.org, victorgo...@chromium.org

Marja Hölttä added 2 comments

Patchset-level comments
Marja Hölttä . resolved

thx!

File src/maglev/maglev-graph-builder.cc
Line 9530, Patchset 1 (Latest): if (!CanSpeculateCall()) return {};
Victor Gomes . resolved

Nit: What's the value if the args.count() == 0? We can return it before the CanSpeculate condition.

Marja Hölttä

As discussed IRL, we'd still need to check that receiver is a string in that case -> that would clutter the code and prob the benefit is not that high -> not doing it.

Open in Gerrit

Related details

Attention set is empty
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: Ic0b18527ccfc6f55705f80c853bfc0ba956c337e
    Gerrit-Change-Number: 7075472
    Gerrit-PatchSet: 1
    Gerrit-Owner: Marja Hölttä <ma...@chromium.org>
    Gerrit-Reviewer: Marja Hölttä <ma...@chromium.org>
    Gerrit-Reviewer: Victor Gomes <victo...@chromium.org>
    Gerrit-Comment-Date: Thu, 23 Oct 2025 08:34:02 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: No
    Comment-In-Reply-To: Victor Gomes <victo...@chromium.org>
    satisfied_requirement
    open
    diffy

    Marja Hölttä (Gerrit)

    unread,
    4:34 AM (7 hours ago) 4:34 AM
    to Victor Gomes, V8 LUCI CQ, leszek...@chromium.org, v8-re...@googlegroups.com, verwaes...@chromium.org, victorgo...@chromium.org

    Marja Hölttä voted Commit-Queue+2

    Commit-Queue+2
    Open in Gerrit

    Related details

    Attention set is empty
    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: Ic0b18527ccfc6f55705f80c853bfc0ba956c337e
    Gerrit-Change-Number: 7075472
    Gerrit-PatchSet: 1
    Gerrit-Owner: Marja Hölttä <ma...@chromium.org>
    Gerrit-Reviewer: Marja Hölttä <ma...@chromium.org>
    Gerrit-Reviewer: Victor Gomes <victo...@chromium.org>
    Gerrit-Comment-Date: Thu, 23 Oct 2025 08:34:08 +0000
    Gerrit-HasComments: No
    Gerrit-Has-Labels: Yes
    satisfied_requirement
    open
    diffy

    V8 LUCI CQ (Gerrit)

    unread,
    4:37 AM (7 hours ago) 4:37 AM
    to Marja Hölttä, Victor Gomes, leszek...@chromium.org, v8-re...@googlegroups.com, verwaes...@chromium.org, victorgo...@chromium.org

    V8 LUCI CQ submitted the change

    Change information

    Commit message:
    [maglev] String.p.slice(-1) optimization: add a missing String check

    Even if we check that we're calling the correct slice function, the receiver is not necessarily a string.
    Fixed: 454270729
    Change-Id: Ic0b18527ccfc6f55705f80c853bfc0ba956c337e
    Commit-Queue: Marja Hölttä <ma...@chromium.org>
    Reviewed-by: Victor Gomes <victo...@chromium.org>
    Cr-Commit-Position: refs/heads/main@{#103305}
    Files:
    • M src/maglev/maglev-graph-builder.cc
    • A test/mjsunit/maglev/regress/regress-454270729.js
    • A test/mjsunit/maglev/regress/regress-454270729b.js
    Change size: S
    Delta: 3 files changed, 43 insertions(+), 1 deletion(-)
    Branch: refs/heads/main
    Submit Requirements:
    • requirement satisfiedCode-Review: +1 by Victor Gomes
    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: Ic0b18527ccfc6f55705f80c853bfc0ba956c337e
    Gerrit-Change-Number: 7075472
    Gerrit-PatchSet: 2
    Gerrit-Owner: Marja Hölttä <ma...@chromium.org>
    Gerrit-Reviewer: Marja Hölttä <ma...@chromium.org>
    Gerrit-Reviewer: Victor Gomes <victo...@chromium.org>
    open
    diffy
    satisfied_requirement
    Reply all
    Reply to author
    Forward
    0 new messages