* fixed typo in image.rs
* unnecessary repeated words in sixtyfps_runtime
* unnecessary repeated words in sixtyfps_compiler
* unnecessary repeated word in docs
* unnecessary repeated words in helper_crates
For now this requires pinning on the type contained in VRc as well as
the fields mapped to. This could be lifted using additional flags, but
for now this is what we need anyway.
As outlined in commit 753ec83a05,
converting from a VRc<VT, X> to VRc<VT, Dyn> requires subsequent use of
the data_offset in order to determine the correct instance pointer.
This applies also to VRc's Deref implementation, which isn't used with
Dyn right now, but will be soon in order to determine the bare instance
address for item tree traversal.
Component's get_item_ref has a life time attached to it, and in the
interpreter we're having two vtable implementations, one for
ErasedComponentBox and another generated one. The approach with
as_pin_ref to transfer the lifetime to a reference to the trait object
for the other vtable isn't working because as_pin_ref consumes the VRef
and then takes the address of a temporary on the stack.
Short of a cleaner solution, this patch circumvents the second vtable
indirection and calls our extern "C" function directly.
When converting a Weak<VT, T> into Weak<VT, Dyn>, we were ignoring that
while T inside VRcInner may be at a certain offset to satisfy alignment,
the empty Dyn field may not and thus be at a different offset.
On wasm32 for example the compiler generated component struct has a
16-byte alignment, while the Dyn has none. So converting the Weak<VT,
Dyn> to a VRc<VT, Dyn> and then calling borrow() would use the wrong
instance pointer.
To fix this, this patch introduces an extra offset field that's
preserved during the casting and that's used for borrow() as well as
drop().
... or `Dyn` if unkown.
So we can implement Deref for the concreate type.
Sicne Deref is implemented for VRc, all the method of VRc are now
associated function.