Commit Graph

2220 Commits

Author SHA1 Message Date
Jordan Rose
d23a85e942 [docs] Mention update-checkout in Branches.md. (#11169) 2017-07-25 11:33:47 -07:00
Robert Widmann
4babbe95e1 Push __shared into the mangling and down thru to codegen
This does not lower to @guaranteed as of yet.
2017-07-23 21:47:25 -07:00
Jordan Rose
cc1a0ed4cb [docs] Branches.md: If you commit at llvm.org, you should cherry-pick. 2017-07-21 19:12:25 -07:00
Jordan Rose
de1cab803e [docs] Describe the Swift, LLVM, and LLDB branch structure. 2017-07-20 19:51:46 -07:00
Andrew Trick
4db2a46cff Add SIL instruction: open_existential_box_value.
This has the same semantics as open_existential_box, but returns an object value
instead of an address.

This is used in SIL opaque values mode. Attempting to reuse open_existential_box
in this mode causes SIL type inconsistencies that are too difficult to work
around. Adding this instruction allows for consistent handling of opaque values.

The original versions of several of these currently redundant instructions will
be removed once the SIL representation stabilizes.
2017-07-17 23:46:41 -07:00
Andrew Trick
f657ad2d3a Rename *ExistentialOpaque instructions to *ExistentialValue.
These instructions have the same semantics as the *ExistentialAddr instructions
but operate directly on the existential value, not its address.

This is in preparation for adding ExistentialBoxValue instructions.
The previous name would cause impossible confusion with "opaque existentials"
and "opaque existential boxes".
2017-07-17 23:46:41 -07:00
swift-ci
40a403ddd2 Merge pull request #10743 from gottesmm/viewcfg_docs 2017-07-17 11:52:19 -07:00
Michael Gottesman
e5dc0d1128 [docs] Use `` around @noescape and @autoclosure like we do in other places in SIL.rst. 2017-07-10 10:36:09 -07:00
Andrew Trick
0236c985c3 Document @swift-ci smoke benchmark. 2017-07-05 13:14:17 -07:00
Michael Gottesman
2289e5c509 [gardening] Convert Testing.rst to markdown and rename to Testing.md 2017-07-04 23:33:04 -07:00
Michael Gottesman
25b25bbc85 [docs] Add some useful lit commandline flags to the Testing documentation. 2017-07-04 21:54:55 -07:00
Michael Gottesman
50f0accf39 [viewcfg] Reformulate, expand the docs on viewcfg.
Specifically, I tried to make it clearer that viewcfg does not rely on any type
information or declarations (i.e. it can dump raw textual CFGs). This also means
that it can be used in an editor to dump CFGs at your cursor?!

Thanks Erik for showing me this!
2017-06-30 22:03:27 -07:00
swift-ci
6bf18eaece Merge pull request #10241 from contraultra/SR-3281 2017-06-27 12:04:23 -07:00
contraultra
c3c53e4ebc [SR-3281] Update swift man page
For future reference, please refer to the following man pages:

- PERLDOC(1)
- PERLPODSPEC(1)
- PODCHECKER(1)
2017-06-27 10:54:47 -07:00
Arnold Schwaighofer
48e889b51b IRGen: EmptyBoxType's representation cannot be nil because of a conflict with extra inhabitant assumption in indirect enums (#10326)
* IRGen: EmptyBoxType's representation cannot be nil because of a conflict with extra inhabitant assumption in indirect enums

We map nil to the .None case of Optional. Instead use a singleton object.

SR-5148
rdar://32618580
2017-06-17 09:33:41 -07:00
Jordan Rose
2bd5295f3f [docs] Add "build czar" to Lexicon.rst. 2017-06-16 10:08:26 -07:00
Jordan Rose
813eacd026 [docs] Add a document concerning Swift diagnostics style. (#10138)
A handful of people have recently asked me if such a thing existed;
now it does. There's certainly more that can be added here, but I
wanted to dump a bunch of the information in my brain into doc form.
2017-06-08 07:40:36 -07:00
Robert Widmann
6509f78f13 tests: replace remaining 'mkdir -p' calls with %empty-directory(...)'
These changes were made manually.
2017-06-04 11:08:39 -07:00
Dmitri Gribenko
d54e5b2326 lit.cfg: add a new substitution '%empty-directory(directory-name)' 2017-06-04 11:08:39 -07:00
Roman Levenstein
956c556cb6 [docs] Add the description of @_semantics("optimize.sil.specialize.generic.partial.never") and the new @_specialized syntax 2017-06-03 11:15:21 -07:00
Dave Abrahams
8e1c7bde19 Revert "[docs] Add the description of @_semantics("optimize.sil.specialize.generic.partial.never") and the new @_specialized syntax" 2017-06-02 13:41:36 -07:00
Roman Levenstein
99077692ea [docs] Add the description of @_semantics("optimize.sil.specialize.generic.partial.never") and the new @_specialized syntax 2017-06-02 12:21:08 -07:00
Jordan Rose
c1c4f5243b [Mangling] Include private discriminators in constructor manglings. (#9880)
Previously, two constructors with the same full name and argument
types would get identical manglings even if they were declared
'private' or 'fileprivate' in different files. This would lead to
symbol collisions in whole-module builds. Add a new mangling node for
private discriminators on base-name-less decls to make this unique.

This still doesn't fix the existing issue with private members, named
or not, conflicting when they're in the /same/ file, but since Swift 4
makes those members visible to one another (SE-0169) that's only an
issue in Swift 3 mode anyway, and as such probably won't get fixed at
all.

rdar://problem/27758199
2017-06-01 16:42:17 -07:00
Pavol Vaskovic
68199f24d5 Document the added lit substitution swift_src_root
`%swift_src_root`: absolute path to the directory where the Swift source code is stored.
2017-05-31 16:27:49 +02:00
Robert Widmann
9f0b2c7da4 Update latex_paper_size to latex_elements.papersize 2017-05-30 13:19:31 -07:00
Daniel Jalkut
56b314f741 Fix documentation build (#9980)
* Fix a documentation build failure caused by missing _ underscore in footnote citation.

* Get archive/LangRef.html building again. I'm not sure this is the most desirable way to address the failure to locate archive/LangRef.html but I confirmed this causes the desired _build/html/archive/LangRef.html to be created when making docs.
2017-05-30 10:50:03 -07:00
Erik Eckstein
d342041420 Mangling: use ‘Tm’ mangling for merged functions
Previously merged functions just got the name with a “_merged” suffix
2017-05-24 17:00:16 -07:00
Andrew Trick
df6e927147 Documentation: move the @_specialize discussion into
proposals/UnsupportedOptimizationAttributes.rst.
2017-05-19 12:59:49 -07:00
Andrew Trick
2e8645ed30 Fixed a typo in SIL.rst. 2017-05-16 10:50:35 -07:00
Joe Shajrawi
0d0cac357a retain_value_addr and release_value_addr SIL instructions: take as an input an address, load the value inside it and call retain_value and release_value respectively 2017-04-30 10:23:55 -07:00
Joe Shajrawi
d17258cac7 @in_constant calling convention - part of passing large loadable types by address 2017-04-30 10:13:02 -07:00
mishal_shah
02b1c99dc2 [Docs] Add source compatibility pull request testing info and fix table markdown 2017-04-24 17:33:12 -07:00
practicalswift
7eb7d5b109 [gardening] Fix 100 typos. 2017-04-18 17:01:42 +02:00
Jordan Rose
4e04061861 Merge pull request #8767 from jrose-apple/mangle-typealiases-better
Improve the mangling of USRs in several ways.
2017-04-17 13:32:24 -07:00
Jordan Rose
2d84981fc2 Improve the mangling of typealiases.
- Allow them to use substitutions.
- Consistently use 'a' as a mangling operator.
- For generic typealiases, include the alias as context for any generic
  parameters.

Typealiases don't show up in symbol names, which always refer to
canonical types, but they are mangled for debug info and for USRs
(unique identifiers used by SourceKit), so it's good to get this
right.
2017-04-17 11:31:15 -07:00
Michael Gottesman
e494e3fbfe [lexicon] Define irrefutable and refutable pattern in the Lexicon.
This term is used often times in SILGen/AST. This just defines the concept at a
high level in a centralized place.
2017-04-14 16:07:56 -07:00
Slava Pestov
0d0dc207c0 AST: Mangling for primitive AnyObject
A protocol composition with an explicit 'AnyObject' member is
now mangled as <protocol list> 'Xl'. For subclass existentials,
I changed the mangling from <protocol list> <class> 'XE' to
<protocol list> <class> 'Xl'.

Not used for anything just yet.
2017-04-13 21:17:07 -07:00
Slava Pestov
b5ae8c4de6 AST: Add mangling for class-constrained existentials 2017-04-12 00:07:29 -07:00
Ben Emdon
79675c76c0 Added end braces to code example 2017-04-04 22:46:42 -04:00
Erik Eckstein
9ce3df106e Add two new array semantics functions.
array.append_element(newElement: Element)
array.append_contentsOf(contentsOf newElements: S)

And allow early inlining of them.
Those functions will be needed to optimize Array.append(contentsOf)
2017-03-31 15:31:57 -07:00
Qasim Iqbal
577913a476 [docs][Android] Update location of Android NDK's libc++ and libgcc 2017-03-30 12:16:54 -07:00
Bob Wilson
2ee382efc3 Merge pull request #8330 from bob-wilson/abi-manifesto-jiras
Update the ABI Stability manifesto with more JIRA issue numbers.
2017-03-27 11:32:14 -07:00
swift-ci
41ab3fe1fc Merge pull request #8346 from eeckstein/vararg-mangling 2017-03-26 12:47:42 -07:00
John McCall
74a4310525 Merge pull request #8349 from rjmccall/begin_end_access
Add begin_access and end_access instructions.
2017-03-26 13:28:01 -04:00
John McCall
57ecaa7fae Add begin_access and end_access instructions.
NFC because we're not actually emitting them.
2017-03-26 04:37:05 -04:00
Slava Pestov
a3e6a39e39 ABI.rst: Update for new 'TV' mangling 2017-03-25 20:21:18 -07:00
Erik Eckstein
327017a65b Mangling: support mangling of varargs even if it's not the last argument.
Example:
func a(arr: Int..., n: String)

fixes SR-1076
2017-03-25 19:07:52 -07:00
Bob Wilson
b42872da57 Update the ABI Stability manifesto with more JIRA issue numbers.
I filed some additional JIRA issues to track tasks mentioned in the
ABI Stability manifesto. This change just updates the document with those
issue numbers.
2017-03-24 16:53:51 -07:00
Roman Levenstein
415736bd87 Merge pull request #8295 from swiftix/wip-gsb-layout-constrains-fixes
[mangling] Define a mangling for _Class and _NativeClass layout constraints
2017-03-23 08:47:16 -07:00
Hugh Bellamy
8671854674 Properly python lint remaining files 2017-03-23 14:06:46 +07:00