Commit Graph

4421 Commits

Author SHA1 Message Date
Joe Groff
9d86770a1e Start putting together a complete proposal for how keywords and compound names should work.
I tried to work both Daves' proposals into one big proposal, and elaborate on interactions with other features like initializers, enums and default arguments I could think of. Comments appreciated!

Swift SVN r9910
2013-11-03 20:02:45 +00:00
Dmitri Hrybenko
91ce21666d Change 'func' keyword to 'def'
I tried hard find all references to 'func' in documentation, comments and
diagnostics, but I am sure that I missed a few.  If you find something, please
let me know.

rdar://15346654


Swift SVN r9886
2013-11-02 01:00:42 +00:00
Joe Groff
410c9c0d75 ABI.rst: Describe existential container layout.
Swift SVN r9881
2013-11-01 21:34:03 +00:00
Joe Groff
1b0e03cb9e ABI.rst: Describe protocol descriptors.
Swift SVN r9880
2013-11-01 21:12:24 +00:00
Joe Groff
45dd79a642 ABI.rst: Describe the now-somewhat-useful layout of protocol metadata.
Description of protocol descriptors coming shortly.

Swift SVN r9879
2013-11-01 20:21:48 +00:00
Joe Groff
a0c4486808 IRGen: Emit protocol descriptors.
Produce protocol descriptors when we see a protocol definition in the current module. If the protocol is @objc, go through the existing path for generating full Protocol* metadata for objc objects; otherwise, emit our layout-compatible but strong-external-linkage Swift protocol descriptor record.

Swift SVN r9867
2013-11-01 04:28:43 +00:00
Chris Lattner
ef93c81ffb Introduce a new SIL-level "undef" value, useful for SIL transformations.
IRGen support is missing, Joe volenteers to implement it.


Swift SVN r9776
2013-10-30 00:58:09 +00:00
Jordan Rose
e0084c8a8e [docs] Flesh out the mixed Swift/ObjC build model.
I've come up with a model which I think will work for at least basic
Swift/Objective-C interoperation within a target. It isn't wonderful, but
it does at least seem feasible, and will probably not require too many
changes to Clang.

Swift SVN r9737
2013-10-28 22:50:52 +00:00
Mark Lacey
eaa7018ed0 Fixup attribute syntax in LangRef.html.
There are still some [infix_left=] in the text. Based on
r4627 it looks like these can just be deleted, but I haven't
done so at this time.

Swift SVN r9616
2013-10-23 08:12:21 +00:00
Greg Parker
5708b8b6ec Remove mention of Optional.get().
Swift SVN r9605
2013-10-22 23:11:58 +00:00
Joe Groff
a334ce8904 SIL.rst: Document cond_fail instruction.
Swift SVN r9590
2013-10-22 15:53:09 +00:00
Joe Groff
61360ba7a4 SIL: Remove ConvertCCInst.
Swift SVN r9577
2013-10-22 03:16:27 +00:00
Jordan Rose
62905cf226 [docs] Revise Modules Build Model to include dependency analysis.
Also, update for the plan of record that the compiler driver will be
responsible for dependency analysis rather than an external build system.

Swift SVN r9573
2013-10-22 00:30:06 +00:00
Joe Groff
85ea53a989 ABI.rst: Describe nominal type descriptor layout.
Swift SVN r9550
2013-10-21 18:50:10 +00:00
Joe Groff
5bbbd4751c ABI.rst: Correct description of generic parameter vector.
The type metadata and witness tables aren't actually interleaved; the witness tables come after all of the type metadata.

Swift SVN r9495
2013-10-18 21:10:47 +00:00
Joe Groff
b8c75769b3 IRGen: Emit nominal type descriptors in struct and enum metadata.
Build a nominal type descriptor when we emit the metadata or generic metadata pattern for a nominal type, and put a reference into the formerly null slot in the struct or enum metadata. We need to make a place for them in class metadata; that'll come next.

