Skip to content

Commit 03a570c

Browse files
committed
---
yaml --- r: 341467 b: refs/heads/rxwei-patch-1 c: 49bdc45 h: refs/heads/master i: 341465: 35dbcb4 341463: ee2e495
1 parent 95efdea commit 03a570c

File tree

111 files changed

+842
-2096
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

111 files changed

+842
-2096
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1015,7 +1015,7 @@ refs/tags/swift-DEVELOPMENT-SNAPSHOT-2018-08-18-a: b10b1fce14385faa6d44f6b933e95
10151015
refs/heads/rdar-43033749-fix-batch-mode-no-diags-swift-5.0-branch: a14e64eaad30de89f0f5f0b2a782eed7ecdcb255
10161016
refs/heads/revert-19006-error-bridging-integer-type: 8a9065a3696535305ea53fe9b71f91cbe6702019
10171017
refs/heads/revert-19050-revert-19006-error-bridging-integer-type: ecf752d54b05dd0a20f510f0bfa54a3fec3bcaca
1018-
refs/heads/rxwei-patch-1: dfb90b7e1c1b390c89f12098f69d7b5f962cbf16
1018+
refs/heads/rxwei-patch-1: 49bdc45dc9c8b6e9fd741047bd86b653c3785120
10191019
refs/heads/shahmishal-patch-1: e58ec0f7488258d42bef51bc3e6d7b3dc74d7b2a
10201020
refs/heads/typelist-existential: 4046359efd541fb5c72d69a92eefc0a784df8f5e
10211021
refs/tags/swift-4.2-DEVELOPMENT-SNAPSHOT-2018-08-20-a: 4319ba09e4fb8650ee86061075c74a016b6baab9

