Commit Graph

563 Commits

Author SHA1 Message Date
Chris Lattner
65b400e30d introduce a new "Builtin.RawPointer" type, which corresponds to LLVM's "i8*" type,
and is just an unmanaged pointer.  Also, introduce a basic swift.string type.

This is progress towards rdar://10923403 and strings.  Review welcome.



Swift SVN r1349
2012-04-10 00:52:52 +00:00
Eli Friedman
70770465e4 Get rid of ParseResult. <rdar://problem/11018362>.
Swift SVN r1321
2012-04-04 20:21:35 +00:00
Eli Friedman
94244131f7 Remove ElementRefDecl and DeclVarName. Add the replacement, PatternBindingDecl. Use proper pattern parsing for variable declarations. Uniformly use PatternBindingDecl for variable initialization. Adapt type-checking and IRGen for this new style of variable declaration. <rdar://problem/11124980>.
Swift SVN r1312
2012-04-02 23:49:28 +00:00
Doug Gregor
4cc616f2be Rename the DependentType class to UnstructuredDependentType, because
this type is only going to cover dependent types for which there is
absolutely no structure. Still no functionality change.


Swift SVN r1292
2012-03-29 14:14:48 +00:00
John McCall
1f118dbda6 Basic support for Builtin.ObjectPointer as a completely
opaque type.  Also some rudimentary support for retain/release.

Swift SVN r1214
2012-03-16 09:26:32 +00:00
John McCall
b2a2027a43 Revert r1144, r1145, and r1146. These changes (which removed ParenType
in favor of a single-element non-canonical TupleType) broke the type
system, in that supposed sugar (the TupleType) supported a different
set of operations from the canonical type.  For example, a
single-element unlabelled tuple type supports elementwise projection
(foo.$0), but the underlying element does not (or supports it
differently).

The IR-gen failure was due to a very related problem:  IR-gen
was not updated to reflect that a single unlabelled tuple element
is the same type as its element type, and therefore it was giving
different representations to these types ({ %foo } and %foo,
respectively), which broke widespread assumptions.

The removal of ParenType was done in pursuit of an AST invariant
that's not actually particularly interesting in the first place
and which, furthermore, is problematic to attain.

Swift SVN r1182
2012-03-11 09:15:21 +00:00
Chris Lattner
6641b06283 remove ParenType, which is now dead. Grouping parens are represented
as non-canonical tuple types.


Swift SVN r1147
2012-03-02 00:17:45 +00:00
Chris Lattner
6692cba150 simplify expression parsing to return a NullablePtr<Expr> instead of a ParseError<Expr>.
The later could represent semantic errors, but we'd rather represent those with an
ExprError node instead.  This simplifies the code and allows the parser to build a more
fully-formed AST that IDE clients will like.


Swift SVN r1141
2012-03-01 22:34:32 +00:00
Chris Lattner
17ea0a6670 finish my pass over LangRef, updating it and changing it and the parser to keep the grammars in sync.
Swift SVN r1132
2012-03-01 16:55:09 +00:00
John McCall
7b29a420f6 Design and implement the [byref] attribute, checking that
it doesn't appear in places it shouldn't.  The only limits on
this checking right now is the inadequacy of location information
for types, which is something we ought to fix.

Fix type-checking of byref applications.  Fix IR generation
of byref variables.  Whole lotta fixin' goin' on.

But hey, byref calls work.



Swift SVN r1111
2012-02-10 09:42:50 +00:00
John McCall
7f60469fdf Introduce the notion of a "fully-typed" type, necessary
because tuple types can have defaulted elements.  Check for
it and complain in function signatures.



Swift SVN r1109
2012-02-07 03:48:23 +00:00
John McCall
ce7780af04 I don't think we're really getting anything out of ArgDecl
at the moment.  We can put it back if I'm wrong.



Swift SVN r1100
2012-01-26 02:08:52 +00:00
John McCall
16f8b2e656 Revise the language design for function argument clause syntax.
A function argument clause is now one or more patterns (which
must be parenthesized and explicitly type all positions) not
separated by arrows;  the first arrow then separates off the
return type.

Revisions to language reference forthcoming.



Swift SVN r1099
2012-01-26 01:25:26 +00:00