[defer-import-eval] implement deferred import evaluation for ES modules [v8/v8 : main]

0 views
Skip to first unread message

Caio Lima (Gerrit)

unread,
Nov 4, 2025, 12:42:31 PM11/4/25
to Olivier Flückiger, Leszek Swirski, V8 LUCI CQ, Hannes Payer, cbruni...@chromium.org, dmercadi...@chromium.org, mlippau...@chromium.org, v8-re...@googlegroups.com
Attention needed from Leszek Swirski and Olivier Flückiger

Caio Lima voted Commit-Queue+1

Commit-Queue+1
Open in Gerrit

Related details

Attention is currently required from:
  • Leszek Swirski
  • Olivier Flückiger
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: Ia2aa34037a41a1525b1e0ca8fc7c96dbc23dbd87
Gerrit-Change-Number: 7102359
Gerrit-PatchSet: 9
Gerrit-Owner: Caio Lima <caio...@igalia.com>
Gerrit-Reviewer: Caio Lima <caio...@igalia.com>
Gerrit-Reviewer: Leszek Swirski <les...@chromium.org>
Gerrit-Reviewer: Olivier Flückiger <ol...@chromium.org>
Gerrit-CC: Hannes Payer <hpa...@chromium.org>
Gerrit-Attention: Olivier Flückiger <ol...@chromium.org>
Gerrit-Attention: Leszek Swirski <les...@chromium.org>
Gerrit-Comment-Date: Tue, 04 Nov 2025 17:42:27 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
unsatisfied_requirement
open
diffy

Caio Lima (Gerrit)

unread,
Nov 4, 2025, 1:56:29 PM11/4/25
to Olivier Flückiger, Leszek Swirski, V8 LUCI CQ, Hannes Payer, cbruni...@chromium.org, dmercadi...@chromium.org, mlippau...@chromium.org, v8-re...@googlegroups.com
Attention needed from Leszek Swirski and Olivier Flückiger

Caio Lima added 1 comment

File src/ic/accessor-assembler.cc
Line 992, Patchset 9 (Latest): &is_deferred_namespace);
Caio Lima . unresolved

I’m wondering how the impact of this check would impact non-deferred module accesses. I still need to run Speedometer and JetStream here, but would it be possible to trigger a pinpoint to check it here?

Open in Gerrit

Related details

Attention is currently required from:
  • Leszek Swirski
  • Olivier Flückiger
