Commit Graph

12848 Commits

Author SHA1 Message Date
John McCall
060c8c5d32 Emit l-values and assignment statements.
Swift SVN r677
2011-09-02 00:33:32 +00:00
John McCall
b1ec40a2e1 s/suffix/prefix/, and explain the choice of T.
Swift SVN r675
2011-09-01 22:55:49 +00:00
John McCall
d03c3984f8 Add the missing Mangle.cpp.
Swift SVN r674
2011-09-01 22:39:39 +00:00
John McCall
d70f0aefd3 Implement basic mangling.
Swift SVN r673
2011-09-01 22:38:50 +00:00
John McCall
21119f3bc8 Make simple calls work. Note that parameters are working, too.
Swift SVN r670
2011-09-01 21:00:58 +00:00
John McCall
6dfa91282d 'float' -> 'float32', 'double' -> 'float64'
Swift SVN r654
2011-08-31 19:57:52 +00:00
John McCall
58b81c8da0 Add builtin float and double types.
Swift SVN r650
2011-08-31 18:43:22 +00:00
Doug Gregor
2fc593a993 Unbreak CMake build
Swift SVN r638
2011-08-29 19:57:40 +00:00
Doug Gregor
67bcc9fac1 Some headers have moved around in LLVM; update to their new locations.
Swift SVN r637
2011-08-29 19:57:33 +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
ca0c671726 IR generation for tuple literals.
Swift SVN r619
2011-08-25 09:50:26 +00:00
John McCall
1c874a26a8 Hack in IR generation for integer literals by making a crazy
assumption about how the int type is represented.



Swift SVN r618
2011-08-25 09:21:00 +00:00
John McCall
156c029718 Implement return statements; add some related infrastructure,
including a new file for control flow code.



Swift SVN r617
2011-08-25 09:09:58 +00:00
John McCall
b691cf461c Define the JumpDest type. Eventually this will also get a ScopeDepth
member.



Swift SVN r616
2011-08-25 09:06:15 +00:00
John McCall
2ac244ec7f unimplemented() should flag an error to cause the process to fail.
XFAIL func.swift again until return statements are implemented.



Swift SVN r615
2011-08-25 08:37:31 +00:00
John McCall
06719bb9ce Update the CMake lists for all these new files.
Swift SVN r614
2011-08-25 08:34:58 +00:00
John McCall
bde7b74ac2 Add a new file for emitting local declarations.
Swift SVN r613
2011-08-25 08:34:45 +00:00
John McCall
64c72579b4 Flesh out more unimplemented stuff.
Swift SVN r612
2011-08-25 08:30:41 +00:00
John McCall
e200bed904 Basic framework for emitting Swift statements.
Swift SVN r611
2011-08-25 08:21:06 +00:00
John McCall
b2bbab90f4 Build function emission around emitting a FuncExpr instead of a FuncDecl.
Swift SVN r610
2011-08-25 07:55:02 +00:00
John McCall
e749b07d97 Break down expressions; some more unimplemented support.
Swift SVN r609
2011-08-25 07:47:56 +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
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
29b25c5868 Add an accessor for computing the alignment at a known offset.
Swift SVN r606
2011-08-25 07:16:39 +00:00
John McCall
c7bc658da0 Access the data pointer as the second element.
Swift SVN r605
2011-08-25 07:16:09 +00:00
John McCall
b60d4807b8 Initial prologue/epilogue emission code. This breaks func.swift because
of the unimplemented load/store methods.



Swift SVN r604
2011-08-25 02:45:18 +00:00
John McCall
a769b264f8 Give RValueSchema an isScalar(unsigned) accessor, too.
Swift SVN r603
2011-08-25 02:40:08 +00:00
John McCall
0ce7d17b99 If there are exactly two options in a oneof, use i1 instead of i8.
Swift SVN r601
2011-08-24 21:00:55 +00:00
John McCall
3af13059c2 ADTs which carry no non-discriminator payload can always be scalar.
Swift SVN r600
2011-08-24 20:56:53 +00:00
John McCall
cb3fe4dfc8 The array-decay-to-bool conversion is better than the array-to-ArrayRef
conversion, so disambiguate.



Swift SVN r599
2011-08-24 20:55:44 +00:00
John McCall
ab931ceb21 Improve type safety on storage type; no functionality change.
Swift SVN r598
2011-08-24 20:54:51 +00:00
John McCall
b48755de5f Provide a nice little convenience method for testing whether an
RValue is a scalar with an exact number of arguments.  Useful for
asserts.



Swift SVN r597
2011-08-24 20:53:10 +00:00
John McCall
0ceeb2ed61 Make Chris happy.
Swift SVN r596
2011-08-24 18:56:50 +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
dfa334555c Introduce the idea of an r-value schema.
Swift SVN r594
2011-08-24 18:53:15 +00:00
John McCall
aacd7ade8f LValues should also store the target alignment.
Swift SVN r593
2011-08-24 18:52:47 +00:00
John McCall
02c0dd6a18 Provide an IRBuilder customization point that, among other things,
consumes our alignment type.



Swift SVN r592
2011-08-24 18:51:51 +00:00
John McCall
ba077c667c Permit sizes to be scaled by a constant factor.
Swift SVN r591
2011-08-24 18:51:14 +00:00
John McCall
97c6ccadfb More IR-generation infrastructure.
Swift SVN r576
2011-08-20 05:55:02 +00:00
John McCall
6cff7d48b6 Factor performIRGeneration into Subsystems.h.
Swift SVN r574
2011-08-20 01:10:23 +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
ac0facd1f0 Fix the build.
Swift SVN r568
2011-08-17 18:35:30 +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
15922d77b4 Go ahead and support outputting to .ll, .bc, .s, and .o.
Swift SVN r546
2011-08-13 22:01:51 +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
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
bca041368d Structure for IR generation.
Swift SVN r537
2011-08-13 05:37:06 +00:00