the.bay.news

Avoiding VWT copies when passing raw memory to unspecialized generic parameters

Swift Forums
Avoiding VWT copies when passing raw memory to unspecialized generic parameters
Hi everyone, I've been working on a low-level dispatch bridge where I receive an UnsafeRawPointer and a metatype (Any.Type), and need to forward the underlying value to an unspecialized generic function: func foo<T>(_ value: T) { print(T.self, type(of: value)) } An argument to an unspecialized generic function foo<T>(_ value: T) is passed indirectly as @in_guaranteed T (a pointer in x0 and type metadata in x1). Since the value is already initialized in memory at the raw pointer location, m...

0 comments

Sign in to join the discussion — your thebay.events account works here.

No comments yet.