mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
This is essentially a long-belated follow-up to Arnold's #12606. The key observation here is that the enum-tag-single-payload witnesses are strictly more powerful than the XI witnesses: you can simulate the XI witnesses by using an extra case count that's <= the XI count. Of course the result is less efficient than the XI witnesses, but that's less important than overall code size, and we can work on fast-paths for that. The extra inhabitant count is stored in a 32-bit field (always present) following the ValueWitnessFlags, which now occupy a fixed 32 bits. This inflates non-XI VWTs on 32-bit targets by a word, but the net effect on XI VWTs is to shrink them by two words, which is likely to be the more important change. Also, being able to access the XI count directly should be a nice win.
20 lines
532 B
C
20 lines
532 B
C
int $sBi32_N;
|
|
int $sBi64_N;
|
|
int $sBi8_N;
|
|
int $sBwN;
|
|
int $sBpN;
|
|
int $sBi32_WV;
|
|
int $sBi64_WV;
|
|
int $sBi8_WV;
|
|
void swift_getGenericMetadata(void) {}
|
|
void swift_checkMetadataState(void) {}
|
|
void swift_slowAlloc(void) {}
|
|
void swift_slowDealloc(void) {}
|
|
void swift_allocateGenericValueMetadata(void) {}
|
|
void swift_initEnumMetadataSinglePayload(void) {}
|
|
void swift_getEnumTagSinglePayloadGeneric(void) {}
|
|
void swift_storeEnumTagSinglePayloadGeneric(void) {}
|
|
void swift_retain(){}
|
|
void swift_allocBox(){}
|
|
void swift_getWitnessTable(void) {}
|