Commit Graph

1819 Commits

Author SHA1 Message Date
Jordan Rose
2161cca82f [docs] LibraryEvolution: Fill out "Fixed-Layout Structs". 2016-01-21 18:26:53 -08:00
Jordan Rose
0965907e55 [docs] LibraryEvolution: Drop the term "availability-pinned"
...in favor of "versioned internal declarations". Add some more detail
around these things.
2016-01-21 18:26:53 -08:00
Dmitri Gribenko
f5153572d7 stdlib: rename count labels in underscored protocols
lengthInBytes => utf8CodeUnitCount

numberOfCodeUnits => utf16CodeUnitCount
2016-01-21 17:18:15 -08:00
practicalswift
75e12ae544 [gardening] Fix recently introduced typos 2016-01-21 23:08:10 +01:00
David Farler
aa7a212728 Add doc sketch for type reference encoding
WIP - @rjmccall and I decided a custom encoding would be best for
this.
2016-01-21 11:24:28 -08:00
Nadav Rotem
193a285453 [Compression] Remove the compression prototype. 2016-01-20 17:08:41 -08:00
Max Moiseev
9a018bd77d Merge remote-tracking branch 'origin/master' into swift-3-api-guidelines 2016-01-20 14:38:22 -08:00
Erik Eckstein
b7ea3b9bb2 [SIL] Let alloc_existential_box return a single value.
And use the new project_existential_box to get to the address value.
SILGen now generates a project_existential_box for each alloc_existential_box.
And IRGen re-uses the address value from the alloc_existential_box if the operand of project_existential_box is an alloc_existential_box.
This lets the generated code be the same as before.
2016-01-20 11:27:06 -08:00
Erik Eckstein
4dab67c582 SIL: add a new project_existential_box instruction.
It will be used as a replacement for the second return value of alloc_existential_box.
2016-01-20 11:27:06 -08:00
Doug Gregor
7d70b704e4 Merge commit '5e11e3f7287427d386636a169c4065c0373931a8' into swift-3-api-guidelines 2016-01-19 23:18:20 -08:00
Jordan Rose
c0df537a17 [docs] LibraryEvolution: Non-final methods can be safely removed.
...and final methods cannot. Inspired by @bitjammer's recent commit 0825841.
2016-01-19 19:58:45 -08:00
Dmitri Gribenko
3cf4dd36a1 Update language version to 3.0 2016-01-19 19:59:05 -07:00
Jordan Rose
d4edd950b5 [docs] LibraryEvolution: Be consistent about made-up API names. 2016-01-19 18:28:27 -08:00
Jordan Rose
de30c0ceea [docs] LibraryEvolution: define "versioned entity" properly.
Also provide several possible syntaxes for marking an entity as versioned.
None of the syntax in this document is set in stone. (Even these three
options are just examples of three different approaches.)
2016-01-19 18:23:40 -08:00
Erik Eckstein
8110b1ebc8 [SIL] Let alloc_box return a single value.
And use project_box to get to the address value.
SILGen now generates a project_box for each alloc_box.
And IRGen re-uses the address value from the alloc_box if the operand of project_box is an alloc_box.
This lets the generated code be the same as before.

