ExternalReference for ModuleNamespaceEntryGetter

10 views
Skip to first unread message

Giovanny Gutierrez

unread,
Aug 25, 2022, 11:30:38 PM8/25/22
to v8-dev
I was trying to create a snapshot of a code using modules, and started to get an issue about "Unknown external reference" . After debugging the code I realized it was on Accessors::ModuleNamespaceEntryGetter and reviewing the code this is the only one not defined through the `ACCESSOR_GETTER_DECLARATION` macro, therefore was not included in the external reference table,  through the ExternalReferenceTable::AddAccessors function, was there any other reason to not include the ModuleNamespaceEntryGetter in the ReferenceTable list? Can I send a PR to add it manually? or is there a better way to include this function in the ExternalReferenceTable?

Here's the portion of the code I'm referring to

Jakob Kummerow

unread,
Aug 26, 2022, 6:24:51 AM8/26/22
to v8-dev, ishell
Adding ModuleNamespaceEntryGetter to the macro sounds reasonable to me.

Igor, are you aware of any reason why that getter would need special-casing?


--
--
v8-dev mailing list
v8-...@googlegroups.com
http://groups.google.com/group/v8-dev
---
You received this message because you are subscribed to the Google Groups "v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to v8-dev+un...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/v8-dev/90aed667-8c2f-45fd-bb53-ef54dbeb7d7bn%40googlegroups.com.

Igor Sheludko

unread,
Aug 26, 2022, 7:27:42 AM8/26/22
to Jakob Kummerow, v8-dev
It seems that the main reason why it's not added to the macro is that the accessor name is not statically known unlike all the other entries in the `ACCESSOR_INFO_LIST_GENERATOR` macro and thus the AccessorInfo objects can't be shared between different module entry accessors even though the C++ callbacks are the same.
I think adding a new `ACCESSOR_GETTER_LIST` macro list and making the ExternalReferenceTable aware of it should be the right way of addressing the problem (similar to ACCESSOR_SETTER_LIST).

-- Igor

Igor Sheludko

Software Engineer

ish...@google.com



Google Germany GmbH

Erika-Mann-Str. 33

80636 München


Geschäftsführer: Paul Manicle, Liana Sebastian

Registergericht und -nummer: Hamburg, HRB 86891

Sitz der Gesellschaft: Hamburg


Diese E-Mail ist vertraulich. Falls sie diese fälschlicherweise erhalten haben sollten, leiten Sie diese bitte nicht an jemand anderes weiter, löschen Sie alle Kopien und Anhänge davon und lassen Sie mich bitte wissen, dass die E-Mail an die falsche Person gesendet wurde.

    

This e-mail is confidential. If you received this communication by mistake, please don't forward it to anyone else, please erase all copies and attachments, and please let me know that it has gone to the wrong person.


Gio Gutierrez Gaitan

unread,
Aug 26, 2022, 7:58:46 AM8/26/22
to v8-dev
Thanks for the quick responses, I'll try to create a PR with your recommendations

Gio Gutierrez Gaitan

unread,
Aug 26, 2022, 12:53:30 PM8/26/22
to v8-dev
I just created this PR https://chromium-review.googlesource.com/c/v8/v8/+/3856924 hope I captured what you said
Reply all
Reply to author
Forward
0 new messages