Commit Graph

19088 Commits

Author SHA1 Message Date
Jordan Rose
5ad871ecd6 Adopt llvm::function_ref for callbacks that aren't persisted.
...removing a few other constructs that were doing the same thing
(mostly from me).

No functionality change.

Swift SVN r23294
2014-11-13 00:19:03 +00:00
Jordan Rose
1bbe784d51 [Driver] Add another parseable output test, this time with dependencies.
Swift SVN r23293
2014-11-13 00:18:57 +00:00
Adrian Prantl
c578ef6f02 Emit human-readable names for destructors in the debug info.
<rdar://problem/16653867> swift is emitting many "empty string" named items in the apple-names table

Swift SVN r23292
2014-11-13 00:11:27 +00:00
Dave Abrahams
4d58b5895d [buildbot-script] require --build-dir argument
Swift SVN r23291
2014-11-12 23:44:45 +00:00
Doug Gregor
aa41a5ce1b Revert "Update uses of Clang's NullableKind -> Nullability."
This reverts commit ad91cc5b7f0482938397a40f81c4fafcd6718d2a.

Swift SVN r23290
2014-11-12 23:18:43 +00:00
Doug Gregor
f204351e7e Implement Clang importer support for finding Objective-C methods by selector.
This functionality doesn’t really change what we accept right now, because we eagerly import all of the methods of a class when we do *any* kind of lookup into the class. However, when we manage to stop doing that, this operation will become more important.

Swift SVN r23289
2014-11-12 23:18:42 +00:00
Dmitri Hrybenko
2aef2c3c7d stdlib: put back C_ARGC and C_ARGV for now to stage in the API change
Swift SVN r23288
2014-11-12 22:59:20 +00:00
Adrian Prantl
538f459dc6 swift-mode: add override to the list of keywords
Swift SVN r23287
2014-11-12 22:58:08 +00:00
Sean Callanan
9b4b6dcfcf Modified the playground transform to provide a unique ID with
each instrumentation point.  This ID should only be a way to
identify a point for the purposes of the current run, so it is
somewhat random.

<rdar://problem/18788357> Instrumenter should start sending unique ID information for each logged entry to playgroundlogger


Swift SVN r23286
2014-11-12 22:28:16 +00:00
Jordan Rose
5816026af2 [Driver] Add missing test files.
These were excluded by my .gitignore, confusing the tests that depend on them
being there even in the first build.

Swift SVN r23285
2014-11-12 21:18:28 +00:00
Joe Groff
055e8671a0 SILGen: Fix memory leak when casting from address-only to loadable trivial type.
The result does not carry a meaningful cleanup when trivial. Fixes rdar://problem/18936388.

Swift SVN r23284
2014-11-12 21:03:15 +00:00
Joe Groff
53af706676 Sema: Fix logic inversion that threw away significant bits of enum raw value literals.
Fixes rdar://problem/18878717.

Swift SVN r23283
2014-11-12 21:03:12 +00:00
David Farler
3f67608410 Remove unused equalsUnordered in Set tests
Swift SVN r23282
2014-11-12 20:54:03 +00:00
David Farler
371956532b Update expected Set hash ordering for 32-bit
Swift SVN r23281
2014-11-12 20:25:17 +00:00
Denis Vnukov
8770dba416 [TypeChecker] Minor: corrected safety check against crash in type checker on invalid input.
Swift SVN r23280
2014-11-12 18:17:03 +00:00
Doug Gregor
5c245f8a5a Update uses of Clang's NullableKind -> Nullability.
Synchronized with a Clang commit; please update your Clang along with Swift.

Swift SVN r23279
2014-11-12 18:15:55 +00:00
Joe Groff
b73b22a179 Remove meaningless code.
Swift SVN r23278
2014-11-12 18:13:40 +00:00
Joe Groff
aa3f35c28d Don't consider DynamicTypeExpr or MetatypeConversionExpr to produce a statically derived metatype.
Though the value may be statically known in some cases, that isn't good enough to do what we try to do with this information. In particular, if we invoke a class method on a MetatypeConversion, we want to dispatch to the method of the original metatype, not statically call the method of the converted type, which is what is evident in the AST. Fixes rdar://problem/18877135.

Swift SVN r23277
2014-11-12 18:10:31 +00:00
Adrian Prantl
1be7553d39 Debug info: unwrap promoted inout variables and prevent a double-deref of
inout variables.

