[decorators] Add decorators context and access object. [v8/v8 : main]

0 views
Skip to first unread message

Luis Pardo (Gerrit)

unread,
Sep 13, 2024, 12:43:30 PM9/13/24
to Shu-yu Guo, V8 LUCI CQ, Hannes Payer, AyeAye, victorgo...@chromium.org, mlippau...@chromium.org, v8-re...@googlegroups.com
Attention needed from Shu-yu Guo

Luis Pardo added 1 comment

Patchset-level comments
File-level comment, Patchset 6 (Latest):
Luis Pardo . resolved

@s...@chromium.org PTAL when you have a chance, this is a simple CL but a lot of wiring.

Open in Gerrit

Related details

Attention is currently required from:
  • Shu-yu Guo
Submit Requirements:
  • requirement is not satisfiedCode-Review
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
Gerrit-MessageType: comment
Gerrit-Project: v8/v8
Gerrit-Branch: main
Gerrit-Change-Id: I4c0febabf9f0f1689f73cf4d5224d4d7d765fc18
Gerrit-Change-Number: 5818208
Gerrit-PatchSet: 6
Gerrit-Owner: Luis Pardo <lpardo...@microsoft.com>
Gerrit-Reviewer: Luis Pardo <lpardo...@microsoft.com>
Gerrit-Reviewer: Shu-yu Guo <s...@chromium.org>
Gerrit-CC: Hannes Payer <hpa...@chromium.org>
Gerrit-Attention: Shu-yu Guo <s...@chromium.org>
Gerrit-Comment-Date: Fri, 13 Sep 2024 16:43:26 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
unsatisfied_requirement
open
diffy

Luis Pardo (Gerrit)

unread,
Sep 13, 2024, 1:06:43 PM9/13/24
to Shu-yu Guo, V8 LUCI CQ, Hannes Payer, AyeAye, victorgo...@chromium.org, mlippau...@chromium.org, v8-re...@googlegroups.com
Attention needed from Shu-yu Guo

Luis Pardo added 1 comment

File src/objects/js-objects-inl.h
Line 1017, Patchset 6 (Latest):ACCESSORS(JSClassDecoratorContextObject, kind, Tagged<Object>, kKindOffset)
Luis Pardo . unresolved

I'd like to follow your suggestion and add a dcheck to verify that the map has not change, that would look something like:

```
ACCESSORS_CHECKED(JSClassElementDecoratorContextObject, kind, Tagged<Object>,
kKindOffset, IsJSClassDecoratorContextObjectMap(map())
```

But there isn't an automatically generated IsJSClassDecoratorContextObjectMap and I'm not sure what is the right way to code it since the map is cached in the native context.

Alternatively, I could write getters/setters that receive the native context as an argument and perform the dcheck. That's fine but I'd like us to agree that it is the best solution before adding that code.

Open in Gerrit

Related details

Attention is currently required from:
  • Shu-yu Guo
Submit Requirements:
  • requirement is not satisfiedCode-Review
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
Gerrit-MessageType: comment
Gerrit-Project: v8/v8
Gerrit-Branch: main
Gerrit-Change-Id: I4c0febabf9f0f1689f73cf4d5224d4d7d765fc18
Gerrit-Change-Number: 5818208
Gerrit-PatchSet: 6
Gerrit-Owner: Luis Pardo <lpardo...@microsoft.com>
Gerrit-Reviewer: Luis Pardo <lpardo...@microsoft.com>
Gerrit-Reviewer: Shu-yu Guo <s...@chromium.org>
Gerrit-CC: Hannes Payer <hpa...@chromium.org>
Gerrit-Attention: Shu-yu Guo <s...@chromium.org>
Gerrit-Comment-Date: Fri, 13 Sep 2024 17:06:38 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
unsatisfied_requirement
open
diffy

Luis Pardo (Gerrit)

unread,
Oct 16, 2024, 12:34:36 PM10/16/24
to Shu-yu Guo, V8 LUCI CQ, Hannes Payer, AyeAye, victorgo...@chromium.org, mlippau...@chromium.org, v8-re...@googlegroups.com
Attention needed from Shu-yu Guo

Luis Pardo added 1 comment

Patchset-level comments
File-level comment, Patchset 10 (Latest):
Luis Pardo . resolved

@s...@chromium.org This is ready for review, thanks!

Open in Gerrit

Related details