Submit Requirements:
    • requirement is not 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: Ia2aa34037a41a1525b1e0ca8fc7c96dbc23dbd87
    Gerrit-Change-Number: 7102359
    Gerrit-PatchSet: 9
    Gerrit-Owner: Caio Lima <caio...@igalia.com>
    Gerrit-Reviewer: Caio Lima <caio...@igalia.com>
    Gerrit-Reviewer: Leszek Swirski <les...@chromium.org>
    Gerrit-Reviewer: Olivier Flückiger <ol...@chromium.org>
    Gerrit-CC: Hannes Payer <hpa...@chromium.org>
    Gerrit-Attention: Olivier Flückiger <ol...@chromium.org>
    Gerrit-Attention: Leszek Swirski <les...@chromium.org>
    Gerrit-Comment-Date: Tue, 04 Nov 2025 18:56:25 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: No
    unsatisfied_requirement
    open
    diffy

    chromeperf@appspot.gserviceaccount.com (Gerrit)

    unread,
    Nov 5, 2025, 7:33:37 AM11/5/25
    to Caio Lima, Olivier Flückiger, Leszek Swirski, V8 LUCI CQ, Hannes Payer, cbruni...@chromium.org, dmercadi...@chromium.org, mlippau...@chromium.org, v8-re...@googlegroups.com
    Attention needed from Caio Lima, Leszek Swirski and Olivier Flückiger

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

    📍 Job mac-m1_mini_2020-perf/speedometer3 complete.

    See results at: https://pinpoint-dot-chromeperf.appspot.com/job/15354465d10000

    Open in Gerrit

    Related details

    Attention is currently required from:
    • Caio Lima
    • Leszek Swirski
    • Olivier Flückiger
    Submit Requirements:
    • requirement is not 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: Ia2aa34037a41a1525b1e0ca8fc7c96dbc23dbd87
    Gerrit-Change-Number: 7102359
    Gerrit-PatchSet: 9
    Gerrit-Owner: Caio Lima <caio...@igalia.com>
    Gerrit-Reviewer: Caio Lima <caio...@igalia.com>
    Gerrit-Reviewer: Leszek Swirski <les...@chromium.org>
    Gerrit-Reviewer: Olivier Flückiger <ol...@chromium.org>
    Gerrit-CC: Hannes Payer <hpa...@chromium.org>
    Gerrit-Attention: Olivier Flückiger <ol...@chromium.org>
    Gerrit-Attention: Leszek Swirski <les...@chromium.org>
    Gerrit-Comment-Date: Wed, 05 Nov 2025 12:33:33 +0000
    Gerrit-HasComments: No
    Gerrit-Has-Labels: No
    unsatisfied_requirement
    open
    diffy

    chromeperf@appspot.gserviceaccount.com (Gerrit)

    unread,
    Nov 5, 2025, 7:40:42 AM11/5/25
    to Caio Lima, Olivier Flückiger, Leszek Swirski, V8 LUCI CQ, Hannes Payer, cbruni...@chromium.org, dmercadi...@chromium.org, mlippau...@chromium.org, v8-re...@googlegroups.com
    Attention needed from Caio Lima, Leszek Swirski and Olivier Flückiger

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

    📍 Job mac-m1_mini_2020-perf/speedometer3 complete.

    See results at: https://pinpoint-dot-chromeperf.appspot.com/job/111e6402d10000

    Gerrit-Comment-Date: Wed, 05 Nov 2025 12:40:38 +0000
    Gerrit-HasComments: No
    Gerrit-Has-Labels: No
    unsatisfied_requirement
    open
    diffy

    chromeperf@appspot.gserviceaccount.com (Gerrit)

    unread,
    Nov 5, 2025, 7:46:13 AM11/5/25
    to Caio Lima, Olivier Flückiger, Leszek Swirski, V8 LUCI CQ, Hannes Payer, cbruni...@chromium.org, dmercadi...@chromium.org, mlippau...@chromium.org, v8-re...@googlegroups.com
    Attention needed from Caio Lima, Leszek Swirski and Olivier Flückiger

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

    📍 Job mac-m1_mini_2020-perf/speedometer3 complete.

    See results at: https://pinpoint-dot-chromeperf.appspot.com/job/13fdb721d10000

    Gerrit-Comment-Date: Wed, 05 Nov 2025 12:46:10 +0000
    Gerrit-HasComments: No
    Gerrit-Has-Labels: No
    unsatisfied_requirement
    open
    diffy

    chromeperf@appspot.gserviceaccount.com (Gerrit)

    unread,
    Nov 5, 2025, 8:58:38 AM11/5/25
    to Caio Lima, Olivier Flückiger, Leszek Swirski, V8 LUCI CQ, Hannes Payer, cbruni...@chromium.org, dmercadi...@chromium.org, mlippau...@chromium.org, v8-re...@googlegroups.com
    Attention needed from Caio Lima, Leszek Swirski and Olivier Flückiger

    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/14c22269d10000

    Gerrit-Comment-Date: Wed, 05 Nov 2025 13:58:34 +0000
    Gerrit-HasComments: No
    Gerrit-Has-Labels: No
    unsatisfied_requirement
    open
    diffy

    chromeperf@appspot.gserviceaccount.com (Gerrit)

    unread,
    Nov 5, 2025, 9:09:04 AM11/5/25
    to Caio Lima, Olivier Flückiger, Leszek Swirski, V8 LUCI CQ, Hannes Payer, cbruni...@chromium.org, dmercadi...@chromium.org, mlippau...@chromium.org, v8-re...@googlegroups.com
    Attention needed from Caio Lima, Leszek Swirski and Olivier Flückiger

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

    📍 Job mac-m1_mini_2020-perf/speedometer3 complete.

    See results at: https://pinpoint-dot-chromeperf.appspot.com/job/16080bc2d10000

    Gerrit-Comment-Date: Wed, 05 Nov 2025 14:09:00 +0000
    Gerrit-HasComments: No
    Gerrit-Has-Labels: No
    unsatisfied_requirement
    open
    diffy

    chromeperf@appspot.gserviceaccount.com (Gerrit)

    unread,
    Nov 5, 2025, 9:35:58 AM11/5/25
    to Caio Lima, Olivier Flückiger, Leszek Swirski, V8 LUCI CQ, Hannes Payer, cbruni...@chromium.org, dmercadi...@chromium.org, mlippau...@chromium.org, v8-re...@googlegroups.com
    Attention needed from Caio Lima, Leszek Swirski and Olivier Flückiger

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

    📍 Job mac-m1_mini_2020-perf/speedometer3 complete.

    See results at: https://pinpoint-dot-chromeperf.appspot.com/job/14e08379d10000

    Gerrit-Comment-Date: Wed, 05 Nov 2025 14:35:55 +0000
    Gerrit-HasComments: No
    Gerrit-Has-Labels: No
    unsatisfied_requirement
    open
    diffy

    Olivier Flückiger (Gerrit)

    unread,
    Nov 5, 2025, 11:15:19 AM11/5/25
    to Caio Lima, chrom...@appspot.gserviceaccount.com, Leszek Swirski, V8 LUCI CQ, Hannes Payer, cbruni...@chromium.org, dmercadi...@chromium.org, mlippau...@chromium.org, v8-re...@googlegroups.com
    Attention needed from Caio Lima and Leszek Swirski

    Olivier Flückiger added 1 comment

    File src/ic/accessor-assembler.cc
    Line 992, Patchset 9 (Latest): &is_deferred_namespace);
    Caio Lima . unresolved

    I’m wondering how the impact of this check would impact non-deferred module accesses. I still need to run Speedometer and JetStream here, but would it be possible to trigger a pinpoint to check it here?

    Olivier Flückiger

    Can we just not configure the IC for kModuleExport as long as the module is not evaluated? Basically here we wouly only CSA_DCHECK that the module is evaluated. And in the IC update machinery we should not configure the IC with modules which are not evaluated yet, but instead leave it empty. Maybe I miss some detail that makes this impossible?

    Open in Gerrit

    Related details

    Attention is currently required from:
    • Caio Lima
    • Leszek Swirski
    Submit Requirements:
    • requirement is not 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: Ia2aa34037a41a1525b1e0ca8fc7c96dbc23dbd87
    Gerrit-Change-Number: 7102359
    Gerrit-PatchSet: 9
    Gerrit-Owner: Caio Lima <caio...@igalia.com>
    Gerrit-Reviewer: Caio Lima <caio...@igalia.com>
    Gerrit-Reviewer: Leszek Swirski <les...@chromium.org>
    Gerrit-Reviewer: Olivier Flückiger <ol...@chromium.org>
    Gerrit-CC: Hannes Payer <hpa...@chromium.org>
    Gerrit-Attention: Caio Lima <caio...@igalia.com>
    Gerrit-Attention: Leszek Swirski <les...@chromium.org>
    Gerrit-Comment-Date: Wed, 05 Nov 2025 16:15:14 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: No
    Comment-In-Reply-To: Caio Lima <caio...@igalia.com>
    unsatisfied_requirement
    open
    diffy

    Caio Lima (Gerrit)

    unread,
    Nov 5, 2025, 12:44:09 PM11/5/25
    to chrom...@appspot.gserviceaccount.com, Olivier Flückiger, Leszek Swirski, V8 LUCI CQ, Hannes Payer, cbruni...@chromium.org, dmercadi...@chromium.org, mlippau...@chromium.org, v8-re...@googlegroups.com
    Attention needed from Leszek Swirski and Olivier Flückiger

    Caio Lima added 1 comment

    File src/ic/accessor-assembler.cc
    Line 992, Patchset 9 (Latest): &is_deferred_namespace);
    Caio Lima . unresolved

    I’m wondering how the impact of this check would impact non-deferred module accesses. I still need to run Speedometer and JetStream here, but would it be possible to trigger a pinpoint to check it here?

    Olivier Flückiger

    Can we just not configure the IC for kModuleExport as long as the module is not evaluated? Basically here we wouly only CSA_DCHECK that the module is evaluated. And in the IC update machinery we should not configure the IC with modules which are not evaluated yet, but instead leave it empty. Maybe I miss some detail that makes this impossible?

    Caio Lima

    No, you are right here and I'm the one who actually missed something. I was with the case in mind where ModuleNamespace objects share their maps, thinking in the scenario where 2 different deferred modules having the same exported names. However, I just figured out that it's never the case[1]. Given that, you are right and I can actually do the check when installing the IC handler. I'm going to change it and thank you for the question.

    [1] - https://github.com/v8/v8/blob/main/src/objects/module.cc#L383

    Open in Gerrit

    Related details

    Attention is currently required from:
    • Leszek Swirski
    • Olivier Flückiger
    Submit Requirements:
    • requirement is not 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: Ia2aa34037a41a1525b1e0ca8fc7c96dbc23dbd87
    Gerrit-Change-Number: 7102359
    Gerrit-PatchSet: 9
    Gerrit-Owner: Caio Lima <caio...@igalia.com>
    Gerrit-Reviewer: Caio Lima <caio...@igalia.com>
    Gerrit-Reviewer: Leszek Swirski <les...@chromium.org>
    Gerrit-Reviewer: Olivier Flückiger <ol...@chromium.org>
    Gerrit-CC: Hannes Payer <hpa...@chromium.org>
    Gerrit-Attention: Olivier Flückiger <ol...@chromium.org>
    Gerrit-Attention: Leszek Swirski <les...@chromium.org>
    Gerrit-Comment-Date: Wed, 05 Nov 2025 17:44:06 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: No
    Comment-In-Reply-To: Caio Lima <caio...@igalia.com>
    Comment-In-Reply-To: Olivier Flückiger <ol...@chromium.org>
    unsatisfied_requirement
    open
    diffy

    Olivier Flückiger (Gerrit)

    unread,
    Nov 6, 2025, 6:49:02 AM11/6/25
    to Caio Lima, chrom...@appspot.gserviceaccount.com, Leszek Swirski, V8 LUCI CQ, Hannes Payer, cbruni...@chromium.org, dmercadi...@chromium.org, mlippau...@chromium.org, v8-re...@googlegroups.com
    Attention needed from Caio Lima and Leszek Swirski

    Olivier Flückiger added 1 comment

    File src/ic/ic.cc
    Line 886, Patchset 11 (Latest): handler = MaybeObjectHandle(LoadHandler::LoadSlow(isolate()));
    Olivier Flückiger . unresolved

    Is this the case where the value itself then triggers the evaluation?

    It would be nice if the IC is not permanently slow, but rather we wait with updating it until the module is evaluated.

    Open in Gerrit

    Related details

    Attention is currently required from:
    • Caio Lima
    • Leszek Swirski
    Submit Requirements:
    • requirement is not 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: Ia2aa34037a41a1525b1e0ca8fc7c96dbc23dbd87
    Gerrit-Change-Number: 7102359
    Gerrit-PatchSet: 11
    Gerrit-Owner: Caio Lima <caio...@igalia.com>
    Gerrit-Reviewer: Caio Lima <caio...@igalia.com>
    Gerrit-Reviewer: Leszek Swirski <les...@chromium.org>
    Gerrit-Reviewer: Olivier Flückiger <ol...@chromium.org>
    Gerrit-CC: Hannes Payer <hpa...@chromium.org>
    Gerrit-Attention: Caio Lima <caio...@igalia.com>
    Gerrit-Attention: Leszek Swirski <les...@chromium.org>
    Gerrit-Comment-Date: Thu, 06 Nov 2025 11:48:58 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: No
    unsatisfied_requirement
    open
    diffy

    Caio Lima (Gerrit)

    unread,
    Nov 6, 2025, 7:41:41 AM11/6/25
    to chrom...@appspot.gserviceaccount.com, Olivier Flückiger, Leszek Swirski, V8 LUCI CQ, Hannes Payer, cbruni...@chromium.org, dmercadi...@chromium.org, mlippau...@chromium.org, v8-re...@googlegroups.com
    Attention needed from Leszek Swirski and Olivier Flückiger

    Caio Lima added 1 comment

    File src/ic/ic.cc
    Line 886, Patchset 11 (Latest): handler = MaybeObjectHandle(LoadHandler::LoadSlow(isolate()));
    Olivier Flückiger . unresolved

    Is this the case where the value itself then triggers the evaluation?

    It would be nice if the IC is not permanently slow, but rather we wait with updating it until the module is evaluated.

    Caio Lima

    Is this the case where the value itself then triggers the evaluation?

    I'm not sure if I understand the question, but the case here is that a missing access to a deferred namespace should trigger the evaluation to then return undefined. The logic behind this part of the spec is that it triggers the evaluation because it needs to load all exported names.

    Regarding slow path installation, the hypothesis I'm thinking here is that when ICs start to get filled, the module is quite likely to be evaluated already, due to `--lazy-feedback-allocation`. IIUC, on default configuration the vector is allocated when tiering up to Sparkplug and it's likely that an access to the module already happened at this point. So when `status != kEvaluated` here, probably is due to an error on evaluation, and since we need to throw on each access, I thought it would be a good time to give up on IC. One alternative is to actually just install slow path if `status == kError`. WDYT?

    Open in Gerrit

    Related details

    Attention is currently required from:
    • Leszek Swirski
    • Olivier Flückiger
    Submit Requirements:
    • requirement is not 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: Ia2aa34037a41a1525b1e0ca8fc7c96dbc23dbd87
    Gerrit-Change-Number: 7102359
    Gerrit-PatchSet: 11
    Gerrit-Owner: Caio Lima <caio...@igalia.com>
    Gerrit-Reviewer: Caio Lima <caio...@igalia.com>
    Gerrit-Reviewer: Leszek Swirski <les...@chromium.org>
    Gerrit-Reviewer: Olivier Flückiger <ol...@chromium.org>
    Gerrit-CC: Hannes Payer <hpa...@chromium.org>
    Gerrit-Attention: Olivier Flückiger <ol...@chromium.org>
    Gerrit-Attention: Leszek Swirski <les...@chromium.org>
    Gerrit-Comment-Date: Thu, 06 Nov 2025 12:41:37 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: No
    Comment-In-Reply-To: Olivier Flückiger <ol...@chromium.org>
    unsatisfied_requirement
    open
    diffy

    Olivier Flückiger (Gerrit)

    unread,
    Nov 6, 2025, 8:01:41 AM11/6/25
    to Caio Lima, chrom...@appspot.gserviceaccount.com, Leszek Swirski, V8 LUCI CQ, Hannes Payer, cbruni...@chromium.org, dmercadi...@chromium.org, mlippau...@chromium.org, v8-re...@googlegroups.com
    Attention needed from Caio Lima and Leszek Swirski

    Olivier Flückiger added 1 comment

    File src/ic/ic.cc
    Line 886, Patchset 11 (Latest): handler = MaybeObjectHandle(LoadHandler::LoadSlow(isolate()));
    Olivier Flückiger . unresolved

    Is this the case where the value itself then triggers the evaluation?

    It would be nice if the IC is not permanently slow, but rather we wait with updating it until the module is evaluated.

    Caio Lima

    Is this the case where the value itself then triggers the evaluation?
    I'm not sure if I understand the question, but the case here is that a missing access to a deferred namespace should trigger the evaluation to then return undefined. The logic behind this part of the spec is that it triggers the evaluation because it needs to load all exported names.

    Regarding slow path installation, the hypothesis I'm thinking here is that when ICs start to get filled, the module is quite likely to be evaluated already, due to `--lazy-feedback-allocation`. IIUC, on default configuration the vector is allocated when tiering up to Sparkplug and it's likely that an access to the module already happened at this point. So when `status != kEvaluated` here, probably is due to an error on evaluation, and since we need to throw on each access, I thought it would be a good time to give up on IC. One alternative is to actually just install slow path if `status == kError`. WDYT?

    Olivier Flückiger

    I think only updating on error would be optimal. Without an error we should be guaranteed to have an evaluated module on the next access, or not? so updating again should definitely pay off.

    Open in Gerrit

    Related details

    Attention is currently required from:
    • Caio Lima
    • Leszek Swirski
    Submit Requirements:
    • requirement is not 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: Ia2aa34037a41a1525b1e0ca8fc7c96dbc23dbd87
    Gerrit-Change-Number: 7102359
    Gerrit-PatchSet: 11
    Gerrit-Owner: Caio Lima <caio...@igalia.com>
    Gerrit-Reviewer: Caio Lima <caio...@igalia.com>
    Gerrit-Reviewer: Leszek Swirski <les...@chromium.org>
    Gerrit-Reviewer: Olivier Flückiger <ol...@chromium.org>
    Gerrit-CC: Hannes Payer <hpa...@chromium.org>
    Gerrit-Attention: Caio Lima <caio...@igalia.com>
    Gerrit-Attention: Leszek Swirski <les...@chromium.org>
    Gerrit-Comment-Date: Thu, 06 Nov 2025 13:01:34 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: No
    unsatisfied_requirement
    open
    diffy

    Olivier Flückiger (Gerrit)

    unread,
    Nov 6, 2025, 8:02:52 AM11/6/25
    to Caio Lima, chrom...@appspot.gserviceaccount.com, Leszek Swirski, V8 LUCI CQ, Hannes Payer, cbruni...@chromium.org, dmercadi...@chromium.org, mlippau...@chromium.org, v8-re...@googlegroups.com
    Attention needed from Caio Lima and Leszek Swirski

    Olivier Flückiger added 1 comment

    File src/ic/ic.cc
    Line 886, Patchset 11 (Latest): handler = MaybeObjectHandle(LoadHandler::LoadSlow(isolate()));
    Olivier Flückiger . unresolved

    Is this the case where the value itself then triggers the evaluation?

    It would be nice if the IC is not permanently slow, but rather we wait with updating it until the module is evaluated.

    Caio Lima

    Is this the case where the value itself then triggers the evaluation?
    I'm not sure if I understand the question, but the case here is that a missing access to a deferred namespace should trigger the evaluation to then return undefined. The logic behind this part of the spec is that it triggers the evaluation because it needs to load all exported names.

    Regarding slow path installation, the hypothesis I'm thinking here is that when ICs start to get filled, the module is quite likely to be evaluated already, due to `--lazy-feedback-allocation`. IIUC, on default configuration the vector is allocated when tiering up to Sparkplug and it's likely that an access to the module already happened at this point. So when `status != kEvaluated` here, probably is due to an error on evaluation, and since we need to throw on each access, I thought it would be a good time to give up on IC. One alternative is to actually just install slow path if `status == kError`. WDYT?

    Olivier Flückiger

    I think only updating on error would be optimal. Without an error we should be guaranteed to have an evaluated module on the next access, or not? so updating again should definitely pay off.

    Olivier Flückiger

    Ah btw. your understanding of lazy fbv allocation is correct. But it could still happen that the access is e.g., in a branch that was not executed so far.

    Gerrit-Comment-Date: Thu, 06 Nov 2025 13:02:46 +0000
    unsatisfied_requirement
    open
    diffy

    Olivier Flückiger (Gerrit)

    unread,
    Nov 6, 2025, 8:32:47 AM11/6/25
    to Caio Lima, chrom...@appspot.gserviceaccount.com, Leszek Swirski, V8 LUCI CQ, Hannes Payer, cbruni...@chromium.org, dmercadi...@chromium.org, mlippau...@chromium.org, v8-re...@googlegroups.com
    Attention needed from Caio Lima and Leszek Swirski

    Olivier Flückiger added 1 comment

    Patchset-level comments
    File-level comment, Patchset 11 (Latest):
    Olivier Flückiger . resolved

    I looked a bit closer at the CL now and realized that we basically have to put `JSDeferredModuleNamespace::MaybeEvaluateDeferredModule(it)` for any kind of access. Granted this is in the runtime, but still these checks add up since they are basically on every access. My suspicion is that the red trend on your speedometer runs are actually from this.

    So what I have been thinking, maybe we should make unevaluated modules interceptors after all. This will have the upside that lazy modules do not make normal data property accessors or `has` slower. and it might even simplify the implementation since we should never see unevaluated modules in ICs.

    Gerrit-Comment-Date: Thu, 06 Nov 2025 13:32:42 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: No
    unsatisfied_requirement
    open
    diffy

    Igor Sheludko (Gerrit)

    unread,
    Nov 13, 2025, 8:29:24 AM11/13/25
    to Caio Lima, chrom...@appspot.gserviceaccount.com, Olivier Flückiger, Leszek Swirski, V8 LUCI CQ, Hannes Payer, cbruni...@chromium.org, dmercadi...@chromium.org, mlippau...@chromium.org, v8-re...@googlegroups.com
    Attention needed from Caio Lima and Leszek Swirski

    Igor Sheludko added 4 comments

    Patchset-level comments
    Igor Sheludko . resolved

    some comments

    File src/ic/ic.cc
    Line 886, Patchset 11 (Latest): handler = MaybeObjectHandle(LoadHandler::LoadSlow(isolate()));
    Olivier Flückiger . unresolved

    Is this the case where the value itself then triggers the evaluation?

    It would be nice if the IC is not permanently slow, but rather we wait with updating it until the module is evaluated.

    Caio Lima

    Is this the case where the value itself then triggers the evaluation?
    I'm not sure if I understand the question, but the case here is that a missing access to a deferred namespace should trigger the evaluation to then return undefined. The logic behind this part of the spec is that it triggers the evaluation because it needs to load all exported names.

    Regarding slow path installation, the hypothesis I'm thinking here is that when ICs start to get filled, the module is quite likely to be evaluated already, due to `--lazy-feedback-allocation`. IIUC, on default configuration the vector is allocated when tiering up to Sparkplug and it's likely that an access to the module already happened at this point. So when `status != kEvaluated` here, probably is due to an error on evaluation, and since we need to throw on each access, I thought it would be a good time to give up on IC. One alternative is to actually just install slow path if `status == kError`. WDYT?

    Olivier Flückiger

    I think only updating on error would be optimal. Without an error we should be guaranteed to have an evaluated module on the next access, or not? so updating again should definitely pay off.

    Olivier Flückiger

    Ah btw. your understanding of lazy fbv allocation is correct. But it could still happen that the access is e.g., in a branch that was not executed so far.

    Igor Sheludko

    +1 to this question. IIUC we are loading a property from the module and by this time I think `LookupIterator` itself or `LookupForRead` should have already triggered module evaluation and thus we should already know whether the property is there or not (on this branch - it's not found). I think there should be no special handling of modules in `if (!lookup->IsFound()) {` branch.

    Line 1025, Patchset 11 (Latest): return MaybeObjectHandle(LoadHandler::LoadSlow(isolate()));
    Igor Sheludko . unresolved

    Same concern as above - I think by this time the module should already be evaluated (by `LookupIterator` or by `LookupForRead`).

    File src/objects/js-objects.cc
    Line 133, Patchset 11 (Latest): }
    Igor Sheludko . unresolved

    It feels like this should be done inside lookup iterator under the hood because AFAICT handling of deferred modules is always the same.

    If I'm wrong then please consider adding a `DEFERRED_MODULE` state (similar to `ACCESS_CHECK`) which would imply triggering required actions depending on the operation type.

    Open in Gerrit

    Related details

    Attention is currently required from:
    • Caio Lima
    • Leszek Swirski
    Submit Requirements:
    • requirement is not 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: Ia2aa34037a41a1525b1e0ca8fc7c96dbc23dbd87
    Gerrit-Change-Number: 7102359
    Gerrit-PatchSet: 11
    Gerrit-Owner: Caio Lima <caio...@igalia.com>
    Gerrit-Reviewer: Caio Lima <caio...@igalia.com>
    Gerrit-Reviewer: Leszek Swirski <les...@chromium.org>
    Gerrit-Reviewer: Olivier Flückiger <ol...@chromium.org>
    Gerrit-CC: Hannes Payer <hpa...@chromium.org>
    Gerrit-CC: Igor Sheludko <ish...@chromium.org>
    Gerrit-Attention: Caio Lima <caio...@igalia.com>
    Gerrit-Attention: Leszek Swirski <les...@chromium.org>
    Gerrit-Comment-Date: Thu, 13 Nov 2025 13:29:19 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: No
    unsatisfied_requirement
    open
    diffy

    Caio Lima (Gerrit)

    unread,
    Nov 13, 2025, 12:32:19 PM11/13/25
    to Igor Sheludko, chrom...@appspot.gserviceaccount.com, Olivier Flückiger, Leszek Swirski, V8 LUCI CQ, Hannes Payer, cbruni...@chromium.org, dmercadi...@chromium.org, mlippau...@chromium.org, v8-re...@googlegroups.com
    Attention needed from Igor Sheludko, Leszek Swirski and Olivier Flückiger

    Caio Lima added 3 comments

    File src/ic/ic.cc
    Line 886, Patchset 11 (Latest): handler = MaybeObjectHandle(LoadHandler::LoadSlow(isolate()));
    Olivier Flückiger . unresolved

    Is this the case where the value itself then triggers the evaluation?

    It would be nice if the IC is not permanently slow, but rather we wait with updating it until the module is evaluated.

    Caio Lima

    Is this the case where the value itself then triggers the evaluation?
    I'm not sure if I understand the question, but the case here is that a missing access to a deferred namespace should trigger the evaluation to then return undefined. The logic behind this part of the spec is that it triggers the evaluation because it needs to load all exported names.

    Regarding slow path installation, the hypothesis I'm thinking here is that when ICs start to get filled, the module is quite likely to be evaluated already, due to `--lazy-feedback-allocation`. IIUC, on default configuration the vector is allocated when tiering up to Sparkplug and it's likely that an access to the module already happened at this point. So when `status != kEvaluated` here, probably is due to an error on evaluation, and since we need to throw on each access, I thought it would be a good time to give up on IC. One alternative is to actually just install slow path if `status == kError`. WDYT?

    Olivier Flückiger

    I think only updating on error would be optimal. Without an error we should be guaranteed to have an evaluated module on the next access, or not? so updating again should definitely pay off.

    Olivier Flückiger

    Ah btw. your understanding of lazy fbv allocation is correct. But it could still happen that the access is e.g., in a branch that was not executed so far.

    Igor Sheludko

    +1 to this question. IIUC we are loading a property from the module and by this time I think `LookupIterator` itself or `LookupForRead` should have already triggered module evaluation and thus we should already know whether the property is there or not (on this branch - it's not found). I think there should be no special handling of modules in `if (!lookup->IsFound()) {` branch.

    Caio Lima

    I think it's the case, since all async dependencies are already evaluated once such access happens.

    The case being considered when `!lookup->IsFound()` is when there's an error while accessing a deferred module. For such case we need to throw the same error on every access. The semantics is the same if the property is present or not. Considering how this implementation is now, if we cache on
    !lookup->IsFound() and the evaluation throws an error, next accesses will not throw. This happens because `UpdateCaches` is called before we actually trigger the deferred evaluation.

    Line 1025, Patchset 11 (Latest): return MaybeObjectHandle(LoadHandler::LoadSlow(isolate()));
    Igor Sheludko . unresolved

    Same concern as above - I think by this time the module should already be evaluated (by `LookupIterator` or by `LookupForRead`).

    Caio Lima

    As I mentioned above, module evaluation happens on `Object::GetProperty`, but UpdateCaches is called before it[1].

    [1] - https://github.com/v8/v8/blob/main/src/ic/ic.cc#L438-L456

    File src/objects/js-objects.cc
    Igor Sheludko . unresolved

    It feels like this should be done inside lookup iterator under the hood because AFAICT handling of deferred modules is always the same.

    If I'm wrong then please consider adding a `DEFERRED_MODULE` state (similar to `ACCESS_CHECK`) which would imply triggering required actions depending on the operation type.

    Caio Lima

    I actually started looking into a version using Interceptors and I should upload it later this week. This way this part of implementation is going away, and I also won't need to do the handling in ICs as before.

    Open in Gerrit

    Related details

    Attention is currently required from:
    • Igor Sheludko
    • Leszek Swirski
    • Olivier Flückiger
    Submit Requirements:
    • requirement is not 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: Ia2aa34037a41a1525b1e0ca8fc7c96dbc23dbd87
    Gerrit-Change-Number: 7102359
    Gerrit-PatchSet: 11
    Gerrit-Owner: Caio Lima <caio...@igalia.com>
    Gerrit-Reviewer: Caio Lima <caio...@igalia.com>
    Gerrit-Reviewer: Leszek Swirski <les...@chromium.org>
    Gerrit-Reviewer: Olivier Flückiger <ol...@chromium.org>
    Gerrit-CC: Hannes Payer <hpa...@chromium.org>
    Gerrit-CC: Igor Sheludko <ish...@chromium.org>
    Gerrit-Attention: Igor Sheludko <ish...@chromium.org>
    Gerrit-Attention: Olivier Flückiger <ol...@chromium.org>
    Gerrit-Attention: Leszek Swirski <les...@chromium.org>
    Gerrit-Comment-Date: Thu, 13 Nov 2025 17:32:16 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: No
    Comment-In-Reply-To: Caio Lima <caio...@igalia.com>
    Comment-In-Reply-To: Igor Sheludko <ish...@chromium.org>
    Comment-In-Reply-To: Olivier Flückiger <ol...@chromium.org>
    unsatisfied_requirement
    open
    diffy

    Igor Sheludko (Gerrit)

    unread,
    Nov 13, 2025, 1:22:01 PM11/13/25
    to Caio Lima, chrom...@appspot.gserviceaccount.com, Olivier Flückiger, Leszek Swirski, V8 LUCI CQ, Hannes Payer, cbruni...@chromium.org, dmercadi...@chromium.org, mlippau...@chromium.org, v8-re...@googlegroups.com
    Attention needed from Caio Lima, Leszek Swirski and Olivier Flückiger

    Igor Sheludko added 3 comments

    File src/ic/ic.cc
    Line 886, Patchset 11 (Latest): handler = MaybeObjectHandle(LoadHandler::LoadSlow(isolate()));
    Olivier Flückiger . unresolved

    Is this the case where the value itself then triggers the evaluation?

    It would be nice if the IC is not permanently slow, but rather we wait with updating it until the module is evaluated.

    Caio Lima

    Is this the case where the value itself then triggers the evaluation?
    I'm not sure if I understand the question, but the case here is that a missing access to a deferred namespace should trigger the evaluation to then return undefined. The logic behind this part of the spec is that it triggers the evaluation because it needs to load all exported names.

    Regarding slow path installation, the hypothesis I'm thinking here is that when ICs start to get filled, the module is quite likely to be evaluated already, due to `--lazy-feedback-allocation`. IIUC, on default configuration the vector is allocated when tiering up to Sparkplug and it's likely that an access to the module already happened at this point. So when `status != kEvaluated` here, probably is due to an error on evaluation, and since we need to throw on each access, I thought it would be a good time to give up on IC. One alternative is to actually just install slow path if `status == kError`. WDYT?

    Olivier Flückiger

    I think only updating on error would be optimal. Without an error we should be guaranteed to have an evaluated module on the next access, or not? so updating again should definitely pay off.

    Olivier Flückiger

    Ah btw. your understanding of lazy fbv allocation is correct. But it could still happen that the access is e.g., in a branch that was not executed so far.

    Igor Sheludko

    +1 to this question. IIUC we are loading a property from the module and by this time I think `LookupIterator` itself or `LookupForRead` should have already triggered module evaluation and thus we should already know whether the property is there or not (on this branch - it's not found). I think there should be no special handling of modules in `if (!lookup->IsFound()) {` branch.

    Caio Lima

    I think it's the case, since all async dependencies are already evaluated once such access happens.

    The case being considered when `!lookup->IsFound()` is when there's an error while accessing a deferred module. For such case we need to throw the same error on every access. The semantics is the same if the property is present or not. Considering how this implementation is now, if we cache on
    !lookup->IsFound() and the evaluation throws an error, next accesses will not throw. This happens because `UpdateCaches` is called before we actually trigger the deferred evaluation.

    Igor Sheludko

    I see. Then having a separate `LookupIterator` state `DEFERRED_MODULE` or `FAILED_DEFERRED_MODULE` would probably be helpful here. The lookup iterator could transition there in case the holder is the deferred module that failed during evaluation.

    Line 1025, Patchset 11 (Latest): return MaybeObjectHandle(LoadHandler::LoadSlow(isolate()));
    Igor Sheludko . unresolved

    Same concern as above - I think by this time the module should already be evaluated (by `LookupIterator` or by `LookupForRead`).

    Caio Lima

    As I mentioned above, module evaluation happens on `Object::GetProperty`, but UpdateCaches is called before it[1].

    [1] - https://github.com/v8/v8/blob/main/src/ic/ic.cc#L438-L456

    Igor Sheludko

    I was actually suggesting to make sure that the `LookupIterator` or at least `LookupForRead` function trigger module evaluation by the time we reach here.

    File src/objects/js-objects.cc
    Igor Sheludko . unresolved

    It feels like this should be done inside lookup iterator under the hood because AFAICT handling of deferred modules is always the same.

    If I'm wrong then please consider adding a `DEFERRED_MODULE` state (similar to `ACCESS_CHECK`) which would imply triggering required actions depending on the operation type.

    Caio Lima

    I actually started looking into a version using Interceptors and I should upload it later this week. This way this part of implementation is going away, and I also won't need to do the handling in ICs as before.

    Igor Sheludko

    Giving Interceptors a try SGTM, I just think that they will be noticeably slower than what you could get after refining this implementation. Unless you use interceptor mode until the first evaluation and then switch the module object shape to an interceptor-less state somehow so that at least in case of successful evaluation there will be a chance to make all these properties fast.

    Open in Gerrit

    Related details

    Attention is currently required from:
    • Caio Lima
    • Leszek Swirski
    • Olivier Flückiger
    Submit Requirements:
    • requirement is not 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: Ia2aa34037a41a1525b1e0ca8fc7c96dbc23dbd87
    Gerrit-Change-Number: 7102359
    Gerrit-PatchSet: 11
    Gerrit-Owner: Caio Lima <caio...@igalia.com>
    Gerrit-Reviewer: Caio Lima <caio...@igalia.com>
    Gerrit-Reviewer: Leszek Swirski <les...@chromium.org>
    Gerrit-Reviewer: Olivier Flückiger <ol...@chromium.org>
    Gerrit-CC: Hannes Payer <hpa...@chromium.org>
    Gerrit-CC: Igor Sheludko <ish...@chromium.org>
    Gerrit-Attention: Caio Lima <caio...@igalia.com>
    Gerrit-Attention: Olivier Flückiger <ol...@chromium.org>
    Gerrit-Attention: Leszek Swirski <les...@chromium.org>
    Gerrit-Comment-Date: Thu, 13 Nov 2025 18:21:55 +0000
    unsatisfied_requirement
    open
    diffy

    Olivier Flückiger (Gerrit)

    unread,
    Nov 14, 2025, 4:33:56 AM11/14/25
    to Caio Lima, Igor Sheludko, chrom...@appspot.gserviceaccount.com, Leszek Swirski, V8 LUCI CQ, Hannes Payer, cbruni...@chromium.org, dmercadi...@chromium.org, mlippau...@chromium.org, v8-re...@googlegroups.com
    Attention needed from Caio Lima and Leszek Swirski

    Olivier Flückiger added 1 comment

    File src/objects/js-objects.cc
    Igor Sheludko . unresolved

    It feels like this should be done inside lookup iterator under the hood because AFAICT handling of deferred modules is always the same.

    If I'm wrong then please consider adding a `DEFERRED_MODULE` state (similar to `ACCESS_CHECK`) which would imply triggering required actions depending on the operation type.

    Caio Lima

    I actually started looking into a version using Interceptors and I should upload it later this week. This way this part of implementation is going away, and I also won't need to do the handling in ICs as before.

    Igor Sheludko

    Giving Interceptors a try SGTM, I just think that they will be noticeably slower than what you could get after refining this implementation. Unless you use interceptor mode until the first evaluation and then switch the module object shape to an interceptor-less state somehow so that at least in case of successful evaluation there will be a chance to make all these properties fast.

    Olivier Flückiger

    That was the idea. In most cases (unless the evaluation throws) we should be able to replace the interceptor with a module map once evaluated.

    Open in Gerrit

    Related details

    Attention is currently required from:
    • Caio Lima
    • Leszek Swirski
    Submit Requirements:
    • requirement is not 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: Ia2aa34037a41a1525b1e0ca8fc7c96dbc23dbd87
    Gerrit-Change-Number: 7102359
    Gerrit-PatchSet: 11
    Gerrit-Owner: Caio Lima <caio...@igalia.com>
    Gerrit-Reviewer: Caio Lima <caio...@igalia.com>
    Gerrit-Reviewer: Leszek Swirski <les...@chromium.org>
    Gerrit-Reviewer: Olivier Flückiger <ol...@chromium.org>
    Gerrit-CC: Hannes Payer <hpa...@chromium.org>
    Gerrit-CC: Igor Sheludko <ish...@chromium.org>
    Gerrit-Attention: Caio Lima <caio...@igalia.com>
    Gerrit-Attention: Leszek Swirski <les...@chromium.org>
    Gerrit-Comment-Date: Fri, 14 Nov 2025 09:33:50 +0000
    unsatisfied_requirement
    open
    diffy

    Caio Lima (Gerrit)

    unread,
    Nov 14, 2025, 10:07:18 AM11/14/25
    to Igor Sheludko, chrom...@appspot.gserviceaccount.com, Olivier Flückiger, Leszek Swirski, V8 LUCI CQ, Hannes Payer, cbruni...@chromium.org, dmercadi...@chromium.org, mlippau...@chromium.org, v8-re...@googlegroups.com
    Attention needed from Igor Sheludko, Leszek Swirski and Olivier Flückiger

    Caio Lima added 1 comment

    File src/objects/js-objects.cc
    Igor Sheludko . unresolved

    It feels like this should be done inside lookup iterator under the hood because AFAICT handling of deferred modules is always the same.

    If I'm wrong then please consider adding a `DEFERRED_MODULE` state (similar to `ACCESS_CHECK`) which would imply triggering required actions depending on the operation type.

    Caio Lima

    I actually started looking into a version using Interceptors and I should upload it later this week. This way this part of implementation is going away, and I also won't need to do the handling in ICs as before.

    Igor Sheludko

    Giving Interceptors a try SGTM, I just think that they will be noticeably slower than what you could get after refining this implementation. Unless you use interceptor mode until the first evaluation and then switch the module object shape to an interceptor-less state somehow so that at least in case of successful evaluation there will be a chance to make all these properties fast.

    Olivier Flückiger

    That was the idea. In most cases (unless the evaluation throws) we should be able to replace the interceptor with a module map once evaluated.

    Caio Lima

    Yes. One question that I have here is if we just transition do common ModuleNamespace map, will we lose track of potential private fields installed on previous map?

    I have a very odd edge case in tests where we install private fields in a NamespaceObject and it only triggers evaluation afterwards. Right now what I'm doing is actually copying the current map from deferred module object and then disabling interceptors and properly setting it.

    Open in Gerrit

    Related details

    Attention is currently required from:
    • Igor Sheludko
    • Leszek Swirski
    • Olivier Flückiger
    Submit Requirements:
    • requirement is not 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: Ia2aa34037a41a1525b1e0ca8fc7c96dbc23dbd87
    Gerrit-Change-Number: 7102359
    Gerrit-PatchSet: 11
    Gerrit-Owner: Caio Lima <caio...@igalia.com>
    Gerrit-Reviewer: Caio Lima <caio...@igalia.com>
    Gerrit-Reviewer: Leszek Swirski <les...@chromium.org>
    Gerrit-Reviewer: Olivier Flückiger <ol...@chromium.org>
    Gerrit-CC: Hannes Payer <hpa...@chromium.org>
    Gerrit-CC: Igor Sheludko <ish...@chromium.org>
    Gerrit-Attention: Igor Sheludko <ish...@chromium.org>
    Gerrit-Attention: Olivier Flückiger <ol...@chromium.org>
    Gerrit-Attention: Leszek Swirski <les...@chromium.org>
    Gerrit-Comment-Date: Fri, 14 Nov 2025 15:07:11 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: No
    Comment-In-Reply-To: Caio Lima <caio...@igalia.com>
    Comment-In-Reply-To: Igor Sheludko <ish...@chromium.org>
    Comment-In-Reply-To: Olivier Flückiger <ol...@chromium.org>
    unsatisfied_requirement
    open
    diffy

    Igor Sheludko (Gerrit)

    unread,
    Nov 14, 2025, 10:11:03 AM11/14/25
    to Caio Lima, chrom...@appspot.gserviceaccount.com, Olivier Flückiger, Leszek Swirski, V8 LUCI CQ, Hannes Payer, cbruni...@chromium.org, dmercadi...@chromium.org, mlippau...@chromium.org, v8-re...@googlegroups.com
    Attention needed from Caio Lima, Leszek Swirski and Olivier Flückiger

    Igor Sheludko added 1 comment

    File src/objects/js-objects.cc
    Igor Sheludko . unresolved

    It feels like this should be done inside lookup iterator under the hood because AFAICT handling of deferred modules is always the same.

    If I'm wrong then please consider adding a `DEFERRED_MODULE` state (similar to `ACCESS_CHECK`) which would imply triggering required actions depending on the operation type.

    Caio Lima

    I actually started looking into a version using Interceptors and I should upload it later this week. This way this part of implementation is going away, and I also won't need to do the handling in ICs as before.

    Igor Sheludko

    Giving Interceptors a try SGTM, I just think that they will be noticeably slower than what you could get after refining this implementation. Unless you use interceptor mode until the first evaluation and then switch the module object shape to an interceptor-less state somehow so that at least in case of successful evaluation there will be a chance to make all these properties fast.

    Olivier Flückiger

    That was the idea. In most cases (unless the evaluation throws) we should be able to replace the interceptor with a module map once evaluated.

    Caio Lima

    Yes. One question that I have here is if we just transition do common ModuleNamespace map, will we lose track of potential private fields installed on previous map?

    I have a very odd edge case in tests where we install private fields in a NamespaceObject and it only triggers evaluation afterwards. Right now what I'm doing is actually copying the current map from deferred module object and then disabling interceptors and properly setting it.

    Igor Sheludko

    I think your approach should work.

    Open in Gerrit

    Related details

    Attention is currently required from:
    • Caio Lima
    • Leszek Swirski
    • Olivier Flückiger
    Submit Requirements:
    • requirement is not 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: Ia2aa34037a41a1525b1e0ca8fc7c96dbc23dbd87
    Gerrit-Change-Number: 7102359
    Gerrit-PatchSet: 11
    Gerrit-Owner: Caio Lima <caio...@igalia.com>
    Gerrit-Reviewer: Caio Lima <caio...@igalia.com>
    Gerrit-Reviewer: Leszek Swirski <les...@chromium.org>
    Gerrit-Reviewer: Olivier Flückiger <ol...@chromium.org>
    Gerrit-CC: Hannes Payer <hpa...@chromium.org>
    Gerrit-CC: Igor Sheludko <ish...@chromium.org>
    Gerrit-Attention: Caio Lima <caio...@igalia.com>
    Gerrit-Attention: Olivier Flückiger <ol...@chromium.org>
    Gerrit-Attention: Leszek Swirski <les...@chromium.org>
    Gerrit-Comment-Date: Fri, 14 Nov 2025 15:10:57 +0000
    unsatisfied_requirement
    open
    diffy

    Caio Lima (Gerrit)

    unread,
    Nov 14, 2025, 2:40:46 PM11/14/25
    to Igor Sheludko, chrom...@appspot.gserviceaccount.com, Olivier Flückiger, Leszek Swirski, V8 LUCI CQ, Hannes Payer, cbruni...@chromium.org, dmercadi...@chromium.org, mlippau...@chromium.org, v8-re...@googlegroups.com
    Attention needed from Leszek Swirski and Olivier Flückiger

    Caio Lima added 7 comments

    Patchset-level comments
    File-level comment, Patchset 12 (Latest):
    Caio Lima . resolved

    I uploaded the version I've worked so far to check if I'm going in the right direction when using Interceptors. In this version, we don't need to change anything regarding IC and the logic is to transition the Map to an interpector-less version as soon as the evaluation happens.

    File src/heap/factory.cc
    Line 3457, Patchset 12 (Latest):DirectHandle<Map> Factory::EnsureJSDeferredModuleNamespaceMap() {
    Caio Lima . unresolved

    I have some questions regarding this part here. I'm using mostly the FunctionTemplate to configure interceptors, but I'm not sure if this is the proper path.

    In addition to that, I want to have just a single Map for `JSDeferredModuleNamespace`, but I didnt' manage to do it on `bootstrapper.cc` due to issues I'm having by adding the following callbacks to external reference list. Do you have some idea if I could fix this somehow?

    Line 3459, Patchset 12 (Latest): if (!IsNullMap(*map)) {
    Caio Lima . unresolved

    Here I'm using a bit of a hack using NullMap to mark if we already initialized `js_deferred_module_namespace_map`. I'm not a big fan of this approach, and I'd be happy to hear suggestion on how I could properly set the map here.

    File src/ic/accessor-assembler.cc
    Line 992, Patchset 9: &is_deferred_namespace);
    Caio Lima . resolved

    I’m wondering how the impact of this check would impact non-deferred module accesses. I still need to run Speedometer and JetStream here, but would it be possible to trigger a pinpoint to check it here?

    Olivier Flückiger

    Can we just not configure the IC for kModuleExport as long as the module is not evaluated? Basically here we wouly only CSA_DCHECK that the module is evaluated. And in the IC update machinery we should not configure the IC with modules which are not evaluated yet, but instead leave it empty. Maybe I miss some detail that makes this impossible?

    Caio Lima

    No, you are right here and I'm the one who actually missed something. I was with the case in mind where ModuleNamespace objects share their maps, thinking in the scenario where 2 different deferred modules having the same exported names. However, I just figured out that it's never the case[1]. Given that, you are right and I can actually do the check when installing the IC handler. I'm going to change it and thank you for the question.

    [1] - https://github.com/v8/v8/blob/main/src/objects/module.cc#L383

    Caio Lima

    Done

    File src/init/bootstrapper.cc
    Line 4571, Patchset 12 (Latest): ReadOnlyRoots(heap()).null_map());
    Caio Lima . unresolved

    This is the part of the hack I mentioned above. If I could solve the issue with external reference and interceptors callbacks, I 'll then be able to properly configure `set_js_deferred_module_namespace_map` at this point.

    File src/objects/module.cc
    Line 519, Patchset 12 (Latest): Map::Copy(isolate, current_map, "RemoveNamedInterceptors");
    Caio Lima . unresolved

    At this point I'm not just moving to JSModuleNamespace map we need to take into account private fields that might be installed in this `ns` up to this point (very hard to happen in real applications).

    File src/objects/objects.cc
    Line 2318, Patchset 12 (Latest): DirectHandle<JSReceiver> holder = it->GetHolder<JSReceiver>();
    Caio Lima . unresolved

    I needed to add this case here, otherwise the interceptor will trigger evaluation due to `GetPropertyDescriptorWithInterceptor` that happens later.

    Open in Gerrit

    Related details

    Attention is currently required from:
    • Leszek Swirski
    • Olivier Flückiger
    Submit Requirements:
    • requirement is not 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: Ia2aa34037a41a1525b1e0ca8fc7c96dbc23dbd87
    Gerrit-Change-Number: 7102359
    Gerrit-PatchSet: 12
    Gerrit-Owner: Caio Lima <caio...@igalia.com>
    Gerrit-Reviewer: Caio Lima <caio...@igalia.com>
    Gerrit-Reviewer: Leszek Swirski <les...@chromium.org>
    Gerrit-Reviewer: Olivier Flückiger <ol...@chromium.org>
    Gerrit-CC: Hannes Payer <hpa...@chromium.org>
    Gerrit-CC: Igor Sheludko <ish...@chromium.org>
    Gerrit-Attention: Olivier Flückiger <ol...@chromium.org>
    Gerrit-Attention: Leszek Swirski <les...@chromium.org>
    Gerrit-Comment-Date: Fri, 14 Nov 2025 19:40:43 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: No
    Comment-In-Reply-To: Caio Lima <caio...@igalia.com>
    Comment-In-Reply-To: Olivier Flückiger <ol...@chromium.org>
    unsatisfied_requirement
    open
    diffy

    Caio Lima (Gerrit)

    unread,
    Nov 17, 2025, 1:14:47 PM11/17/25
    to Igor Sheludko, chrom...@appspot.gserviceaccount.com, Olivier Flückiger, Leszek Swirski, V8 LUCI CQ, Hannes Payer, cbruni...@chromium.org, dmercadi...@chromium.org, mlippau...@chromium.org, v8-re...@googlegroups.com
    Attention needed from Leszek Swirski and Olivier Flückiger

    Caio Lima added 3 comments

    File src/heap/factory.cc
    Line 3457, Patchset 12:DirectHandle<Map> Factory::EnsureJSDeferredModuleNamespaceMap() {
    Caio Lima . resolved

    I have some questions regarding this part here. I'm using mostly the FunctionTemplate to configure interceptors, but I'm not sure if this is the proper path.

    In addition to that, I want to have just a single Map for `JSDeferredModuleNamespace`, but I didnt' manage to do it on `bootstrapper.cc` due to issues I'm having by adding the following callbacks to external reference list. Do you have some idea if I could fix this somehow?

    Caio Lima

    Done

    Line 3459, Patchset 12: if (!IsNullMap(*map)) {
    Caio Lima . resolved

    Here I'm using a bit of a hack using NullMap to mark if we already initialized `js_deferred_module_namespace_map`. I'm not a big fan of this approach, and I'd be happy to hear suggestion on how I could properly set the map here.

    Caio Lima

    Done

    File src/init/bootstrapper.cc
    Line 4571, Patchset 12: ReadOnlyRoots(heap()).null_map());
    Caio Lima . resolved

    This is the part of the hack I mentioned above. If I could solve the issue with external reference and interceptors callbacks, I 'll then be able to properly configure `set_js_deferred_module_namespace_map` at this point.

    Caio Lima

    Done

    Open in Gerrit

    Related details

    Attention is currently required from:
    • Leszek Swirski
    • Olivier Flückiger
    Submit Requirements:
    • requirement is not 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: Ia2aa34037a41a1525b1e0ca8fc7c96dbc23dbd87
    Gerrit-Change-Number: 7102359
    Gerrit-PatchSet: 15
    Gerrit-Owner: Caio Lima <caio...@igalia.com>
    Gerrit-Reviewer: Caio Lima <caio...@igalia.com>
    Gerrit-Reviewer: Leszek Swirski <les...@chromium.org>
    Gerrit-Reviewer: Olivier Flückiger <ol...@chromium.org>
    Gerrit-CC: Hannes Payer <hpa...@chromium.org>
    Gerrit-CC: Igor Sheludko <ish...@chromium.org>
    Gerrit-Attention: Olivier Flückiger <ol...@chromium.org>
    Gerrit-Attention: Leszek Swirski <les...@chromium.org>
    Gerrit-Comment-Date: Mon, 17 Nov 2025 18:14:44 +0000
    unsatisfied_requirement
    open
    diffy

    Olivier Flückiger (Gerrit)

    unread,
    Dec 2, 2025, 7:44:20 AM12/2/25
    to Caio Lima, Igor Sheludko, chrom...@appspot.gserviceaccount.com, Leszek Swirski, V8 LUCI CQ, Hannes Payer, cbruni...@chromium.org, dmercadi...@chromium.org, mlippau...@chromium.org, v8-re...@googlegroups.com
    Attention needed from Caio Lima and Leszek Swirski

    Olivier Flückiger added 1 comment

    Patchset-level comments
    File-level comment, Patchset 18 (Latest):
    Olivier Flückiger . resolved

    @Caio sorry I lost track here. Are you waiting on another round of reviews or are you still making changes?

    Open in Gerrit

    Related details

    Attention is currently required from:
    • Caio Lima
    • Leszek Swirski
    Submit Requirements:
    • requirement is not 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: Ia2aa34037a41a1525b1e0ca8fc7c96dbc23dbd87
    Gerrit-Change-Number: 7102359
    Gerrit-PatchSet: 18
    Gerrit-Owner: Caio Lima <caio...@igalia.com>
    Gerrit-Reviewer: Caio Lima <caio...@igalia.com>
    Gerrit-Reviewer: Leszek Swirski <les...@chromium.org>
    Gerrit-Reviewer: Olivier Flückiger <ol...@chromium.org>
    Gerrit-CC: Hannes Payer <hpa...@chromium.org>
    Gerrit-CC: Igor Sheludko <ish...@chromium.org>
    Gerrit-Attention: Caio Lima <caio...@igalia.com>
    Gerrit-Attention: Leszek Swirski <les...@chromium.org>
    Gerrit-Comment-Date: Tue, 02 Dec 2025 12:44:15 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: No
    unsatisfied_requirement
    open
    diffy

    Caio Lima (Gerrit)

    unread,
    Dec 2, 2025, 7:53:48 AM12/2/25
    to Igor Sheludko, chrom...@appspot.gserviceaccount.com, Olivier Flückiger, Leszek Swirski, V8 LUCI CQ, Hannes Payer, cbruni...@chromium.org, dmercadi...@chromium.org, mlippau...@chromium.org, v8-re...@googlegroups.com
    Attention needed from Leszek Swirski and Olivier Flückiger

    Caio Lima added 1 comment

    Patchset-level comments
    Olivier Flückiger . resolved

    @Caio sorry I lost track here. Are you waiting on another round of reviews or are you still making changes?

    Caio Lima

    No worries! I'm waiting for a new round of reviews. The major change is that it's using Interceptors now.

    Open in Gerrit

    Related details

    Attention is currently required from:
    • Leszek Swirski
    • Olivier Flückiger
    Submit Requirements:
    • requirement is not 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: Ia2aa34037a41a1525b1e0ca8fc7c96dbc23dbd87
    Gerrit-Change-Number: 7102359
    Gerrit-PatchSet: 18
    Gerrit-Owner: Caio Lima <caio...@igalia.com>
    Gerrit-Reviewer: Caio Lima <caio...@igalia.com>
    Gerrit-Reviewer: Leszek Swirski <les...@chromium.org>
    Gerrit-Reviewer: Olivier Flückiger <ol...@chromium.org>
    Gerrit-CC: Hannes Payer <hpa...@chromium.org>
    Gerrit-CC: Igor Sheludko <ish...@chromium.org>
    Gerrit-Attention: Olivier Flückiger <ol...@chromium.org>
    Gerrit-Attention: Leszek Swirski <les...@chromium.org>
    Gerrit-Comment-Date: Tue, 02 Dec 2025 12:53:45 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: No
    Comment-In-Reply-To: Olivier Flückiger <ol...@chromium.org>
    unsatisfied_requirement
    open
    diffy

    Olivier Flückiger (Gerrit)

    unread,
    Dec 2, 2025, 7:59:30 AM12/2/25
    to Caio Lima, Igor Sheludko, chrom...@appspot.gserviceaccount.com, Leszek Swirski, V8 LUCI CQ, Hannes Payer, cbruni...@chromium.org, dmercadi...@chromium.org, mlippau...@chromium.org, v8-re...@googlegroups.com
    Attention needed from Caio Lima and Leszek Swirski

    Olivier Flückiger added 1 comment

    Patchset-level comments
    Olivier Flückiger . resolved

    @Caio sorry I lost track here. Are you waiting on another round of reviews or are you still making changes?

    Caio Lima

    No worries! I'm waiting for a new round of reviews. The major change is that it's using Interceptors now.

    Olivier Flückiger

    Oh ok. Getting to it asap.

    Open in Gerrit

    Related details

    Attention is currently required from:
    • Caio Lima
    • Leszek Swirski
    Submit Requirements:
    • requirement is not 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: Ia2aa34037a41a1525b1e0ca8fc7c96dbc23dbd87
    Gerrit-Change-Number: 7102359
    Gerrit-PatchSet: 18
    Gerrit-Owner: Caio Lima <caio...@igalia.com>
    Gerrit-Reviewer: Caio Lima <caio...@igalia.com>
    Gerrit-Reviewer: Leszek Swirski <les...@chromium.org>
    Gerrit-Reviewer: Olivier Flückiger <ol...@chromium.org>
    Gerrit-CC: Hannes Payer <hpa...@chromium.org>
    Gerrit-CC: Igor Sheludko <ish...@chromium.org>
    Gerrit-Attention: Caio Lima <caio...@igalia.com>
    Gerrit-Attention: Leszek Swirski <les...@chromium.org>
    Gerrit-Comment-Date: Tue, 02 Dec 2025 12:59:25 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: No
    unsatisfied_requirement
    open
    diffy

    Caio Lima (Gerrit)

    unread,
    Dec 2, 2025, 9:56:30 AM12/2/25
    to Igor Sheludko, chrom...@appspot.gserviceaccount.com, Olivier Flückiger, Leszek Swirski, V8 LUCI CQ, Hannes Payer, cbruni...@chromium.org, dmercadi...@chromium.org, mlippau...@chromium.org, v8-re...@googlegroups.com
    Attention needed from Leszek Swirski

    Caio Lima added 1 comment

    File src/objects/module.cc
    Line 519, Patchset 12: Map::Copy(isolate, current_map, "RemoveNamedInterceptors");
    Caio Lima . unresolved

    At this point I'm not just moving to JSModuleNamespace map we need to take into account private fields that might be installed in this `ns` up to this point (very hard to happen in real applications).

    Caio Lima

    Actually, Nicolò just showed me https://github.com/tc39/proposal-nonextensible-applies-to-private. What's V8 status for this proposal? Looking `JSReceiver::AddPrivateField`, I don't think it is implemented yet.

    But in this case, I think it's fair to implement import-defer with the idea that there's no transition from private fields/brands already in mind. WDYT?

    Open in Gerrit

    Related details

    Attention is currently required from:
    • Leszek Swirski
    Submit Requirements:
    • requirement is not 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: Ia2aa34037a41a1525b1e0ca8fc7c96dbc23dbd87
    Gerrit-Change-Number: 7102359
    Gerrit-PatchSet: 18
    Gerrit-Owner: Caio Lima <caio...@igalia.com>
    Gerrit-Reviewer: Caio Lima <caio...@igalia.com>
    Gerrit-Reviewer: Leszek Swirski <les...@chromium.org>
    Gerrit-Reviewer: Olivier Flückiger <ol...@chromium.org>
    Gerrit-CC: Hannes Payer <hpa...@chromium.org>
    Gerrit-CC: Igor Sheludko <ish...@chromium.org>
    Gerrit-Attention: Leszek Swirski <les...@chromium.org>
    Gerrit-Comment-Date: Tue, 02 Dec 2025 14:56:27 +0000
    unsatisfied_requirement
    open
    diffy

    Olivier Flückiger (Gerrit)

    unread,
    Dec 2, 2025, 10:04:17 AM12/2/25
    to Caio Lima, Igor Sheludko, chrom...@appspot.gserviceaccount.com, Leszek Swirski, V8 LUCI CQ, Hannes Payer, cbruni...@chromium.org, dmercadi...@chromium.org, mlippau...@chromium.org, v8-re...@googlegroups.com
    Attention needed from Caio Lima and Leszek Swirski

    Olivier Flückiger added 1 comment

    File src/objects/module.cc
    Line 519, Patchset 12: Map::Copy(isolate, current_map, "RemoveNamedInterceptors");
    Caio Lima . unresolved

    At this point I'm not just moving to JSModuleNamespace map we need to take into account private fields that might be installed in this `ns` up to this point (very hard to happen in real applications).

    Caio Lima

    Actually, Nicolò just showed me https://github.com/tc39/proposal-nonextensible-applies-to-private. What's V8 status for this proposal? Looking `JSReceiver::AddPrivateField`, I don't think it is implemented yet.

    But in this case, I think it's fair to implement import-defer with the idea that there's no transition from private fields/brands already in mind. WDYT?

    Olivier Flückiger

    We implemented the current version (see https://chromium-review.googlesource.com/c/v8/v8/+/7066839). However we recently discovered https://github.com/tc39/proposal-nonextensible-applies-to-private/issues/6 which means the proposal probably needs to be changed to call IsExtensible instead.

    If it's hard to implement I would be fine with leaving a todo (and maybe a dcheck) for now and hope the other proposal advances fast enough.

    Open in Gerrit

    Related details

    Attention is currently required from:
    • Caio Lima
    • Leszek Swirski
    Submit Requirements:
    • requirement is not 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: Ia2aa34037a41a1525b1e0ca8fc7c96dbc23dbd87
    Gerrit-Change-Number: 7102359
    Gerrit-PatchSet: 18
    Gerrit-Owner: Caio Lima <caio...@igalia.com>
    Gerrit-Reviewer: Caio Lima <caio...@igalia.com>
    Gerrit-Reviewer: Leszek Swirski <les...@chromium.org>
    Gerrit-Reviewer: Olivier Flückiger <ol...@chromium.org>
    Gerrit-CC: Hannes Payer <hpa...@chromium.org>
    Gerrit-CC: Igor Sheludko <ish...@chromium.org>
    Gerrit-Attention: Caio Lima <caio...@igalia.com>
    Gerrit-Attention: Leszek Swirski <les...@chromium.org>
    Gerrit-Comment-Date: Tue, 02 Dec 2025 15:04:11 +0000
    unsatisfied_requirement
    open
    diffy

    Olivier Flückiger (Gerrit)

    unread,
    Dec 3, 2025, 4:56:54 AM12/3/25
    to Caio Lima, Igor Sheludko, chrom...@appspot.gserviceaccount.com, Leszek Swirski, V8 LUCI CQ, Hannes Payer, cbruni...@chromium.org, dmercadi...@chromium.org, mlippau...@chromium.org, v8-re...@googlegroups.com
    Attention needed from Caio Lima and Leszek Swirski

    Olivier Flückiger added 7 comments

    Patchset-level comments
    Olivier Flückiger . resolved

    thanks, this feels like the right direction to be moving in. seems we can almost entirely rely on the interceptor infra to introduce this without adding any new checks on hot-paths. I like that.

    File src/heap/factory.cc
    Line 3470, Patchset 18 (Latest): NewJSObjectType::kMaybeEmbedderFieldsAndApiWrapper)));
    Olivier Flückiger . unresolved

    I guess interceptors require this NewJSObjectType? Can we make them work without lying on that type?

    File src/objects/js-objects.cc
    Line 1309, Patchset 18 (Latest): IsJSDeferredModuleNamespace(*holder))) {
    Olivier Flückiger . unresolved

    this looks a bit like a leaky abstraction to me. We should really introduce some concept of a "internal" interceptor which does not come from the api. Either by marking such interceptors or by having e.g., a centralized list of instance types which are such internal interceptors.

    Line 1933, Patchset 18 (Latest): if (IsJSDeferredModuleNamespace(*holder)) {
    Olivier Flückiger . unresolved

    dito

    File src/objects/keys.cc
    Line 1051, Patchset 18 (Latest): if (IsJSDeferredModuleNamespace(*object)) {
    Olivier Flückiger . unresolved

    maybe move this down a bit since it's probably not the most common case.

    File src/objects/objects.cc
    Line 2325, Patchset 18 (Latest): DirectHandle<JSReceiver> holder = it->GetHolder<JSReceiver>();
    Olivier Flückiger . unresolved

    What is the reason for the special casing here instead of using a setter on the interceptor?

    File test/test262/test262.status
    Line 802, Patchset 18 (Parent): 'language/import/import-defer/deferred-namespace-object/exotic-object-behavior': [SKIP],
    Olivier Flückiger . unresolved

    just remove these as the default is PASS

    Gerrit-Comment-Date: Wed, 03 Dec 2025 09:56:50 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: No
    unsatisfied_requirement
    open
    diffy

    Caio Lima (Gerrit)

    unread,
    Dec 3, 2025, 8:43:15 AM12/3/25
    to Igor Sheludko, chrom...@appspot.gserviceaccount.com, Olivier Flückiger, Leszek Swirski, V8 LUCI CQ, Hannes Payer, cbruni...@chromium.org, dmercadi...@chromium.org, mlippau...@chromium.org, v8-re...@googlegroups.com
    Attention needed from Leszek Swirski and Olivier Flückiger

    Caio Lima added 3 comments

    File src/heap/factory.cc
    Line 3470, Patchset 18 (Latest): NewJSObjectType::kMaybeEmbedderFieldsAndApiWrapper)));
    Olivier Flückiger . unresolved

    I guess interceptors require this NewJSObjectType? Can we make them work without lying on that type?

    Caio Lima

    Actually, I'm getting this from `Factory::NewJSModuleNamespace` above. I spent some time looking why JSModuleNamespace, use this enum, and looks like it's related with the fact of it being an `JSSpecialObject` (https://source.chromium.org/chromium/chromium/src/+/main:v8/src/objects/js-objects.tq;l=65;drc=776f8c61110d34732318252a9661692fbc285dac).

    I don't see any limitation on Interceptors for `NewJSObjectType`, at least not directly. The check for API that I see on Interceptors is from this part https://source.chromium.org/chromium/chromium/src/+/main:v8/src/objects/map-inl.h;l=1049;drc=5e7626b1a30658766d34fd9875fd2bfbdc2ebb3f. However the way I'm initializing things in `bootstrap.cc` satisfy this assertion. It feels a bit strange to me using FunctionTemplateInfo there, however I'm not sure if the alternative I have in mind is better. What I implemented before, but I didn't upload, was a new `JSObjectWithInterceptors` that would store InterceptorInfos, and then in https://source.chromium.org/chromium/chromium/src/+/main:v8/src/objects/map-inl.h;l=156;drc=5e7626b1a30658766d34fd9875fd2bfbdc2ebb3f I 'd get the check if `IsJSObjectWithInterceptors` and get the InterceptorInfo properly. I'd use it as a constructor to have only a single `JSObjectWithInterceptors` shared with all instances of JSDeferredModuleNamespace. However, I decided to rollback from it because it was doing pretty much what `FunctionTemplateInfo` does.

    File src/objects/js-objects.cc
    Line 1309, Patchset 18 (Latest): IsJSDeferredModuleNamespace(*holder))) {
    Olivier Flückiger . unresolved

    this looks a bit like a leaky abstraction to me. We should really introduce some concept of a "internal" interceptor which does not come from the api. Either by marking such interceptors or by having e.g., a centralized list of instance types which are such internal interceptors.

    Caio Lima

    Just to make sure if I understand your comment here. If I have something like `JSObjectWithInterceptors` (name can change), and check here for `IsJSObjectWithInterceptors`, would it be fine? I added this check here because even when a property is absent in a Deferred Module, it still triggers evaluation.

    File src/objects/objects.cc
    Line 2325, Patchset 18 (Latest): DirectHandle<JSReceiver> holder = it->GetHolder<JSReceiver>();
    Olivier Flückiger . unresolved

    What is the reason for the special casing here instead of using a setter on the interceptor?

    Caio Lima

    I don't remember why I decided to not use a setter interceptor here. Maybe I just overlooked it and looks like it will work..

    Open in Gerrit

    Related details

    Attention is currently required from:
    • Leszek Swirski
    • Olivier Flückiger
    Submit Requirements:
    • requirement is not 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: Ia2aa34037a41a1525b1e0ca8fc7c96dbc23dbd87
    Gerrit-Change-Number: 7102359
    Gerrit-PatchSet: 18
    Gerrit-Owner: Caio Lima <caio...@igalia.com>
    Gerrit-Reviewer: Caio Lima <caio...@igalia.com>
    Gerrit-Reviewer: Leszek Swirski <les...@chromium.org>
    Gerrit-Reviewer: Olivier Flückiger <ol...@chromium.org>
    Gerrit-CC: Hannes Payer <hpa...@chromium.org>
    Gerrit-CC: Igor Sheludko <ish...@chromium.org>
    Gerrit-Attention: Olivier Flückiger <ol...@chromium.org>
    Gerrit-Attention: Leszek Swirski <les...@chromium.org>
    Gerrit-Comment-Date: Wed, 03 Dec 2025 13:43:11 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: No
    Comment-In-Reply-To: Olivier Flückiger <ol...@chromium.org>
    unsatisfied_requirement
    open
    diffy

    Olivier Flückiger (Gerrit)

    unread,
    Dec 3, 2025, 8:51:06 AM12/3/25
    to Caio Lima, Igor Sheludko, chrom...@appspot.gserviceaccount.com, Leszek Swirski, V8 LUCI CQ, Hannes Payer, cbruni...@chromium.org, dmercadi...@chromium.org, mlippau...@chromium.org, v8-re...@googlegroups.com
    Attention needed from Caio Lima and Leszek Swirski

    Olivier Flückiger added 2 comments

    File src/heap/factory.cc
    Line 3470, Patchset 18 (Latest): NewJSObjectType::kMaybeEmbedderFieldsAndApiWrapper)));
    Olivier Flückiger . resolved

    I guess interceptors require this NewJSObjectType? Can we make them work without lying on that type?

    Caio Lima

    Actually, I'm getting this from `Factory::NewJSModuleNamespace` above. I spent some time looking why JSModuleNamespace, use this enum, and looks like it's related with the fact of it being an `JSSpecialObject` (https://source.chromium.org/chromium/chromium/src/+/main:v8/src/objects/js-objects.tq;l=65;drc=776f8c61110d34732318252a9661692fbc285dac).

    I don't see any limitation on Interceptors for `NewJSObjectType`, at least not directly. The check for API that I see on Interceptors is from this part https://source.chromium.org/chromium/chromium/src/+/main:v8/src/objects/map-inl.h;l=1049;drc=5e7626b1a30658766d34fd9875fd2bfbdc2ebb3f. However the way I'm initializing things in `bootstrap.cc` satisfy this assertion. It feels a bit strange to me using FunctionTemplateInfo there, however I'm not sure if the alternative I have in mind is better. What I implemented before, but I didn't upload, was a new `JSObjectWithInterceptors` that would store InterceptorInfos, and then in https://source.chromium.org/chromium/chromium/src/+/main:v8/src/objects/map-inl.h;l=156;drc=5e7626b1a30658766d34fd9875fd2bfbdc2ebb3f I 'd get the check if `IsJSObjectWithInterceptors` and get the InterceptorInfo properly. I'd use it as a constructor to have only a single `JSObjectWithInterceptors` shared with all instances of JSDeferredModuleNamespace. However, I decided to rollback from it because it was doing pretty much what `FunctionTemplateInfo` does.

    Olivier Flückiger

    Oh, I see. Didn't see that normal modules also set it up like this. Ignore this comment then.

    File src/objects/js-objects.cc
    Line 1309, Patchset 18 (Latest): IsJSDeferredModuleNamespace(*holder))) {
    Olivier Flückiger . unresolved

    this looks a bit like a leaky abstraction to me. We should really introduce some concept of a "internal" interceptor which does not come from the api. Either by marking such interceptors or by having e.g., a centralized list of instance types which are such internal interceptors.

    Caio Lima

    Just to make sure if I understand your comment here. If I have something like `JSObjectWithInterceptors` (name can change), and check here for `IsJSObjectWithInterceptors`, would it be fine? I added this check here because even when a property is absent in a Deferred Module, it still triggers evaluation.

    Olivier Flückiger

    Yes, it just feels strange to check for one particular object type here and not for the "concept" (an internal interceptor which can have absent fields).

    Open in Gerrit

    Related details

    Attention is currently required from:
    • Caio Lima
    • Leszek Swirski
    Submit Requirements:
    • requirement is not 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: Ia2aa34037a41a1525b1e0ca8fc7c96dbc23dbd87
    Gerrit-Change-Number: 7102359
    Gerrit-PatchSet: 18
    Gerrit-Owner: Caio Lima <caio...@igalia.com>
    Gerrit-Reviewer: Caio Lima <caio...@igalia.com>
    Gerrit-Reviewer: Leszek Swirski <les...@chromium.org>
    Gerrit-Reviewer: Olivier Flückiger <ol...@chromium.org>
    Gerrit-CC: Hannes Payer <hpa...@chromium.org>
    Gerrit-CC: Igor Sheludko <ish...@chromium.org>
    Gerrit-Attention: Caio Lima <caio...@igalia.com>
    Gerrit-Attention: Leszek Swirski <les...@chromium.org>
    Gerrit-Comment-Date: Wed, 03 Dec 2025 13:51:02 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: No
    unsatisfied_requirement
    open
    diffy

    Caio Lima (Gerrit)

    unread,
    Dec 5, 2025, 9:23:11 AM12/5/25
    to Igor Sheludko, chrom...@appspot.gserviceaccount.com, Olivier Flückiger, Leszek Swirski, V8 LUCI CQ, Hannes Payer, cbruni...@chromium.org, dmercadi...@chromium.org, mlippau...@chromium.org, v8-re...@googlegroups.com
    Attention needed from Leszek Swirski and Olivier Flückiger

    Caio Lima added 1 comment

    File src/objects/keys.cc
    Line 1051, Patchset 18 (Latest): if (IsJSDeferredModuleNamespace(*object)) {
    Olivier Flückiger . unresolved

    maybe move this down a bit since it's probably not the most common case.

    Caio Lima

    What do you think of using V8_UNLIKELY? If I move this bellow to make a meaningful difference, I'll need to duplicate this code in 4 parts (1 for each `if (V8_ENABLE_SWISS_NAME_DICTIONARY_BOOL)` path. It's necessary because I'm just installing properties when `MaybeEvaluateAndTransition` is called, so I need to call it before `GetOwnEnumPropertyDictionaryKeys` or `CollectKeysFromDictionary`. This lazy installation is useful for Interceptors part, because I don't need to worry about `ACCESSOR` while the module was not evaluated yet.

    Open in Gerrit

    Related details

    Attention is currently required from:
    • Leszek Swirski
    • Olivier Flückiger
    Submit Requirements:
    • requirement is not 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: Ia2aa34037a41a1525b1e0ca8fc7c96dbc23dbd87
    Gerrit-Change-Number: 7102359
    Gerrit-PatchSet: 18
    Gerrit-Owner: Caio Lima <caio...@igalia.com>
    Gerrit-Reviewer: Caio Lima <caio...@igalia.com>
    Gerrit-Reviewer: Leszek Swirski <les...@chromium.org>
    Gerrit-Reviewer: Olivier Flückiger <ol...@chromium.org>
    Gerrit-CC: Hannes Payer <hpa...@chromium.org>
    Gerrit-CC: Igor Sheludko <ish...@chromium.org>
    Gerrit-Attention: Olivier Flückiger <ol...@chromium.org>
    Gerrit-Attention: Leszek Swirski <les...@chromium.org>
    Gerrit-Comment-Date: Fri, 05 Dec 2025 14:23:08 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: No
    Comment-In-Reply-To: Olivier Flückiger <ol...@chromium.org>
    unsatisfied_requirement
    open
    diffy

    Olivier Flückiger (Gerrit)

    unread,
    Dec 5, 2025, 9:32:03 AM12/5/25
    to Caio Lima, Igor Sheludko, chrom...@appspot.gserviceaccount.com, Leszek Swirski, V8 LUCI CQ, Hannes Payer, cbruni...@chromium.org, dmercadi...@chromium.org, mlippau...@chromium.org, v8-re...@googlegroups.com
    Attention needed from Caio Lima and Leszek Swirski

    Olivier Flückiger added 1 comment

    File src/objects/keys.cc
    Line 1051, Patchset 18 (Latest): if (IsJSDeferredModuleNamespace(*object)) {
    Olivier Flückiger . unresolved

    maybe move this down a bit since it's probably not the most common case.

    Caio Lima

    What do you think of using V8_UNLIKELY? If I move this bellow to make a meaningful difference, I'll need to duplicate this code in 4 parts (1 for each `if (V8_ENABLE_SWISS_NAME_DICTIONARY_BOOL)` path. It's necessary because I'm just installing properties when `MaybeEvaluateAndTransition` is called, so I need to call it before `GetOwnEnumPropertyDictionaryKeys` or `CollectKeysFromDictionary`. This lazy installation is useful for Interceptors part, because I don't need to worry about `ACCESSOR` while the module was not evaluated yet.

    Olivier Flückiger

    sounds good. I think we are actually transitioning to [[unlikely]] predicates for new code.

    Open in Gerrit

    Related details

    Attention is currently required from:
    • Caio Lima
    • Leszek Swirski
    Submit Requirements:
    • requirement is not 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: Ia2aa34037a41a1525b1e0ca8fc7c96dbc23dbd87
    Gerrit-Change-Number: 7102359
    Gerrit-PatchSet: 18
    Gerrit-Owner: Caio Lima <caio...@igalia.com>
    Gerrit-Reviewer: Caio Lima <caio...@igalia.com>
    Gerrit-Reviewer: Leszek Swirski <les...@chromium.org>
    Gerrit-Reviewer: Olivier Flückiger <ol...@chromium.org>
    Gerrit-CC: Hannes Payer <hpa...@chromium.org>
    Gerrit-CC: Igor Sheludko <ish...@chromium.org>
    Gerrit-Attention: Caio Lima <caio...@igalia.com>
    Gerrit-Attention: Leszek Swirski <les...@chromium.org>
    Gerrit-Comment-Date: Fri, 05 Dec 2025 14:31:57 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: No
    unsatisfied_requirement
    open
    diffy

    Caio Lima (Gerrit)

    unread,
    Dec 5, 2025, 1:36:51 PM12/5/25
    to Igor Sheludko, chrom...@appspot.gserviceaccount.com, Olivier Flückiger, Leszek Swirski, V8 LUCI CQ, Hannes Payer, cbruni...@chromium.org, dmercadi...@chromium.org, mlippau...@chromium.org, v8-re...@googlegroups.com
    Attention needed from Igor Sheludko, Leszek Swirski and Olivier Flückiger

    Caio Lima added 10 comments

    Patchset-level comments
    File-level comment, Patchset 19 (Latest):
    Caio Lima . resolved

    Sorry for taking a bit long to update here. I spent some time trying to figure out the proper way to implement [[Set]] with interceptors.

    File src/objects/api-callbacks.tq
    Line 11, Patchset 19 (Latest): is_internal: bool: 1 bit;
    Caio Lima . unresolved

    I added this new bitfield so we are able to figure out if an interceptor is internal or not. Such distinction came in hand mainly on `SetPropertyInternal`, but also on other interceptor paths. The overall idea for the creating such distinction is to avoid introducing any observable change for non-internal interceptors.

    File src/objects/js-objects.cc
    Line 133, Patchset 11: }
    Igor Sheludko . resolved

    It feels like this should be done inside lookup iterator under the hood because AFAICT handling of deferred modules is always the same.

    If I'm wrong then please consider adding a `DEFERRED_MODULE` state (similar to `ACCESS_CHECK`) which would imply triggering required actions depending on the operation type.

    Caio Lima

    I actually started looking into a version using Interceptors and I should upload it later this week. This way this part of implementation is going away, and I also won't need to do the handling in ICs as before.

    Igor Sheludko

    Giving Interceptors a try SGTM, I just think that they will be noticeably slower than what you could get after refining this implementation. Unless you use interceptor mode until the first evaluation and then switch the module object shape to an interceptor-less state somehow so that at least in case of successful evaluation there will be a chance to make all these properties fast.

    Olivier Flückiger

    That was the idea. In most cases (unless the evaluation throws) we should be able to replace the interceptor with a module map once evaluated.

    Caio Lima

    Yes. One question that I have here is if we just transition do common ModuleNamespace map, will we lose track of potential private fields installed on previous map?

    I have a very odd edge case in tests where we install private fields in a NamespaceObject and it only triggers evaluation afterwards. Right now what I'm doing is actually copying the current map from deferred module object and then disabling interceptors and properly setting it.

    Igor Sheludko

    I think your approach should work.

    Caio Lima

    Done

    Line 1309, Patchset 18: IsJSDeferredModuleNamespace(*holder))) {
    Olivier Flückiger . resolved

    this looks a bit like a leaky abstraction to me. We should really introduce some concept of a "internal" interceptor which does not come from the api. Either by marking such interceptors or by having e.g., a centralized list of instance types which are such internal interceptors.

    Caio Lima

    Just to make sure if I understand your comment here. If I have something like `JSObjectWithInterceptors` (name can change), and check here for `IsJSObjectWithInterceptors`, would it be fine? I added this check here because even when a property is absent in a Deferred Module, it still triggers evaluation.

    Olivier Flückiger

    Yes, it just feels strange to check for one particular object type here and not for the "concept" (an internal interceptor which can have absent fields).

    Caio Lima

    Acknowledged

    Line 1933, Patchset 18: if (IsJSDeferredModuleNamespace(*holder)) {
    Olivier Flückiger . resolved

    dito

    Caio Lima

    Acknowledged

    File src/objects/keys.cc
    Line 1051, Patchset 18: if (IsJSDeferredModuleNamespace(*object)) {
    Olivier Flückiger . resolved

    maybe move this down a bit since it's probably not the most common case.

    Caio Lima

    What do you think of using V8_UNLIKELY? If I move this bellow to make a meaningful difference, I'll need to duplicate this code in 4 parts (1 for each `if (V8_ENABLE_SWISS_NAME_DICTIONARY_BOOL)` path. It's necessary because I'm just installing properties when `MaybeEvaluateAndTransition` is called, so I need to call it before `GetOwnEnumPropertyDictionaryKeys` or `CollectKeysFromDictionary`. This lazy installation is useful for Interceptors part, because I don't need to worry about `ACCESSOR` while the module was not evaluated yet.

    Olivier Flückiger

    sounds good. I think we are actually transitioning to [[unlikely]] predicates for new code.

    Caio Lima

    Acknowledged

    File src/objects/objects.cc
    Line 2318, Patchset 12: DirectHandle<JSReceiver> holder = it->GetHolder<JSReceiver>();
    Caio Lima . resolved

    I needed to add this case here, otherwise the interceptor will trigger evaluation due to `GetPropertyDescriptorWithInterceptor` that happens later.

    Caio Lima

    Done

    Line 2325, Patchset 18: DirectHandle<JSReceiver> holder = it->GetHolder<JSReceiver>();
    Olivier Flückiger . resolved

    What is the reason for the special casing here instead of using a setter on the interceptor?

    Caio Lima

    I don't remember why I decided to not use a setter interceptor here. Maybe I just overlooked it and looks like it will work..

    Caio Lima

    Done

    Line 2330, Patchset 19 (Latest): it->GetInterceptor()->is_internal()) {
    Caio Lima . unresolved

    This is one of the reasons why it took me a while to upload a new patch. I didn't fully understand why there's a `it->HolderIsReceiverOrHiddenPrototype()` check before calling `JSObject::SetPropertyWithInterceptor`, but this gave me some trouble to properly implement `JSDeferredModuleNamespace` [[Set]] without triggering an evaluation. I added a condition on internal interceptors to avoid introduce breaking changes to current interceptors API, since there'll be a trap on `JSObject::GetPropertyAttributesWithInterceptor` if `it->HolderIsReceiverOrHiddenPrototype() == false`. However, I'm curious to know why we are just calling `SetProperty` interceptor when `holder == receiver`.

    File test/test262/test262.status
    Line 802, Patchset 18 (Parent): 'language/import/import-defer/deferred-namespace-object/exotic-object-behavior': [SKIP],
    Olivier Flückiger . resolved

    just remove these as the default is PASS

    Caio Lima

    Acknowledged

    Open in Gerrit

    Related details

    Attention is currently required from:
    • Igor Sheludko
    • Leszek Swirski
    • Olivier Flückiger
    Submit Requirements:
    • requirement is not 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: Ia2aa34037a41a1525b1e0ca8fc7c96dbc23dbd87
    Gerrit-Change-Number: 7102359
    Gerrit-PatchSet: 19
    Gerrit-Owner: Caio Lima <caio...@igalia.com>
    Gerrit-Reviewer: Caio Lima <caio...@igalia.com>
    Gerrit-Reviewer: Leszek Swirski <les...@chromium.org>
    Gerrit-Reviewer: Olivier Flückiger <ol...@chromium.org>
    Gerrit-CC: Hannes Payer <hpa...@chromium.org>
    Gerrit-CC: Igor Sheludko <ish...@chromium.org>
    Gerrit-Attention: Igor Sheludko <ish...@chromium.org>
    Gerrit-Attention: Olivier Flückiger <ol...@chromium.org>
    Gerrit-Attention: Leszek Swirski <les...@chromium.org>
    Gerrit-Comment-Date: Fri, 05 Dec 2025 18:36:47 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: No
    Comment-In-Reply-To: Caio Lima <caio...@igalia.com>
    unsatisfied_requirement
    open
    diffy

    Caio Lima (Gerrit)

    unread,
    Dec 5, 2025, 1:37:52 PM12/5/25
    to Igor Sheludko, chrom...@appspot.gserviceaccount.com, Olivier Flückiger, Leszek Swirski, V8 LUCI CQ, Hannes Payer, cbruni...@chromium.org, dmercadi...@chromium.org, mlippau...@chromium.org, v8-re...@googlegroups.com
    Attention needed from Igor Sheludko, Leszek Swirski and Olivier Flückiger

    Caio Lima added 2 comments

    File src/ic/ic.cc
    Line 886, Patchset 11: handler = MaybeObjectHandle(LoadHandler::LoadSlow(isolate()));
    Olivier Flückiger . resolved

    Is this the case where the value itself then triggers the evaluation?

    It would be nice if the IC is not permanently slow, but rather we wait with updating it until the module is evaluated.

    Caio Lima

    Is this the case where the value itself then triggers the evaluation?
    I'm not sure if I understand the question, but the case here is that a missing access to a deferred namespace should trigger the evaluation to then return undefined. The logic behind this part of the spec is that it triggers the evaluation because it needs to load all exported names.

    Regarding slow path installation, the hypothesis I'm thinking here is that when ICs start to get filled, the module is quite likely to be evaluated already, due to `--lazy-feedback-allocation`. IIUC, on default configuration the vector is allocated when tiering up to Sparkplug and it's likely that an access to the module already happened at this point. So when `status != kEvaluated` here, probably is due to an error on evaluation, and since we need to throw on each access, I thought it would be a good time to give up on IC. One alternative is to actually just install slow path if `status == kError`. WDYT?

    Olivier Flückiger

    I think only updating on error would be optimal. Without an error we should be guaranteed to have an evaluated module on the next access, or not? so updating again should definitely pay off.

    Olivier Flückiger

    Ah btw. your understanding of lazy fbv allocation is correct. But it could still happen that the access is e.g., in a branch that was not executed so far.

    Igor Sheludko

    +1 to this question. IIUC we are loading a property from the module and by this time I think `LookupIterator` itself or `LookupForRead` should have already triggered module evaluation and thus we should already know whether the property is there or not (on this branch - it's not found). I think there should be no special handling of modules in `if (!lookup->IsFound()) {` branch.

    Caio Lima

    I think it's the case, since all async dependencies are already evaluated once such access happens.

    The case being considered when `!lookup->IsFound()` is when there's an error while accessing a deferred module. For such case we need to throw the same error on every access. The semantics is the same if the property is present or not. Considering how this implementation is now, if we cache on
    !lookup->IsFound() and the evaluation throws an error, next accesses will not throw. This happens because `UpdateCaches` is called before we actually trigger the deferred evaluation.

    Igor Sheludko

    I see. Then having a separate `LookupIterator` state `DEFERRED_MODULE` or `FAILED_DEFERRED_MODULE` would probably be helpful here. The lookup iterator could transition there in case the holder is the deferred module that failed during evaluation.

    Caio Lima

    Done

    Line 1025, Patchset 11: return MaybeObjectHandle(LoadHandler::LoadSlow(isolate()));
    Igor Sheludko . resolved

    Same concern as above - I think by this time the module should already be evaluated (by `LookupIterator` or by `LookupForRead`).

    Caio Lima

    As I mentioned above, module evaluation happens on `Object::GetProperty`, but UpdateCaches is called before it[1].

    [1] - https://github.com/v8/v8/blob/main/src/ic/ic.cc#L438-L456

    Igor Sheludko

    I was actually suggesting to make sure that the `LookupIterator` or at least `LookupForRead` function trigger module evaluation by the time we reach here.

    Caio Lima

    Done

    Gerrit-Comment-Date: Fri, 05 Dec 2025 18:37:49 +0000
    unsatisfied_requirement
    open
    diffy

    Olivier Flückiger (Gerrit)

    unread,
    Dec 9, 2025, 8:05:21 AM12/9/25
    to Caio Lima, Igor Sheludko, chrom...@appspot.gserviceaccount.com, Leszek Swirski, V8 LUCI CQ, Hannes Payer, cbruni...@chromium.org, dmercadi...@chromium.org, mlippau...@chromium.org, v8-re...@googlegroups.com
    Attention needed from Caio Lima, Igor Sheludko and Leszek Swirski

    Olivier Flückiger added 3 comments

    File src/objects/api-callbacks.tq
    Line 11, Patchset 19: is_internal: bool: 1 bit;
    Caio Lima . unresolved

    I added this new bitfield so we are able to figure out if an interceptor is internal or not. Such distinction came in hand mainly on `SetPropertyInternal`, but also on other interceptor paths. The overall idea for the creating such distinction is to avoid introducing any observable change for non-internal interceptors.

    Olivier Flückiger

    I think it makes sense.

    File src/objects/js-objects.cc
    Line 1939, Patchset 20 (Latest): if (interceptor->is_internal() && IsNull(*result)) {
    Olivier Flückiger . unresolved

    Maybe `false` would be a more natural marker value?

    File src/objects/objects.cc
    Line 2330, Patchset 19: it->GetInterceptor()->is_internal()) {
    Caio Lima . unresolved

    This is one of the reasons why it took me a while to upload a new patch. I didn't fully understand why there's a `it->HolderIsReceiverOrHiddenPrototype()` check before calling `JSObject::SetPropertyWithInterceptor`, but this gave me some trouble to properly implement `JSDeferredModuleNamespace` [[Set]] without triggering an evaluation. I added a condition on internal interceptors to avoid introduce breaking changes to current interceptors API, since there'll be a trap on `JSObject::GetPropertyAttributesWithInterceptor` if `it->HolderIsReceiverOrHiddenPrototype() == false`. However, I'm curious to know why we are just calling `SetProperty` interceptor when `holder == receiver`.

    Olivier Flückiger

    @ish...@chromium.org do you know why? Maybe we cannot guarantee that we check for interceptors on all stores in optimized code?

    Open in Gerrit

    Related details

    Attention is currently required from:
    • Caio Lima
    • Igor Sheludko
    • Leszek Swirski
    Submit Requirements:
    • requirement is not 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: Ia2aa34037a41a1525b1e0ca8fc7c96dbc23dbd87
    Gerrit-Change-Number: 7102359
    Gerrit-PatchSet: 20
    Gerrit-Owner: Caio Lima <caio...@igalia.com>
    Gerrit-Reviewer: Caio Lima <caio...@igalia.com>
    Gerrit-Reviewer: Leszek Swirski <les...@chromium.org>
    Gerrit-Reviewer: Olivier Flückiger <ol...@chromium.org>
    Gerrit-CC: Hannes Payer <hpa...@chromium.org>
    Gerrit-CC: Igor Sheludko <ish...@chromium.org>
    Gerrit-Attention: Caio Lima <caio...@igalia.com>
    Gerrit-Attention: Igor Sheludko <ish...@chromium.org>
    Gerrit-Attention: Leszek Swirski <les...@chromium.org>
    Gerrit-Comment-Date: Tue, 09 Dec 2025 13:05:16 +0000
    unsatisfied_requirement
    open
    diffy

    Igor Sheludko (Gerrit)

    unread,
    Dec 9, 2025, 9:31:13 AM12/9/25
    to Caio Lima, chrom...@appspot.gserviceaccount.com, Olivier Flückiger, Leszek Swirski, V8 LUCI CQ, Hannes Payer, cbruni...@chromium.org, dmercadi...@chromium.org, mlippau...@chromium.org, v8-re...@googlegroups.com
    Attention needed from Caio Lima and Leszek Swirski

    Igor Sheludko added 1 comment

    File src/objects/objects.cc
    Line 2330, Patchset 19: it->GetInterceptor()->is_internal()) {
    Caio Lima . unresolved

    This is one of the reasons why it took me a while to upload a new patch. I didn't fully understand why there's a `it->HolderIsReceiverOrHiddenPrototype()` check before calling `JSObject::SetPropertyWithInterceptor`, but this gave me some trouble to properly implement `JSDeferredModuleNamespace` [[Set]] without triggering an evaluation. I added a condition on internal interceptors to avoid introduce breaking changes to current interceptors API, since there'll be a trap on `JSObject::GetPropertyAttributesWithInterceptor` if `it->HolderIsReceiverOrHiddenPrototype() == false`. However, I'm curious to know why we are just calling `SetProperty` interceptor when `holder == receiver`.

    Olivier Flückiger

    @ish...@chromium.org do you know why? Maybe we cannot guarantee that we check for interceptors on all stores in optimized code?

    Igor Sheludko
    This new behavior contradicts JS semantics of `[[Set]]` operation. Imagine the following setup:
    ```
    var p = {x:42};
    var obj = {__proto__: p};
    obj.x = 153;
    console.log(obj.x); // 153

    Object.defineProperty(p, "y", {value:55, writable: false});
    obj.y = 153;
    console.log(obj.y); // 55
    ```
    When we store a property to an object and there's data property with the same name in prototype chain then `p.x/p.y` will never be updated but the writability of `p.x/p.y` will define whether the property will be added to `obj` or not (JS spec does not allow to "override" non-writable properties, and we need to throw TypeError if the override attempt happens in strict mode).

    What's happening with the module evaluation? Do we trigger evaluation via prototype chain? Can a JSModule become a prototype of arbitrary object in user code?

    **TLDR:** In general we are moving towards limiting the power of interceptors Api to serve just as a dynamic collection of *data* properties unlike the `Proxy`-like Api which might serve as anything. The reason is that interceptors were introduced for Chrome which uses only half of the provided functionality while it has to pay the full price of passing unnecessary values (for example, receiver) to the callbacks. The new interceptors Api (once we get there) will allow to create only data properties.

    I'm sorry I haven't foreseen this issue before you implemented everything.

    Now I'm leaning even more towards the idea of adding a `LookupIterator::DEFERRED_MODULE` state for which Get/Set methods should just trigger the module object evaluation (which would populate the object with respective data properties), handle potential exception and just proceed lookup based on the new state of the module object. This new state would be similar to `LookupIterator::ACCESS_CHECK`.

    Please give this idea a though, I think with this approach the implementation would be way simpler and not require any hacks.

    Open in Gerrit

    Related details

    Attention is currently required from:
    • Caio Lima
    • Leszek Swirski
    Submit Requirements:
    • requirement is not 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: Ia2aa34037a41a1525b1e0ca8fc7c96dbc23dbd87
    Gerrit-Change-Number: 7102359
    Gerrit-PatchSet: 20
    Gerrit-Owner: Caio Lima <caio...@igalia.com>
    Gerrit-Reviewer: Caio Lima <caio...@igalia.com>
    Gerrit-Reviewer: Leszek Swirski <les...@chromium.org>
    Gerrit-Reviewer: Olivier Flückiger <ol...@chromium.org>
    Gerrit-CC: Hannes Payer <hpa...@chromium.org>
    Gerrit-CC: Igor Sheludko <ish...@chromium.org>
    Gerrit-Attention: Caio Lima <caio...@igalia.com>
    Gerrit-Attention: Leszek Swirski <les...@chromium.org>
    Gerrit-Comment-Date: Tue, 09 Dec 2025 14:31:08 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: No
    Comment-In-Reply-To: Caio Lima <caio...@igalia.com>
    Comment-In-Reply-To: Olivier Flückiger <ol...@chromium.org>
    unsatisfied_requirement
    open
    diffy

    Nicolò Ribaudo (Gerrit)

    unread,
    Dec 9, 2025, 10:03:20 AM12/9/25
    to Caio Lima, Igor Sheludko, chrom...@appspot.gserviceaccount.com, Olivier Flückiger, Leszek Swirski, V8 LUCI CQ, Hannes Payer, cbruni...@chromium.org, dmercadi...@chromium.org, mlippau...@chromium.org, v8-re...@googlegroups.com
    Attention needed from Caio Lima and Leszek Swirski

    Nicolò Ribaudo added 1 comment

    File src/objects/objects.cc
    Line 2330, Patchset 19: it->GetInterceptor()->is_internal()) {
    Caio Lima . unresolved

    This is one of the reasons why it took me a while to upload a new patch. I didn't fully understand why there's a `it->HolderIsReceiverOrHiddenPrototype()` check before calling `JSObject::SetPropertyWithInterceptor`, but this gave me some trouble to properly implement `JSDeferredModuleNamespace` [[Set]] without triggering an evaluation. I added a condition on internal interceptors to avoid introduce breaking changes to current interceptors API, since there'll be a trap on `JSObject::GetPropertyAttributesWithInterceptor` if `it->HolderIsReceiverOrHiddenPrototype() == false`. However, I'm curious to know why we are just calling `SetProperty` interceptor when `holder == receiver`.

    Olivier Flückiger

    @ish...@chromium.org do you know why? Maybe we cannot guarantee that we check for interceptors on all stores in optimized code?

    Igor Sheludko
    This new behavior contradicts JS semantics of `[[Set]]` operation. Imagine the following setup:
    ```
    var p = {x:42};
    var obj = {__proto__: p};
    obj.x = 153;
    console.log(obj.x); // 153

    Object.defineProperty(p, "y", {value:55, writable: false});
    obj.y = 153;
    console.log(obj.y); // 55
    ```
    When we store a property to an object and there's data property with the same name in prototype chain then `p.x/p.y` will never be updated but the writability of `p.x/p.y` will define whether the property will be added to `obj` or not (JS spec does not allow to "override" non-writable properties, and we need to throw TypeError if the override attempt happens in strict mode).

    What's happening with the module evaluation? Do we trigger evaluation via prototype chain? Can a JSModule become a prototype of arbitrary object in user code?

    **TLDR:** In general we are moving towards limiting the power of interceptors Api to serve just as a dynamic collection of *data* properties unlike the `Proxy`-like Api which might serve as anything. The reason is that interceptors were introduced for Chrome which uses only half of the provided functionality while it has to pay the full price of passing unnecessary values (for example, receiver) to the callbacks. The new interceptors Api (once we get there) will allow to create only data properties.

    I'm sorry I haven't foreseen this issue before you implemented everything.

    Now I'm leaning even more towards the idea of adding a `LookupIterator::DEFERRED_MODULE` state for which Get/Set methods should just trigger the module object evaluation (which would populate the object with respective data properties), handle potential exception and just proceed lookup based on the new state of the module object. This new state would be similar to `LookupIterator::ACCESS_CHECK`.

    Please give this idea a though, I think with this approach the implementation would be way simpler and not require any hacks.

    Nicolò Ribaudo

    When we store a property to an object and there's data property with the same name in prototype chain then p.x/p.y will never be updated but the writability of p.x/p.y will define whether the property will be added to obj or not (JS spec does not allow to "override" non-writable properties, and we need to throw TypeError if the override attempt happens in strict mode).
    > What's happening with the module evaluation? Do we trigger evaluation via prototype chain? Can a JSModule become a prototype of arbitrary object in user code?

    When you have this code:
    ```
    import defer * as ns from "mod"; // assume it exports `const x = 2`
    var obj = { __proto__: ns };
    obj.x = 3;
    ```

    What happens is that:

    • `obj.x` runs `obj.[[Set]]("x", 3, obj)
    • it calls `OrdinarySet(obj, "x", 3, obj)`
    • it calls `obj.[[GetOwnProperty]]("x")`, which returns undefined because `x` is not an own property
    • then, it moves to the prototype (in OrdinarySetWithOwnDescriptor): it calls `ns.[[Set]]("x", 3, obj)`, which just returns `false` and we are done

    `[[Set]]` does not "check the descriptor on the prototype". `[[Set]]` just calls `[[Set]]` from the prototype, without ever reading properties from it.

    If `ns` was an ordinary object, it would still be `ns.[[Set]]` that checks its own descriptor and then installs the property on `obj`, and not `obj.[[Set]]` itself.

    Open in Gerrit

    Related details

    Attention is currently required from:
    • Caio Lima
    • Leszek Swirski
    Submit Requirements:
    • requirement is not 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: Ia2aa34037a41a1525b1e0ca8fc7c96dbc23dbd87
    Gerrit-Change-Number: 7102359
    Gerrit-PatchSet: 20
    Gerrit-Owner: Caio Lima <caio...@igalia.com>
    Gerrit-Reviewer: Caio Lima <caio...@igalia.com>
    Gerrit-Reviewer: Leszek Swirski <les...@chromium.org>
    Gerrit-Reviewer: Olivier Flückiger <ol...@chromium.org>
    Gerrit-CC: Hannes Payer <hpa...@chromium.org>
    Gerrit-CC: Igor Sheludko <ish...@chromium.org>
    Gerrit-CC: Nicolò Ribaudo <nrib...@igalia.com>
    Gerrit-Attention: Caio Lima <caio...@igalia.com>
    Gerrit-Attention: Leszek Swirski <les...@chromium.org>
    Gerrit-Comment-Date: Tue, 09 Dec 2025 15:03:15 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: No
    Comment-In-Reply-To: Caio Lima <caio...@igalia.com>
    unsatisfied_requirement
    open
    diffy

    Olivier Flückiger (Gerrit)

    unread,
    Dec 9, 2025, 10:22:51 AM12/9/25
    to Caio Lima, Nicolò Ribaudo, Igor Sheludko, chrom...@appspot.gserviceaccount.com, Leszek Swirski, V8 LUCI CQ, Hannes Payer, cbruni...@chromium.org, dmercadi...@chromium.org, mlippau...@chromium.org, v8-re...@googlegroups.com
    Attention needed from Caio Lima and Leszek Swirski

    Olivier Flückiger added 1 comment

    File src/objects/objects.cc
    Olivier Flückiger

    @caio...@igalia.com did you already try to handle deferred modules with a dedicated iterator state and hit any insurmountable issues? From looking at the CL as it is now, I wonder if the actual code and logic wouldn't almost stay the same. Of course the interceptor implementation would move to the respective cases in the various switches handling the lookup iterator states instead.

    Making the unevaluated module a special receiver map might help (see https://source.chromium.org/chromium/chromium/src/+/main:v8/src/objects/lookup.cc;l=86?q=file:lookup.cc&ss=chromium)

    Gerrit-Comment-Date: Tue, 09 Dec 2025 15:22:45 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: No
    Comment-In-Reply-To: Caio Lima <caio...@igalia.com>
    Comment-In-Reply-To: Igor Sheludko <ish...@chromium.org>
    Comment-In-Reply-To: Olivier Flückiger <ol...@chromium.org>
    Comment-In-Reply-To: Nicolò Ribaudo <nrib...@igalia.com>
    unsatisfied_requirement
    open
    diffy

    Igor Sheludko (Gerrit)

    unread,
    Dec 9, 2025, 10:52:25 AM12/9/25
    to Caio Lima, Nicolò Ribaudo, chrom...@appspot.gserviceaccount.com, Olivier Flückiger, Leszek Swirski, V8 LUCI CQ, Hannes Payer, cbruni...@chromium.org, dmercadi...@chromium.org, mlippau...@chromium.org, v8-re...@googlegroups.com
    Attention needed from Caio Lima and Leszek Swirski

    Igor Sheludko added 1 comment

    File src/objects/objects.cc
    Igor Sheludko

    @nrib...@igalia.com , ah, you are right! Thanks!
    Anyway, adding a new `LookupIterator` state is still the easiest way to go.

    Gerrit-Comment-Date: Tue, 09 Dec 2025 15:52:20 +0000
    unsatisfied_requirement
    open
    diffy

    Caio Lima (Gerrit)

    unread,
    Dec 9, 2025, 12:08:22 PM12/9/25
    to Nicolò Ribaudo, Igor Sheludko, chrom...@appspot.gserviceaccount.com, Olivier Flückiger, Leszek Swirski, V8 LUCI CQ, Hannes Payer, cbruni...@chromium.org, dmercadi...@chromium.org, mlippau...@chromium.org, v8-re...@googlegroups.com
    Attention needed from Igor Sheludko, Leszek Swirski, Nicolò Ribaudo and Olivier Flückiger

    Caio Lima added 1 comment

    File src/objects/objects.cc
    Caio Lima

    Did you already try to handle deferred modules with a dedicated iterator state and hit any insurmountable issues?

    I tried it before, and doesn't look like it's impossible. My feeling after implementing with interceptors is that most of the code I needed to put in each callback should go somewhere else when implementing with `LookupIterator`. Another thing I need to keep in mind using `LookupIterator` is the new check we need to do to see if we are passing through `JSDeferredModuleNamespace`. I can give another real try there.

    Open in Gerrit

    Related details

    Attention is currently required from:
    • Igor Sheludko
    • Leszek Swirski
    • Nicolò Ribaudo
    • Olivier Flückiger
    Submit Requirements:
    • requirement is not 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: Ia2aa34037a41a1525b1e0ca8fc7c96dbc23dbd87
    Gerrit-Change-Number: 7102359
    Gerrit-PatchSet: 20
    Gerrit-Owner: Caio Lima <caio...@igalia.com>
    Gerrit-Reviewer: Caio Lima <caio...@igalia.com>
    Gerrit-Reviewer: Leszek Swirski <les...@chromium.org>
    Gerrit-Reviewer: Olivier Flückiger <ol...@chromium.org>
    Gerrit-CC: Hannes Payer <hpa...@chromium.org>
    Gerrit-CC: Igor Sheludko <ish...@chromium.org>
    Gerrit-CC: Nicolò Ribaudo <nrib...@igalia.com>
    Gerrit-Attention: Igor Sheludko <ish...@chromium.org>
    Gerrit-Attention: Olivier Flückiger <ol...@chromium.org>
    Gerrit-Attention: Nicolò Ribaudo <nrib...@igalia.com>
    Gerrit-Attention: Leszek Swirski <les...@chromium.org>
    Gerrit-Comment-Date: Tue, 09 Dec 2025 17:08:17 +0000
    unsatisfied_requirement
    open
    diffy

    Igor Sheludko (Gerrit)

    unread,
    Dec 9, 2025, 12:32:03 PM12/9/25
    to Caio Lima, Nicolò Ribaudo, chrom...@appspot.gserviceaccount.com, Olivier Flückiger, Leszek Swirski, V8 LUCI CQ, Hannes Payer, cbruni...@chromium.org, dmercadi...@chromium.org, mlippau...@chromium.org, v8-re...@googlegroups.com
    Attention needed from Caio Lima, Leszek Swirski, Nicolò Ribaudo and Olivier Flückiger

    Igor Sheludko added 1 comment

    File src/objects/objects.cc
    Igor Sheludko
    Some hints, just in case:
    - [this predicate](https://source.chromium.org/chromium/chromium/src/+/main:v8/src/objects/lookup.cc;l=86?q=%22if%20(IsSpecialReceiverMap(map))%20%7B%22&ss=chromium) should return true for deferred module objects (this would also make sure that `AccessorAssembler::GenericPropertyLoad()` handles such objects correctly),
    - detection of an non-evaluated deferred module should go somewhere [here](https://source.chromium.org/chromium/chromium/src/+/main:v8/src/objects/lookup.cc;l=1329?q=%22LookupIterator::State%20LookupIterator::LookupInSpecialHolder),
    - you'll need to add a bunch of `case LookupIterator::DEFERRED_MODULE:` into various switches, some of them would be UNREACHABLE and some would have to trigger module evaluation and proceed lookup.
    Open in Gerrit

    Related details

    Attention is currently required from:
    • Caio Lima
    Gerrit-Attention: Caio Lima <caio...@igalia.com>
    Gerrit-Attention: Olivier Flückiger <ol...@chromium.org>
    Gerrit-Attention: Nicolò Ribaudo <nrib...@igalia.com>
    Gerrit-Attention: Leszek Swirski <les...@chromium.org>
    Gerrit-Comment-Date: Tue, 09 Dec 2025 17:31:58 +0000
    unsatisfied_requirement
    open
    diffy

    Caio Lima (Gerrit)

    unread,
    Dec 10, 2025, 8:04:17 PM12/10/25
    to Nicolò Ribaudo, Igor Sheludko, chrom...@appspot.gserviceaccount.com, Olivier Flückiger, Leszek Swirski, V8 LUCI CQ, Hannes Payer, cbruni...@chromium.org, dmercadi...@chromium.org, mlippau...@chromium.org, v8-re...@googlegroups.com
    Attention needed from Igor Sheludko, Leszek Swirski, Nicolò Ribaudo and Olivier Flückiger

    Caio Lima added 1 comment

    File src/objects/objects.cc
    Caio Lima

    Thanks a lot for the guidance here. I prepared a separated CL that implements it using a dedicated LookupIterator here (https://chromium-review.googlesource.com/c/v8/v8/+/7247865) and only implements [[Get]] to make it simpler. The reason to separate it is that I think handling all operations in one single patch feels like too much, and my idea is to split it on Patches for each internal operation ([[Get]], [[Set]], [[Delete]], [[GetOwnProperty]], etc). The first patch with [[Get]] is probably going to be the biggest one, since we need to include all the logic to create JSDeferredModuleNamespace, but I think the following CLs will be much focused and better to reason/discuss.

    Open in Gerrit

    Related details

    Attention is currently required from:
    • Igor Sheludko
    Gerrit-Attention: Igor Sheludko <ish...@chromium.org>
    Gerrit-Attention: Olivier Flückiger <ol...@chromium.org>
    Gerrit-Attention: Nicolò Ribaudo <nrib...@igalia.com>
    Gerrit-Attention: Leszek Swirski <les...@chromium.org>
    Gerrit-Comment-Date: Thu, 11 Dec 2025 01:04:14 +0000
    unsatisfied_requirement
    open
    diffy

    Caio Lima (Gerrit)

    unread,
    Jan 16, 2026, 9:08:30 AMJan 16
    to Nicolò Ribaudo, Igor Sheludko, chrom...@appspot.gserviceaccount.com, Olivier Flückiger, Leszek Swirski, V8 LUCI CQ, Hannes Payer, cbruni...@chromium.org, dmercadi...@chromium.org, mlippau...@chromium.org, v8-re...@googlegroups.com

    Caio Lima abandoned this change

    Related details

    Attention set is empty
    Submit Requirements:
    • 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: abandon
    unsatisfied_requirement
    open
    diffy
    Reply all
    Reply to author
    Forward
    0 new messages