Commit Graph

4421 Commits

Author SHA1 Message Date
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
Joe Groff
1776881f3a LangRef: Update tuple keyword argument syntax.
Swift SVN r6450
2013-07-22 15:39:07 +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
733c2dd6a0 LangRef: Remove outdated section about metatype expressions.
Swift SVN r6428
2013-07-21 18:39:40 +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
Joe Groff
751da69c6a LangRef: Remove some stale references to 'following' tokens.
Swift SVN r6416
2013-07-20 17:35:35 +00:00
Anna Zaks
7d7e47aa26 Remove the common Pitfalls document as it has been moved to the wiki.
Swift SVN r6395
2013-07-19 21:28:50 +00:00
Doug Gregor
601c69527f Remove roadmap from this repository. It doesn't belong here.
Swift SVN r6386
2013-07-19 20:29:52 +00:00
Dave Abrahams
e4b999fe99 [docs] PitfallsWhenPortingFromObjC.rst: fix title underline lengths
These were causing the doc build to issue warnings

Swift SVN r6383
2013-07-19 19:52:46 +00:00
Anna Zaks
2382f6c309 Add the document describing common pitfalls while porting from ObjC
This includes items from an email I've sent out earlier as well
as the radars that are supposed to address each one provided by
Chris.

Swift SVN r6291
2013-07-16 18:53:24 +00:00
Ted Kremenek
00bdd449e3 Misc. SIL document tidying.
Swift SVN r6238
2013-07-13 00:47:41 +00:00
Joe Groff
02c609854c LangRef: Update keyword list.
Re-alphabetize 'where' among the declaration keywords. Eliminate the now non-user-facing "identifier-like keyword" concept and sort them among the other expression keywords. Add 'in' as a keyword.

Swift SVN r6182
2013-07-11 23:21:28 +00:00
Joe Groff
070ee26c56 Replace 'requires' keyword with 'where'.
Reuse the 'where' keyword to introduce generic requirement clauses, as in 'func foo<T:Enumerator where T.Element == Int>()'.

Swift SVN r6180
2013-07-11 22:20:40 +00:00
Joe Groff
dd1208c62c LangRef: Update 'switch' statement description.
Swift SVN r6159
2013-07-11 18:08:38 +00:00
Joe Groff
b62b376d45 LangRef: Clean up some grammar and phrasing.
Swift SVN r6158
2013-07-11 18:08:36 +00:00
Doug Gregor
61060baf8e Eliminate the type-checking pass that resolves default arguments in tuple types.
Per r6154, this is now dead code. The only places we allow default
arguments will be visited by normal type validation, so there's
nothing specific to do here.


Swift SVN r6157
2013-07-11 18:06:14 +00:00
Doug Gregor
50d6fd0455 Lock down on the use of default values in patterns and types.
Per previous discussions, we only want to allow default values for
uncurried 'func' and 'constructor' parameters, and not for return
types or arbitrary tuple types. Introduce this restriction, fixing
part of <rdar://problem/13372694>. 



Swift SVN r6156
2013-07-11 17:53:05 +00:00
Joe Groff
d5dd3edcff LangRef: Describe the magic default argument behavior of __LINE__ etc.
Swift SVN r6148
2013-07-11 15:30:30 +00:00
Joe Groff
b2d8226039 LangRef: Describe the new pattern forms.
Swift SVN r6147
2013-07-11 04:51:00 +00:00
Joe Groff
deab9bba9d Typo in LangRef anchor link.
Swift SVN r6131
2013-07-10 21:54:34 +00:00
Doug Gregor
63ff23147f Implement another new closure syntax.
In this syntax, the closure signature (when present) is placed within
the braces and the 'in' keyword separates it from the body of the
closure, e.g.,

      magic(42, { (x : Int, y : Int) -> Bool in
        print("Comparing \(x) to \(y).\n")
        return y < x
      })

