Commit Graph

4421 Commits

Author SHA1 Message Date
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
Emanuel Zephir
38c755547b [SIL] Update integer_literal formatting in docs
Fixes the formatting for integer_literal in the documentation so that it
conforms with the SIL grammar.
2015-12-31 13:26:13 -08:00
Nadav Rotem
41148a71d7 [Mangling] Add a document that describes the proposed compressed mangling scheme. 2015-12-31 09:11:32 -08:00
John McCall
8f30faa4c1 Include access functions for the metadata and witness tables
of associated types in protocol witness tables.

We use the global access functions when the result isn't
dependent, and a simple accessor when the result can be cheaply
recovered from the conforming metadata.  Otherwise, we add a
cache slot to a private section of the witness table, forcing
an instantiation per conformance.  Like generic type metadata,
concrete instantiations of generic conformances are memoized.

There's a fair amount of code in this patch that can't be
dynamically tested at the moment because of the widespread
reliance on recursive expansion of archetypes / dependent
types.  That's something we're now theoretically in a position
to change, and as we do so, we'll test more of this code.

This speculatively re-applies 7576a91009,
i.e. reverts commit 11ab3d537f.
We have not been able to duplicate the build failure in
independent testing; it might have been spurious or unrelated.
2015-12-29 12:14:40 -08:00
practicalswift
07f57246ee Fix documentation typos. 2015-12-28 01:50:14 +01:00
Brian Gesiak
0ede0c4bcd [test] Run Python unit tests in validation tests
This repository includes several Python modules, each with unit tests.
Add a step to the validation tests to ensure these tests pass.
2015-12-27 01:57:33 -05:00
Chris Lattner
bee0d955ff Merge pull request #784 from practicalswift/a-vs-an-again
Fix typos: "a" vs. "an"
2015-12-26 17:45:36 -08:00
Joe Groff
9d58f21371 Runtime.md: TODO note to add getExistentialMetadata[n] entry points. 2015-12-26 15:19:07 -08:00
practicalswift
fa0b339a21 Fix typos. 2015-12-26 17:51:59 +01:00
Dmitri Gribenko
f0053a0839 Merge pull request #782 from practicalswift/a-handful-more-typos
Fix typos
2015-12-26 14:16:49 +01:00
practicalswift
db13bcb22e Fix typos. 2015-12-26 14:11:42 +01:00
practicalswift
ce760cff66 Fix typos. 2015-12-26 12:43:52 +01:00
Dmitri Gribenko
11ab3d537f Revert "Include access functions for the metadata and witness tables"
This reverts commit 7576a91009.
It broke the testsuite for swift-corelibs-foundation.
2015-12-25 19:17:50 +02:00
John McCall
7576a91009 Include access functions for the metadata and witness tables
of associated types in protocol witness tables.

We use the global access functions when the result isn't
dependent, and a simple accessor when the result can be cheaply
recovered from the conforming metadata.  Otherwise, we add a
cache slot to a private section of the witness table, forcing
an instantiation per conformance.  Like generic type metadata,
concrete instantiations of generic conformances are memoized.

There's a fair amount of code in this patch that can't be
dynamically tested at the moment because of the widespread
reliance on recursive expansion of archetypes / dependent
types.  That's something we're now theoretically in a position
to change, and as we do so, we'll test more of this code.

This reverts commit 6528ec2887, i.e.
it reapplies b1e3120a28, with a fix
to unbreak release builds.
2015-12-24 20:21:17 -08:00
Dmitri Gribenko
bde439cb28 Merge pull request #562 from thel3l/patch-2
Slight grammatical improvement.
2015-12-24 18:02:02 -08:00
Joe Groff
2201c99a32 IRGen/Runtime: Open-code respondsToSelector: checks for AnyObject lookup.
Emit the respondsToSelector: msgSend inline instead of relying on a runtime call.
2015-12-24 09:00:43 -08:00
Joe Groff
9af439b87e Runtime: Rename reportMissingMethod to deletedMethodError.
The runtime entry doesn't just report the error, unlike the other report* functions, it also does the crashing.

Reapplying independent of unrelated reverted patches.
2015-12-23 16:01:21 -08:00
Sean Callanan
6528ec2887 Revert "Include access functions for the metadata and witness tables"
This reverts commit b1e3120a28.

Reverting because this patch uses WitnessTableBuilder::PI in NDEBUG code.
That field only exists when NDEBUG is not defined, but now NextCacheIndex, a
field that exists regardless, is being updated based on information from PI.

