swift
a6dd630c - Eliminate Builtin.UnknownObject as an AST type (#27378)

Commit
6 years ago
Eliminate Builtin.UnknownObject as an AST type (#27378) This removes it from the AST and largely replaces it with AnyObject at the SIL and IRGen layers. Some notes: - Reflection still uses the notion of "unknown object" to mean an object with unknown refcounting. There's no real reason to make this different from AnyObject (an existential containing a single object with unknown refcounting), but this way nothing changes for clients of Reflection, and it's consistent with how native objects are represented. - The value witness table and reflection descriptor for AnyObject use the mangling "BO" instead of "yXl". - The demangler and remangler continue to support "BO" because it's still in use as a type encoding, even if it's not an AST-level Type anymore. - Type-based alias analysis for Builtin.UnknownObject was incorrect, so it's a good thing we weren't using it. - Same with enum layout. (This one assumed UnknownObject never referred to an Objective-C tagged pointer. That certainly wasn't how we were using it!)
Author
Parents
Loading