When types are omitted from the parameter list, one can also drop the
parentheses, e.g.,

      magic(42, { x, y -> Bool in
        print("Comparing \(x) to \(y).\n")
        return y < x
      })

The parsing is inefficient and recovers poorly (in part because 'in'
is a contextual keyword rather than a real keyword), but it should
handle the full grammar. A number of tests, along with the whitepaper
and related rational documents, still need to be updated. Still, this
is the core of <rdar://problem/14004323>.



Swift SVN r6105
2013-07-10 01:15:15 +00:00
John McCall
553f8c866c Revise weak design per discussion.
Swift SVN r6089
2013-07-09 08:37:30 +00:00
Dave Abrahams
dc7ab3e57a Clean up remaining ReST errors in our documentation
Swift SVN r6025
2013-07-05 22:52:12 +00:00
Dave Abrahams
05eeba93f4 Turn on ReST error checking in CMake documentation builds
(it was already on in Makefile builds)

Also, fix the ReST errors it found.

Also, monkeypatch pygments so it can see our lexers when we build
documentation.  This keeps all doc builds from producing heaps of
warnings.

Swift SVN r6023
2013-07-05 22:33:50 +00:00
Dave Abrahams
612e03ab04 Small ReST formatting correction
Swift SVN r5945
2013-07-01 20:21:38 +00:00
Dave Abrahams
8080661186 [docs] Printf.rst and printf.swift: a Text Formatting Proposal
Swift SVN r5944
2013-07-01 20:10:36 +00:00
Joe Groff
6228e220e1 Sketch out an improved 'import' syntax.
Swift SVN r5931
2013-07-01 17:34:56 +00:00
Chris Lattner
2fe98e14e7 implement basic __FILE__, __LINE__, and __COLUMN__ magic identifiers.
Swift SVN r5912
2013-06-30 21:19:32 +00:00
Joe Groff
8287a50606 ABI: Update with mangling for Builtin.Vec* types.
Swift SVN r5852
2013-06-27 23:07:10 +00:00
Chris Lattner
4723c7b549 some more typographical changes.
Swift SVN r5843
2013-06-27 20:41:01 +00:00
Chris Lattner
af78ddb897 fix some rst formatting issues.
Swift SVN r5840
2013-06-27 18:20:43 +00:00
John McCall
5347041998 Revise the weak design in response to comments.
I actually backtracked on the name and went back to [backref].

The main changes here are (1) [backref] is now definitively a
decl attribute and (2) there's now a huge new section about
closures.  This entailed doing quite a bit of secondary design
on closure capture semantics because backref captures are
value captures, and adding those just does so much fun stuff
to the model.

Swift SVN r5836
2013-06-27 10:35:28 +00:00
Chris Lattner
71be5c9c60 fallthrough is a control flow transfer too.
Swift SVN r5810
2013-06-26 04:37:59 +00:00
Chris Lattner
1259e32913 - Update LangRef to mention stmt-break/continue/fallthrough. Factor the stmt
grammar description in LangRef and the parser to expose a new stmt-control-transfer.
- remove obsolete comment in ParseStmt.cpp talking about stmt-brace.

No behavior change.


Swift SVN r5809
2013-06-26 04:31:28 +00:00
Doug Gregor
85030ae72f Remove a stray selector-args production from the expr-super grammar
Swift SVN r5776
2013-06-24 14:48:38 +00:00
Doug Gregor
fad5c78484 Remove expr-func from the syntax of the language.
FuncExpr still lives on as the implementation mechanism for FuncDecl,
but it's not long for this world.


Swift SVN r5752
2013-06-21 18:54:18 +00:00
Dmitri Hrybenko
e822788ffc docs: new document: Swift Coding Standards
Swift SVN r5718
2013-06-20 17:20:53 +00:00
Dave Abrahams
ad757cdb83 [docs] More clarifications
Swift SVN r5630
2013-06-17 22:18:49 +00:00
Dave Abrahams
c97bab033e General documentation corrections
Swift SVN r5628
2013-06-17 21:15:02 +00:00