Commit Graph

4421 Commits

Author SHA1 Message Date
Joe Groff
101522bdfd Don't generate offensive words in our value witness mangling.
Swift SVN r5601
2013-06-15 22:12:50 +00:00
Joe Groff
cb2e800612 LangRef: Update stale language about cast operator syntax.
Cast operators no longer have precedence below all operators, but they still end sequence expression parsing because of the type production on their right sides.

Swift SVN r5572
2013-06-11 00:36:44 +00:00
Joe Groff
5358806890 LangRef: Note that '=' expr has void result.
Swift SVN r5559
2013-06-10 16:31:46 +00:00
Joe Groff
44790622c6 LangRef: Update assign/cast operator descriptions.
Describe the new handling of '=' and cast operators as builtin binary operators.

Swift SVN r5558
2013-06-10 16:20:39 +00:00
Joe Groff
3de47b3fec LangRef: Remove outdated lparen/lsquare whitespace sensitivity talk.
Swift SVN r5557
2013-06-10 01:58:05 +00:00
Joe Groff
dfad177173 Document and demangle '_Tnk_' protocol witness thunks.
Swift SVN r5548
2013-06-08 22:47:03 +00:00
Joe Groff
32af869a78 Demangler: Demangle protocol types and polymorphic types.
Swift SVN r5540
2013-06-08 03:11:10 +00:00
Joe Groff
075e0031d7 Fix mangling of single-protocol types.
The protocol type mangling is 'P' protocol+ '_', and so needs a trailing '_' to terminate the list, but we were missing the '_' for single-protocol types, which we tried to mangle as a nominal type context.

Swift SVN r5539
2013-06-08 03:11:07 +00:00
Joe Groff
fbd041f305 ABI.rst: Fix inaccuracy in protocol list description.
Protocols in generic protocol lists are not mangled as an 'entity' (including the type) but as just the name. The type would be redundant.

Swift SVN r5538
2013-06-08 03:11:00 +00:00
Joe Groff
2f6a59b287 Demangle: Demangle more types.
Demangle function, metatype, byref, and tuple types, and update operator and known substitution demangling for changes in the compiler.

Swift SVN r5525
2013-06-07 22:51:28 +00:00
Joe Groff
b1ef4f4a2a Update description of generic type disambiguation in Generics.rst.
Swift SVN r5480
2013-06-05 16:58:14 +00:00
Dmitri Hrybenko
625f059d7e Fix a few typos in documentation
Swift SVN r5474
2013-06-04 23:02:51 +00:00
John McCall
94fa0d7ef7 Initial weak-reference design document.
Swift SVN r5419
2013-05-31 06:38:08 +00:00
Doug Gregor
c10b1cef65 Allow trailing closures without pipes wherever we don't expect curly braces.
This moves trailing closures from expr-postfix up to the level of
expr, and introduces an intermediate level (expr-basic) for places
that need to parse expressions followed by curly braces, such as
if/while/switch/for. Trailing closures are still restricted to occur
after expr-postfix, although the parser itself parses a slightly more
general and then complains if it got more than an expr-postfix.


Swift SVN r5256
2013-05-21 22:30:25 +00:00
Doug Gregor
4d60bb7173 Implement trailing closure syntax.
Trailing closure syntax allows one to write a closure following any
other postfix expression, which passes the closure to that postfix
expression as an arguments. For example:

        sort(fruits) { |lhs, rhs|
          print("Comparing \(lhs) to \(rhs)\n")
          return lhs > rhs
        }

As a temporary limitation to work around the ambiguity with

  if foo { ... } { ... }

we require trailing closures to have an explicit parameter list, e.g.,

  if foo { || ... } { ... }



Swift SVN r5210
2013-05-17 19:16:18 +00:00
Doug Gregor
2138dc93e1 Update LangRef with a discussion of the Ruby-inspired closures.
Swift SVN r5204
2013-05-17 17:09:02 +00:00
Dave Abrahams
0d42b789ce [proposals] Inplace.rst: fix ReST errors
Swift SVN r5102
2013-05-08 21:39:13 +00:00
Doug Gregor
6e2a99f189 Remove unnecessary commentary
Swift SVN r5050
2013-05-06 16:28:07 +00:00
Chris Lattner
15f40068d4 remove stmt-brace. If you need something like it for scoping purposes, you can always use "if true {}".
Swift SVN r5034
2013-05-03 05:59:27 +00:00
Joe Groff
a2341a4cde Add Unicode symbol characters to operator charset.
Remove '@' from the operator character set, but add the math, symbol, punctuation, arrow, and line- and box-drawing characters. Also allow operators to contain (but not start with) combining characters--this should be safe, because identifiers can't start with combining characters either, and we don't allow them anywhere else.

Swift SVN r5019
2013-05-01 23:13:48 +00:00
Joe Groff
08b6f87524 Add 'typeof' to value witness tables.
To be able to get the dynamic type of a generic value, the 'typeof' operation needs to be part of the value witness for the type. Add 'typeof' to the value witness table layout, and in the runtime, provide standard typeof witnesses for static, Swift class, and ObjC class values.

Swift SVN r5013
2013-05-01 18:49:25 +00:00
Doug Gregor
2f3e948ad1 Remove the ".(foo:1 bar:2)" message-send syntax.
Swift SVN r5009
2013-05-01 04:33:59 +00:00
Joe Groff
7ed3285cd4 LangRef: Another small tweak.
The description of identifiers got long enough that it makes sense to break operators out into their own subsection. Also, I snuck '@' into the operator character set.