Swift SVN r9492
2013-10-18 21:04:58 +00:00
Joe Groff
0adc63999b ABI.rst: Formatting OCD.
Swift SVN r9457
2013-10-17 18:48:58 +00:00
Argyrios Kyrtzidis
57c8040203 Introduce a skeletal man page for swift, to satisfy buildit verification.
Feel free to expand it at will.

Swift SVN r9446
2013-10-17 15:24:43 +00:00
Howard Hinnant
36e6f363f1 Further Vector -> Array migration. Also updated Array with several good suggestions from Dave A.
Swift SVN r9418
2013-10-16 20:48:24 +00:00
Joe Groff
8d5e8e26c2 ABI.rst: Describe the generic parameter vector layout.
Swift SVN r9391
2013-10-16 00:10:06 +00:00
Dmitri Hrybenko
dd66c7e455 Update LangRef for 'as' syntax change that happened some time ago
Swift SVN r9379
2013-10-15 21:52:34 +00:00
Joe Groff
8180068cc2 ABI.rst: Finish describing class metadata layout.
Swift SVN r9363
2013-10-15 19:13:33 +00:00
Mark Lacey
3ed49cf81a Fix typo in vtable example: s/B/C/
Swift SVN r9359
2013-10-15 18:32:11 +00:00
Joe Groff
06fb25c992 ABI.rst: Point out that empty aggregates are allowed and take no space.
Swift SVN r9348
2013-10-15 16:56:02 +00:00
Joe Groff
684a588b9b Proposal for how to handle option sets.
Swift SVN r9323
2013-10-14 18:53:21 +00:00
Chris Lattner
9f439292b6 Implement support for type-attributes on the result of a function type or decl.
Also, improve error recovery for new-syntax attributes.

This means that we now compile the testcase into:

t.swift:3:16: error: unknown attribute 'xyz'
var x : () -> @xyz Int
               ^
