Commit Graph

521 Commits

Author SHA1 Message Date
Joe Groff
d8b9ddc5f3 SIL.rst: Discuss undefined behavior.
SIL has it, though a perfect Swift program written against a perfect Swift standard library run through perfect optimization passes should never emit it.

Swift SVN r6556
2013-07-24 21:03:00 +00:00
Joe Groff
77ee3c7819 SIL.rst: Reference type values need to be used with an owning strong refcount.
Obvious, but worth spelling out.

Swift SVN r6555
2013-07-24 21:02:59 +00:00
Joe Groff
30c0d47033 SIL.rst: Define "runtime failure".
Swift SVN r6554
2013-07-24 21:02:57 +00:00
Joe Groff
320106c7bd SIL.rst: Provide some high-level discussion of dataflow errors.
Swift SVN r6552
2013-07-24 19:06:56 +00:00
Joe Groff
e4a6c93b4b SIL.rst: Discuss some additional categories of type.
Swift SVN r6551
2013-07-24 19:06:54 +00:00
Joe Groff
936a1f08d2 SIL.rst: Touch-ups.
Swift SVN r6548
2013-07-24 18:07:23 +00:00
Joe Groff
676de04f61 SIL.rst: ReST syntax.
Swift SVN r6544
2013-07-24 03:52:50 +00:00
Joe Groff
82d1091bc6 SIL.rst: Update docs for terminators.
Swift SVN r6539
2013-07-24 01:01:55 +00:00
Joe Groff
b2115265d3 SIL.rst: Update docs for index_addr/index_raw_pointer.
And lump them in with memory access instructions.

Swift SVN r6537
2013-07-24 00:24:10 +00:00
Joe Groff
a919bc1073 SIL.rst: Remove out-of-date "examples" section.
Swift SVN r6536
2013-07-24 00:24:08 +00:00
Joe Groff
08723dd3a9 SIL.rst: Update docs for checked cast instructions.
Swift SVN r6535
2013-07-24 00:03:35 +00:00
Joe Groff
ac5cefddb8 SIL.rst: Update docs for unchecked conversion instructions.
Swift SVN r6530
2013-07-23 23:15:52 +00:00
Joe Groff
51d7e56d4e SIL.rst: Update docs for protocol type instructions.
Swift SVN r6500
2013-07-23 16:41:25 +00:00
Joe Groff
8fa2419136 SIL.rst: Wording.
Swift SVN r6499
2013-07-23 16:41:23 +00:00
Joe Groff
a9c8ad3c07 SIL.rst: Update docs for reference counting instructions.
The retain_autoreleased docs might need some help from someone more versed in the arcana of the autoreleased-return-value hack.

Swift SVN r6491
2013-07-23 03:09:10 +00:00
Joe Groff
a245dfae3a SIL.rst: Update docs for load/store-ish instructions.
Swift SVN r6490
2013-07-23 03:09:02 +00:00
Chris Lattner
e903fae800 update this to reflect the current direction in SIL optzn passes.
Swift SVN r6487
2013-07-23 02:29:13 +00:00
Joe Groff
b9ab10d67a SIL.rst: Update docs for aggregate construct/extract insts.
Swift SVN r6486
2013-07-23 01:45:11 +00:00
Joe Groff
ff4b9ce1f3 SIL.rst: Put the 'module' instruction in with the literal insts.
Swift SVN r6485
2013-07-23 01:45:05 +00:00
Joe Groff
2bec3871d8 SIL.rst: Update docs for metatype instructions.
Swift SVN r6484
2013-07-23 01:45:00 +00:00
Joe Groff
dffe597ee0 SIL.rst: Update docs for function application instructions.
Swift SVN r6483
2013-07-23 01:44:53 +00:00
Joe Groff
b55d0c7ae9 SIL.rst: Update documentation for dynamic method instructions.
Swift SVN r6482
2013-07-22 21:42:40 +00:00
Joe Groff
37b3911cef SIL.rst: Update documentation for literal instructions.
Swift SVN r6480
2013-07-22 21:42:10 +00:00
Joe Groff
6e418585b3 SIL.rst: Update syntax and description of alloc/dealloc instructions.
Swift SVN r6479
2013-07-22 21:41:29 +00:00
Joe Groff
c0b03b42ac SIL.rst: Reorder instructions consistent with SILNodes.def.
Neither order is particularly great yet, but getting them in sync will help us keep SIL.rst coverage up as we add/remove instructions in the future.

Swift SVN r6457
2013-07-22 17:31:26 +00:00
Joe Groff
f00345496c SIL.rst: ReST syntax.
Swift SVN r6452
2013-07-22 15:48:35 +00:00
Chris Lattner
dbd820c6e5 teach memorypromotion about ProjectExistentialInst. Mention ARC optimization in SIL.rst.
Swift SVN r6435
2013-07-22 00:46:00 +00:00
Joe Groff
99874c0df4 SIL.rst: Wording.
Swift SVN r6420
2013-07-21 00:05:18 +00:00
Joe Groff
2b05858cd5 SIL.rst: Rework the "Syntax" section.
Describe the syntax entities as implemented by Chris and Manman in the parser.

Swift SVN r6419
2013-07-21 00:03:21 +00:00
Joe Groff
bb65bcd6d4 SIL.rst: Add a section about the SIL pipeline in the compiler.
Give an overview of the entire compiler pipeline followed by some description of where we're at and where we want to be with SILGen and the following SIL passes.

