Make Int a word-size type.

- Int and UInt are now struct types backed by Builtin.Word. Previously they
were typealiases for Int64; Int and Int64 are now distinct types.
- Mangled names 'i' and 'u' are now Int and UInt. Int64 is mangled longhand.
- Word is a typealias for Int. It is expected to go away in the future.
- Builtin.Word is unchanged.
- CLong and CUnsignedLong are typealiases for Int and UInt.
- FixedPoint.swift is now FixedPoint32.swift and FixedPoint64.swift. 
Reunifying these requires better builtins, especially for checked 
conversions (rdar://15472770).
- Updated many tests, mostly because Int is no longer spelled Int64 in sil.
- One check was removed from test decl/operator/operators.swift 
because it changed behavior when Int became a non-typealias 
type (rdar://15934688).



Swift SVN r13109
This commit is contained in:
Greg Parker
2014-01-29 12:21:19 +00:00
parent 9ccaf820b8
commit b2846b546b
23 changed files with 7429 additions and 3429 deletions

View File

@@ -714,7 +714,7 @@ private:
if (Mangled.nextIf('f'))
return createSwiftType(Node::Kind::Structure, "Float32");
if (Mangled.nextIf('i'))
return createSwiftType(Node::Kind::Structure, "Int64");
return createSwiftType(Node::Kind::Structure, "Int");
if (Mangled.nextIf('q'))
return createSwiftType(Node::Kind::Enum, "Optional");
if (Mangled.nextIf('Q'))
@@ -722,7 +722,7 @@ private:
if (Mangled.nextIf('S'))
return createSwiftType(Node::Kind::Structure, "String");
if (Mangled.nextIf('u'))
return createSwiftType(Node::Kind::Structure, "UInt64");
return createSwiftType(Node::Kind::Structure, "UInt");
Node::IndexType index_sub;
if (!demangleIndex(index_sub))
return Node::create(Node::Kind::Failure);