t.swift:6:16: error: unknown attribute 'xyz'
func foo() -> @xyz Int {
               ^

instead of:

t.swift:4:15: error: expected type for function result
func foo() -> @xyz Int {
              ^
t.swift:4:14: error: consecutive statements on a line must be separated by ';'
func foo() -> @xyz Int {
             ^
             ;
t.swift:4:16: error: unknown attribute 'xyz'
func foo() -> @xyz Int {
               ^
t.swift:7:1: error: expected declaration

^

this is part of rdar://15183765


Swift SVN r9260
2013-10-12 21:27:16 +00:00
Jordan Rose
760438f0e6 [docs] Fix internal links in ModulesBuild.rst.
Swift SVN r9245
2013-10-12 00:13:12 +00:00
Jordan Rose
d18f19f52c [docs] Sketch out a Modules Build Model doc.
This doc will contain the underlying build model for a multi-file Swift
framework or application module. This model will then be driven by
Xcode to build a target.

The biggest open questions are in how Swift and Objective-C will interact.

<rdar://problem/14579792> TLF: Swift 1.0 Modules

Swift SVN r9244
2013-10-12 00:08:11 +00:00
Joe Groff
cf9bdf87a5 ABI.rst: Finish up some talk about class metadata I left mid-sentence.
Swift SVN r9183
2013-10-10 23:57:14 +00:00
Joe Groff
1bdbc97056 Drop the 'x as! T' cast syntax.
Now that we have a solid Optional-based story for dynamic casts, it's no longer needed, and can be expressed as '(x as T)!'. Future refinement of the 'as' syntax will deal with the unfortunate extra parens.

Swift SVN r9181
2013-10-10 23:47:59 +00:00
Joe Groff
a62b864793 ABI: Note that we don't currently provide labels in tuple metadata.
Swift SVN r9171
2013-10-10 21:15:59 +00:00
Joe Groff
e3376d3369 ReST mistake.
Swift SVN r9170
2013-10-10 21:12:55 +00:00
Joe Groff
b92fa26a56 ABI: Document the tuple, function, protocol, and metatype metadata layouts.
Swift SVN r9169
2013-10-10 21:10:54 +00:00
Joe Groff
a2807bd35c ABI.rst: Clarify that struct field offset is given in bytes.
Swift SVN r9155
2013-10-10 18:33:43 +00:00
Joe Groff
0da7502d5a ABI.rst: Describe struct and enum metadata layout.
Swift SVN r9154
2013-10-10 18:32:01 +00:00
Joe Groff
216d3edac9 ABI.rst: Add subheadings to the Mangling section.
To improve navigability of the generated HTML.

Swift SVN r9149
2013-10-10 18:05:08 +00:00
Joe Groff
a906658cba ABI.rst: Describe type metadata header.
Start a section on type metadata layout. Eventually we'll describe the contents of all of the different kinds of type metadata here.

Swift SVN r9148
2013-10-10 17:41:37 +00:00
Joe Groff
1c7641dc8b ABI.rst: Fix description of struct layout algorithm.
We offset each field according to the alignment of the field, not the alignment of the aggregate so far. Thanks Dmitri!

Swift SVN r9147
2013-10-10 17:41:33 +00:00
Joe Groff
d084573042 ABI.rst: Update struct layout discussion.
Describe the "Universal" layout algorithm in full, and update the examples to use packed structs, following the recent IRGen changes.

Swift SVN r9143
2013-10-10 16:54:44 +00:00
Joe Groff
104dd0e53a ABI.rst: Update enum layout discussion.
No-payload enums now vend extra inhabitants, and single-payload enums forward the unconsumed extra inhabitants of their payload.

Swift SVN r9140
2013-10-10 16:38:12 +00:00
Joe Groff
57ea2025cb Adopt '_TPA.*' as a proper mangling for partial_apply thunks.
Jim wants a less ad-hoc naming convention for these thunks so that LLDB's 'trampoline' logic can recognize and step past these thunks in the process of "stepping into" methods involving closures.

Swift SVN r9086
2013-10-09 20:42:24 +00:00
Doug Gregor
32c40e8deb Document @sil_self.
Swift SVN r9069
2013-10-09 17:40:09 +00:00
Dave Abrahams
87e51140fa [docs] SIL.rst: ReST fixups
Swift SVN r9031
2013-10-08 21:53:42 +00:00
Chris Lattner
efe1ff3fd4 update example for the "new" syntax.
Swift SVN r9024
2013-10-08 16:59:42 +00:00
Jordan Rose
5934df5e1c [docs] Update Modules User Model based on discussion and feedback.
- Drop the notion of hierarchical module names for now. People can prefix
  their module names (instead of their classes) until we come up with
  something else.
- For ambiguity resolution, prefer names in the current module (found by
  implicit visibility) over any sort of import (selective or otherwise).
- Add section on development-time Submodules based on last week's discussion.
- Simplify/remove several things that were found confusing.
- Still haven't written anything about search paths.

Swift SVN r9007
2013-10-07 23:47:56 +00:00
Joe Groff
abd8a6dd7e SIL.rst: Update for attribute syntax change.
Swift SVN r8987
2013-10-07 20:49:46 +00:00
Joe Groff
63588740ff SIL.rst: Document new alloc_stack/dealloc_stack invariants enforced by verifier.
Swift SVN r8986
2013-10-07 20:37:31 +00:00
Joe Groff
6424e99da2 SIL: Rename 'condbranch' to the more idiomatic 'cond_br'.
For consistency with the other '*_br' instructions.

Swift SVN r8957
2013-10-07 16:16:35 +00:00
Joe Groff
accdbf318e SIL.rst: Clarify language describing enum initialization.
Swift SVN r8955
2013-10-07 15:57:48 +00:00
Joe Groff
6a84a1c8bc SIL.rst: Describe SIL vtables.
Swift SVN r8953
2013-10-07 15:49:08 +00:00