-
Notifications
You must be signed in to change notification settings - Fork 127
Open
Description
Slightly related to #787.
It seems there's currently no way to take a Ptr<T: GarbageCollected>
as an argument in an op as anything other than &T
or Option<&T>
.
That's fine, except it's not possible to create something equivalent to v8::cppgc::Member<T>
from the &T
.
Proposal:
- Introduce
deno_core::cppgc::Member<T>
(wrappingv8::cppgc::Member<CppGcObject<T>>
), implementingTraced
etc. - Extend the
op2
machinery even more with the ability to get a&deno_core::cppgc::Ptr<T>
as an argument (note the reference - it has to be bound to the stack by the caller, and must be!Clone
as it already is). - Allow creating a
deno_core::cppgc::Member<T>
from a&deno_core::cppgc::Ptr<T>
.
I tried to implement this myself, but I have to admit I get lost very quickly inside the op2
proc macro implementation, and it isn't obvious to me what the correct course of action is. There are some surprising aspects of the design that I would love to learn more about if someone wants to guide.
Metadata
Metadata
Assignees
Labels
No labels