Swift SVN r23276
2014-11-12 18:06:21 +00:00
Jordan Rose
f9a6b1d452 [Driver] Add several tests for the DependencyGraph.
malformed: Compiling generates a broken swiftdeps file -> recompile everything.
mutual: Two files depend on each other -> compiling either forces a recompile.
one-way: One file depends on another
  -> the latter forces the former to be recompiled.
one-way-depends-before: One file starts off depending on another
  -> the latter forces the former to be recompiled, but only the first time.
one-way-depends-after: One file newly depends on another
  -> the latter forces the former to be recompiled, but only once the former
     has been touched.
one-way-provides-before: One file starts off providing a dependency for another
  -> the former forces the latter to be recompiled, but only the first time.
one-way-provides-after: One file newly provides a dependency for another
  -> the former forces the latter to be recompiled.
simple-half-dirty: Two independent files -> recompile only the dirty one.

Swift SVN r23275
2014-11-12 18:06:12 +00:00
Jordan Rose
8fcc2d70d0 [Driver] Add a test for dependency tracking and parseable output.
This makes sure we emit the right "skipped" messages when we decide not to
run something.

Swift SVN r23274
2014-11-12 18:06:11 +00:00
Jordan Rose
a4a6b42604 [Driver] Only run compile jobs if needed.
This teaches the driver's Compilation to not run jobs where the base input
is older than the main output (r23221) when we're tracking dependencies.
After a compile command finishes, anything that depended on the file that
just got compiled will get scheduled.

This has the nice side effect of trying to rebuild changed files first.

The tests here aren't really testing the dependency graph yet, because the
files don't include any dependencies. I'll be adding several more test
scenarios in the next few commits.

Part of rdar://problem/15353101

Swift SVN r23273
2014-11-12 18:06:10 +00:00
Jordan Rose
6ca70b3c49 [Driver] Add debug option -driver-use-frontend-path.
This will be used to test dependency analysis by substituting a different
executable to use as the frontend.

For debugging purposes only.

Swift SVN r23272
2014-11-12 18:06:08 +00:00
Joe Groff
4b2097c9f4 SILGen: Include overrides of required allocating initializers in the vtable.
Part of fixing rdar://problem/18877135.

Swift SVN r23271
2014-11-12 17:36:55 +00:00
Dmitri Hrybenko
6969be48bf CMake: don't build WatchKit.apinotesc for OS X
This is not a clean solution, I will prepare a better one as a part of
my CMake improvements.

rdar://problem/18947771

Swift SVN r23270
2014-11-12 17:16:08 +00:00
Joe Groff
2c257fa78a IRGen: Fix assertion failure when doing a checked cast to AnyObject.
The optimizer could eliminate these but isn't there yet. These instructions are valid nonetheless and should be emittable. Fixes rdar://problem/18934125.

Swift SVN r23269
2014-11-12 17:11:30 +00:00
Dave Abrahams
9fa1cc7a3a [stdlib] BridgeObject uniqueness checking
Also, more complete testing overall

Swift SVN r23268
2014-11-12 15:00:57 +00:00
Dmitri Hrybenko
d2e3bd850a CMake: trim trailing whitespace
Swift SVN r23267
2014-11-12 09:20:16 +00:00
Dmitri Hrybenko
4cd60e6b4e stdlib/Set: add #if guards for non-ObjC platforms
Swift SVN r23266
2014-11-12 09:05:39 +00:00
Dmitri Hrybenko
0d42339173 Runtime: fix the build for !SWIFT_OBJC_INTEROP
Swift SVN r23265
2014-11-12 08:02:28 +00:00
Dmitri Hrybenko
a2faf6beb6 CMake: add a comment about linking the 'swift' binary
Swift SVN r23264
2014-11-12 08:02:27 +00:00
David Farler
d0718c69fc Prefix Set<T> with underscore for API development
Swift SVN r23263
2014-11-12 07:07:01 +00:00
David Farler
c453eb4c48 Add Set type.
<rdar://problem/14661754> TLF: [data-structure] Set<T> data type + Bridging from NSSet

Swift SVN r23262
2014-11-12 07:07:00 +00:00
Dmitri Hrybenko
dac8697299 Update the test for the C_ARGV rename
Swift SVN r23261
2014-11-12 03:47:22 +00:00
Dave Abrahams
b6c7d89ee7 [stdlib] Don't let gyb interfere with doc comments
The interposed line directive comment "// #line ..." prevents Swift from
associating the doc comment with the declaration.  Tested, this time,
and everything!

Swift SVN r23260
2014-11-12 02:58:40 +00:00
Joe Groff
b50293b26a Runtime: Work around rdar://problem/18950072 to avoid paying for .cxx_destruct on Swift objects.
Clang overzealously infects SwiftObject with the HasCXXStructors bit because it contained a struct (with trivial constructor). Manually explode the struct to avoid this.

Swift SVN r23259
2014-11-12 02:30:31 +00:00
Adrian Prantl
4244c45f37 Debug info: Emit byref captures as indirect.
<rdar://problem/15851064> Variables captured by inner functions are described oddly and often incorrectly

Swift SVN r23258
2014-11-12 01:28:51 +00:00
Maxwell Swadling
2bbf6b9293 [stdlib] changed C_ARG{C,V} @availability to provide fix-its
Swift SVN r23255
2014-11-12 00:09:52 +00:00
Joe Groff
08fe138808 Runtime: Generate a human-understandable name for Any.Type.
Expose this in the stdlib as _typeName(Any.Type) -> String, pending API review.

Swift SVN r23254
2014-11-11 23:38:24 +00:00
Michael Gottesman
7a2e1fb4d3 [arc-opts] After the arc optimizer converges, run another round of the ARC
optimizer freezing releases in the epilogue of functions that match to
SILArguments. This allows us to treat all such SILArguments throughout the
entire function as having a post dominating release.

<rdar://problem/18923030>

Swift SVN r23253
2014-11-11 23:37:09 +00:00
Anna Zaks
ed9a765d43 [API Notes] Commit the WatchKit audit.
Swift SVN r23252
2014-11-11 23:29:43 +00:00
Adrian Prantl
0c21c4da07 Expose ExitableFullExpr scopes to the debug info, so variables declared in
patterns show up in their own scopes, and the same variable name can be
reused in consecutive patterns.

<rdar://problem/15187441> Implement local variable debug scoping for variables declared in patterns

Swift SVN r23251
2014-11-11 23:27:43 +00:00
Arnold Schwaighofer
9ac0595334 Revert "[stdlib] Don't let gyb interfere with doc comments"
This reverts commit r23247.

It broke the incremental builder - I could reproduce this locally with a clean
rebuild.

Swift SVN r23250
2014-11-11 23:03:39 +00:00
Maxwell Swadling
963619cdc1 [stdlib] C_ARG{c,v} renamed to argc/unsafeArgv
Fixes rdar://problem/17229052
Make it clear C_ARGV var is unsafe.
Made it impossible to set the argc/unsafeArgv outside of the stdlib.
Refactored tests to not use C_ARG{C,V}.
Made C_ARG{C,V} unavailable.

Swift SVN r23249
2014-11-11 22:34:49 +00:00
Dmitri Hrybenko
75876f531a XCTest: silence the warning about accessing a property that is not declared
Patch by Chris Hanson.

Swift SVN r23248
2014-11-11 22:19:48 +00:00
Dave Abrahams
392a675b05 [stdlib] Don't let gyb interfere with doc comments
The interposed line directive comment "// #line ..." prevents Swift from
associating the doc comment with the declaration.

Swift SVN r23247
2014-11-11 22:16:31 +00:00
Arnold Schwaighofer
08b6f803c1 LoopRotate: Add a test case for objc_method after Roman's commit
rdar://18940762

Swift SVN r23246
2014-11-11 20:51:44 +00:00
Roman Levenstein
742a9bf717 Don't jumpthread blocks containing MethodInst instructions referring to objc methods, because we cannot build SSA for method values that lower to objc methods.
rdar://18940762

Swift SVN r23245
2014-11-11 20:25:43 +00:00
Chris Willmore
f723b05672 Don't remove 'with' from ObjC method arg name if resulting name is keyword.
Also, remove calls to isSwiftReservedName in
ClangImporter::Implementation::importName(), since 'true' and 'false'
are now keywords and rdar://problem/13187570 is no longer a problem.

rdar://problem/18797808

Swift SVN r23244
2014-11-11 19:34:53 +00:00
Arnold Schwaighofer
19b01516d8 ArrayBoundsCheck: Use the destructor analysis to make sure the array's destructor is memory safe
rdar://18940376

Swift SVN r23243
2014-11-11 19:27:41 +00:00