Commits

Slava Pestov committed 9ce9784180b
Runtime: Tweak Mirrors for resilience Make _MagicMirrorData @_fixed_layout, but not the concrete mirror implementations. To make the calling convention work in resilient builds, make the runtime entry points into top-level functions that take a _MagicMirrorData, instead of adding @_silgen_name attributes on methods. This involves changing the convention on the 'owner' parameter from +0 to +1. Also, there was a memory leak in the old enum code that I noticed by inspection. We would copy the enum value into a box, strip the enum tag bits, take the box contents but never free the box itself. The fix isn't very satisfying either -- we have to modify the source enum in-place to strip tag bits, then we copy it into a box having the right payload type, and add the tag bits back. At least this way, we can free the box after.