branches/rxwei-patch-1/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
|**[Debian 9.1 (Raspberry Pi)](https://github.com/apple/swift-community-hosted-continuous-integration/blob/master/nodes/armv7_debian_stretch.json)** | ARMv7 | [![Build Status](https://ci-external.swift.org/job/oss-swift-RA-linux-debian-9_1/lastCompletedBuild/badge/icon)](https://ci-external.swift.org/job/oss-swift-RA-linux-debian-9_1)|
1818
|**[Fedora 27](https://github.com/apple/swift-community-hosted-continuous-integration/blob/master/nodes/x86_64_fedora_27.json)** | x86_64 |[![Build Status](https://ci-external.swift.org/job/oss-swift-RA-linux-fedora-27/lastCompletedBuild/badge/icon)](https://ci-external.swift.org/job/oss-swift-RA-linux-fedora-27)|
1919
|**[Ubuntu 16.04](https://github.com/apple/swift-community-hosted-continuous-integration/blob/master/nodes/x86_64_ubuntu_16_04.json)** | x86_64 |[![Build Status](https://ci-external.swift.org/job/oss-swift-RA-linux-ubuntu-16.04/lastCompletedBuild/badge/icon)](https://ci-external.swift.org/job/oss-swift-RA-linux-ubuntu-16.04)|
20-
|**[Ubuntu 16.04 ](https://github.com/apple/swift-community-hosted-continuous-integration/blob/master/nodes/ppc64le_ubuntu_16_04.json)** | PPC64LE |[![Build Status](https://ci-external.swift.org/job/oss-swift-5.1-RA-linux-ubuntu-16.04-ppc64le/lastCompletedBuild/badge/icon)](https://ci-external.swift.org/job/oss-swift-5.1-RA-linux-ubuntu-16.04-ppc64le)|
20+
|**[Ubuntu 16.04 ](https://github.com/apple/swift-community-hosted-continuous-integration/blob/master/nodes/ppc64le_ubuntu_16_04.json)** | PPC64LE |[![Build Status](https://ci-external.swift.org/job/oss-swift-4.1-RA-linux-ubuntu-16.04-ppc64le/lastCompletedBuild/badge/icon)](https://ci-external.swift.org/job/oss-swift-4.1-RA-linux-ubuntu-16.04-ppc64le)|
2121
|**[Ubuntu 16.04 ](https://github.com/apple/swift-community-hosted-continuous-integration/blob/master/nodes/aarch64_ubuntu_16.04.json)** | AArch64 |[![Build Status](https://ci-external.swift.org/job/oss-swift-RA-linux-ubuntu-16.04-aarch64/lastCompletedBuild/badge/icon)](https://ci-external.swift.org/job/oss-swift-RA-linux-ubuntu-16.04-aarch64)|
2222
|**[Android](https://github.com/apple/swift-community-hosted-continuous-integration/blob/master/nodes/x86_64_ubuntu_16_04_LTS_android.json)** | ARMv7 |[![Build Status](https://ci-external.swift.org/job/oss-swift-RA-linux-ubuntu-16.04-android/lastCompletedBuild/badge/icon)](https://ci-external.swift.org/job/oss-swift-RA-linux-ubuntu-16.04-android)|
2323
|**[Android](https://github.com/apple/swift-community-hosted-continuous-integration/blob/master/nodes/x86_64_ubuntu_16_04_LTS_android.json)** | AArch64 |[![Build Status](https://ci-external.swift.org/job/oss-swift-RA-linux-ubuntu-16.04-android-arm64/lastCompletedBuild/badge/icon)](https://ci-external.swift.org/job/oss-swift-RA-linux-ubuntu-16.04-android-arm64)|

branches/rxwei-patch-1/benchmark/single-source/AngryPhonebook.swift

Lines changed: 5 additions & 117 deletions
Original file line numberDiff line numberDiff line change
@@ -14,59 +14,11 @@
1414
// to test uppercase and lowercase ASCII string fast paths.
1515
import TestsUtils
1616

17-
let t: [BenchmarkCategory] = [.validation, .api, .String]
18-
19-
public let AngryPhonebook = [
20-
BenchmarkInfo(
21-
name: "AngryPhonebook",
22-
runFunction: run_AngryPhonebook,
23-
tags: t,
24-
legacyFactor: 7),
25-
26-
// Small String Workloads
27-
BenchmarkInfo(
28-
name: "AngryPhonebook.ASCII.Small",
29-
runFunction: { angryPhonebook($0, ascii) },
30-
tags: t,
31-
setUpFunction: { blackHole(ascii) }),
32-
BenchmarkInfo(
33-
name: "AngryPhonebook.Strasse.Small",
34-
runFunction: { angryPhonebook($0, strasse) },
35-
tags: t,
36-
setUpFunction: { blackHole(strasse) }),
37-
BenchmarkInfo(
38-
name: "AngryPhonebook.Armenian.Small",
39-
runFunction: { angryPhonebook($0, armenian) },
40-
tags: t,
41-
setUpFunction: { blackHole(armenian) }),
42-
BenchmarkInfo(
43-
name: "AngryPhonebook.Cyrillic.Small",
44-
runFunction: { angryPhonebook($0, cyrillic) },
45-
tags: t,
46-
setUpFunction: { blackHole(cyrillic) }),
47-
48-
// Regular String Workloads
49-
BenchmarkInfo(
50-
name: "AngryPhonebook.ASCII",
51-
runFunction: { angryPhonebook($0, precomposed: longASCII) },
52-
tags: t,
53-
setUpFunction: { blackHole(longASCII) }),
54-
BenchmarkInfo(
55-
name: "AngryPhonebook.Strasse",
56-
runFunction: { angryPhonebook($0, precomposed: longStrasse) },
57-
tags: t,
58-
setUpFunction: { blackHole(longStrasse) }),
59-
BenchmarkInfo(
60-
name: "AngryPhonebook.Armenian",
61-
runFunction: { angryPhonebook($0, precomposed: longArmenian) },
62-
tags: t,
63-
setUpFunction: { blackHole(longArmenian) }),
64-
BenchmarkInfo(
65-
name: "AngryPhonebook.Cyrillic",
66-
runFunction: { angryPhonebook($0, precomposed: longCyrillic) },
67-
tags: t,
68-
setUpFunction: { blackHole(longCyrillic) })
69-
]
17+
public let AngryPhonebook = BenchmarkInfo(
18+
name: "AngryPhonebook",
19+
runFunction: run_AngryPhonebook,
20+
tags: [.validation, .api, .String],
21+
legacyFactor: 7)
7022

7123
let words = [
7224
"James", "John", "Robert", "Michael", "William", "David", "Richard", "Joseph",
@@ -86,67 +38,3 @@ public func run_AngryPhonebook(_ N: Int) {
8638
}
8739
}
8840
}
89-
90-
// Workloads for various scripts. Always 20 names for 400 pairings.
91-
// To keep the performance of various scripts roughly comparable, aim for
92-
// a total length of approximately 120 characters.
93-
// E.g.: `ascii.joined(separator: "").count == 124`
94-
// Every name should fit in 15-bytes UTF-8 encoded, to excercise the small
95-
// string optimization.
96-
// E.g.: `armenian.allSatisfy { $0._guts.isSmall } == true`
97-
98-
// Workload Size Statistics
99-
// SMALL | UTF-8 | UTF-16 | REGULAR | UTF-8 | UTF-16
100-
// ---------|-------|--------|--------------|---------|--------
101-
// ascii | 124 B | 248 B | longASCII | 6158 B | 12316 B
102-
// strasse | 140 B | 240 B | longStrasse | 6798 B | 11996 B
103-
// armenian | 232 B | 232 B | longArmenian | 10478 B | 11676 B
104-
// cyrillic | 238 B | 238 B | longCyrillic | 10718 B | 11916 B
105-
106-
let ascii = Array(words.prefix(20))
107-
// Pathological case, uppercase: ß -> SS
108-
let strasse = Array(repeating: "Straße", count: 20)
109-
110-
let armenian = [
111-
"Արմեն", "Աննա", "Հարութ", "Միքայել", "Մարիա", "Դավիթ", "Վարդան",
112-
"Նարինե", "Տիգրան", "Տաթևիկ", "Թագուհի", "Թամարա", "Ազնաուր", "Գրիգոր",
113-
"Կոմիտաս", "Հայկ", "Գառնիկ", "Վահրամ", "Վահագն", "Գևորգ"]
114-
115-
let cyrillic = [
116-
"Ульяна", "Аркадий", "Аня", "Даниил", "Дмитрий", "Эдуард", "Юрій", "Давид",
117-
"Анна", "Дмитрий", "Евгений", "Борис", "Ксения", "Артур", "Аполлон",
118-
"Соломон", "Николай", "Кристи", "Надежда", "Спартак"]
119-
120-
/// Precompose the phonebook into one large string of comma separated names.
121-
func phonebook(_ names: [String]) -> String {
122-
names.map { firstName in
123-
names.map { lastName in
124-
firstName + " " + lastName
125-
}.joined(separator: ", ")
126-
}.joined(separator: ", ")
127-
}
128-
129-
let longASCII = phonebook(ascii)
130-
let longStrasse = phonebook(strasse)
131-
let longArmenian = phonebook(armenian)
132-
let longCyrillic = phonebook(cyrillic)
133-
134-
@inline(never)
135-
public func angryPhonebook(_ N: Int, _ names: [String]) {
136-
assert(names.count == 20)
137-
// Permute the names.
138-
for _ in 1...N {
139-
for firstname in names {
140-
for lastname in names {
141-
blackHole((firstname.uppercased(), lastname.lowercased()))
142-
}
143-
}
144-
}
145-
}
146-
147-
@inline(never)
148-
public func angryPhonebook(_ N: Int, precomposed names: String) {
149-
for _ in 1...N {
150-
blackHole((names.uppercased(), names.lowercased()))
151-
}
152-
}

branches/rxwei-patch-1/cmake/modules/AddSwift.cmake

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1905,7 +1905,7 @@ function(add_swift_target_library name)
19051905
if(SWIFTLIB_SHARED)
19061906
if(sdk IN_LIST SWIFT_APPLE_PLATFORMS)
19071907
list(APPEND swiftlib_link_flags_all "-dynamiclib -Wl,-headerpad_max_install_names")
1908-
elseif(${sdk} STREQUAL ANDROID)
1908+
elseif(sdk STREQUAL ANDROID)
19091909
list(APPEND swiftlib_link_flags_all "-shared")
19101910
# TODO: Instead of `lib${name}.so` find variable or target property which already have this value.
19111911
list(APPEND swiftlib_link_flags_all "-Wl,-soname,lib${name}.so")

branches/rxwei-patch-1/docs/ObjCInterop.md

Lines changed: 0 additions & 113 deletions
This file was deleted.

branches/rxwei-patch-1/include/swift/AST/AnyFunctionRef.h

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -76,18 +76,6 @@ class AnyFunctionRef {
7676
return !TheFunction.get<AbstractClosureExpr *>()->getType().isNull();
7777
}
7878

79-
bool hasSingleExpressionBody() const {
80-
if (auto *AFD = TheFunction.dyn_cast<AbstractFunctionDecl *>())
81-
return AFD->hasSingleExpressionBody();
82-
return TheFunction.get<AbstractClosureExpr *>()->hasSingleExpressionBody();
83-
}
84-
85-
Expr *getSingleExpressionBody() const {
86-
if (auto *AFD = TheFunction.dyn_cast<AbstractFunctionDecl *>())
87-
return AFD->getSingleExpressionBody();
88-
return TheFunction.get<AbstractClosureExpr *>()->getSingleExpressionBody();
89-
}
90-
9179
Type getType() const {
9280
if (auto *AFD = TheFunction.dyn_cast<AbstractFunctionDecl *>())
9381
return AFD->getInterfaceType();

branches/rxwei-patch-1/include/swift/AST/Builtins.def

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -551,20 +551,6 @@ BUILTIN_MISC_OPERATION(WillThrow, "willThrow", "", Special)
551551
/// poundAssert has type (Builtin.Int1, Builtin.RawPointer) -> ().
552552
BUILTIN_MISC_OPERATION(PoundAssert, "poundAssert", "", Special)
553553

554-
// BUILTIN_MISC_OPERATION_WITH_SILGEN - Miscellaneous operations that are
555-
// specially emitted during SIL generation.
556-
#ifndef BUILTIN_MISC_OPERATION_WITH_SILGEN
557-
#define BUILTIN_MISC_OPERATION_WITH_SILGEN(Id, Name, Attrs, Overload) \
558-
BUILTIN_MISC_OPERATION(Id, Name, Attrs, Overload)
559-
#endif
560-
561-
/// globalStringTablePointer has type String -> Builtin.RawPointer.
562-
/// It returns an immortal, global string table pointer for strings constructed
563-
/// from string literals.
564-
BUILTIN_MISC_OPERATION_WITH_SILGEN(GlobalStringTablePointer, "globalStringTablePointer", "", Special)
565-
566-
#undef BUILTIN_MISC_OPERATION_WITH_SILGEN
567-
568554
#undef BUILTIN_MISC_OPERATION
569555

570556
/// Builtins for instrumentation added by sanitizers during SILGen.

branches/rxwei-patch-1/include/swift/AST/DiagnosticsClangImporter.def

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,10 @@ WARNING(implicit_bridging_header_imported_from_module,none,
9191
"is deprecated and will be removed in a later version of Swift",
9292
(StringRef, Identifier))
9393

94+
WARNING(clang_vfs_overlay_is_ignored,none,
95+
"ignoring '-ivfsoverlay' options provided to '-Xcc' in favor of "
96+
"'-vfsoverlay'", ())
97+
9498
#ifndef DIAG_NO_UNDEF
9599
# if defined(DIAG)
96100
# undef DIAG

branches/rxwei-patch-1/include/swift/AST/DiagnosticsSIL.def

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -113,12 +113,6 @@ ERROR(unsupported_c_function_pointer_conversion,none,
113113
"C function pointer signature %0 is not compatible with expected type %1",
114114
(Type, Type))
115115

116-
ERROR(c_function_pointer_from_function_with_context,none,
117-
"a C function pointer cannot be formed from a "
118-
"%select{local function|closure}0 that captures "
119-
"%select{context|generic parameters|dynamic Self type|<<error>}1",
120-
(bool, unsigned))
121-
122116
ERROR(objc_selector_malformed,none,"the type ObjectiveC.Selector is malformed",
123117
())
124118

@@ -484,7 +478,7 @@ NOTE(switch_value_case_doesnt_yield, none, "missing yield in the %0 case",
484478
NOTE(try_branch_doesnt_yield, none, "missing yield when error is "
485479
"%select{not |}0thrown", (bool))
486480

487-
// OS log optimization diagnostics.
481+
// OS log optimization dianostics.
488482

489483
ERROR(oslog_message_argument_not_found, none, "no argument of type %0 in "
490484
" the os log call", (Identifier))
@@ -505,9 +499,6 @@ ERROR(oslog_non_constant_interpolation, none, "'OSLogInterpolation' struct is "
505499
ERROR(oslog_property_not_constant, none, "'OSLogInterpolation.%0' is not a "
506500
"constant: formatting and privacy options must be literals", (StringRef))
507501

508-
ERROR(global_string_pointer_on_non_constant, none, "globalStringTablePointer "
509-
"builtin must used only on string literals", ())
510-
511502
#ifndef DIAG_NO_UNDEF
512503
# if defined(DIAG)
513504
# undef DIAG

branches/rxwei-patch-1/include/swift/AST/DiagnosticsSema.def

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1121,6 +1121,11 @@ ERROR(c_function_pointer_from_method,none,
11211121
ERROR(c_function_pointer_from_generic_function,none,
11221122
"a C function pointer cannot be formed from a reference to a generic "
11231123
"function", ())
1124+
ERROR(c_function_pointer_from_function_with_context,none,
1125+
"a C function pointer cannot be formed from a "
1126+
"%select{local function|closure}0 that captures "
1127+
"%select{context|generic parameters|dynamic Self type|<<error>}1",
1128+
(bool, unsigned))
11241129
ERROR(invalid_autoclosure_forwarding,none,
11251130
"add () to forward @autoclosure parameter", ())
11261131

@@ -3332,9 +3337,6 @@ ERROR(trailing_closure_requires_parens,none,
33323337
"trailing closure requires parentheses for disambiguation in this"
33333338
" context", ())
33343339

3335-
ERROR(opaque_type_var_no_init,none,
3336-
"property declares an opaque return type, but has no initializer "
3337-
"expression from which to infer an underlying type", ())
33383340
ERROR(opaque_type_no_underlying_type_candidates,none,
33393341
"function declares an opaque return type, but has no return statements "
33403342
"in its body from which to infer an underlying type", ())
@@ -3346,9 +3348,6 @@ NOTE(opaque_type_underlying_type_candidate_here,none,
33463348
ERROR(opaque_type_self_referential_underlying_type,none,
33473349
"function opaque return type was inferred as %0, which defines the "
33483350
"opaque type in terms of itself", (Type))
3349-
ERROR(opaque_type_var_no_underlying_type,none,
3350-
"property declares an opaque return type, but cannot infer the "
3351-
"underlying type from its initializer expression", ())
33523351

33533352
//------------------------------------------------------------------------------
33543353
// MARK: Type Check Patterns

0 commit comments

Comments
 (0)