Doug Gregor
24cede9543
[Omit needless words] Treat "Mask" as a skippable type suffix.
...
Fixes rdar://problem/23751733.
2016-02-22 11:39:20 -08:00
Doug Gregor
03fe1d0a35
[Omit needless words] More Cocoa verbs: activate, deactivate, reattach.
...
Fixes rdar://problem/23556916.
2016-02-22 11:22:09 -08:00
Han Sangjin
e06c7136cb
Porting to Cygwin. rebased and squashed
2016-02-22 13:20:21 +09:00
William Dillon
390e50c999
Added thumb to supported platforms conditions
2016-02-21 16:56:02 +00:00
Doug Gregor
4b116d0e26
[Omit needless words] enqueue/dequeue are verbs
2016-02-16 16:17:56 -08:00
Doug Gregor
bc18e4521b
[Omit needless words] After "by", recognize gerunds more liberally.
2016-02-12 16:40:10 -08:00
Jordan Rose
c90511a74e
Merge pull request #1289 from jrose-apple/conditional-compilation-blocks
...
Rename "build configurations" to "conditional compilation blocks".
2016-02-12 14:02:21 -08:00
Doug Gregor
1cd7a8611d
[Omit needless words] Introduce set-specific verbs.
2016-02-12 12:52:13 -08:00
Doug Gregor
0e46850a66
[Omit needless words] "ObjectValue" in the name matches "Object" in the type.
...
Fixes rdar://problem/24618946.
2016-02-12 12:41:40 -08:00
Jordan Rose
6272941c5c
Rename "build configurations" to "conditional compilation blocks".
...
...because "build configuration" is already the name of an Xcode feature.
- '#if' et al are "conditional compilation directives".
- The condition is a "conditional compilation expression", or just
"condition" if it's obvious.
- The predicates are "platform conditions" (including 'swift(>=...)')
- The options set with -D are "custom conditional compilation flags".
(Thanks, Kevin!)
I left "IfConfigDecl" as is, as well as SourceKit's various "BuildConfig"
settings because some of them are part of the SourceKit request format.
We can change these in follow-up commits, or not.
rdar://problem/19812930
2016-02-12 11:09:26 -08:00
Doug Gregor
bdfedf70ed
[Omit needless words] Treat "passing" as a preposition
2016-02-12 10:53:35 -08:00
Doug Gregor
a87782e414
[Omit needless words] Handle "extended prepositions" like "compatible with".
...
Also, be more careful not to produce base names that are keywords.
2016-02-12 10:33:59 -08:00
Doug Gregor
f61aa7a86e
[Omit needless words] Prepend is a verb.
2016-02-11 16:44:06 -08:00
Doug Gregor
90af7e60e7
[Omit needless words] "Of" associates left except when determining properties of the result.
2016-02-11 16:44:05 -08:00
Doug Gregor
4bbdec1cfc
[Omit needless words] "update" is a verb.
2016-02-11 16:44:05 -08:00
Doug Gregor
e720333032
[Omit needless words] Only move "lonely of" arguments back to the base name.
...
If the first argument label would end up as "of" following splitting
and pruning, move that "of" onto the base name.
2016-02-11 16:44:05 -08:00
Doug Gregor
643725f75a
[Omit needless words] The preposition "of" binds to the word preceding it.
2016-02-11 16:44:05 -08:00
Doug Gregor
a024fe0115
[Omit needless words] Split at a preposition before "of", if one exists.
...
This helps for cases such as "appendWithContentsOfFoo", where
"contentsOf" or "contentsOfFoo" is a better argument label than "foo"
or "ofFoo".
2016-02-11 16:44:05 -08:00
Doug Gregor
850e0e2fc3
[Omit needless words] Skip over verbs and gerunds when looking for a preposition.
2016-02-11 16:44:04 -08:00
Doug Gregor
720d67faf4
[Omit needless words] Split out find-last-preposition. NFC
2016-02-11 16:44:04 -08:00
Doug Gregor
10e98da40d
[Omit needless words] Clip is a poor verb for Cocoa imports
2016-02-11 16:44:04 -08:00
Doug Gregor
55b406a20d
[Omit needless words] Stop preventing argument labels named "for", "with", or other vacuous words.
...
Fixes rdar://problem/23752046.
2016-02-11 16:44:04 -08:00
practicalswift
7d67f58e1f
[gardening] Fix recently introduced typo: "prposition" → "preposition"
2016-02-11 19:12:49 +01:00
Doug Gregor
050b324593
[Omit needless words] Split before last preposition in most cases.
...
Splitting *before* the last preposition tends to keep the
prepositional phrase together. Only leave the preposition on the base
name in rare cases where we would end up with weird argument labels
(e.g., prefer "moveTo(x:y:)" to "move(toX:y:)").
Also, refine our heuristics for when we can remove the preposition
entirely.
2016-02-10 14:20:44 -08:00
Doug Gregor
0533f6158d
[Omit needless words] Move a paired preposition into the first argument label.
...
If the second argument label starts with a preposition for a split
selector, move the preposition into the first argument label. For
example:
- func transitionFrom(fromViewController: NSViewController, to
toViewController: NSViewController, options:
NSViewControllerTransitionOptions = [], completionHandler completion:
(() -> Void)? = nil)
+ func transition(from fromViewController: NSViewController, to
toViewController: NSViewController, options:
NSViewControllerTransitionOptions = [], completionHandler completion:
(() -> Void)? = nil)
2016-02-08 22:41:16 -08:00
Doug Gregor
8a3a2958e7
[Omit needless words] Improve our handling of plural acronyms.
2016-02-08 22:41:16 -08:00
Doug Gregor
32b0c8c4a8
[Omit needless words] "No" conflicts after "With".
2016-02-08 22:41:15 -08:00
Doug Gregor
d03d831e1e
[Omit needless words] Drop split preposition if the first parameter is defaulted.
2016-02-08 16:23:27 -08:00
Doug Gregor
c04a67ae4c
[Omit needless words] Don't split setters, "action-like" methods.
...
Suggested by Brent Royal-Gordon.
2016-02-07 21:40:10 -08:00
Doug Gregor
e05cf6e018
[Omit needless words] Split first selector piece into base name/first argument label.
2016-02-05 23:03:36 -08:00
Doug Gregor
bd8fc9614e
[Omit needless words] Match type/name words ignoring case
2016-02-05 22:27:45 -08:00
Doug Gregor
10c2a48ffc
[Omit needless words] Tweak the verb lists slightly.
2016-02-05 22:27:44 -08:00
Doug Gregor
1dec2f1f34
[Clang importer] After stripping a prefix, lowercase initialisms as well.
2016-02-03 16:11:59 -08:00
David Farler
be58b3c2e3
Extract Version value out of optional when parsing _compiler_version
...
rdar://problem/24476174
2016-02-02 23:50:13 -08:00
Doug Gregor
b9955404c8
[Clang importer] Lowercase plural initialisms correctly.
...
URLs -> urls rather than urLs.
2016-01-27 16:38:11 -08:00
practicalswift
0cb9573398
Bring .gyb files in line with rest of code base in terms of PEP8 compliance.
2016-01-24 12:17:17 +01:00
practicalswift
638a7c9474
[gardening] Avoid "var == true" and "var == false"
2016-01-23 19:57:07 +01:00
practicalswift
8efa5f587e
[gardening] Remove "-*- C++ -*-" tag from .cpp files
...
Emacs assumes .h files are C files by default which is why the
tag "-*- C++ -*-" is needed.
.cpp files do not have this problem.
2016-01-23 12:09:32 +01:00
practicalswift
33312eac6b
[gardening] Remove unreachable/unused/redundant code
...
* Make parameter naming in forward declaration match definition
* Remove unused argument to function persistAsync(…)
* Remove unused enum ShouldHalt
* Remove unused enum class IsProtocol
* Remove unused function dumpTypeSubstitutionMap()
* Remove unused function template getFirstPairElt(…)
* Remove unused method addConstantWordInWords(…)
* Remove unused method asExistentialTI()
* Remove unused method currentTrackedState()
* Remove unused method getNumBodyParameters()
* Remove unused method getSuccIndex()
* Remove unused method getTypeOfDeclReference(…)
* Remove unused method hasStructWithAtMostOneNonTrivialField(…)
* Remove unused method initForDirectValues()
* Remove unused method nextIfNot(…)
* Remove unused method overwriteLoweredValue(…)
* Remove unused method removeColumn(…)
* Remove unused methods HasSingleDecl() and GetFirstDecl()
* Remove unused methods overwriteLoweredExplosion(…) and setLoweredSingleValue(…)
* Remove unused methods requireRetainablePointerValue(…), getMethodSelfInstanceType(…) and isSelfArchetype(…)
* Remove unused methods setAsEmptyDirect(), setAsSingleDirectUnmanagedFragileValue(…), setAsIndirectAddress(…) and getDirectValues()
* Remove unused struct CachedMemberInfo
* Remove unused struct CallEdit
* Remove unused struct ErrorImportInfo
* Remove unused synonym ConformancePair
* Remove unused variable SemaInfo
* Remove unused variable localDeclNameNode
* Remove unused variables kindToken and kindLoc
2016-01-22 09:43:24 +01:00
David Farler
c32fb8e7b9
SE-0020: Swift Language Version Build Configuration
...
Introduce a new "swift" build configuration that guards declarations
and statements with a language version - if the current language version
of the compiler is at least that version, the block will parse as normal.
For inactive blocks, the code will not be parsed an no diagnostics will
be emitted there.
Example:
#if swift(>=2.2)
print("Active")
#else
this code will not parse or emit diagnostics
#endif
https://github.com/apple/swift-evolution/blob/master/proposals/0020-if-swift-version.md
rdar://problem/19823607
2016-01-21 16:31:19 -08:00
Doug Gregor
769b41e240
[Omit needless words] Prune redundant "self" type following a verb in the base name.
...
This allows us to prune UIViewController's
"dismissViewControllerAnimated" to "dismissAnimated", eliminating
unnecessary redundancy.
2016-01-19 10:34:23 -08:00
Doug Gregor
e380184cf3
[Omit needless words] Don't strip just "Error".
2016-01-18 22:06:42 -08:00
Anton Blanchard
b1827d8a8f
Add powerpc64le Linux support
...
This patch adds powerpc64le Linux support. While the patch also adds
the matching powerpc64 bits, there are endian issues that need to be
sorted out.
The PowerPC LLVM changes for the swift ABI (eg returning three element
non-homogeneous aggregates) are still in the works, but a simple LLVM
fix to allow those aggregates results in swift passing all but 8
test cases.
2016-01-15 06:48:31 +00:00
Maxim Moiseev
e8886a4ffa
Merge pull request #920 from practicalswift/gyb-fixes
...
[gardening] Clean up .gyb-files: Remove unused imports. Non-controversial PEP8 fixes.
2016-01-12 09:27:48 -08:00
Jordan Rose
6a8ab15b68
[Demangle] Change the demangling text for extensions.
...
Make it clear that this is not a nested type or submodule or anything.
Mangled: _TFE9ExtModuleV9DefModule1A4testfT_T_
Before: ext.ExtModule.DefModule.A.test () -> ()
After: (extension in ExtModule):DefModule.A.test () -> ()
2016-01-11 14:26:16 -08:00
Nadav Rotem
1ea38dd3e4
De-indent the switch cases (that Jordan noticed)
2016-01-08 17:24:48 -08:00
practicalswift
21c3d93bea
Remove unused imports.
2016-01-09 01:39:22 +01:00
Doug Gregor
4d2480086e
[Omit needless words] Use the getter name for BOOL properties.
...
Rather than employ complicated heuristics to determine when to add
"is" to the name of a Booleam property, just trust the name of the
getter.
2016-01-05 10:43:32 -08:00
practicalswift
c48a25647d
Use correct formatting for separator line.
2016-01-05 09:49:00 +01:00
Doug Gregor
bfba3a7968
[Omit needless words] Fix lowercasing of initialisms ending with a non-letter.
...
Lowercases "UTF8String" to "utf8String" rather than "utF8String".
2016-01-04 16:45:31 -08:00