mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
Replace PointerIntUnion with a PointerUnion-compatible Fixnum type.
Per discussion on swift-dev, we'd prefer to have a "pointer-like" integer with limited bit width, to reuse all the existing infrastructure for pointer-like types, rather than invent another new data structure. Swift SVN r5529
This commit is contained in:
@@ -45,15 +45,17 @@ enum class DeclOrType {
|
||||
IsType
|
||||
};
|
||||
|
||||
// The serialized format uses 32 bits for potential alignment benefits, even
|
||||
// though bitcode is generally unaligned.
|
||||
using DeclID = Fixnum<31>;
|
||||
using DeclIDField = BCFixed<32>;
|
||||
using DeclID = DeclIDField::value_type;
|
||||
|
||||
// TypeID must be the same as DeclID because it is stored in the same way.
|
||||
using TypeIDField = DeclIDField;
|
||||
using TypeID = DeclID;
|
||||
using TypeIDField = DeclIDField;
|
||||
|
||||
using BitOffset = Fixnum<31>;
|
||||
using BitOffsetField = BCFixed<32>;
|
||||
using BitOffset = BitOffsetField::value_type;
|
||||
|
||||
|
||||
/// The various types of blocks that can occur within a serialized Swift
|
||||
|
||||
Reference in New Issue
Block a user