Swift SVN r5006
2013-05-01 02:47:53 +00:00
Joe Groff
dedbc6d7a6 Update LangRef.
Ternaries are now parsed among sequence expressions, identifiers can use unicode code points, and new now only allocates arrays.

Swift SVN r5003
2013-05-01 00:18:00 +00:00
John McCall
ac7a1a509c Respond to Chris's comments.
Swift SVN r4994
2013-04-30 05:52:04 +00:00
Chris Lattner
7595d85555 a few more missing :'s
Swift SVN r4993
2013-04-30 05:51:29 +00:00
Chris Lattner
c31773ed00 some hopefully non-controversial edits.
Swift SVN r4992
2013-04-30 05:48:59 +00:00
John McCall
1b85d2d47c More revisions per brief conversation with Joe.
Swift SVN r4991
2013-04-30 01:32:06 +00:00
John McCall
bd883975b6 Update the pattern-matching proposal after thinking it over for a
few months.  Discuss some of the stuff that we've currently got
implemented as 'switch'.

Swift SVN r4987
2013-04-30 00:18:28 +00:00
Joe Groff
bb0eada7a6 Inplace.rst: words about compiler features
Swift SVN r4985
2013-04-29 23:44:30 +00:00
Joe Groff
1013781bcc Parse: Allow Unicode identifier characters.
Extend the character set for identifiers according to WG14 N1518, which recommends an extended character set for identifier start and continuation characters in C. Mangle identifiers containing non-ASCII characters by borrowing the Punycode encoding used for international domain names.

No Unicode operators just yet.

Swift SVN r4968
2013-04-28 21:39:02 +00:00
Joe Groff
5b4519d12b Mangle operator fixity and tuple variadicity.
Tweak the mangling rules to fix some collisions I found:

- Mangle variadic tuples with a lowercase 't' to distinguish them from nonvariadic tuples with a slice as their final element.
- Mangle the fixity of operators using 'op' for prefix, 'oP' for postfix, and 'oi' for infix, so that operator declarations that differ only in fixity can coexist.

While we're here, 'Slice' seems worthy of a standard substitution, so mangle it to 'Sa'.

This fixes <rdar://problem/13757744> and <rdar://problem/13757750>.

Swift SVN r4965
2013-04-28 15:48:18 +00:00
Joe Groff
0566088bf2 Move name mangling into SIL.
Sever the last load-bearing link between SILFunction and SILConstant by naming SILFunctions with their mangled symbol names. Move the core of the mangler up to SIL, and teach SILGen how to use it to mangle a SILConstant.

Swift SVN r4964
2013-04-28 03:32:41 +00:00
Dave Abrahams
3b39ac7b59 Mark two .rst files as known to be missing tests
Swift SVN r4931
2013-04-27 04:38:26 +00:00
Dave Abrahams
e1ddd5c476 Inplace.rst: COW
Swift SVN r4918
2013-04-26 01:09:57 +00:00
Dave Abrahams
503b627ed8 Inplace.rst: Review review
Swift SVN r4917
2013-04-26 01:09:55 +00:00
Joe Groff
0c59f06273 Inplace.rst: Review
Swift SVN r4915
2013-04-25 23:21:55 +00:00
Dave Abrahams
d1f0d9412b docs/Inplace.rst: first draft
Swift SVN r4914
2013-04-25 22:43:18 +00:00
Dave Zarzycki
e14ed81412 String-vs-NSString: Fix HTML and drop NS_AVAILABLE() noise.
Swift SVN r4911
2013-04-25 20:22:15 +00:00
Dave Zarzycki
70e5ea57a4 Document NSString methods that do not map to Swift strings
Swift SVN r4910
2013-04-25 20:09:33 +00:00
Dave Zarzycki
d04492b8f9 String-vs-NSString: Document why String does not have Range arguments
Our APIs are simpler because substrings operations are fast.

Swift SVN r4909
2013-04-25 20:09:19 +00:00
Dave Zarzycki
618d35a00f Ignore deprecated NSString APIs
Swift SVN r4906
2013-04-25 18:37:55 +00:00
Dave Zarzycki
434e0e94d6 Add a status column to track String progress
Swift SVN r4904
2013-04-25 18:30:13 +00:00
Joe Groff
a2f8702b9f Pattern Matching.rst: Formatting fixes
Swift SVN r4885
2013-04-24 18:09:40 +00:00
Dave Abrahams
1b21fdc423 Generate reference-style links when translating NS-HTML to .rst
Makes the result lots easier to read

Swift SVN r4870
2013-04-24 11:08:27 +00:00
Dave Abrahams
95f1f5bf69 add scripts/ns-html2rst: converts Cocoa HTML doc into clean ReStructuredText
Requires the installation of pandoc <http://johnmacfarlane.net/pandoc>
Known limitation with tables: http://goo.gl/EdFw9

Swift SVN r4869
2013-04-24 11:08:24 +00:00
Dave Zarzycki
82e84f4ab1 Start a document/plan for Strings and NSString interop
Swift SVN r4864
2013-04-23 22:50:02 +00:00
Dave Abrahams
eccb25a6b7 docs/Generics.rst: disable the currently-failing test
If this stuff is going to be run by the buildbot, it should start out clean

Swift SVN r4647
2013-04-09 22:33:15 +00:00
Dave Abrahams
4a3426c808 docs/CMakeLists.txt: Add missing dependency
Swift SVN r4646
2013-04-09 22:33:14 +00:00
Dave Abrahams
1a5408f870 Make it possible to build docs standalone
Swift SVN r4645
2013-04-09 22:33:14 +00:00