Skip to content

Commit 1fb6586

Browse files
committed
---
yaml --- r: 274427 b: refs/heads/master-next c: c826dea h: refs/heads/master i: 274425: 4ca1208 274423: f8b06b1
1 parent d579be0 commit 1fb6586

File tree

66 files changed

+454
-820
lines changed

Some content is hidden

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

66 files changed

+454
-820
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
refs/heads/master: cbef630f19f869ab5279731179bd731f12b3b9d5
3-
refs/heads/master-next: 02672a01fadeb8476d31c9dc737a0e397c592966
3+
refs/heads/master-next: c826deadb416227425e631d5d500d2845dabbe15
44
refs/tags/osx-passed: b6b74147ef8a386f532cf9357a1bde006e552c54
55
refs/tags/swift-2.2-SNAPSHOT-2015-12-01-a: 6bb18e013c2284f2b45f5f84f2df2887dc0f7dea
66
refs/tags/swift-2.2-SNAPSHOT-2015-12-01-b: 66d897bfcf64a82cb9a87f5e663d889189d06d07

branches/master-next/benchmark/single-source/ArrayInClass.swift

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -17,12 +17,11 @@ public let ArrayInClass = [
1717
runFunction: run_ArrayInClass,
1818
tags: [.validation, .api, .Array],
1919
setUpFunction: { ac = ArrayContainer() },
20-
tearDownFunction: { ac = nil },
21-
legacyFactor: 5),
20+
tearDownFunction: { ac = nil }),
2221
BenchmarkInfo(name: "DistinctClassFieldAccesses",
2322
runFunction: run_DistinctClassFieldAccesses,
24-
tags: [.validation, .api, .Array],
25-
setUpFunction: { workload = ClassWithArrs(N: 10_000) },
23+
tags: [.unstable, .api, .Array],
24+
setUpFunction: { workload = ClassWithArrs(N: 100_000) },
2625
tearDownFunction: { workload = nil }),
2726
]
2827

