Commit Graph

1441 Commits

Author SHA1 Message Date
Dmitri Gribenko
4f8773f40e Add a test feature 'swift_ast_verifier' 2015-11-30 21:07:13 -07:00
Slava Pestov
2194aa59c4 ABI.rst: Document enum reflection metadata 2015-11-30 13:32:55 -08:00
Nadav Rotem
68aa44b30c Add a document that describes the design of the Swift Optimizer. 2015-11-29 23:08:45 -08:00
Ted Kremenek
4c12a1278a Bump Swift version to '2.2'. 2015-11-17 22:19:33 -08:00
Jordan Rose
cf8baedee2 Re-apply "Rename @transparent to @_transparent for now."
This re-applies 90fcbfe9a6. I'll be committing
the corresponding change to Foundation momentarily.
2015-11-16 10:53:56 -08:00
Xin Tong
16843684b2 Revert "Rename @transparent to @_transparent for now."
This reverts commit 90fcbfe9a6.

Seems there are still some tests that are left not modified.
2015-11-14 07:04:31 -08:00
Jordan Rose
90fcbfe9a6 Rename @transparent to @_transparent for now.
This feature has not been fully designed, let alone properly implemented.
For more information, see docs/TransparentAttr.rst.
2015-11-13 16:25:34 -08:00
Nadav Rotem
78ee82d4cc Replace the single backtick with a double backtick to fix the linux build. 2015-11-09 22:17:17 -08:00
Nadav Rotem
6b85ada71e [optimization guide] Add a disclaimer about the advice given in this document 2015-11-09 17:09:06 -08:00
Xi Ge
885850396e [Docs] Use double quote to avoid doc build errors. 2015-11-09 16:36:25 -08:00
Nadav Rotem
04cfc9264b [optimization guide] Describe the disadvantages of using Array and propose an alternative cow data structure. 2015-11-08 15:56:12 -08:00
Michael Gottesman
043fd75e4e Fix header line in OptimizationTips.rst that was too long for the heading above it. 2015-11-08 00:20:19 -06:00
Nadav Rotem
751b261c77 [optimization guide] Advice: Mark protocols that are only satisfied by classes as class-protocols 2015-11-07 21:57:50 -08:00
Dave Abrahams
9035291301 Fix a ReST formatting error 2015-11-06 21:10:42 -08:00
Nadav Rotem
debc8f4aa1 [optimization guide] Describe the cost of passing large values. 2015-11-06 16:04:21 -08:00
Jordan Rose
e3e618399e [CMake] Drop the contents of the "lang-docs" install package.
I didn't remove the package itself because I'm not sure what that would do,
but none of the content we were publishing is worth shipping at this point.
(And not all of it is public.)
2015-11-05 20:29:12 -08:00
Xi Ge
5c99ce0498 [cmake] Correct some paths. 2015-11-05 18:38:58 -08:00
Jordan Rose
42a466b299 [docs] Delete proposal for KVO-supporting features.
While this remains interesting for Swift, any KVO-supporting changes would
need a fair amount of Apple-internal discussion that isn't really suited
for open source at this time.
2015-11-05 08:54:23 -08:00
Jordan Rose
fe9143f50c [docs] Delete superseded proposals. 2015-11-05 08:54:23 -08:00
Jordan Rose
e038079c69 [docs] Promote Failable Initializers out of proposals/ as Plan of Record. 2015-11-05 08:52:52 -08:00
Jordan Rose
8c62851c66 [docs] Demote several proposals to archive/. 2015-11-05 08:52:52 -08:00
Jordan Rose
6cdeb226dc [docs] Make a new subfolder for rejected proposals. 2015-11-05 08:52:52 -08:00
Jordan Rose
9f9780c6e6 [docs] Delete several docs that don't even really have historical interest.
...and that do not describe or even actively contradict the way things are
today.

A few of these aren't quite so problematic, but simply have no owner or no
significant content. I'm happy to resurrect any that may still be useful.
2015-11-05 08:52:51 -08:00
Jordan Rose
de15f8a3b5 [docs] Move several historical-interest-only docs to an archive/ subfolder. 2015-11-05 08:52:51 -08:00
David Farler
2d1fdc8c6d Convert DocumentationComments doc to Markdown 2015-11-03 23:28:38 -08:00
Michael Gottesman
583d202795 Create the GitWorkflows document.
This document describes the current git workflow that is meant to be used when
developing for the swift project.

At some point in the future, we may discuss changing from this rebase based
workflow to a merge based workflow.
2015-11-03 17:01:12 -08:00
Jordan Rose
3ec168c26e [docs] Clean up (historical) Modules.rst a bit. 2015-11-02 17:49:18 -08:00
Jordan Rose
51e33581d0 [docs] Rewrite PersistentSerialization to describe the current situation.
We're leaning away from using the current serialization scheme as the
format for persistent interfaces, so just make this a reference for the
Serialization library.
2015-11-02 17:49:14 -08:00
Jordan Rose
d5c6d0d6cf [docs] Mark a bunch of older docs as out of date and not plan-of-record.
More doc changes to come.
2015-11-02 17:49:02 -08:00
David Farler
e2734bd92f Add missing docs/Testing.rst
rdar://problem/23359113
2015-11-02 13:54:34 -08:00
Joe Groff
8146a97519 Remove stale proposals
Swift SVN r32955
2015-10-28 23:47:44 +00:00
Erik Eckstein
ee988e21cb SIL: Add stack attributes to alloc_ref and dealloc_ref.
For details see docs/SIL.rst.
This is needed for the stack promotion optimization.



