Commit Graph

145 Commits

Author SHA1 Message Date
Eli Friedman
372ecb3b6b Fix Ted's latest fractal testcase. <rdar://problem/11278118>. (There were two issues: an assertion failure in tryEmitTupleElementAsAddress, and a strange runtime failure caused by incorrect refcounting.)
Swift SVN r1524
2012-04-20 04:14:22 +00:00
John McCall
5ad3782b01 Rework the IR-generation of initialization and teach the
compiler to enter properly-scoped cleanups to destroy local
variables.

Swift SVN r1385
2012-04-11 03:00:08 +00:00
Ted Kremenek
352453a53b Revert "Fix a bunch of "has virtual functions but non-virtual destructor" warnings"
Swift SVN r1376
2012-04-11 00:02:16 +00:00
Ted Kremenek
8a61ea1fd0 Fix a bunch of "has virtual functions but non-virtual destructor" warnings
Swift SVN r1373
2012-04-10 23:53:46 +00:00
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
John McCall
f3e27d90ff Change IR-generation so that it emits metadata objects for the
heap allocations it makes, and switch swift_alloc over to pass
that pointer in as well as the alignment.  Also, compute
whether a type is POD during its generation and cache that in
the object, and introduce a method on TypeInfo to destroy an
object in memory.

Swift SVN r1356
2012-04-10 06:28:22 +00:00
John McCall
ca9f85d694 Add code for associating cleanups with intermediate
evaluation results and then claiming or forwarding the
ownership of such results.

Swift SVN r1337
2012-04-06 07:07:28 +00:00
John McCall
edad637ddb In preparation for Explosion storing some sort of cleanup pointer,
add some APIs for working with non-cleaned-up entities.

Swift SVN r1336
2012-04-06 07:07:22 +00:00
Eli Friedman
debd0361ee Fix a couple crashers for tuples with default values.
Swift SVN r1289
2012-03-29 02:54:02 +00:00
John McCall
173d750a02 Switch IR-generation to use ASTVisitor, or more precisely, to
use irgen::ASTVisitor, which is a subclass of the AST version
that always looks through some expressions and asserts that
others (the unchecked/error ones) can't happen.  The main
obstacle to that is access control, because it's quite nice to
have the visitor be a non-local class for nesting purposes,
but that makes it impossible to use private methods anymore.
It's nice to give all the type-specific emitters private
interfaces anyway, though;  that ends up being most of the
patch.

I futzed with GenClosure.cpp while I was in there, but
separating it would have been obnoxious.

Swift SVN r1267
2012-03-26 06:08:19 +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
John McCall
52598e0e91 Kill more unnecessary 'Exploded's from method names, and do
a minor reorganization with CallPlan.

Swift SVN r1223
2012-03-17 00:44:58 +00:00
John McCall
e020724c3d Distinguish between assignment and initialization, and fix
some problems with the data pointer of function types.

Swift SVN r1220
2012-03-16 19:02:25 +00:00
John McCall
53de72a7f1 Pull an unnecessary 'Explosion' out of some names.
Swift SVN r1217
2012-03-16 19:02:22 +00:00
John McCall
d76aaea2b6 Remove the outdated RValue concept; no functionality change.
Swift SVN r1216
2012-03-16 09:26:39 +00:00
John McCall
9038a38ce8 We will need a DiverseStack<T> for cleanups, but a stack is really
the wrong structure for an l-value.  Use a list instead (that is,
something which allows efficient iteration forward through the
collection).

Swift SVN r1117
2012-02-16 06:11:30 +00:00
John McCall
a9120cf1bf Stop storing the lvalue-projection bit on TupleElementExpr and
LookThroughOneofExpr.

Swift SVN r1114
2012-02-16 01:57:07 +00:00
John McCall
d0f4d86f3e Use LValueType everywhere instead of the l-value value kind.
Kill off TypeJudgement.  Various fixes and improvements.