@@ -32,7 +31,7 @@ class ArrayContainer {
3231
final var arr : [Int]
3332

3433
init() {
35-
arr = [Int] (repeating: 0, count: 20_000)
34+
arr = [Int] (repeating: 0, count: 100_000)
3635
}
3736

3837
func runLoop(_ N: Int) {

branches/master-next/benchmark/single-source/DictionaryOfAnyHashableStrings.swift

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -21,15 +21,18 @@ public var DictionaryOfAnyHashableStrings = [
2121
name: "DictionaryOfAnyHashableStrings_insert",
2222
runFunction: run_DictionaryOfAnyHashableStrings_insert,
2323
tags: [.abstraction, .runtime, .cpubench],
24-
setUpFunction: { keys = buildKeys(50) },
25-
legacyFactor: 14
24+
setUpFunction: {
25+
keys = buildKeys(500)
26+
}
2627
),
2728
BenchmarkInfo(
2829
name: "DictionaryOfAnyHashableStrings_lookup",
2930
runFunction: run_DictionaryOfAnyHashableStrings_lookup,
3031
tags: [.abstraction, .runtime, .cpubench],
31-
setUpFunction: { keys = buildKeys(50); workload = buildWorkload() },
32-
legacyFactor: 24
32+
setUpFunction: {
33+
keys = buildKeys(500)
34+
workload = buildWorkload()
35+
}
3336
),
3437
]
3538

@@ -62,7 +65,7 @@ func buildWorkload() -> [AnyHashable: Any] {
6265
@inline(never)
6366
public func run_DictionaryOfAnyHashableStrings_insert(_ n: Int) {
6467
precondition(keys.count > 0)
65-
for _ in 1...n {
68+
for _ in 0 ... n {
6669
blackHole(buildWorkload())
6770
}
6871
}
@@ -71,7 +74,7 @@ public func run_DictionaryOfAnyHashableStrings_insert(_ n: Int) {
7174
public func run_DictionaryOfAnyHashableStrings_lookup(_ n: Int) {
7275
precondition(workload.count > 0)
7376
precondition(keys.count > 0)
74-
for _ in 1...n {
77+
for _ in 0 ... n {
7578
for i in 0 ..< keys.count {
7679
let key = keys[i]
7780
CheckResults((workload[key] as! Int) == i)

branches/master-next/benchmark/single-source/Substring.swift

Lines changed: 20 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,6 @@ public let SubstringTest = [
3131

3232
// A string that doesn't fit in small string storage and doesn't fit in Latin-1
3333
let longWide = "fὢasὢodὢijὢadὢolὢsjὢalὢsdὢjlὢasὢdfὢijὢliὢsdὢjøὢslὢdiὢalὢiὢ"
34-
let (s1, ss1) = equivalentWithDistinctBuffers()
35-
let (s2, ss2) = equivalentWithDistinctBuffers()
3634

3735
@inline(never)
3836
public func run_SubstringFromLongString(_ N: Int) {
@@ -91,33 +89,33 @@ private func equivalentWithDistinctBuffers() -> (String, Substring) {
9189

9290
@inline(never)
9391
public func run_EqualStringSubstring(_ N: Int) {
94-
let (a, b) = (s1, ss1)
92+
let (a, b) = equivalentWithDistinctBuffers()
9593
for _ in 1...N*500 {
9694
blackHole(a == b)
9795
}
9896
}
9997

10098
@inline(never)
10199
public func run_EqualSubstringString(_ N: Int) {
102-
let (a, b) = (s1, ss1)
100+
let (a, b) = equivalentWithDistinctBuffers()
103101
for _ in 1...N*500 {
104102
blackHole(b == a)
105103
}
106104
}
107105

108106
@inline(never)
109107
public func run_EqualSubstringSubstring(_ N: Int) {
110-
let (_, a) = (s1, ss1)
111-
let (_, b) = (s2, ss2)
108+
let (_, a) = equivalentWithDistinctBuffers()
109+
let (_, b) = equivalentWithDistinctBuffers()
112110
for _ in 1...N*500 {
113111
blackHole(a == b)
114112
}
115113
}
116114

117115
@inline(never)
118116
public func run_EqualSubstringSubstringGenericEquatable(_ N: Int) {
119-
let (_, a) = (s1, ss1)
120-
let (_, b) = (s2, ss2)
117+
let (_, a) = equivalentWithDistinctBuffers()
118+
let (_, b) = equivalentWithDistinctBuffers()
121119
func check<T>(_ x: T, _ y: T) where T : Equatable {
122120
blackHole(x == y)
123121
}
@@ -134,24 +132,24 @@ where T : StringProtocol, U : StringProtocol {
134132

135133
@inline(never)
136134
public func run _EqualStringSubstringGenericStringProtocol(_ N: Int) {
137-
let (a, b) = (s1, ss1)
135+
let (a, b) = equivalentWithDistinctBuffers()
138136
for _ in 1...N*500 {
139137
checkEqual(a, b)
140138
}
141139
}
142140

143141
@inline(never)
144142
public func run _EqualSubstringStringGenericStringProtocol(_ N: Int) {
145-
let (a, b) = (s1, ss1)
143+
let (a, b) = equivalentWithDistinctBuffers()
146144
for _ in 1...N*500 {
147145
checkEqual(b, a)
148146
}
149147
}
150148

151149
@inline(never)
152150
public func run _EqualSubstringSubstringGenericStringProtocol(_ N: Int) {
153-
let (_, a) = (s1, ss1)
154-
let (_, b) = (s2, ss2)
151+
let (_, a) = equivalentWithDistinctBuffers()
152+
let (_, b) = equivalentWithDistinctBuffers()
155153
for _ in 1...N*500 {
156154
checkEqual(a, b)
157155
}
@@ -163,15 +161,15 @@ public func run _EqualSubstringSubstringGenericStringProtocol(_ N: Int) {
163161
/*
164162
@inline(never)
165163
public func run _LessStringSubstring(_ N: Int) {
166-
let (a, b) = (s1, ss1)
164+
let (a, b) = equivalentWithDistinctBuffers()
167165
for _ in 1...N*500 {
168166
blackHole(a < b)
169167
}
170168
}
171169

172170
@inline(never)
173171
public func run _LessSubstringString(_ N: Int) {
174-
let (a, b) = (s1, ss1)
172+
let (a, b) = equivalentWithDistinctBuffers()
175173
for _ in 1...N*500 {
176174
blackHole(b < a)
177175
}
@@ -180,17 +178,17 @@ public func run _LessSubstringString(_ N: Int) {
180178

181179
@inline(never)
182180
public func run_LessSubstringSubstring(_ N: Int) {
183-
let (_, a) = (s1, ss1)
184-
let (_, b) = (s2, ss2)
181+
let (_, a) = equivalentWithDistinctBuffers()
182+
let (_, b) = equivalentWithDistinctBuffers()
185183
for _ in 1...N*500 {
186184
blackHole(a < b)
187185
}
188186
}
189187

190188
@inline(never)
191189
public func run_LessSubstringSubstringGenericComparable(_ N: Int) {
192-
let (_, a) = (s1, ss1)
193-
let (_, b) = (s2, ss2)
190+
let (_, a) = equivalentWithDistinctBuffers()
191+
let (_, b) = equivalentWithDistinctBuffers()
194192
func check<T>(_ x: T, _ y: T) where T : Comparable {
195193
blackHole(x < y)
196194
}
@@ -253,24 +251,24 @@ where T : StringProtocol, U : StringProtocol {
253251

254252
@inline(never)
255253
public func run _LessStringSubstringGenericStringProtocol(_ N: Int) {
256-
let (a, b) = (s1, ss1)
254+
let (a, b) = equivalentWithDistinctBuffers()
257255
for _ in 1...N*500 {
258256
checkLess(a, b)
259257
}
260258
}
261259

262260
@inline(never)
263261
public func run _LessSubstringStringGenericStringProtocol(_ N: Int) {
264-
let (a, b) = (s1, ss1)
262+
let (a, b) = equivalentWithDistinctBuffers()
265263
for _ in 1...N*500 {
266264
checkLess(b, a)
267265
}
268266
}
269267

270268
@inline(never)
271269
public func run _LessSubstringSubstringGenericStringProtocol(_ N: Int) {
272-
let (_, a) = (s1, ss1)
273-
let (_, b) = (s2, ss2)
270+
let (_, a) = equivalentWithDistinctBuffers()
271+
let (_, b) = equivalentWithDistinctBuffers()
274272
for _ in 1...N*500 {
275273
checkLess(a, b)
276274
}

branches/master-next/include/swift-c/SyntaxParser/SwiftSyntaxParser.h

Lines changed: 0 additions & 58 deletions
Original file line numberDiff line numberDiff line change
@@ -232,64 +232,6 @@ swiftparse_parse_string(swiftparse_parser_t, const char *source);
232232
/// declarations, etc.
233233
SWIFTPARSE_PUBLIC const char* swiftparse_syntax_structure_versioning_identifier(void);
234234

235-
typedef struct {
236-
/// Represents the range for the fixit.
237-
swiftparse_range_t range;
238-
/// Represent the text for replacement.
239-
const char* text;
240-
} swiftparse_diagnostic_fixit_t;
241-
242-
typedef enum {
243-
SWIFTPARSER_DIAGNOSTIC_SEVERITY_ERROR = 0,
244-
SWIFTPARSER_DIAGNOSTIC_SEVERITY_WARNING = 1,
245-
SWIFTPARSER_DIAGNOSTIC_SEVERITY_NOTE = 2,
246-
} swiftparser_diagnostic_severity_t;
247-
248-
/// This is for the client to ask further information about a diagnostic that is
249-
/// associated with the pointer.
250-
/// This pointer is only valid to access from within the
251-
/// swiftparse_diagnostic_handler_t block
252-
typedef const void* swiftparser_diagnostic_t;
253-
254-
/// Invoked by the parser when a diagnostic is emitted.
255-
typedef void(^swiftparse_diagnostic_handler_t)(swiftparser_diagnostic_t);
256-
257-
/// Set the \c swiftparse_diagnostic_handler_t block to be used by the parser.
258-
///
259-
/// It isn't required to set a \c swiftparse_diagnostic_handler_t block.
260-
SWIFTPARSE_PUBLIC void
261-
swiftparse_parser_set_diagnostic_handler(swiftparse_parser_t,
262-
swiftparse_diagnostic_handler_t);
263-
264-
/// Get the message of a swiftparser_diagnostic_t
265-
SWIFTPARSE_PUBLIC const char*
266-
swiftparse_diagnostic_get_message(swiftparser_diagnostic_t);
267-
268-
/// Get the source location in byte offset to where the diagnostic is issued
269-
/// in the source buffer.
270-
SWIFTPARSE_PUBLIC
271-
unsigned swiftparse_diagnostic_get_source_loc(swiftparser_diagnostic_t diag);
272-
273-
/// Get the number of fixits of a swiftparser_diagnostic_t
274-
SWIFTPARSE_PUBLIC unsigned
275-
swiftparse_diagnostic_get_fixit_count(swiftparser_diagnostic_t);
276-
277-
/// Get the fixit at the specified index of a swiftparser_diagnostic_t
278-
SWIFTPARSE_PUBLIC swiftparse_diagnostic_fixit_t
279-
swiftparse_diagnostic_get_fixit(swiftparser_diagnostic_t, unsigned);
280-
281-
/// Get the number of highlight ranges of a swiftparser_diagnostic_t
282-
SWIFTPARSE_PUBLIC unsigned
283-
swiftparse_diagnostic_get_range_count(swiftparser_diagnostic_t);
284-
285-
/// Get the highlight range at the specified index of a swiftparser_diagnostic_t
286-
SWIFTPARSE_PUBLIC swiftparse_range_t
287-
swiftparse_diagnostic_get_range(swiftparser_diagnostic_t, unsigned);
288-
289-
/// Get the severity of a swiftparser_diagnostic_t
290-
SWIFTPARSE_PUBLIC swiftparser_diagnostic_severity_t
291-
swiftparse_diagnostic_get_severity(swiftparser_diagnostic_t diag);
292-
293235
SWIFTPARSE_END_DECLS
294236

295237
#endif

branches/master-next/include/swift/AST/Expr.h

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -823,11 +823,11 @@ class NumberLiteralExpr : public LiteralExpr {
823823
}
824824
};
825825

826+
826827
/// Integer literal with a '+' or '-' sign, like '+4' or '- 2'.
827828
///
828-
/// After semantic analysis assigns types, this is guaranteed to have
829-
/// a BuiltinIntegerType or be a normal type and implicitly be
830-
/// AnyBuiltinIntegerType.
829+
/// After semantic analysis assigns types, this is guaranteed to only have
830+
/// a BuiltinIntegerType.
831831
class IntegerLiteralExpr : public NumberLiteralExpr {
832832
public:
833833
IntegerLiteralExpr(StringRef Val, SourceLoc DigitsLoc, bool Implicit = false)
@@ -855,12 +855,9 @@ class IntegerLiteralExpr : public NumberLiteralExpr {
855855
};
856856

857857
/// FloatLiteralExpr - Floating point literal, like '4.0'. After semantic
858-
/// analysis assigns types, BuiltinTy is guaranteed to only have a
858+
/// analysis assigns types, this is guaranteed to only have a
859859
/// BuiltinFloatingPointType.
860860
class FloatLiteralExpr : public NumberLiteralExpr {
861-
/// This is the type of the builtin literal.
862-
Type BuiltinTy;
863-
864861
public:
865862
FloatLiteralExpr(StringRef Val, SourceLoc Loc, bool Implicit = false)
866863
: NumberLiteralExpr(ExprKind::FloatLiteral, Val, Loc, Implicit)
@@ -873,9 +870,6 @@ class FloatLiteralExpr : public NumberLiteralExpr {
873870
static bool classof(const Expr *E) {
874871
return E->getKind() == ExprKind::FloatLiteral;
875872
}
876-
877-
Type getBuiltinType() const { return BuiltinTy; }
878-
void setBuiltinType(Type ty) { BuiltinTy = ty; }
879873
};
880874

881875
/// A Boolean literal ('true' or 'false')

branches/master-next/include/swift/Demangling/Demangle.h

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -35,9 +35,9 @@ namespace Demangle {
3535

3636
enum class SymbolicReferenceKind : uint8_t;
3737

38-
/// A simple default implementation that assigns letters to type parameters in
38+
/// A simple default implementation that assigns letters to archetypes in
3939
/// alphabetic order.
40-
std::string genericParameterName(uint64_t depth, uint64_t index);
40+
std::string archetypeName(uint64_t index, uint64_t depth);
4141

4242
/// Display style options for the demangler.
4343
struct DemangleOptions {
@@ -57,8 +57,7 @@ struct DemangleOptions {
5757
bool ShortenArchetype = false;
5858
bool ShowPrivateDiscriminators = true;
5959
bool ShowFunctionArgumentTypes = true;
60-
std::function<std::string(uint64_t, uint64_t)> GenericParameterName =
61-
genericParameterName;
60+
std::function<std::string(uint64_t, uint64_t)> ArchetypeName = archetypeName;
6261

6362
DemangleOptions() {}
6463

branches/master-next/include/swift/LLVMPasses/Passes.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ namespace swift {
3030
const llvm::PreservedAnalyses &) { return false; }
3131

3232
using AAResultBase::getModRefInfo;
33-
llvm::ModRefInfo getModRefInfo(const llvm::CallBase *Call,
33+
llvm::ModRefInfo getModRefInfo(llvm::ImmutableCallSite CS,
3434
const llvm::MemoryLocation &Loc);
3535
};
3636

branches/master-next/include/swift/Reflection/ReflectionContext.h

Lines changed: 1 addition & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -288,7 +288,7 @@ class ReflectionContext
288288
}
289289

290290
#elif defined(_WIN32)
291-
bool readPECOFFSections(RemoteAddress ImageStart) {
291+
bool addImage(RemoteAddress ImageStart) {
292292
auto DOSHdrBuf = this->getReader().readBytes(
293293
ImageStart, sizeof(llvm::object::dos_header));
294294
auto DOSHdr =
@@ -380,29 +380,6 @@ class ReflectionContext
380380
return true;
381381
}
382382

383-
bool addImage(RemoteAddress ImageStart) {
384-
auto Buf = this->getReader().readBytes(ImageStart,
385-
sizeof(llvm::object::dos_header));
386-
if (!Buf)
387-
return false;
388-
389-
auto DOSHdr = reinterpret_cast<const llvm::object::dos_header *>(Buf.get());
390-
if (!(DOSHdr->Magic[0] == 'M' && DOSHdr->Magic[1] == 'Z'))
391-
return false;
392-
393-
auto PEHeaderAddress =
394-
ImageStart.getAddressData() + DOSHdr->AddressOfNewExeHeader;
395-
396-
Buf = this->getReader().readBytes(RemoteAddress(PEHeaderAddress),
397-
sizeof(llvm::COFF::PEMagic));
398-
if (!Buf)
399-
return false;
400-
401-
if (memcmp(Buf.get(), llvm::COFF::PEMagic, sizeof(llvm::COFF::PEMagic)))
402-
return false;
403-
404-
return readPECOFFSections(ImageStart);
405-
}
406383
#else // ELF platforms.
407384
template <typename T> bool readELFSections(RemoteAddress ImageStart) {
408385
auto Buf =

0 commit comments

Comments
 (0)