Swift SVN r32908
2015-10-27 15:29:20 +00:00
Joe Groff
2368ce774b Remove self types from mangling by default.
And include some supplementary mangling changes:

- Give the first generic param (depth=0, index=0) a single character mangling. Even after removing the self type from method declaration types, 'Self' still shows up very frequently in protocol requirement signatures.
- Fix the mangling of generic parameter counts to elide the count when there's only one parameter at the starting depth of the mangling.

Together these carve another 154KB out of a debug standard library. There's some awkwardness in demangled strings that I'll clean up in subsequent commits; since decl types now only mangle the number of generic params at their own depth, it's context-dependent what depths those represent, which we get wrong now. Currying markers are also wrong, but since free function currying is going away, we can mangle the partial application thunks in different ways.

Swift SVN r32896
2015-10-26 22:05:20 +00:00
Erik Eckstein
e5f6eb3671 Add a convenience function hasName in SILFunction to be used in the debugger.
This is a replacement for getName().equals("..."), which is no longer callable from the debugger with the latest llvm changes.



Swift SVN r32895
2015-10-26 21:52:37 +00:00
Joe Groff
7e119d0d53 Optimize the mangling of associated types in generic signatures.
Canonical dependent member types are always based from a generic parameter, so we can use a more optimal mangling that assumes this. We can also introduce substitutions for AssociatedTypeDecls, and when a generic parameter in a signature is constrained by a single protocol, we can leave that protocol qualification out of the unsubstituted associated type mangling. These optimizations together shrink the standard library by 117KB, and bring the length of the longest Swift symbol in the stdlib down from 578 to 334 characters, shorter than the longest C++ symbol in the stdlib.

Swift SVN r32786
2015-10-20 17:52:07 +00:00
Joe Groff
b77ea5e5ae Mangle the generic signature of a constrained extension after the containing module.
A microoptimization; since the module is likely to come up often in the subsequent mangling, we want to make it more likely to get the coveted S_ substitution.

Swift SVN r32784
2015-10-20 17:51:51 +00:00
Nadav Rotem
9cff4a3808 Add a note to the optimization guide about the trick to enable generic specialization.
Inserting a runtime typecheck can allow the generic specializer to operate across module boundary.

Swift SVN r32773
2015-10-20 15:07:19 +00:00
Arnold Schwaighofer
4e855add17 Add a motivation section to the Swift level attributes proposal and remove the
old low-level attributes proposal.

Swift SVN r32679
2015-10-14 13:54:11 +00:00
Slava Pestov
7cc59e01d7 SIL: Add DeallocPartialRefInst
This instruction destroys instance variables in a partially-initialized
object, then frees it.

Swift SVN r32661
2015-10-13 19:56:20 +00:00
Andrew Trick
39acb24c1d Effects doc, minor spelling typos.
Swift SVN r32647
2015-10-13 01:18:54 +00:00
Erik Eckstein
3d08ee0e67 OptimizerEffects proposal: Add some thoughts on pure value types.
Swift SVN r32632
2015-10-12 19:25:30 +00:00
Joe Groff
42c71b7972 Don't mangle directness into type metadata symbols.
Anywhere we can't directly address type metadata in Swift, we've found we need a function call. Directness isn't useful here.

Swift SVN r32626
2015-10-12 17:22:40 +00:00
Arnold Schwaighofer
a1f4abeb99 Add a Swift-level CoW attributes proposal
Swift SVN r32623
2015-10-12 00:59:45 +00:00
Slava Pestov
090d723763 SIL: Remove null_class instruction
Swift SVN r32605
2015-10-11 02:11:22 +00:00
Andrew Trick
c20370a664 Remove the last remnants of unchecked_ref_bit_cast
Swift SVN r32598
2015-10-10 05:42:57 +00:00
Andrew Trick
665e5169d5 Add unchecked_ref_cast_addr SIL instruction.
Swift SVN r32587
2015-10-10 03:39:32 +00:00
Andrew Trick
98069493aa OptimizerEffects. Add a little note.
Swift SVN r32586
2015-10-10 03:39:26 +00:00
John McCall
76e324a950 Refactors leading towards the use of protocol witness table access functions.
This re-applies r32541 with a few changes to the demangling logic and associated test fixes.

Swift SVN r32553
2015-10-09 05:49:18 +00:00
Erik Eckstein
19bb23a63f Revert r32541 "Refactors leading towards the use of protocol witness table access functions."
It broke the build: 2 demangle tests failed.




Swift SVN r32552
2015-10-09 04:42:19 +00:00
John McCall
9af9b9914d Refactors leading towards the use of protocol witness table
access functions.  NFC for now.

Swift SVN r32541
2015-10-09 01:06:06 +00:00