Commit Graph

1270 Commits

Author SHA1 Message Date
Joe Pamer
5894736321 Update ABI.rst to point out that mangled types may never begin with a 'z'.
Swift SVN r26774
2015-03-31 19:31:55 +00:00
Joe Pamer
eee40fc53f Add basic parsing, sema and mangling support for throwing function types. Next up, metadata and serialization support, as well as more tests.
Swift SVN r26767
2015-03-31 18:55:19 +00:00
Chris Lattner
379cae70d9 unbreak the dox build.
Swift SVN r26761
2015-03-31 16:40:43 +00:00
John McCall
6d8fff9c06 Parsing and basic structure of try_apply. Not yet properly
threaded into IRGen; tests to follow when that's done.

I made a preliminary effort to make the inliner do the
right thing with try_apply, but otherwise tried to avoid
touching the optimizer any more than was required by the
removal of ApplyInstBase.

Swift SVN r26747
2015-03-31 02:41:03 +00:00
Chris Lattner
209d9d6f5b fix the dox build.
Swift SVN r26623
2015-03-27 05:46:33 +00:00
John McCall
35b7db3ae1 Parsing support for error results from SILFunctionType.
Swift SVN r26566
2015-03-26 00:01:32 +00:00
Dmitri Hrybenko
6ad58cc52c SequencesAndCollections: add sections about mutable and range
replaceable collections

Also explain that MutableCollectionType can have an interesting
domain-specific order.

Swift SVN r26515
2015-03-25 02:21:48 +00:00
Joe Groff
7431234bd2 SIL.rst: trim
Swift SVN r26496
2015-03-24 19:41:59 +00:00
Dmitri Hrybenko
042dc8e69b StdlibRationales: provide better examples
Swift SVN r26474
2015-03-24 02:17:53 +00:00
Joe Groff
a5fb34fea1 SIL.rst: Hook up links to existential box insns.
Swift SVN r26468
2015-03-24 01:10:01 +00:00
Dmitri Hrybenko
cfc547c3ec docs: start a document with random advice about C interop tricks
Based on an email exchange with Mishal Awadah.

Swift SVN r26245
2015-03-18 03:02:19 +00:00
Michael Gottesman
3c2216b115 [+0 self] Add the deallocating parameter convention.
The deallocating parameter convention is a new convention put on a
non-trivial parameter if the caller function guarantees to the callee
that the parameter has the deallocating bit set in its object header.

This means that retains and releases do not need to be emitted on these
parameters even though they are non-trivial. This helps to solve a bug
in +0 self and makes it trivial for the optimizer to perform
optimizations based on this property.

It is not emitted yet by SILGen and will only be put on the self
argument of Deallocator functions.

Swift SVN r26179
2015-03-16 07:51:11 +00:00
Joe Groff
fdde2a8e99 SIL: Add instructions for boxed existential operations.
Parsing and serialization for {Alloc,Open,Dealloc}ExistentialBox instructions to represent operations on ErrorType boxes.

Swift SVN r26145
2015-03-15 03:32:37 +00:00
Joe Groff
daf3ec67de SIL.rst: Pre-document instructions for boxed existential containers.
Swift SVN r26085
2015-03-13 02:40:22 +00:00
Joe Groff
3d466312c9 SIL.rst: Add docs for existential metatype instructions.
Swift SVN r26083
2015-03-13 02:40:13 +00:00
Joe Groff
84e2d4e8ba SIL.rst: Add discussion of existential container representations.
And adjust the names of ExistentialRepresentation cases to match the existing nomenclature instead of needlessly inventing new names.

Swift SVN r26069
2015-03-12 22:26:00 +00:00
Chris Lattner
d55d2f052f fix build error in dox
Swift SVN r25912
2015-03-10 04:00:42 +00:00
Dmitri Hrybenko
484f71bd1d docs: add some FIXMEs to the document describing index invalidation rules
Swift SVN r25905
2015-03-10 00:04:06 +00:00
Joe Groff
962a87f444 SIL: Rename address-only existential instructions to '{init,deinit,open}_existential_addr'.
For better consistency with other address-only instruction variants, and to open the door to new exciting existential representations (such as a refcounted boxed representation for ErrorType).

Swift SVN r25902
2015-03-09 23:55:31 +00:00
Joe Groff
7b6c41055f Add mangling for C function pointer types.
Swift SVN r25498
2015-02-24 04:46:07 +00:00
John McCall
6f9334698f Add the second draft of the calling convention spec.
Basically the first draft that I sent to the list, plus
some editorial fixes, ReST fixes, and a new subsection
discussing default argument generation (credit to Joe
for this idea).

Swift SVN r25442
2015-02-20 23:34:23 +00:00
Dave Abrahams
c8ad2a54c8 SequencesAndCollections.rst final edits
Swift SVN r25343
2015-02-17 02:16:20 +00:00
Dave Abrahams
33c9457930 SequencesAndCollections.rst fix-ups
Long lines were getting cut off, and a sidebar was awkwardly placed

Swift SVN r25306
2015-02-15 23:15:10 +00:00
Dave Abrahams
1570364556 Update SequencesAndCollections.rst
Swift SVN r25305
2015-02-15 22:51:40 +00:00
Dave Abrahams
1171593974 Docs: Use a sans-serif font for code
This tends to improve readability and harmonizes better with the size of
regular text.

Swift SVN r25304
2015-02-15 22:51:39 +00:00
Dave Abrahams
8c04ba6166 Docs: switch links to a subtler color
Red hurts text readability when it occurs inline

