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 we retrieve metadata information during parsing. This might not be a correct place to do this (#2870 (comment)). We should find a correct place and method of doing the retrieval.
I was looking into how to do this and it's a little more complicated than you think. The problem is that the value witness table for any particular type might not live in the dylib that you're reading. For example, if I define a swift type like this:
publicstructNoInThisDylib{publicletcontents:Intpublicinit(with:Int){
contents = with
}}
Then the value witness table for this type is an external reference to the value witness table for Int64 from libswiftCore.dylib. IIRC all heap allocated types (classes) share the same value witness table.
Currently we retrieve metadata information during parsing. This might not be a correct place to do this (#2870 (comment)). We should find a correct place and method of doing the retrieval.
I was looking into how to do this and it's a little more complicated than you think. The problem is that the value witness table for any particular type might not live in the dylib that you're reading. For example, if I define a swift type like this:
Then the value witness table for this type is an external reference to the value witness table for Int64 from libswiftCore.dylib. IIRC all heap allocated types (classes) share the same value witness table.
Originally posted by @stephen-hawley in #2870 (comment)
The text was updated successfully, but these errors were encountered: