Skip to content

Commit c47426f

Browse files
committed
---
yaml --- r: 286654 b: refs/heads/master-next c: 8cb4456 h: refs/heads/master
1 parent b874c38 commit c47426f

File tree

30 files changed

+264
-559
lines changed

30 files changed

+264
-559
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: a67ffadd758dfc7a0f10a8afde063b8864663208
3-
refs/heads/master-next: 0da04ca1eded63d5f1aba74efa4c551ace560486
3+
refs/heads/master-next: 8cb4456d337f99dea8bca08901c8b554f1e65d58
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/CHANGELOG.md

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -197,9 +197,7 @@ Swift 5.1
197197
}
198198
```
199199

200-
* [SR-9827][]:
201-
202-
`weak` and `unowned` stored properties no longer inhibit the
200+
* `weak` and `unowned` stored properties no longer inhibit the
203201
automatic synthesis of `Equatable` or `Hashable` conformance.
204202

205203
* [SR-2688][]:
@@ -7697,4 +7695,3 @@ Swift 1.0
76977695
[SR-8109]: <https://bugs.swift.org/browse/SR-8109>
76987696
[SR-8546]: <https://bugs.swift.org/browse/SR-8546>
76997697
[SR-9043]: <https://bugs.swift.org/browse/SR-9043>
7700-
[SR-9827]: <https://bugs.swift.org/browse/SR-9827>

branches/master-next/benchmark/CMakeLists.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,6 @@ set(SWIFT_BENCH_MODULES
9292
single-source/Hash
9393
single-source/Histogram
9494
single-source/InsertCharacter
95-
single-source/IntegerParsing
9695
single-source/Integrate
9796
single-source/IterateData
9897
single-source/Join

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

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

branches/master-next/benchmark/utils/main.swift

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,6 @@ import Hanoi
8080
import Hash
8181
import Histogram
8282
import InsertCharacter
83-
import IntegerParsing
8483
import Integrate
8584
import IterateData
8685
import Join
@@ -254,7 +253,6 @@ registerBenchmark(Hanoi)
254253
registerBenchmark(HashTest)
255254
registerBenchmark(Histogram)
256255
registerBenchmark(InsertCharacter)
257-
registerBenchmark(IntegerParsing)
258256
registerBenchmark(IntegrateTest)
259257
registerBenchmark(IterateData)
260258
registerBenchmark(Join)
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
//===--- AccessedStorage.def ----------------------------*- c++ -*---------===//
2+
//
3+
// This source file is part of the Swift.org open source project
4+
//
5+
// Copyright (c) 2014 - 2018 Apple Inc. and the Swift project authors
6+
// Licensed under Apache License v2.0 with Runtime Library Exception
7+
//
8+
// See https://swift.org/LICENSE.txt for license information
9+
// See https://swift.org/CONTRIBUTORS.txt for the list of Swift project authors
10+
//
11+
//===----------------------------------------------------------------------===//
12+
///
13+
/// \file
14+
///
15+
/// A file used for metaprogramming with accessed storage. Used to enable
16+
/// easily updateable visitors.
17+
///
18+
//===----------------------------------------------------------------------===//
19+
20+
#ifndef ACCESSED_STORAGE
21+
#error "Must define accesed storage before including this?!"
22+
#endif
23+
24+
#ifndef ACCESSED_STORAGE_RANGE
25+
#define ACCESSED_STORAGE_RANGE(Name, Start, End)
26+
#endif
27+
28+
ACCESSED_STORAGE(Box)
29+
ACCESSED_STORAGE(Stack)
30+
ACCESSED_STORAGE(Global)
31+
ACCESSED_STORAGE(Class)
32+
ACCESSED_STORAGE(Argument)
33+
ACCESSED_STORAGE(Yield)
34+
ACCESSED_STORAGE(Nested)
35+
ACCESSED_STORAGE(Unidentified)
36+
ACCESSED_STORAGE_RANGE(AccessedStorageKind, Box, Unidentified)
37+
38+
#undef ACCESSED_STORAGE_RANGE
39+
#undef ACCESSED_STORAGE

branches/master-next/include/swift/SIL/MemAccessUtils.h

Lines changed: 25 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -106,15 +106,11 @@ class AccessedStorage {
106106
/// Enumerate over all valid begin_access bases. Clients can use a covered
107107
/// switch to warn if findAccessedAddressBase ever adds a case.
108108
enum Kind : uint8_t {
109-
Box,
110-
Stack,
111-
Global,
112-
Class,
113-
Argument,
114-
Yield,
115-
Nested,
116-
Unidentified,
117-
NumKindBits = countBitsUsed(static_cast<unsigned>(Unidentified))
109+
#define ACCESSED_STORAGE(Name) Name,
110+
#define ACCESSED_STORAGE_RANGE(Name, Start, End) \
111+
First_##Name = Start, Last_##Name = End,
112+
#include "swift/SIL/AccessedStorage.def"
113+
NumKindBits = countBitsUsed(unsigned(Last_AccessedStorageKind))
118114
};
119115

120116
static const char *getKindName(Kind k);
@@ -326,6 +322,26 @@ class AccessedStorage {
326322
bool operator==(const AccessedStorage &) const = delete;
327323
bool operator!=(const AccessedStorage &) const = delete;
328324
};
325+
326+
template <class ImplTy, class ResultTy = void, typename... ArgTys>
327+
class AccessedStorageVisitor {
328+
ImplTy &asImpl() { return static_cast<ImplTy &>(*this); }
329+
330+
public:
331+
#define ACCESSED_STORAGE(Name) \
332+
ResultTy visit##Name(const AccessedStorage &storage, ArgTys &&... args);
333+
#include "swift/SIL/AccessedStorage.def"
334+
335+
ResultTy visit(const AccessedStorage &storage, ArgTys &&... args) {
336+
switch (storage.getKind()) {
337+
#define ACCESSED_STORAGE(Name) \
338+
case AccessedStorage::Name: \
339+
return asImpl().visit##Name(storage, std::forward<ArgTys>(args)...);
340+
#include "swift/SIL/AccessedStorage.def"
341+
}
342+
}
343+
};
344+
329345
} // end namespace swift
330346

331347
namespace llvm {

branches/master-next/include/swift/SwiftRemoteMirror/SwiftRemoteMirrorTypes.h

Lines changed: 9 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -24,23 +24,7 @@
2424
extern "C" {
2525
#endif
2626

27-
// Pointers used here need to be pointer-sized on watchOS for binary
28-
// compatibility. Everywhere else, they are 64-bit so 32-bit processes can
29-
// potentially read from 64-bit processes.
30-
#if defined(__APPLE__) && defined(__MACH__)
31-
#include <TargetConditionals.h>
32-
#if TARGET_OS_WATCH
33-
#define SWIFT_REFLECTION_NATIVE_POINTERS 1
34-
#endif
35-
#endif
36-
37-
#if SWIFT_REFLECTION_NATIVE_POINTERS
38-
typedef uintptr_t swift_reflection_ptr_t;
39-
#else
40-
typedef uint64_t swift_reflection_ptr_t;
41-
#endif
42-
43-
typedef swift_reflection_ptr_t swift_typeref_t;
27+
typedef uint64_t swift_typeref_t;
4428

4529
/// Represents one of the Swift reflection sections of an image.
4630
typedef struct swift_reflection_section {
@@ -53,37 +37,37 @@ typedef struct swift_reflection_section {
5337
typedef struct swift_reflection_info {
5438
struct {
5539
swift_reflection_section_t section;
56-
swift_reflection_ptr_t offset;
40+
uint64_t offset;
5741
} field;
5842

5943
struct {
6044
swift_reflection_section_t section;
61-
swift_reflection_ptr_t offset;
45+
uint64_t offset;
6246
} associated_types;
6347

6448
struct {
6549
swift_reflection_section_t section;
66-
swift_reflection_ptr_t offset;
50+
uint64_t offset;
6751
} builtin_types;
6852

6953
struct {
7054
swift_reflection_section_t section;
71-
swift_reflection_ptr_t offset;
55+
uint64_t offset;
7256
} capture;
7357

7458
struct {
7559
swift_reflection_section_t section;
76-
swift_reflection_ptr_t offset;
60+
uint64_t offset;
7761
} type_references;
7862

7963
struct {
8064
swift_reflection_section_t section;
81-
swift_reflection_ptr_t offset;
65+
uint64_t offset;
8266
} reflection_strings;
8367

8468
// Start address in local and remote address spaces.
85-
swift_reflection_ptr_t LocalStartAddress;
86-
swift_reflection_ptr_t RemoteStartAddress;
69+
uint64_t LocalStartAddress;
70+
uint64_t RemoteStartAddress;
8771
} swift_reflection_info_t;
8872

8973
/// The layout kind of a Swift type.

branches/master-next/lib/PrintAsObjC/PrintAsObjC.cpp

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -322,13 +322,6 @@ class ObjCPrinter : private DeclVisitor<ObjCPrinter>,
322322
void visitClassDecl(ClassDecl *CD) {
323323
printDocumentationComment(CD);
324324

325-
// This is just for testing, so we check explicitly for the attribute instead
326-
// of asking if the class is weak imported. If the class has availablility,
327-
// we'll print a SWIFT_AVAIALBLE() which implies __attribute__((weak_imported))
328-
// already.
329-
if (CD->getAttrs().hasAttribute<WeakLinkedAttr>())
330-
os << "SWIFT_WEAK_IMPORT\n";
331-
332325
bool hasResilientAncestry =
333326
CD->checkAncestry().contains(AncestryFlags::ResilientOther);
334327
if (hasResilientAncestry) {
@@ -2724,9 +2717,6 @@ class ModuleWriter {
27242717
"#if !defined(SWIFT_AVAILABILITY)\n"
27252718
"# define SWIFT_AVAILABILITY(plat, ...) __attribute__((availability(plat, __VA_ARGS__)))\n"
27262719
"#endif\n"
2727-
"#if !defined(SWIFT_WEAK_IMPORT)\n"
2728-
"# define SWIFT_WEAK_IMPORT __attribute__((weak_import))\n"
2729-
"#endif\n"
27302720
"#if !defined(SWIFT_DEPRECATED)\n"
27312721
"# define SWIFT_DEPRECATED __attribute__((deprecated))\n"
27322722
"#endif\n"

0 commit comments

Comments
 (0)