This problem means that Release builds do not work.
2015-12-23 15:42:10 -08:00
Sean Callanan
09f48ee2b4 Revert "Runtime: Rename reportMissingMethod to deletedMethodError."
This reverts commit bdffe703b0.
Required to revert b1e3120a28.
2015-12-23 15:41:06 -08:00
Joe Groff
d366089df7 Runtime: Change getInstancePositiveExtents methods to return both extents.
A bit of future-proofing, since we plan to be able to grow class instances in both directions relative to their object header.
2015-12-23 15:39:53 -08:00
Joe Groff
583f5bdb6f Runtime: Rename class property lookup functions with consistent naming scheme.
Getting a superclass, instance extents, and whether a class is native-refcounted are all useful type API. De-underscore these functions and give them a consistent `swift[_objc]_class*` naming scheme.
2015-12-23 15:04:27 -08:00
Joe Groff
fe4782ef05 Runtime: Rename swift_isClassOrObjCExistential to -Type.
To conform with the other 'is*Type' queries.
2015-12-23 13:34:47 -08:00
Joe Groff
8edde2c503 Runtime: Push swift_demangleSimpleClass into XCTest overlay.
The only place it's used.
2015-12-23 11:19:42 -08:00
Dmitri Gribenko
3877d04a73 Merge pull request #731 from ken0nek/add-spaces-before-and-after-arrow
Add spaces before and after closure arrow
2015-12-23 10:53:22 -08:00
Max Moiseev
200be71583 Merge remote-tracking branch 'origin' into swift-3-api-guidelines 2015-12-23 10:28:04 -08:00
Joe Groff
ff74e8e81c Runtime.md: Rearrange some type-related deckchairs 2015-12-23 09:17:09 -08:00
Joe Groff
359e18f54f Runtime: Internalize 'usesNativeSwiftReferenceCounting_nonnull' check.
It's used as a helper by some other entry points, but isn't used outside the runtime.
2015-12-23 09:17:09 -08:00
Joe Groff
eb12224e09 Runtime.md: Stub out a section for exported standard metadata objects. 2015-12-23 09:17:08 -08:00
Joe Groff
4b461684e3 Remove unused _swift_isClass function. 2015-12-23 09:17:08 -08:00
Joe Groff
bdffe703b0 Runtime: Rename reportMissingMethod to deletedMethodError.
The runtime entry doesn't just report the error, unlike the other report* functions, it also does the crashing.
2015-12-23 09:17:07 -08:00
John McCall
b1e3120a28 Include access functions for the metadata and witness tables
of associated types in protocol witness tables.

We use the global access functions when the result isn't
dependent, and a simple accessor when the result can be cheaply
recovered from the conforming metadata.  Otherwise, we add a
cache slot to a private section of the witness table, forcing
an instantiation per conformance.  Like generic type metadata,
concrete instantiations of generic conformances are memoized.

There's a fair amount of code in this patch that can't be
dynamically tested at the moment because of the widespread
reliance on recursive expansion of archetypes / dependent
types.  That's something we're now theoretically in a position
to change, and as we do so, we'll test more of this code.
2015-12-23 00:37:24 -08:00
Ken Tominaga
1cc91b59dd Reformat comments in docs/proposals/valref.rst 2015-12-23 13:43:12 +09:00
Slava Pestov
36ddea64ae Merge pull request #729 from ken0nek/fix-can-not
Convert [Cc]an not -> [Cc]annot
2015-12-22 16:06:20 -08:00
Joe Groff
d3cba67344 Runtime: Move assert implementation details to stdlib.
Many of the report* entry points are specific to the stdlib assert implementation, so belong in the stdlib. Keep a single `reportError` entry point in the runtime to handle the CrashReporter/ASL interface, and call down to it from the assert implementation functions.
2015-12-22 15:54:42 -08:00
Joe Groff
e1589a0a3a Runtime: Implement convertNSErrorToErrorType and v.v. in Swift.
These are compiler hooks that belong in the Foundation overlay; they don't need to be in the core runtime.
2015-12-22 14:41:23 -08:00
Joe Groff
4b7ed84c42 Revert "Runtime: Remove retainCount entry points."
This reverts 51e0594e1c. The corelibs are using this entry point.
2015-12-22 13:06:42 -08:00
ken0nek
50c88b9d15 Add spaces before and after closure arrow in docs 2015-12-23 05:04:58 +09:00
Joe Groff
51e0594e1c Runtime: Remove retainCount entry points.
They're only used for testing and ObjC interop, so don't need to be exported from the runtime.
2015-12-22 11:51:59 -08:00
Max Moiseev
a7339e67ac Merge remote-tracking branch 'origin' into swift-3-api-guidelines 2015-12-22 11:36:07 -08:00
Michael Gottesman
2e1604591a Merge pull request #716 from ezephir/sil-docs-misc-updates
[SIL] Miscellaneous documentation fixes & updates
2015-12-22 13:29:32 -06:00
Joe Groff
0cd2cbb9b0 Merge pull request #717 from ezephir/sil-docs-apply-fix
[SIL] Update generic apply and partial_apply docs
2015-12-22 11:13:31 -08:00
Joe Groff
920103112c Runtime.md: Finish bucketing entry points. 2015-12-22 09:43:45 -08:00
ken0nek
fcd8fcee91 Convert [Cc]an not -> [Cc]annot 2015-12-23 00:55:48 +09:00
Dmitri Gribenko
c0b4ef6ba3 Merge pull request #709 from wpegg-dev/patch-1
Corrected typos
2015-12-21 22:53:33 -08:00
Dmitri Gribenko
57e2187178 Merge pull request #710 from wpegg-dev/patch-2
Corrected typo
2015-12-21 22:52:44 -08:00
Emanuel Zephir
c20f6a58ad [SIL] Documentation fixes
The following changes remove obsolete constructs:
ObjectPointer becomes NativeObject
ObjcPointer becomes UnknownObject
SomeType.metatype becomes SomeType.Type

Additionally, all enumerator element references in example code have been
updated to use the  'enumelt' sub-reference.
2015-12-21 18:08:19 -08:00
Joe Groff
dd39a66b91 Runtime.md: Clarify purpose as suggested by @jrose-apple.
And take a first pass at categorization.
2015-12-21 18:06:18 -08:00
Emanuel Zephir
586a66c243 [SIL] Update generic apply and partial_apply docs
Updates the documentation for the generic versions of apply and partial_apply.
These functions take a simple list of types to substitute instead of the
A = T syntax previously listed in the documentation.
2015-12-21 15:54:36 -08:00
Chris Lattner
7280506e18 Merge pull request #715 from practicalswift/word-word-fixes
[Typo] Remove immediately adjacent repeated words ("the the", "for for", "an an", etc.).
2015-12-21 13:17:16 -08:00