Other than that most changes of this (quite large) commit are straightforward.
2016-01-19 08:59:24 -08:00
practicalswift
22d043fcc0 [gardening] Fix violations of non-controversial PEP8 rules.
Fixes:
* blank line at end of file
* closing bracket does not match indentation of opening bracket's line
* continuation line over-indented for hanging indent
* continuation line over-indented for visual indent
* continuation line unaligned for hanging indent
* inline comment should start with '# '
* missing whitespace around arithmetic operator
* missing whitespace around bitwise or shift operator
* multiple imports on one line
* multiple spaces after ':'
* multiple spaces after operator
2016-01-16 00:47:43 +01:00
Robin Kunde
129aa470d5 Add contents block and fix inline code directives 2016-01-13 11:15:39 -05:00
Tomohiro Kumagai
473b15648a [docs] Replace old-style array type annotations. 2016-01-13 04:09:39 +09:00
Dmitri Gribenko
f0d294b714 Merge pull request #884 from practicalswift/apostrophes
[gardening] Replace left/right quotation marks
2016-01-11 20:41:24 -08:00
Jordan Rose
0e48b9c95a [docs] Note that the Lexicon file uses Sphinx-specific features.
I don't like this not being viewable on GitHub, but I don't want to reformat it all
to use bare definition lists and refs at the moment.
2016-01-11 20:01:30 -08:00
Jordan Rose
daca24fe64 [docs] Add a "Lexicon" file that defines common Swift jargon terms.
Inspired by LLVM's similar file. (Thanks for reminding me about that, Chris!)
2016-01-11 19:57:19 -08:00
Tomohiro Kumagai
e4bf75fb29 [stdlib] [docs] Re-wrap some paragraphs to fit within 80 characters. #936 2016-01-12 11:09:15 +09:00
Max Moiseev
08e1e4a043 Merge remote-tracking branch 'origin/master' into swift-3-api-guidelines 2016-01-11 16:51:11 -08:00
Tomohiro Kumagai
01155076fa [stdlib] [docs] Modify Array's type parameter name and rename Slice to ArraySlice in comments.
In swift 1.2, `Slice` has been renamed  `ArraySlice`.
In swift 2.0, type parameter name of `Array` is changed from `T` to `Element`.
Therefore, modified the names which appear in code comments and a document.
2016-01-11 17:04:45 +09:00
Dmitri Gribenko
b5d5d82576 Merge pull request #935 from EZ-NET/correct_document_set-type-parameter-name
[stdlib] [docs] Modify Set's type parameter name in comments.
2016-01-10 23:19:50 -08:00
Tomohiro Kumagai
cf8a733a4d [stdlib] [docs] Modify Set's type parameter name in comments.
In swift 2.0, type parameter name of `Set` is changed from `T` to `Element`.
Therefore, modified the names which appear in code comments and a document.
2016-01-11 16:02:05 +09:00
practicalswift
5ac92dd72d Use hyphen instead of em-dash/en-dash. 2016-01-09 17:34:44 +01:00
Jordan Rose
4ef0ac1e3c [docs] Library Evolution: note that operator decls are not ABI. 2016-01-08 14:25:47 -08:00
Slava Pestov
01a0444511 SIL.rst: Document new alloc_global instruction 2016-01-08 13:24:03 -08:00
practicalswift
7cf882c4b4 Fix recently introduced typos. 2016-01-08 09:35:35 +01:00
Michael Gottesman
25a999063c [arc-loop-hoisting] Add motiviation/proofs of correctness of ARCLoopHoisting to ARCOptimization.rst. 2016-01-07 19:21:19 -08:00
Jordan Rose
fcb26ae504 [docs] Address some of Slava's feedback on LibraryEvolution.rst.
(but not all of it)

- Add a note about throwing functions becoming non-throwing.
- Clarify that let-properties may not be turned into read-only vars.
- Permit new static stored properties on fixed_layout structs.
- Drop note about "fixed_layout-since-first-available".
- Add note disparaging the utility of @fixed.
- Add note about adding defaulted associated types to protcols.
- Clarify which members can and cannot be added to a class.
- Add some class-specific permitted changes.
- Note that adding/removing 'dynamic' is /not/ permitted.
- Split up protocol and non-protocol extensions.
- Explain why the 'no_payload' performance assertion isn't needed.

Saving the rest of the feedback for the next major content addition.
2016-01-07 17:26:34 -08:00
Jordan Rose
2d8a9b0a7d Merge pull request #903 from zachpanz88/patch-1
Fix exit bugs of some python scripts
2016-01-07 13:26:33 -08:00
practicalswift
d6b2786302 Fix typo introduced a couple of hours ago :-) 2016-01-07 21:40:44 +01:00
Jordan Rose
627c48c49f [docs] LibraryEvolution.rst: What kind of changes are ABI-safe?
Update the Library Evolution ("Resilience") doc with a listing for every
top-level declaration kind (...except operators and imports, TODO) that
describes what should be an ABI-compatible change between releases of a
binary library shipped independently of a client app (say, because it's
part of the OS). Restructure the existing discussion of "fragility
attributes" to describe how each of those capabilities is affected when,
say, marking a struct as "fixed-layout".