Swift SVN r25303
2015-02-15 22:51:39 +00:00
Dave Abrahams
c7f8db13ac Docs: prevent highlights from overflowing boxes
Swift SVN r25302
2015-02-15 22:51:38 +00:00
Dave Abrahams
cb8397a2c6 Docs: Default to highlighting code as Swift
Swift SVN r25301
2015-02-15 22:51:37 +00:00
Nadav Rotem
7dae65c9fd Document the new whole-module-opt mode.
Swift SVN r25255
2015-02-12 22:43:32 +00:00
Dave Abrahams
8dab08e9c9 StdlibRationales: type conversion conventions
Swift SVN r25209
2015-02-12 00:20:28 +00:00
Dave Abrahams
5e6a75b806 [stdlib] Progress on SequencesAndCollections paper
Swift SVN r25164
2015-02-11 04:18:54 +00:00
Joe Groff
63463f54ac SIL: Mangle the static-ness of declarations.
This lets us disambiguate the symbols for static and instance properties, and enables us to eventually leave the useless "self" type mangling out of method symbols. Fixes rdar://19012022 and dupes thereof, including crasher #1341.

Swift SVN r25111
2015-02-10 02:37:35 +00:00
Dave Abrahams
a1cb0023d7 [stdlib] Begin SequencesAndCollections white paper
Swift SVN r25106
2015-02-10 00:46:29 +00:00
Dmitri Hrybenko
1952a103ef ClangImporter: import size_t as Int
Converging APIs to use ``Int`` as the default integer type allows users to
write fewer explicit type conversions.

Importing ``size_t`` as a signed ``Int`` type is not be a problem for 64-bit
platforms.  32-bit platforms are important, but the usecase for an
unsigned ``size_t`` on 32-bit platforms is pretty marginal, and for code
that nevertheless needs to do that there is always the option of doing a
bitcast to ``UInt`` or using C.

rdar://18949559

Swift SVN r25070
2015-02-07 10:39:00 +00:00
Dmitri Hrybenko
f15d27715d docs/StdlibRationales: this document collects rationales for the Swift
standard library.  It is not meant to document all possible designs that
we considered, but might describe some of those, when important to
explain the design that was chosen.

Swift SVN r25067
2015-02-07 04:28:36 +00:00
Joe Groff
a449948275 SILGen: Emit vtable thunks to handle optional variance.
If a subclass overrides methods with variance in the optionality of non-class-type members, emit a thunk to handle wrapping more optional parameters or results and force-unwrapping any IUO parameters made non-optional in the derived. For this to be useful, we need IRGen to finally pay attention to SILVTables, but this is a step on the way to fixing rdar://problem/19321484.

Swift SVN r24705
2015-01-24 05:21:26 +00:00
Michael Gottesman
f6d7033696 [opt-tips] Add a section that suggests using ContiguousArray with reference types when NSArray bridging is unnecessary.
Swift SVN r24680
2015-01-23 04:52:22 +00:00
Michael Gottesman
f874eec120 [opt-tips] Change 2x titles and remove a reference to ContiguousArray.
Swift SVN r24679
2015-01-23 04:50:43 +00:00
Nadav Rotem
902edf1c84 Change the recommendation to use Unmanaged<T>.
Swift SVN r24665
2015-01-23 00:37:47 +00:00
Nadav Rotem
435c4c8543 Describe the use of UnsafeMutablePointer for manual memory managment.
Swift SVN r24659
2015-01-22 22:59:38 +00:00
Michael Gottesman
93d4d9fdde More preliminary changes to address Dave's advice.
Swift SVN r24635
2015-01-22 10:24:04 +00:00
Michael Gottesman
a619610cb5 Incorporate preliminary feedback from Dave.
Swift SVN r24615
2015-01-21 22:47:39 +00:00
Jordan Rose
eb433e9d55 [docs] Reflow PersistentSerialization.rst to be 80-column-compliant.
Swift SVN r24605
2015-01-21 19:46:12 +00:00
Michael Gottesman
e660c7b7f1 Add in :orhpan: to the top of OptimizationTips.rst to quiet rest warnings.
Swift SVN r24584
2015-01-21 02:30:01 +00:00
Michael Gottesman
02b578b9ab Add OptimizationTips.rst, some tips for writing high performance swift code.
Swift SVN r24579
2015-01-21 00:17:36 +00:00
Jordan Rose
709022e0c5 [docs] Start describing a hypothetical persistable module format.
The current serialization format has bits of groundwork for this, but
not a coherent implementation that's really close to being future-proof
and forward-compatible. We will eventually need this as part of being
able to ship compiled frameworks to people.

It is worth the time to get this out of my head and into a proper document.
I'll continue adding information later.

Swift SVN r24572
2015-01-20 23:04:19 +00:00
Michael Gottesman
c4e6fb5f5f [demangler] Teach the remangler how to handle funcsig nodes and print out values when performing string demangling.
Swift SVN r24507
2015-01-19 09:53:12 +00:00
Joe Groff
42d94be16a Update Inplace.rst proposal as accepted by language review.
Swift SVN r24486
2015-01-16 23:27:33 +00:00
Nadav Rotem
a225e98076 Update the docs for the new stdlib_binary_only name.
Swift SVN r24451
2015-01-15 19:05:24 +00:00
Nadav Rotem
290b587f09 Docs: mention that the new annotation is related to the resilient proposal.
Swift SVN r24448
2015-01-15 19:05:09 +00:00