Commit Graph

442 Commits

Author SHA1 Message Date
Maxim Moiseev
6c50752aed UnsafePointer: initializeMemory and deinitializePointee 2015-12-16 17:11:57 -08:00
Maxim Moiseev
0e54467bfa Final bulk removal of Type suffix 2015-12-16 17:06:19 -08:00
Maxim Moiseev
ca932fca5a CVarArgType => CVarArg 2015-12-16 15:52:01 -08:00
Dmitri Gribenko
3d0ad16094 Unsafe[Mutable]Pointer.memory => .pointee 2015-12-16 15:50:31 -08:00
Dmitri Gribenko
b2afeb9a47 Remove the no-argument initializer, following the pattern set by unsafe pointers 2015-12-16 15:30:40 -08:00
Max Moiseev
fca25fbeb9 Comment improvements and test fixes 2015-12-16 15:29:52 -08:00
Dmitri Gribenko
339c7a99dc Remove no-argument initializers from unsafe pointer types
The preferred way to create a nil pointer is to use the 'nil' literal.

Affected types:
AutoreleasingUnsafeMutablePointer
OpaquePointer
UnsafeMutablePointer
UnsafePointer
2015-12-16 14:59:50 -08:00
Doug Gregor
2f5f94a12c Merge remote-tracking branch 'origin/swift-3-api-guidelines' into swift-3-omit-needless-words 2015-12-15 17:11:37 -08:00
Daniel Duan
ebb0c3a204 replaced single-line ++/-- with +=/-= 2015-12-15 09:05:37 -08:00
Max Moiseev
806be29941 Merge remote-tracking branch 'origin' into swift-3-api-guidelines 2015-12-14 12:05:35 -08:00
Dmitri Gribenko
306c586f0a Merge pull request #413 from billabt/fcntl-extension
Implementation of fcntl() to both Darwin and Glibc overlays.  Ported …
2015-12-11 21:25:11 -08:00
Max Moiseev
786e1ea2b1 Merge remote-tracking branch 'origin' into swift-3-api-guidelines 2015-12-11 15:19:02 -08:00
Doug Gregor
06c5e9cd5b Enable "omit needless words" by default.
Most of this is in updating the standard library, SDK overlays, and
piles of test cases to use the new names. No surprises here, although
this shows us some potential heuristic tweaks.

There is one substantive compiler change that needs to be factored out
involving synthesizing calls to copyWithZone()/copy(zone:). Aside from
that, there are four failing tests:

    Swift :: ClangModules/objc_parse.swift
    Swift :: Interpreter/SDK/Foundation_test.swift
    Swift :: Interpreter/SDK/archiving_generic_swift_class.swift
    Swift :: Interpreter/SDK/objc_currying.swift

due to two independent remaining compiler bugs:
  * We're not getting partial ordering between NSCoder's
  encode(AnyObject, forKey: String) and NSKeyedArchiver's version of
  that method, and
  * Dynamic lookup (into AnyObject) doesn't know how to find the new
  names. We need the Swift name lookup tables enabled to address this.
2015-12-11 14:46:50 -08:00
Bill Abt
661e1035cb Minor formatting changes to conform to conventions. 2015-12-11 09:47:09 -05:00
Bill Abt
9c4f47ac9b Implementation of fcntl() to both Darwin and Glibc overlays. Ported open(), openat() and sem_open() from Darwin to Glibc. Added tests for new fcntl functionality. 2015-12-10 21:33:20 -05:00
hvy
4a7a5d4335 fixed typo 2015-12-11 11:09:45 +09:00
Maxim Moiseev
50fba4b770 floating point types renamed 2015-12-10 17:05:11 -08:00
Maxim Moiseev
1b6244f3ee integer types renamed 2015-12-10 17:03:40 -08:00
Maxim Moiseev
35c468ed6b BooleanType => Boolean 2015-12-10 14:58:35 -08:00
Maxim Moiseev
2c95bb6d51 BooleanType => Boolean 2015-12-10 14:56:32 -08:00
Maxim Moiseev
844b81c46b SequenceType => Sequence 2015-12-09 17:16:56 -08:00
Maxim Moiseev
c678a839dc IndexType => Index 2015-12-09 17:16:42 -08:00
Maxim Moiseev
7e2466c14e CollectionType => Collection 2015-12-09 17:12:48 -08:00
Dmitri Gribenko
feacbc4433 Rename ErrorType to ErrorProtocol 2015-12-09 17:12:19 -08:00
Dmitri Gribenko
1c0047829a Rename SequenceType.generate() to SequenceType.iterator() 2015-12-09 17:11:17 -08:00
Dmitri Gribenko
2cf172160c Rename SequenceType.Generator associated type to SequenceType.Iterator 2015-12-09 17:11:05 -08:00
Dmitri Gribenko
31598d41bf Rename GeneratorType to IteratorProtocol 2015-12-07 17:08:32 -08:00
Maxim Moiseev
7372e9e045 COpaquePointer => OpaquePointer 2015-12-07 16:52:45 -08:00
Max Moiseev
d0e1cb3a0e Merge remote-tracking branch 'origin/master' into swift-3-api-guidelines 2015-12-07 16:43:20 -08:00
Nick van der Ploeg
42b4b02df3 Fixed typos in comments throughout the project. 2015-12-07 12:15:52 -06:00
Dmitri Gribenko
f47f206ca0 Merge pull request #164 from jawwad/remove-trailing-semicolons-from-stdlib
Remove trailing semicolons from files in stdlib
2015-12-05 01:28:37 -08:00
ken0nek
ae7b5b62f4 Format code 2015-12-05 10:02:58 +09:00
ken0nek
2735dc32f7 Remove whitespaces 2015-12-05 00:07:27 +09:00
Nadav Rotem
88de1ee150 Merge pull request #171 from ken0nek/master
Add whitespaces.
2015-12-04 06:41:44 -08:00
Ge Sen
7c3abdf974 Add whitespaces and erase redundant whitespaces. 2015-12-04 22:04:28 +08:00
ken0nek
68a59a0258 Add whitespaces 2015-12-04 21:04:01 +09:00
Jawwad Ahmad
8f6f5ab0dd [stdlib] Remove trailing semicolons from files in stdlib 2015-12-04 15:50:13 +05:00
ken0nek
2218e433b4 Add whitespaces after comma and remove redundant whitespaces.
Manage whitespaces

Remove unrelated line

Fix

Fix again
2015-12-04 15:36:34 +09:00
Dmitri Gribenko
174d475833 stdlib: Remove unavavailable APIs that were left as migration aids
These APIs are from the Swift 1.2 => Swift 2.0 transition, and are not
relevant anymore.

Removing them reduces the surface area of the library that needs to be
reviewed.
2015-12-02 01:19:50 -08:00
Dmitri Gribenko
047e4002af stdlib: Fix coding style 2015-12-01 18:32:50 -08:00
Andrew Trick
b3604aaa83 Remove the fake _CocoaStringType protocol, NFC.
Adding a conformance to Foundation doesn't work because NSString can
be used without loading Foundation. debugDescription is one example of
this.

The only value we derive from the _CocoaStringType is its name, which
makes some APIs more readable. Adding a type safe wrapper around it
serves no purpose since we're almost always immediately casting back
and forth from an 'id'. This was previously done with unsafeBitCast,
which should be avoided unless we really need to reinterpret a bit
pattern.
2015-11-18 18:40:45 -08:00
Joe Groff
fbd2e4d872 Rename @asmname to @_silgen_name.
This reflects the fact that the attribute's only for compiler-internal use, and isn't really equivalent to C's asm attribute, since it doesn't change the calling convention to be C-compatible.
2015-11-17 14:13:48 -08:00
Enrico Granata
868035b7c8 Fix an issue where the PlaygroundQuickLook for an NSRange would cause a crash for certain values
rdar://problem/23153462
2015-11-16 13:26:44 -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
bdc42e71d9 Revert several commits working around the autolinking breakage.
Swift was failing to autolink frameworks in the new text-based SDKs.
Clang r253060 fixes the underlying issue, so we can go back to relying
on autolinking for these.

This reverts the following commits (newest to oldest):
f658841
59092a3
7ea9d54
e52ef22

rdar://problem/23511008
2015-11-13 20:21:04 -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
Michael Gottesman
e52ef2278c Try to fix the oss bots by including CoreGraphics for UIKit overlay. 2015-11-12 09:57:27 -08:00
David Farler
8f2fbdc93a Make function parameters and refutable patterns always immutable
All refutable patterns and function parameters marked with 'var'
is now an error.

- Using explicit 'let' keyword on function parameters causes a warning.
- Don't suggest making function parameters mutable
- Remove uses in the standard library
- Update tests

rdar://problem/23378003
2015-11-09 16:56:13 -08:00
Slava Pestov
3e7d63085c Revert "Build the Dispatch overlay on Linux"
This broke the build with a dependency issue.

This reverts commit ac6de62b66.
2015-11-05 14:36:40 -08:00