Attention is currently required from:
  • Shu-yu Guo
Submit Requirements:
    • requirement is not satisfiedCode-Review
    • requirement is not satisfiedNo-Unresolved-Comments
    Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
    Gerrit-MessageType: comment
    Gerrit-Project: v8/v8
    Gerrit-Branch: main
    Gerrit-Change-Id: I4c0febabf9f0f1689f73cf4d5224d4d7d765fc18
    Gerrit-Change-Number: 5818208
    Gerrit-PatchSet: 10
    Gerrit-Owner: Luis Pardo <lpardo...@microsoft.com>
    Gerrit-Reviewer: Luis Pardo <lpardo...@microsoft.com>
    Gerrit-Reviewer: Shu-yu Guo <s...@chromium.org>
    Gerrit-CC: Hannes Payer <hpa...@chromium.org>
    Gerrit-Attention: Shu-yu Guo <s...@chromium.org>
    Gerrit-Comment-Date: Wed, 16 Oct 2024 16:34:33 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: No
    unsatisfied_requirement
    open
    diffy

    Luis Pardo (Gerrit)

    unread,
    Oct 18, 2024, 12:46:33 PM10/18/24
    to Shu-yu Guo, V8 LUCI CQ, Hannes Payer, AyeAye, victorgo...@chromium.org, mlippau...@chromium.org, v8-re...@googlegroups.com
    Attention needed from Shu-yu Guo

    Luis Pardo added 2 comments

    File src/builtins/decorators.tq
    Line 42, Patchset 12 (Latest):transitioning javascript builtin DecoratorAccessGet(
    Luis Pardo . unresolved

    The access objects for private methods and accessors must close around the brand and the object itself. I'll add 3 new builtins with the methods/accessors/auto-accessors CLS.

    Line 64, Patchset 12 (Latest): if (!HasProperty(obj, name)) {
    ThrowTypeError(MessageTemplate::kInvalidPrivateMemberWrite, name);
    }
    SetProperty(obj, name, value);
    Luis Pardo . unresolved

    Performing 2 checks here is suboptimal, but I didn't find any CSA code that could be used to throw when the private property is not present. This CL is already XL, if we want to optimize this, I can add a TODO and do it as a follow up.

    Open in Gerrit

    Related details

    Attention is currently required from:
    • Shu-yu Guo
    Submit Requirements:
    • requirement is not satisfiedCode-Review
    • requirement is not satisfiedNo-Unresolved-Comments
    Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
    Gerrit-MessageType: comment
    Gerrit-Project: v8/v8
    Gerrit-Branch: main
    Gerrit-Change-Id: I4c0febabf9f0f1689f73cf4d5224d4d7d765fc18
    Gerrit-Change-Number: 5818208
    Gerrit-PatchSet: 12
    Gerrit-Owner: Luis Pardo <lpardo...@microsoft.com>
    Gerrit-Reviewer: Luis Pardo <lpardo...@microsoft.com>
    Gerrit-Reviewer: Shu-yu Guo <s...@chromium.org>
    Gerrit-CC: Hannes Payer <hpa...@chromium.org>
    Gerrit-Attention: Shu-yu Guo <s...@chromium.org>
    Gerrit-Comment-Date: Fri, 18 Oct 2024 16:46:30 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: No
    unsatisfied_requirement
    open
    diffy

    Luis Pardo (Gerrit)

    unread,
    Oct 30, 2025, 8:13:59 PMOct 30
    to Olivier Flückiger, V8 LUCI CQ, Hannes Payer, AyeAye, victorgo...@chromium.org, mlippau...@chromium.org, v8-re...@googlegroups.com
    Attention needed from Luis Pardo and Olivier Flückiger

    Luis Pardo voted and added 1 comment

    Votes added by Luis Pardo

    Commit-Queue+1

    1 comment

    Patchset-level comments
    File-level comment, Patchset 20 (Latest):
    Luis Pardo . resolved

    @ol...@chromium.org Started rebasing this CLS. Regenerated the static roots with `gen-static-roots.py` but seems like I'm missing something for the "no wasm" versions. Any advice?

    Open in Gerrit

    Related details

    Attention is currently required from:
    • Luis Pardo
    • 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: I4c0febabf9f0f1689f73cf4d5224d4d7d765fc18
    Gerrit-Change-Number: 5818208
    Gerrit-PatchSet: 20
    Gerrit-Owner: Luis Pardo <lpardo...@microsoft.com>
    Gerrit-Reviewer: Luis Pardo <lpardo...@microsoft.com>
    Gerrit-Reviewer: Olivier Flückiger <ol...@chromium.org>
    Gerrit-Attention: Olivier Flückiger <ol...@chromium.org>
    Gerrit-Attention: Luis Pardo <lpardo...@microsoft.com>
    Gerrit-Comment-Date: Fri, 31 Oct 2025 00:13:55 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: Yes
    unsatisfied_requirement
    open
    diffy

    Olivier Flückiger (Gerrit)

    unread,
    Nov 3, 2025, 4:02:17 AMNov 3
    to Luis Pardo, V8 LUCI CQ, Hannes Payer, AyeAye, victorgo...@chromium.org, mlippau...@chromium.org, v8-re...@googlegroups.com
    Attention needed from Luis Pardo

    Olivier Flückiger added 1 comment

    Patchset-level comments
    Luis Pardo . resolved

    @ol...@chromium.org Started rebasing this CLS. Regenerated the static roots with `gen-static-roots.py` but seems like I'm missing something for the "no wasm" versions. Any advice?

    Olivier Flückiger

    maybe you have an old version of that script? if you pass no args it should create all 4 versions we currently have. you have to check in the modified roots headers.

    Open in Gerrit

    Related details

    Attention is currently required from:
    • Luis Pardo
    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: I4c0febabf9f0f1689f73cf4d5224d4d7d765fc18
    Gerrit-Change-Number: 5818208
    Gerrit-PatchSet: 20
    Gerrit-Owner: Luis Pardo <lpardo...@microsoft.com>
    Gerrit-Reviewer: Luis Pardo <lpardo...@microsoft.com>
    Gerrit-Reviewer: Olivier Flückiger <ol...@chromium.org>
    Gerrit-CC: Hannes Payer <hpa...@chromium.org>
    Gerrit-Attention: Luis Pardo <lpardo...@microsoft.com>
    Gerrit-Comment-Date: Mon, 03 Nov 2025 09:02:13 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: No
    Comment-In-Reply-To: Luis Pardo <lpardo...@microsoft.com>
    unsatisfied_requirement
    open
    diffy

    Luis Pardo (Gerrit)

    unread,
    Nov 3, 2025, 11:37:20 AMNov 3
    to Olivier Flückiger, V8 LUCI CQ, Hannes Payer, AyeAye, victorgo...@chromium.org, mlippau...@chromium.org, v8-re...@googlegroups.com
    Attention needed from Olivier Flückiger

    Luis Pardo added 1 comment

    Patchset-level comments
    Luis Pardo . unresolved

    @ol...@chromium.org Started rebasing this CLS. Regenerated the static roots with `gen-static-roots.py` but seems like I'm missing something for the "no wasm" versions. Any advice?

    Olivier Flückiger

    maybe you have an old version of that script? if you pass no args it should create all 4 versions we currently have. you have to check in the modified roots headers.

    Luis Pardo

    Those 4 headers are already included in this CL but the bot is still failing. Am I adding the new roots correctly?

    Open in Gerrit

    Related details

    Attention is currently required from:
    • 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: I4c0febabf9f0f1689f73cf4d5224d4d7d765fc18
    Gerrit-Change-Number: 5818208
    Gerrit-PatchSet: 20
    Gerrit-Owner: Luis Pardo <lpardo...@microsoft.com>
    Gerrit-Reviewer: Luis Pardo <lpardo...@microsoft.com>
    Gerrit-Reviewer: Olivier Flückiger <ol...@chromium.org>
    Gerrit-CC: Hannes Payer <hpa...@chromium.org>
    Gerrit-Attention: Olivier Flückiger <ol...@chromium.org>
    Gerrit-Comment-Date: Mon, 03 Nov 2025 16:37:16 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: No
    Comment-In-Reply-To: Olivier Flückiger <ol...@chromium.org>
    Comment-In-Reply-To: Luis Pardo <lpardo...@microsoft.com>
    unsatisfied_requirement
    open
    diffy

    Olivier Flückiger (Gerrit)

    unread,
    Nov 3, 2025, 11:41:19 AMNov 3
    to Luis Pardo, V8 LUCI CQ, Hannes Payer, AyeAye, victorgo...@chromium.org, mlippau...@chromium.org, v8-re...@googlegroups.com
    Attention needed from Luis Pardo

    Olivier Flückiger added 1 comment

    Patchset-level comments
    Luis Pardo . unresolved

    @ol...@chromium.org Started rebasing this CLS. Regenerated the static roots with `gen-static-roots.py` but seems like I'm missing something for the "no wasm" versions. Any advice?

    Olivier Flückiger

    maybe you have an old version of that script? if you pass no args it should create all 4 versions we currently have. you have to check in the modified roots headers.

    Luis Pardo

    Those 4 headers are already included in this CL but the bot is still failing. Am I adding the new roots correctly?

    Olivier Flückiger

    Ah, I see. some of the values are exported in the api and you need to manually update the value (i.e., copy the value from the static roots header to the place where the static assert fails). We should really improve that workflow at some point...

    Open in Gerrit

    Related details

    Attention is currently required from:
    • Luis Pardo
    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: I4c0febabf9f0f1689f73cf4d5224d4d7d765fc18
    Gerrit-Change-Number: 5818208
    Gerrit-PatchSet: 20
    Gerrit-Owner: Luis Pardo <lpardo...@microsoft.com>
    Gerrit-Reviewer: Luis Pardo <lpardo...@microsoft.com>
    Gerrit-Reviewer: Olivier Flückiger <ol...@chromium.org>
    Gerrit-CC: Hannes Payer <hpa...@chromium.org>
    Gerrit-Attention: Luis Pardo <lpardo...@microsoft.com>
    Gerrit-Comment-Date: Mon, 03 Nov 2025 16:41:13 +0000
    unsatisfied_requirement
    open
    diffy

    Luis Pardo (Gerrit)

    unread,
    Nov 3, 2025, 6:11:02 PMNov 3
    to Olivier Flückiger, V8 LUCI CQ, Hannes Payer, AyeAye, cbruni...@chromium.org, victorgo...@chromium.org, mlippau...@chromium.org, v8-re...@googlegroups.com
    Attention needed from Olivier Flückiger

    Luis Pardo added 2 comments

    Patchset-level comments

    @ol...@chromium.org Started rebasing this CLS. Regenerated the static roots with `gen-static-roots.py` but seems like I'm missing something for the "no wasm" versions. Any advice?

    Olivier Flückiger

    maybe you have an old version of that script? if you pass no args it should create all 4 versions we currently have. you have to check in the modified roots headers.

    Luis Pardo

    Those 4 headers are already included in this CL but the bot is still failing. Am I adding the new roots correctly?

    Olivier Flückiger

    Ah, I see. some of the values are exported in the api and you need to manually update the value (i.e., copy the value from the static roots header to the place where the static assert fails). We should really improve that workflow at some point...

    Luis Pardo

    Done. Thanks!

    File-level comment, Patchset 21 (Latest):
    Luis Pardo . resolved

    @ol...@chromium.org This one is ready for review.

    Open in Gerrit

    Related details

    Attention is currently required from:
    • 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: I4c0febabf9f0f1689f73cf4d5224d4d7d765fc18
    Gerrit-Change-Number: 5818208
    Gerrit-PatchSet: 21
    Gerrit-Owner: Luis Pardo <lpardo...@microsoft.com>
    Gerrit-Reviewer: Luis Pardo <lpardo...@microsoft.com>
    Gerrit-Reviewer: Olivier Flückiger <ol...@chromium.org>
    Gerrit-CC: Hannes Payer <hpa...@chromium.org>
    Gerrit-Attention: Olivier Flückiger <ol...@chromium.org>
    Gerrit-Comment-Date: Mon, 03 Nov 2025 23:10:58 +0000
    unsatisfied_requirement
    open
    diffy

    Olivier Flückiger (Gerrit)

    unread,
    Nov 16, 2025, 11:52:32 PM (2 days ago) Nov 16
    to Luis Pardo, V8 LUCI CQ, Hannes Payer, AyeAye, cbruni...@chromium.org, victorgo...@chromium.org, mlippau...@chromium.org, v8-re...@googlegroups.com
    Attention needed from Luis Pardo

    Olivier Flückiger added 8 comments

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

    thanks. finally a first round of comments on this one.

    File src/builtins/builtins-definitions.h
    Line 1513, Patchset 21 (Latest): TFS(PrivateGet, NeedsContext::kYes, kObject, kKey) \
    Olivier Flückiger . unresolved

    should we name this GetPrivateProperty to be more consistent

    File src/builtins/decorators.tq
    Line 42, Patchset 12:transitioning javascript builtin DecoratorAccessGet(
    Luis Pardo . unresolved

    The access objects for private methods and accessors must close around the brand and the object itself. I'll add 3 new builtins with the methods/accessors/auto-accessors CLS.

    Olivier Flückiger

    ok, can you leave a TODO?

    Line 50, Patchset 21 (Latest): if (Is<String>(name)) {
    Olivier Flückiger . unresolved

    It is a bit surprising that we have to check this here. At the very least we should have two different accessor implementations, one for private symbols and one for normal names. We then should create the one we need depending on the name when we create the context object.

    Line 64, Patchset 12: if (!HasProperty(obj, name)) {

    ThrowTypeError(MessageTemplate::kInvalidPrivateMemberWrite, name);
    }
    SetProperty(obj, name, value);
    Luis Pardo . unresolved

    Performing 2 checks here is suboptimal, but I didn't find any CSA code that could be used to throw when the private property is not present. This CL is already XL, if we want to optimize this, I can add a TODO and do it as a follow up.

    Olivier Flückiger

    Please add a TODO. That should definitely be fixed.

    File src/objects/js-objects-inl.h
    Line 1017, Patchset 6:ACCESSORS(JSClassDecoratorContextObject, kind, Tagged<Object>, kKindOffset)
    Luis Pardo . unresolved

    I'd like to follow your suggestion and add a dcheck to verify that the map has not change, that would look something like:

    ```
    ACCESSORS_CHECKED(JSClassElementDecoratorContextObject, kind, Tagged<Object>,
    kKindOffset, IsJSClassDecoratorContextObjectMap(map())
    ```

    But there isn't an automatically generated IsJSClassDecoratorContextObjectMap and I'm not sure what is the right way to code it since the map is cached in the native context.

    Alternatively, I could write getters/setters that receive the native context as an argument and perform the dcheck. That's fine but I'd like us to agree that it is the best solution before adding that code.

    Olivier Flückiger

    I am not sure I understand the question. If you mutate the context object, then it's map will change, so the dcheck you want to add will not hold anymore.

    File src/objects/js-objects.h
    Line 1216, Patchset 21 (Latest): DECL_ACCESSORS(add_initializer, Tagged<Object>)
    Olivier Flückiger . unresolved

    Please add a TODO that we would want to eventually statically initialize this field.

    Line 1212, Patchset 21 (Latest): DECL_ACCESSORS(access, Tagged<Object>)
    Olivier Flückiger . unresolved

    Please add a TODO that we would want to eventually statically initialize this field.

    Open in Gerrit

    Related details

    Attention is currently required from:
    • Luis Pardo
    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: I4c0febabf9f0f1689f73cf4d5224d4d7d765fc18
    Gerrit-Change-Number: 5818208
    Gerrit-PatchSet: 21
    Gerrit-Owner: Luis Pardo <lpardo...@microsoft.com>
    Gerrit-Reviewer: Luis Pardo <lpardo...@microsoft.com>
    Gerrit-Reviewer: Olivier Flückiger <ol...@chromium.org>
    Gerrit-CC: Hannes Payer <hpa...@chromium.org>
    Gerrit-Attention: Luis Pardo <lpardo...@microsoft.com>
    Gerrit-Comment-Date: Mon, 17 Nov 2025 04:52:25 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: No
    Comment-In-Reply-To: Luis Pardo <lpardo...@microsoft.com>
    unsatisfied_requirement
    open
    diffy

    Luis Pardo (Gerrit)

    unread,
    Nov 17, 2025, 7:46:46 PM (2 days ago) Nov 17
    to Olivier Flückiger, V8 LUCI CQ, Hannes Payer, AyeAye, cbruni...@chromium.org, victorgo...@chromium.org, mlippau...@chromium.org, v8-re...@googlegroups.com
    Attention needed from Olivier Flückiger

    Luis Pardo added 3 comments

    File src/objects/js-objects-inl.h
    Line 1017, Patchset 6:ACCESSORS(JSClassDecoratorContextObject, kind, Tagged<Object>, kKindOffset)
    Luis Pardo . unresolved

    I'd like to follow your suggestion and add a dcheck to verify that the map has not change, that would look something like:

    ```
    ACCESSORS_CHECKED(JSClassElementDecoratorContextObject, kind, Tagged<Object>,
    kKindOffset, IsJSClassDecoratorContextObjectMap(map())
    ```

    But there isn't an automatically generated IsJSClassDecoratorContextObjectMap and I'm not sure what is the right way to code it since the map is cached in the native context.

    Alternatively, I could write getters/setters that receive the native context as an argument and perform the dcheck. That's fine but I'd like us to agree that it is the best solution before adding that code.

    Olivier Flückiger

    I am not sure I understand the question. If you mutate the context object, then it's map will change, so the dcheck you want to add will not hold anymore.

    Luis Pardo

    Exactly. These accessors should only be used before the object is exposed to JS (and the context could be mutated), so Shu suggested to add a CHECK so this would fail if used after the map changed.

    File src/objects/js-objects.h
    Line 1216, Patchset 21 (Latest): DECL_ACCESSORS(add_initializer, Tagged<Object>)
    Olivier Flückiger . unresolved

    Please add a TODO that we would want to eventually statically initialize this field.

    Luis Pardo

    This could be statically initialized but the way we access the value in C++ benefits from doing it dynamically. See [this](https://chromium-review.googlesource.com/c/v8/v8/+/5837979/16#:~:text=Runtime_ApplyDecoratorsToFieldDefinition)

    Line 1212, Patchset 21 (Latest): DECL_ACCESSORS(access, Tagged<Object>)
    Olivier Flückiger . unresolved

    Please add a TODO that we would want to eventually statically initialize this field.

    Luis Pardo

    Access functions depend on the name/symbol of the element, why do we want to statically initialize them?

    Open in Gerrit

    Related details

    Attention is currently required from:
    • 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: I4c0febabf9f0f1689f73cf4d5224d4d7d765fc18
    Gerrit-Change-Number: 5818208
    Gerrit-PatchSet: 21
    Gerrit-Owner: Luis Pardo <lpardo...@microsoft.com>
    Gerrit-Reviewer: Luis Pardo <lpardo...@microsoft.com>
    Gerrit-Reviewer: Olivier Flückiger <ol...@chromium.org>
    Gerrit-CC: Hannes Payer <hpa...@chromium.org>
    Gerrit-Attention: Olivier Flückiger <ol...@chromium.org>
    Gerrit-Comment-Date: Tue, 18 Nov 2025 00:46:41 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: No
    unsatisfied_requirement
    open
    diffy

    Olivier Flückiger (Gerrit)

    unread,
    Nov 17, 2025, 8:10:32 PM (2 days ago) Nov 17
    to Luis Pardo, V8 LUCI CQ, Hannes Payer, AyeAye, cbruni...@chromium.org, victorgo...@chromium.org, mlippau...@chromium.org, v8-re...@googlegroups.com
    Attention needed from Luis Pardo

    Olivier Flückiger added 2 comments

    File src/objects/js-objects.h
    Line 1216, Patchset 21 (Latest): DECL_ACCESSORS(add_initializer, Tagged<Object>)
    Olivier Flückiger . unresolved

    Please add a TODO that we would want to eventually statically initialize this field.

    Luis Pardo

    This could be statically initialized but the way we access the value in C++ benefits from doing it dynamically. See [this](https://chromium-review.googlesource.com/c/v8/v8/+/5837979/16#:~:text=Runtime_ApplyDecoratorsToFieldDefinition)

    Olivier Flückiger

    sorry, I meant to say "lazily"

    Line 1212, Patchset 21 (Latest): DECL_ACCESSORS(access, Tagged<Object>)
    Olivier Flückiger . unresolved

    Please add a TODO that we would want to eventually statically initialize this field.

    Luis Pardo

    Access functions depend on the name/symbol of the element, why do we want to statically initialize them?

    Olivier Flückiger

    sorry, I meant to say "lazily". thanks for clarifying

    Open in Gerrit

    Related details

    Attention is currently required from:
    • Luis Pardo
    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: I4c0febabf9f0f1689f73cf4d5224d4d7d765fc18
    Gerrit-Change-Number: 5818208
    Gerrit-PatchSet: 21
    Gerrit-Owner: Luis Pardo <lpardo...@microsoft.com>
    Gerrit-Reviewer: Luis Pardo <lpardo...@microsoft.com>
    Gerrit-Reviewer: Olivier Flückiger <ol...@chromium.org>
    Gerrit-CC: Hannes Payer <hpa...@chromium.org>
    Gerrit-Attention: Luis Pardo <lpardo...@microsoft.com>
    Gerrit-Comment-Date: Tue, 18 Nov 2025 01:10:26 +0000
    unsatisfied_requirement
    open
    diffy

    Luis Pardo (Gerrit)

    unread,
    Nov 18, 2025, 5:38:53 PM (15 hours ago) Nov 18
    to Olivier Flückiger, V8 LUCI CQ, Hannes Payer, AyeAye, cbruni...@chromium.org, victorgo...@chromium.org, mlippau...@chromium.org, v8-re...@googlegroups.com
    Attention needed from Olivier Flückiger

    Luis Pardo added 7 comments

    Patchset-level comments
    File-level comment, Patchset 22 (Latest):
    Luis Pardo . resolved

    Addressed feedback

    File src/builtins/builtins-definitions.h
    Line 1513, Patchset 21: TFS(PrivateGet, NeedsContext::kYes, kObject, kKey) \
    Olivier Flückiger . resolved

    should we name this GetPrivateProperty to be more consistent

    Luis Pardo

    Done

    File src/builtins/decorators.tq
    Line 42, Patchset 12:transitioning javascript builtin DecoratorAccessGet(
    Luis Pardo . resolved

    The access objects for private methods and accessors must close around the brand and the object itself. I'll add 3 new builtins with the methods/accessors/auto-accessors CLS.

    Olivier Flückiger

    ok, can you leave a TODO?

    Luis Pardo

    Done

    Line 50, Patchset 21: if (Is<String>(name)) {
    Olivier Flückiger . resolved

    It is a bit surprising that we have to check this here. At the very least we should have two different accessor implementations, one for private symbols and one for normal names. We then should create the one we need depending on the name when we create the context object.

    Luis Pardo

    Done

    Line 64, Patchset 12: if (!HasProperty(obj, name)) {
    ThrowTypeError(MessageTemplate::kInvalidPrivateMemberWrite, name);
    }
    SetProperty(obj, name, value);
    Luis Pardo . resolved

    Performing 2 checks here is suboptimal, but I didn't find any CSA code that could be used to throw when the private property is not present. This CL is already XL, if we want to optimize this, I can add a TODO and do it as a follow up.

    Olivier Flückiger

    Please add a TODO. That should definitely be fixed.

    Luis Pardo

    Done

    File src/objects/js-objects.h
    Line 1216, Patchset 21: DECL_ACCESSORS(add_initializer, Tagged<Object>)
    Olivier Flückiger . resolved

    Please add a TODO that we would want to eventually statically initialize this field.

    Luis Pardo

    This could be statically initialized but the way we access the value in C++ benefits from doing it dynamically. See [this](https://chromium-review.googlesource.com/c/v8/v8/+/5837979/16#:~:text=Runtime_ApplyDecoratorsToFieldDefinition)

    Olivier Flückiger

    sorry, I meant to say "lazily"

    Luis Pardo

    Done

    Line 1212, Patchset 21: DECL_ACCESSORS(access, Tagged<Object>)
    Olivier Flückiger . resolved

    Please add a TODO that we would want to eventually statically initialize this field.

    Luis Pardo

    Access functions depend on the name/symbol of the element, why do we want to statically initialize them?

    Olivier Flückiger

    sorry, I meant to say "lazily". thanks for clarifying

    Luis Pardo

    Done

    Open in Gerrit

    Related details

    Attention is currently required from:
    • 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: I4c0febabf9f0f1689f73cf4d5224d4d7d765fc18
    Gerrit-Change-Number: 5818208
    Gerrit-PatchSet: 22
    Gerrit-Owner: Luis Pardo <lpardo...@microsoft.com>
    Gerrit-Reviewer: Luis Pardo <lpardo...@microsoft.com>
    Gerrit-Reviewer: Olivier Flückiger <ol...@chromium.org>
    Gerrit-CC: Hannes Payer <hpa...@chromium.org>
    Gerrit-Attention: Olivier Flückiger <ol...@chromium.org>
    Gerrit-Comment-Date: Tue, 18 Nov 2025 22:38:51 +0000
    unsatisfied_requirement
    open
    diffy
    Reply all
    Reply to author
    Forward
    0 new messages