John McCall
6cdecc020c
Make all the subscripting getters/setters go down the same path.
...
This intentionally changes the mangling of variable getters and
setters so that we can have a reproducible mangling that doesn't
depend on things like the variables names, which is important
for resilience. It's not currently important for subscripting,
although equally I see no reason to mangle in the subscript
pattern name.
Swift SVN r1590
2012-04-24 09:04:54 +00:00
John McCall
85fecab3b1
Reorganize the emission of a call site so that it's abstracted over
...
exactly how the arguments are emitted. Introduce a new code path
which emits arguments from existing Explosions (possibly of the wrong
resilience level). Use that code path to implement getter/setter
code for MemberRefExpr l-values. This is just a checkpoint for the
latter two parts, but the ApplyExpr path is working correctly in the
new framework, which is worth a commit.
Swift SVN r1589
2012-04-24 08:16:51 +00:00
Eli Friedman
dc213bca76
Implement basic REPL under swift -repl. Known demo-blockers: need error recovery, need better brace/paren handling, need to implement the "print" part of REPL.
...
Swift SVN r1452
2012-04-18 00:52:11 +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
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
Chris Lattner
fbfb76a515
rename 'plus' methods to 'static' methods, resolving:
...
<rdar://problem/10718220> Need a better name than 'plus' for "static" functions
Swift SVN r1340
2012-04-06 17:50:43 +00:00
Eli Friedman
29f3fca950
First iteration of CaptureAnalysis.
...
Swift SVN r1284
2012-03-29 00:24:03 +00:00
John McCall
aafaae22bc
Properly include the heap header when laying out structures
...
for the heap.
Swift SVN r1275
2012-03-27 23:54:10 +00:00
John McCall
99a6c4ccf1
Cache %refcounted* null. This will be particularly important
...
for heap l-values.
Swift SVN r1245
2012-03-20 19:42:00 +00:00
John McCall
d6b05b38a6
Document the various cached bits of IR on IRGenModule.
...
Swift SVN r1243
2012-03-20 19:41:54 +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
8831d35de1
The data pointer is also reference-counted.
...
Swift SVN r1215
2012-03-16 09:26:36 +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
2b65cf22d1
Make 'this' implicitly [byref] when the container type does
...
not have reference semantics. Deciding whether the container
type has reference semantics requires us to perform
some amount of limited name-binding and type-checking first,
which introduces a few complexities.
Also, fix a bug in uncurried call emission.
Methods work now.
Swift SVN r1112
2012-02-11 07:37:57 +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
b85ddcb34a
IR generation for curried functions. For now, parameters
...
are stored in a malloc'ed buffer that gets leaked.
Swift SVN r1092
2012-01-19 23:29:49 +00:00
John McCall
8f60dafc76
Recommit r1044 out of spite.
...
Swift SVN r1048
2012-01-16 07:03:59 +00:00
Chris Lattner
26fbedee09
revert r1044, it looks like Linking.h wasn't 'svn add'ed.
...
Swift SVN r1047
2012-01-16 06:59:19 +00:00
John McCall
2fa6d329be
Propagate currying/explosion information down to the
...
mangler. No functionality change.
Swift SVN r1046
2012-01-14 09:44:30 +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
632b979188
Skeletal IR gen support for ExtensionDecl.
...
Swift SVN r981
2011-12-23 00:30:24 +00:00
John McCall
6bb1b947d8
Emit initializers of global variables as global constructors.
...
This isn't the actor model for globals, but is certainly still a
valid model.
Swift SVN r975
2011-12-22 23:35:41 +00:00
John McCall
e04492f808
Give oneof types prettier type names.
...
Swift SVN r959
2011-12-22 06:13:21 +00:00
John McCall
1f6481d86e
Fill out a few cases.
...
Swift SVN r941
2011-12-15 04:52:14 +00:00
John McCall
88d0f28698
Correctly call oneof injections.
...
Swift SVN r940
2011-12-15 03:20:02 +00:00
John McCall
6b935588e5
On second thought, components need to be known in the AST.
...
Swift SVN r918
2011-12-07 03:57:41 +00:00
John McCall
c756d37afd
Basic Component interface.
...
Swift SVN r911
2011-12-06 21:48:27 +00:00
John McCall
6c559b2ce1
More missing tuple functionality.
...
Swift SVN r877
2011-11-17 10:12:21 +00:00
Chris Lattner
60afdf4842
switch irgen to new diags
...
Swift SVN r769
2011-10-20 21:29:50 +00:00
Chris Lattner
a7c7d64fa0
Switch swift to use SourceLoc instead of SMLoc.
...
Also use the new getAdvancedLoc() method instead of hacking
on SMLoc directly.
Also fix the warning/note/error methods to forward through ASTContext
instead of being replicated everywhere.
Swift SVN r750
2011-10-18 01:22:29 +00:00
John McCall
54ff2ccf4a
Lop the last word off ModuleDecl and TranslationUnitDecl.
...
Swift SVN r693
2011-09-06 21:43:46 +00:00
John McCall
d70f0aefd3
Implement basic mangling.
...
Swift SVN r673
2011-09-01 22:38:50 +00:00
John McCall
066719530c
Implement rudimentary l-value and r-value emission for DeclRefExpr.
...
Swift's ASTs are lacking the extremely useful concept of a DeclContext,
without which it's probably possible to make this work, but it'll be
extremely awkward. Anyway, these hacks are good enough to get the
test passing again.
Swift SVN r620
2011-08-25 10:33:05 +00:00
John McCall
9baf355000
Add a method for reporting unimplemented errors.
...
Swift SVN r608
2011-08-25 07:38:25 +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
86f4371478
Basic IR generation of tuple and oneof types.
...
Swift SVN r573
2011-08-20 01:06:52 +00:00
John McCall
dc31882541
Incorporate notes into the pattern-matching manifesto. A few more random
...
observations that weren't brought up during the meeting.
Swift SVN r567
2011-08-17 08:29:32 +00:00
John McCall
3b3fb3fcd4
Commit missing file.
...
Swift SVN r540
2011-08-13 18:55:51 +00:00
Chris Lattner
f3ea9d7ee3
minimal hack to fix the build.
...
Swift SVN r539
2011-08-13 17:21:42 +00:00