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
Currently our representation of Ptr and ContPtr are nearly identical:
#[derive(Debug,Copy,Clone,PartialEq,Eq)]pubstructPtr<F:LurkField>{/// An expression tagpubtag:ExprTag,/// The underlying pointer, which can be null, opaque, or an indexpubraw:RawPtr,/// PhantomData is needed to consume the `F: LurkField` parameter, since/// we want to pin our Ptr to a specific field (even though we don't/// actually use it)pub_f:PhantomData<F>,}#[derive(Debug,Copy,Clone,PartialEq,Eq)]pubstructContPtr<F:LurkField>{pubtag:ContTag,pubraw:RawPtr,pub_f:PhantomData<F>,}
and there are many duplicated methods.
We should explore combining these representations analogous to how SPtr combines ScalarPtr and ScalarContPtr (soon to be renamed ZPtr, ZExprPtr, ZContPtr)
#[derive(Debug,Clone,Copy,PartialEq,Eq)]#[cfg_attr(not(target_arch = "wasm32"), derive(Arbitrary))]// Note: the trait bound E: Tag is not necessary in the struct, but it makes the proptest strategy more efficient./// A struct representing a scalar pointer with a tag and a value.////// The `SPtr` struct is used to store a tagged scalar pointer, where `E` is its tag, and `F` the field for its values./// It has two important aliases, `ScalarPtr` and `ScalarContPtr`, which are used respectively with `ExprTag` and `ContTag`,/// i.e. the type of expressions and the type of continuations.pubstructSPtr<E:Tag,F:LurkField>(pubE,#[cfg_attr( not(target_arch = "wasm32"), proptest(strategy = "any::<FWrap<F>>().prop_map(|x| x.0)"))]pubF,);
Currently our representation of
Ptr
andContPtr
are nearly identical:and there are many duplicated methods.
We should explore combining these representations analogous to how
SPtr
combinesScalarPtr
andScalarContPtr
(soon to be renamedZPtr
,ZExprPtr
,ZContPtr
)Originally posted by @huitseeker in #359 (comment)
The text was updated successfully, but these errors were encountered: