Commit Graph

6 Commits

Author SHA1 Message Date
Tim Kientzle
502941ca5a More arcana about MPEs carrying class existentials
The first word in a class existential is the class pointer itself.
This pointer exposes spare bits differently depending
on the platform, which becomes apparent when you try to reflect
an Optional carrying such an MPE.

Add new test cases and some logic to zero out the first
word of spare bit information only on platforms with 8-byte pointers.
2024-10-16 16:06:37 -07:00
Tim Kientzle
a105cf5323 Fix multi-payload enums with Class Existential payloads on 32-bit targets
Class existentials expose spare bits from all of the pointers, not just the first one.
Due to a bad bug here, we were properly exposing spare bits from the first pointer,
but then claiming that all bits of subsequent pointers were spare.
This accidentally resulted in the correct operation on 64-bit targets
(it picked the highest-order spare bit, which happened to be spare
in both the broken mask and the correct mask).  But on 32-bit targets,
this exposed the high-order bits of pointers, which is incorrect.

Expand the test a bit while we're here as well.

Resolves rdar://132715829
2024-10-15 09:28:01 -07:00
Mike Ash
ceb2853948 [Test] Temporarily disable reflect_Enum_values10 test on ARM64_32.
This test hits a bug on ARM64_32, disable it temporarily until we can fix it.
2024-10-07 16:16:07 -04:00
LamTrinh.Dev
a175465d5b Update reflect_Enum_values10.swift
Adding comment for "// REQUIRES: reflection_test_support"
2024-07-29 23:01:50 +07:00
Tim Kientzle
f73cfa7396 Reflection tests are incompatible with ASAN 2024-07-26 09:55:08 -07:00
Tim Kientzle
8d22ae449c More MPE improvements
This fills in a number of missing cases:
* MPEs with closure payloads
* MPEs with many non-payload cases
* MPEs with class existential payloads
* MPEs with existential metatype payloads

Resolves rdar://132270733
Resolves rdar://128705332
2024-07-23 16:08:57 -07:00