Commit Graph

17988 Commits

Author SHA1 Message Date
John McCall
0cd849b19c Complete the pattern-matching IR emission logic,
at least for exhaustive patterns.

Swift SVN r1359
2012-04-10 08:28:31 +00:00
Chris Lattner
508dcb3091 implement IRGen for simple strings.
Swift SVN r1352
2012-04-10 01:44:11 +00:00
Eli Friedman
d295d02c42 Initial interpreter implementation. The included pieces are enough to get the included simple.swift running in swift -i mode. <rdar://problem/10962290>, part 1.
Swift SVN r1319
2012-04-04 01:34:42 +00:00
Doug Gregor
c86b40f8bb Implement type coercion of an overloaded declaration reference that is
not being called directly. We previously had a simplistic
implementation that required exact type matches; loosen this to simply
require coercion, as well as diagnosing ambiguities/lack of suitable
candidates.


Swift SVN r1316
2012-04-03 14:44:51 +00:00
Doug Gregor
2bf38b5713 Fix an issue where we were failing to type-check calls to
single-parameter functions with a literal argument. The argument
therefore had unstructured dependent type, and there was no reason to
reject it in the first place.


Swift SVN r1313
2012-04-03 00:04:24 +00:00
John McCall
ad5e4c5c97 Test case for really basic functionalit with Builtin.ObjectPointer.
Swift SVN r1272
2012-03-27 22:13:35 +00:00
John McCall
d789a32827 Module and metatype types are first-class right now, so don't
fail to handle them.

Swift SVN r1271
2012-03-27 22:13:34 +00:00
John McCall
df7ebcd9e8 Introduce the concept of an 'owned address', i.e. an address with
an owner attached.  Use this to implement [byref(heap)].  Force
locals to the heap if they've been referenced in a way that requires
this.

Swift SVN r1265
2012-03-26 03:26:21 +00:00
Chris Lattner
3a969e5dab remove something old.
Swift SVN r1262
2012-03-25 19:23:13 +00:00
Eli Friedman
d466059220 Add support for IRGen for $0 etc.
Swift SVN r1210
2012-03-14 23:00:07 +00:00
John McCall
ed436cf3ff Forbid the declaration of a custom unary '&' operator.
Swift SVN r1184
2012-03-11 09:15:28 +00:00
Eli Friedman
8f02e3f032 Make sure we correctly apply lvalue-to-rvalue conversions for CallExprs. <rdar://problem/10934313>.
Swift SVN r1169
2012-03-05 21:52:30 +00:00
Chris Lattner
fa2ea94348 always turn a named reference to a type into an IdentifierType.
This preserving source location info and reduces redundancy in the parser.


Swift SVN r1065
2012-01-18 01:57:44 +00:00
John McCall
88d0f28698 Correctly call oneof injections.
Swift SVN r940
2011-12-15 03:20:02 +00:00
John McCall
ff5e6aa591 Implement tuple element projection.
Swift SVN r876
2011-11-17 09:32:45 +00:00
Chris Lattner
7376580ca2 stub out some work towards getting slices going. I need John reengaged before
we can actually make progress here.


Swift SVN r788
2011-10-27 06:31:02 +00:00
Doug Gregor
3d15bf3d55 Introduce a diagnostic-formatting engine and port most of the parser's
diagnostics over to it.

There are a few differences between this diagnostic engine and Clang's
engine:
  - Diagnostics are specified by a .def file (Diagnostics.def), rather
  than via tblgen, which drastically simplifies the build and makes
  code completion work when you add a new diagnostic.
  - Calls to the "diagnose()" method are safely typed based on the
  argument types specified in the .def file, so it's harder to write a
  diagnostic whose expected arguments (in the string) and whose actual
  arguments (in the code) don't match.
  - It uses variadic templates, so it hangs with the cool kids.



Swift SVN r734
2011-09-26 23:46:28 +00:00
John McCall
37b07c8691 Add builtin bindings for a bunch of primitive LLVM instructions.
Swift SVN r698
2011-09-08 00:21:11 +00:00
John McCall
ad8081b02e Remove the duplicate swift.swift by implementing import search paths.
Swift SVN r696
2011-09-07 00:30:20 +00:00
John McCall
2cd676bf99 IR generation for 'if' statements. Adjust the standard library
to use global functions for the relational operators, just to get
prettier IR.



Swift SVN r679
2011-09-02 19:02:36 +00:00
John McCall
060c8c5d32 Emit l-values and assignment statements.
Swift SVN r677
2011-09-02 00:33:32 +00:00
Chris Lattner
f9b024adb0 implement parser and AST support for trivial (empty) protocol types.
Swift SVN r652
2011-08-31 19:43:06 +00:00
John McCall
3e65b21a68 Provide r-value schemas for various implemented types. Use these to
implement function signature lowering.  Basic setup for IR generation
of functions.  Test that we can properly declare a simple function.



Swift SVN r595
2011-08-24 18:55:54 +00:00
John McCall
42449b02bb Massively slow down link times by uselessly emitting empty modules.
Swift SVN r538
2011-08-13 07:40:45 +00:00
John McCall
0d002a71b5 Teach the Makefile to autogenerate lit.site.cfg as part of
'make test', and remove sabre's hardcoded copy.



Swift SVN r480
2011-08-01 18:18:45 +00:00
Chris Lattner
20c522122e rename test.
Swift SVN r474
2011-07-31 20:52:28 +00:00
Chris Lattner
0c4bc6e531 add an explicit test for statements, splitting them out of expr-stmt.
Add a test for 'else if'.


Swift SVN r473
2011-07-31 20:52:16 +00:00
Chris Lattner
ba2793aa6b implement parser support for methods, including dox and
a testcase.  No AST or sema yet.


Swift SVN r415
2011-07-19 04:46:07 +00:00
Doug Gregor
86ab76d624 Introduce a CMake build system for Swift.
This CMake-based build system is based on the one in Clang, simplified
and tweaked slightly to better support building a smaller Xcode
project that links against an existing LLVM (rather than importing all
of LLVM into this project).



Swift SVN r403
2011-07-14 17:58:33 +00:00
Chris Lattner
011422478f Split default value processing stuff out to its own file.
Swift SVN r316
2011-03-22 05:48:10 +00:00
Chris Lattner
d23c2f26f3 Document and implement lexer and parser support for trivial import decls. No Sema/AST support yet.
Swift SVN r285
2011-03-18 22:52:48 +00:00
Chris Lattner
3ab8ea17ee add run lines to all the tests and use a less broken test makefile.
Swift SVN r243
2011-03-01 07:48:18 +00:00
Chris Lattner
c38e709da8 improve the makefile.
Swift SVN r238
2011-02-26 02:18:31 +00:00
Chris Lattner
7bbe52b52a Expand the swift language to allow typealiases, oneof, and struct within a brace expression. This allows us to have shadowing of type names.
Swift SVN r236
2011-02-22 07:41:44 +00:00
Chris Lattner
8c393e2519 add some random notes for arrays
Swift SVN r202
2010-10-15 10:52:34 +00:00
Chris Lattner
8fa431c209 rename testcase, add a new test for UDTs
Swift SVN r169
2010-10-09 18:08:41 +00:00
Chris Lattner
454dd86c2b add a testcase
Swift SVN r32
2010-07-19 03:21:45 +00:00
Chris Lattner
15ed0a78d1 better fix for make clean.
Swift SVN r15
2010-07-18 21:31:06 +00:00