Still a work in progress, and if something unexpected catches your eye
I'd like to hear about it. Note also that this does /not/ describe how
Swift behaves today; we still make many assumptions about types that
will not be valid in a "resilient" world.
2016-01-07 11:55:15 -08:00
practicalswift
05d6b954a9 Fix recently introduced typos. 2016-01-07 08:55:42 +01:00
Chris Lattner
a8dd1dedfa Merge pull request #896 from practicalswift/curly-quotes
[gardening] Consistently use normal quotes ("…") instead of curly quotes (“…”)
2016-01-06 20:22:52 -08:00
Zach Panzarino
0b70e6e62b Fix exit bugs of some python scripts 2016-01-07 03:27:46 +00:00
Erik Eckstein
9ad406d5d6 Remove the local_storage type attribute and SIL value category.
They are not used anymore as alloc_stack now returns a single value.
2016-01-06 17:35:27 -08:00
Erik Eckstein
6ff2f09796 [SIL] Let alloc_stack return a single value.
Having a separate address and container value returned from alloc_stack is not really needed in SIL.
Even if they differ we have both addresses available during IRGen, because a dealloc_stack is always dominated by the corresponding alloc_stack in the same function.

Although this commit quite large, most changes are trivial. The largest non-trivial change is in IRGenSIL.

This commit is a NFC regarding the generated code. Even the generated SIL is the same (except removed #0, #1 and @local_storage).
2016-01-06 17:35:27 -08:00
Doug Gregor
1a38e0ad3b Merge branch 'master' into swift-3-api-guidelines 2016-01-06 15:32:55 -08:00
Joe Groff
7775b9c261 Runtime: Remove swift_retainCount entry points.
These are no longer needed by the corelibs.
2016-01-06 14:12:03 -08:00
practicalswift
6c8c9bfbc9 Consistently use normal quotes ("…") instead of curly quotes (“…”). 2016-01-06 21:38:32 +01:00
practicalswift
4d43f4a32c Replace left/right quotation marks 2016-01-06 12:41:08 +01:00
practicalswift
4689a22f1b Replace left/right quotation marks with apostrophes in non-quote contexts
* LEFT SINGLE QUOTATION MARK (U+2018) → APOSTROPHE (U+0027)
* RIGHT SINGLE QUOTATION MARK (U+2019) → APOSTROPHE (U+0027)
2016-01-06 12:29:40 +01:00
Max Moiseev
f51e708a8f Merge remote-tracking branch 'origin/master' into swift-3-api-guidelines 2016-01-04 12:25:25 -08:00
Michael Gottesman
3d8433b7f6 [arc] Add in a new semantics attribute called "arc.programtermination_point" and document it.
If this semantic tag is applied to a function, then we know that:

- The function does not touch any reference counted objects.
- After the function is executed, all reference counted objects are leaked
  (most likely in preparation for program termination).

This allows one, when performing ARC code motion, to ignore blocks that contain
an apply to this function as long as the block does not have any other side
effect having instructions.

I have wanted to do this for a while but was stymied by lacking the ability to
apply multiple @_semantics attributes. This is now committed to trunk so I added
this attribute instead of pattern matching against fatalError (since there could
be other functions with this property).

rdar://19592537
2016-01-02 16:22:06 -06:00
Mark Lacey
9ce3e45f7f Merge pull request #831 from ezephir/sil-docs-integer-literal
[SIL] Update integer_literal formatting in docs
2016-01-02 11:42:19 -07:00
Nadav Rotem
8a15c5abde [Docs] Add a section that describes the use of the programs that generate the compression tables. 2016-01-01 16:13:16 -08:00
Zach Panzarino
e3a4147ac9 Update copyright date 2015-12-31 23:28:40 +00:00