You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Apr 2, 2026. It is now read-only.
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> (wrapping v8::cppgc::Member<CppGcObject<T>>), implementing Traced 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.
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&TorOption<&T>.That's fine, except it's not possible to create something equivalent to
v8::cppgc::Member<T>from the&T.Proposal:
deno_core::cppgc::Member<T>(wrappingv8::cppgc::Member<CppGcObject<T>>), implementingTracedetc.op2machinery 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!Cloneas it already is).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
op2proc 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.