Swift SVN r6418
2013-07-20 21:44:32 +00:00
Joe Groff
e84798351b SIL.rst: Fill out the abstract.
Swift SVN r6417
2013-07-20 21:44:27 +00:00
Ted Kremenek
00bdd449e3 Misc. SIL document tidying.
Swift SVN r6238
2013-07-13 00:47:41 +00:00
Dave Abrahams
dc7ab3e57a Clean up remaining ReST errors in our documentation
Swift SVN r6025
2013-07-05 22:52:12 +00:00
Joe Groff
1f5bdda08f SIL: Add insns for archetype/protocol metatypes.
Archetype and protocol 'x.metatype' expressions eventually need to do a dynamic lookup, like 'x.metatype' for classes. These instructions represent that lookup.

Swift SVN r4534
2013-03-29 03:57:22 +00:00
Dave Abrahams
30d9e8821f *.rst: Use litre.TestsAreMissing exceptions
to avoid long processing times and reams of error messages for as-yet-untested files

Swift SVN r4508
2013-03-28 13:45:11 +00:00
Joe Groff
e8b66bce1d SIL: Rename implicit_convert to convert_function.
All the other implicit conversions have been given their own instructions, so specialize this ill-specified instruction to its one remaining use, for converting compatible function types.

Swift SVN r4482
2013-03-25 16:51:03 +00:00
Joe Groff
9da0f893e5 SIL: Add address_to_pointer instruction.
Make converting a SIL address to a Builtin.RawPointer its own instruction separate from implicit_convert, which will let me get rid of a goofy edge case in IRGenSIL.

Swift SVN r4412
2013-03-18 03:14:24 +00:00
Joe Groff
4437c65178 SIL: Add uncurry level to SILType.
We want to port CallEmission to the SIL level to handle uncurrying, but IRGen needs to have the original signature of a function available to it so that it can maintain the correct calling convention for different ABIs independent of SIL. Instead of flattening curried function types in SIL and losing that information, add an uncurryLevel to SILType so it can represent the type of an entry point at a given uncurry level. Unfortunately, this makes SILType outgrow a single word, so the way Value unions SILType and SILTypeList folding sets needs to be tweaked too.

Swift SVN r4345
2013-03-09 00:53:14 +00:00
Joe Groff
292f44af20 SILGen: Make address-only calling conv caller-copy
This is more in line with how IRGen currently behaves and with how loadable values are passed, and will make optimization of address-only functions easier.

Swift SVN r4343
2013-03-08 19:32:58 +00:00
Joe Groff
9703629f89 SIL.rst: Clean up some language.
Swift SVN r4329
2013-03-08 01:00:41 +00:00
Joe Groff
a44af3da9c SIL.rst: Describe some additional needed insns.
We need 'class_method' and 'super_method' to represent dynamic dispatch on class methods. We also need 'class_metatype' and 'existential_metatype' to obtain the runtime metatypes of class instances and existential containers.

Swift SVN r4321
2013-03-07 21:13:33 +00:00
Joe Groff
5e831ec2fe SIL.rst: Describe intended 'zero_addr' behavior.
zero_addr^Winitialize_var is a thing that should be magicked away either by turning subsequent assignments into initializations or by becoming a default constructor call. I don't think we need zero_value because 'initialize' pseudo-values should always originate from memory locations.

Swift SVN r4318
2013-03-07 18:38:23 +00:00
Joe Groff
c303ef1f7c SIL.rst: update ref_element_addr description.
Swift SVN r3780
2013-01-17 18:17:36 +00:00
Joe Groff
197b9e90e9 SILGen: Emit param patterns in reverse order.
Conform to IRGen's curried calling convention by emitting param patterns in reverse order, with the indirect return argument (if any) coming first.

Swift SVN r3777
2013-01-16 20:03:25 +00:00
Joe Groff
bb51760bdf SIL.rst: Describe calling convention for tuples.
Tuples recursively destructure, and the destructured elements then follow the normal calling convention.

Swift SVN r3748
2013-01-11 17:27:09 +00:00
Joe Groff
10924e22aa SIL.rst: Tidy up existential container description
Consistently use "existential container" to refer to the protocol-typed container object and "concrete value" to refer to the subobject owned by the existential container. Simplify the example a bit by removing the extraneous function call.

Swift SVN r3711
2013-01-09 00:02:36 +00:00
Joe Groff
da356c62ae SIL.rst: Existential terminology
Change the name of the implementation detail underlying protocol and protocol composition types to "existential container" while replacing references to "existential type" with "protocol or protocol composition type".

Swift SVN r3709
2013-01-08 04:25:36 +00:00
Joe Groff
5749e9024d SIL.rst: Catch up with the current state of SIL.
Swift SVN r3693
2013-01-05 01:30:44 +00:00
Joe Groff
7f3939f88a SIL.rst: Describe calling convention.
Loadable types are passed and returned at +1. Address-only arguments are passed by reference and callee-copied. Address-only return values are passed as an implicit argument to caller-owned uninitialized memory and are callee-initialized.

Swift SVN r3525
2012-12-17 19:24:17 +00:00
Joe Groff
57ad36d521 SIL.rst: Call addresses *T instead of Address<T>.
Swift SVN r3524
2012-12-17 19:24:15 +00:00