Swift SVN r1107
2012-02-06 22:47:08 +00:00
John McCall
76ad8fff02 Add more parentheses to Types.h.
Swift SVN r1103
2012-01-31 04:32:37 +00:00
John McCall
ea5e37e276 Getterize uses of TupleTypeElt. I'm trying to figure out how
parameter attributes should work here.



Swift SVN r1066
2012-01-18 04:05:25 +00:00
John McCall
5dde760272 Switch function prologue and application over to using Explosion
and teach them about currying.



Swift SVN r1038
2012-01-13 10:08:14 +00:00
John McCall
22b7ed948a Eliminate the implosion/RValue-projection code, which is now dead.
Swift SVN r1031
2012-01-12 22:55:55 +00:00
John McCall
5b1fbce82b More renaming.
Swift SVN r1030
2012-01-12 22:54:11 +00:00
John McCall
16ebb9e4f5 Rename.
Swift SVN r1029
2012-01-12 22:51:18 +00:00
John McCall
286abfc5f7 Mostly kill off RValue. More tomorrow. :)
Swift SVN r1020
2012-01-12 10:18:40 +00:00
John McCall
885783ab76 Start switching things over to using explosions.
Swift SVN r1014
2012-01-12 07:05:49 +00:00
John McCall
c7bcadf450 On further reflection and use, the concept of an RValue is not actually
very useful;  it is much more interesting to divide r-value emission
into "to arguments" and "to memory" models.  To that end, introduce a
new structure for holding an "exploded" r-value.



Swift SVN r1006
2012-01-11 23:59:57 +00:00
John McCall
9b7fb0c227 New l-value representation.
Swift SVN r956
2011-12-22 05:28:33 +00:00
John McCall
88d0f28698 Correctly call oneof injections.
Swift SVN r940
2011-12-15 03:20:02 +00:00
John McCall
784ee9047c Emit exploded tuple shuffles directly.
Swift SVN r891
2011-11-18 19:19:21 +00:00
John McCall
b69d5f95cd Implement tuple shuffles.
Swift SVN r890
2011-11-18 10:10:21 +00:00
John McCall
737e646f56 Remove accidental logging changes. Having no reliable '0x
debugger is obnoxious.



Swift SVN r880
2011-11-17 10:47:48 +00:00
John McCall
922e6f0916 Build fix.
Swift SVN r878
2011-11-17 10:16:51 +00:00
John McCall
6c559b2ce1 More missing tuple functionality.
Swift SVN r877
2011-11-17 10:12:21 +00:00
John McCall
ff5e6aa591 Implement tuple element projection.
Swift SVN r876
2011-11-17 09:32:45 +00:00
Chris Lattner
60afdf4842 switch irgen to new diags
Swift SVN r769
2011-10-20 21:29:50 +00:00
John McCall
3c769e07f3 L-value element projections.
Swift SVN r721
2011-09-20 07:33:41 +00:00
John McCall
802262a7da More incremental getterization.
Swift SVN r718
2011-09-19 23:37:21 +00:00
John McCall
7a259f4bad Differentiate between the starting location and caret location of
an expression.  More incremental getterization.



Swift SVN r717
2011-09-19 22:45:58 +00:00
John McCall
060c8c5d32 Emit l-values and assignment statements.
Swift SVN r677
2011-09-02 00:33:32 +00:00
John McCall
ca0c671726 IR generation for tuple literals.
Swift SVN r619
2011-08-25 09:50:26 +00:00
John McCall
1f38885bd4 Teach the scalar tuple representation how to load and store rvalues.
This fixes the previously-broken test.



Swift SVN r607
2011-08-25 07:17:33 +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
97c6ccadfb More IR-generation infrastructure.
Swift SVN r576
2011-08-20 05:55:02 +00:00
John McCall
86f4371478 Basic IR generation of tuple and oneof types.
Swift SVN r573
2011-08-20 01:06:52 +00:00