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
A libfunc/corelib function to unbox a Box<T> type into a @T type. This would allow us to not take ownership of the value inside the box when unboxing it, and would avoid unnecessary unbox-rebox operations when accessing a field of the T type without modifying it.
Describe Preferred Solution
A libfunc similar to match_nullable_snapshot - that converts a Box<T> to a @T.
Describe Alternatives
Related Code
Additional Context
If the feature request is approved, would you be willing to submit a PR? (Help can be provided if you need assistance submitting a PR)
I can try myself at it with some guidance
Yes
No
The text was updated successfully, but these errors were encountered:
I think instead adding a: extern fn box_forward_snapshot<T>(value: @Box<T>) -> Box<@T>; would be better (less actual logic).
same for: extern fn nullable_forward_snapshot<T>(value: @Nullable<T>) -> Nullable<@T>; - this can probably replace match_nullable_snapshot as well.
I'm wondering if having the opposite as well would be beneficial.
Feature Request
Describe the Feature Request
A libfunc/corelib function to unbox a
Box<T>
type into a@T
type. This would allow us to not take ownership of the value inside the box when unboxing it, and would avoid unnecessary unbox-rebox operations when accessing a field of theT
type without modifying it.Describe Preferred Solution
A libfunc similar to
match_nullable_snapshot
- that converts aBox<T>
to a@T
.Describe Alternatives
Related Code
Additional Context
If the feature request is approved, would you be willing to submit a PR?
(Help can be provided if you need assistance submitting a PR)
I can try myself at it with some guidance
The text was updated successfully, but these errors were encountered: