Commit Graph

31 Commits

Author SHA1 Message Date
Dmitri Hrybenko
6670bb76ec Rewrite the CMake build system
Swift SVN r24124
2014-12-23 22:15:30 +00:00
Dave Abrahams
dbde275230 [stdlib] Propagate Reflectable docs
230 undocumented public non-operator APIs remain in core

Swift SVN r22236
2014-09-23 23:08:43 +00:00
Enrico Granata
b3f6219ebe Add a very rough mutual exclusion mechanism to prevent a UIView from trying to provide its QuickLook object recursively. The same logic used for NSView is also used here basically verbatim. This is because in playgrounds, you can get a view to log itself as part of its drawRect method due to the way we defined our instrumentation. This very simple mechanism only works because drawing can only happen on the main thread - otherwise, we'd need something smarter than an NSSet of UIView pointers. Fixes rdar://17895769
Swift SVN r21444
2014-08-25 21:11:18 +00:00
Greg Parker
5a71cacec3 Remove nib-lookup hacks from UIViewController. Fixes rdar://17327189.
Swift SVN r21183
2014-08-13 20:57:55 +00:00
Dmitri Hrybenko
56473c34cd stdlib: change out-of-bounds subscripting traps on mirrors to be
_preconditionFailure()s.  Some of these checks are clearly redundant (for
example, the check of array subscript), but since we have no tests for
these traps (and reflection is not fast in general), I prefer to keep this
transformation as straightforward as possible.


Swift SVN r20971
2014-08-03 18:42:53 +00:00
Dmitri Hrybenko
5746e4e9ca stdlib: rename _fatalError to _sanityCheckFailure. Name similarity between
fatalError and _fatalError has caused some damage already, as some
memory-safety checks in Mirrors are _fatalErrors.


Swift SVN r20969
2014-08-03 15:20:37 +00:00
Doug Gregor
c2b5703865 API notes: rework CMake support so that we can separate the API notes sources.
Move all of the information about API notes into the "apinotes"
subdirectory, which specifies the API notes that it provides. The
organization is such that "apinotes" can become its own separate
repository, and the compiler build will pick up those API notes that
are available and build them along with the overlays.

Swift SVN r20406
2014-07-23 16:09:49 +00:00
Doug Gregor
716d548806 Start generating .apinotes files for each of the frameworks that have them.
.apinotes files provide API annotations alongside the Swift overlays
for Objective-C modules, and will be handled by the Clang
importer. Start generating these files from the current in-compiler
source (KnownObjCMethods.def).

The eventual goal is to switch from KnownObjCMethods.def to the
currently-being-defined textual format for API notes, and to replace
the silly swift-ide-test invocations with a Swift driver mode.


Swift SVN r20085
2014-07-17 14:34:20 +00:00
Doug Gregor
71cd9245ba Rename swift_stdlib_core -> swiftCore and swift_runtime -> swiftRuntime.
We can't use underscores in plists, so just makes the names consistent
<rdar://problem/17652418>.

Swift SVN r19954
2014-07-14 22:19:03 +00:00
Dave Abrahams
6d1095f44e Protocol names end in "Type," "ible," or "able"
Mechanically add "Type" to the end of any protocol names that don't end
in "Type," "ible," or "able."  Also, drop "Type" from the end of any
associated type names, except for those of the *LiteralConvertible
protocols.

There are obvious improvements to make in some of these names, which can
be handled with separate commits.

Fixes <rdar://problem/17165920> Protocols `Integer` etc should get
uglier names.

Swift SVN r19883
2014-07-12 17:29:57 +00:00
Jordan Rose
da29f099f0 Update stdlib for accessibility modifiers becoming context-sensitive keywords.
Swift SVN r19672
2014-07-08 02:17:46 +00:00
Joe Groff
1a332dbc80 Remove the UIKit overlay for UIApplicationMain.
UIApplicationMain now naturally gets imported with the correct argv type.

Swift SVN r19481
2014-07-02 20:53:10 +00:00
Doug Gregor
a5bde4e3a4 CMake: Add COMPILE_FLAGS support for add_swift_library.
COMPILE_FLAGS is currently used for two purposes:
  - For any target library, add the appropriate Swift optimization flags. This eliminates the add_swift_optimization_flags boilerplate and makes these flags work for all library variants
  - For the runtime, pass the appropriate define down when SWIFT_RUNTIME_CLOBBER_FREED_OBJECTS is set, so that all library variants get this setting.

Swift SVN r19444
2014-07-02 00:37:48 +00:00
Jordan Rose
e506d70667 [CMake] AppKit depends on QuartzCore, and UIKit depends on CoreImage.
Swift SVN r19439
2014-07-01 23:42:07 +00:00
Doug Gregor
acbed44c36 CMake: Teach add_swift_library to handle libraries where the default configuration can’t be built.
Use this to build UIKit for iOS the iOS simulator without building it for the OS X host.

Swift SVN r19415
2014-07-01 17:11:37 +00:00
Jordan Rose
cca27d02a0 Tag everything in the standard library with accessibility attributes.
Keep calm: remember that the standard library has many more public exports
than the average target, and that this contains ALL of them at once.
I also deliberately tried to tag nearly every top-level decl, even if that
was just to explicitly mark things @internal, to make sure I didn't miss
something.

This does export more than we might want to, mostly for protocol conformance
reasons, along with our simple-but-limiting typealias rule. I tried to also
mark things private where possible, but it's really going to be up to the
standard library owners to get this right. This is also only validated
against top-level access control; I haven't fully tested against member-level
access control yet, and none of our semantic restrictions are in place.

Along the way I also noticed bits of stdlib cruft; to keep this patch
understandable, I didn't change any of them.

Swift SVN r19145
2014-06-24 21:32:18 +00:00
Enrico Granata
2ab2e6c07b Change the very cryptic "don't ask" to something more informative
Fixes <rdar://problem/16922703>



Swift SVN r19123
2014-06-24 01:50:02 +00:00
Greg Parker
50404f6210 Fix build break in UIViewControllerAdditions.
Swift SVN r18779
2014-06-10 06:16:00 +00:00
Enrico Granata
c44731ac31 B&I updated the builders to a new iOS SDK - the new SDK means that the Unmanaged<> is unwrapped automatically on our behalf
This patch is required to unbreak the build



Swift SVN r18651
2014-05-27 23:53:26 +00:00
Enrico Granata
30341ed401 The B&I-sanctioned iOS SDK does not have the right annotations for this to be automatically unwrapped. The Graphics Context comes back to us as Unamanged<> and we need to manually extract the value out of it. Do so for now
Swift SVN r18643
2014-05-26 23:22:59 +00:00
Enrico Granata
3e1ed25aa7 Add a mirror for UIView
There are a couple caveats to this Mirror, discussed in detail in the radar

Fixes rdar://17029335



Swift SVN r18642
2014-05-26 20:26:57 +00:00
Greg Parker
e2ca13c993 <rdar://16529903> Make UIViewController's nib search find Swift class names.
UIViewController is able to find nib files that have names derived from the 
UIViewController subclass's name. This change modifies UIViewController's 
lookup so it is able to find nib files for Swift class names.


Swift SVN r18470
2014-05-20 23:14:52 +00:00
Ted Kremenek
fad874708e Adjust test cases.
Swift SVN r17964
2014-05-12 22:01:52 +00:00
Joe Groff
5ea0a0734e UIKit overlay: Add our own designated initializers for UIActionSheet and UIAlertView.
The true designated initializers take a variadic argument, which we can't directly support in Swift, so we'll map those definitions to refer to versions that drop the variadic parameters altogether, and reimplement the variadic interface in the overlay.

Swift SVN r16711
2014-04-23 19:52:39 +00:00
Ted Kremenek
028f9d0561 Remove rest of Makefile build except for 'docs' and 'www'.
For 'docs' and 'www' it is possible these are still being used,
as they work independent of the Makefile build.  Keeping them for now.

Swift SVN r14418
2014-02-26 22:21:25 +00:00
Jordan Rose
335ceb2f57 Re-enable the new Swift driver.
This re-applies r13380, reverted in r13406. I don't think this actually
caused any harm (r13400 was the primary culprit), but if it did I'd
like to actually see the buildbots or someone else's machine fail on it.

Swift SVN r13456
2014-02-05 00:09:00 +00:00
Dave Abrahams
01e9139944 Revert "Enable the new Swift driver!"
This reverts r13380, which broke the build

Swift SVN r13406
2014-02-04 06:13:58 +00:00
Jordan Rose
16b5a57838 Enable the new Swift driver!
This substitutes swift_driver in as the new "swift". Tests that currently
test "%swift" will invoke "swift -frontend", much like "clang -cc1".
Most command-line interaction will look the same, except that Swift can
now emit linked libraries (using -emit-library) and executables (using
-emit-executable, or by not passing a mode option at all).

If you are working with @transparent functions, note that they will not be
properly inlined across file boundaries unless you use
-force-single-frontend-invocation, which emulates the old swift binary.
There are Radars for this already: <rdar://problem/15366167&15693042>

The name 'swift_driver' is now a symlink for 'swift'. This will be removed
next week.

The old 'swift' is still available as 'swift_old', though it is not being
tested at all. This will be removed in two weeks.

Clean CMake builds will get this immediately.

Incremental CMake builds will not get the new driver unless you explicitly
enable the SWIFT_NEW_DRIVER option (-DSWIFT_NEW_DRIVER=ON on the command line).
This option will go away in a week.

Makefile builds will get this immediately because I didn't want to work out
how to maintain both modes.

Much credit to Connor for bringing up the entire driver and for doing much
of the work in ensuring that all the tests continue to pass.

Swift SVN r13380
2014-02-03 22:48:39 +00:00
Jordan Rose
b4fe56eb1c Actually fix the Makefile build for multi-file Swift libraries.
The hack to get the LLVM build system to do what we want is to define a
custom build rule for "XYZ.o" and then add "XYZ" as a dummy source file
to the SOURCES variable, which the LLVM Makefile system uses. To make it
clear that something unusual is going on here, I've changed all existing
instances of this to use "XYZ.o" in SOURCES, rather than having that name
be derived from "XYZ.swift" or whatever.

The actual Swift source files go in SWIFT_SOURCES for the time being
(and possibly forever, since Swift sources will always be built together).

Swift SVN r11058
2013-12-10 00:23:43 +00:00
Greg Parker
974f1e4ea9 Clean up -force_load and linkage of libswift_runtime.a. Fixes test Interpreter/Union.swift.
Swift SVN r8398
2013-09-18 06:28:53 +00:00
Greg Parker
63ecd5c9d1 Add UIKit module.
Swift SVN r8178
2013-09-13 01:39:54 +00:00