Skip to content

Commit 6109041

Browse files
committed
---
yaml --- r: 286647 b: refs/heads/master-next c: 11c6657 h: refs/heads/master i: 286645: 640771d 286643: 650504e 286639: 5a51dfc
1 parent 827155d commit 6109041

File tree

93 files changed

+715
-1164
lines changed

Some content is hidden

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

93 files changed

+715
-1164
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: 9e1651645bd59edaca93b966af18588d6aeccf4b
3+
refs/heads/master-next: 11c665715cff30b648579f079ace78ef20336b55
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/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)

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -856,9 +856,9 @@ class ASTContext final {
856856
return getIdentifier(getSwiftName(kind));
857857
}
858858

859-
/// Populate \p names with visible top level module names.
860-
/// This guarantees that resulted \p names doesn't have duplicated names.
861-
void getVisibleTopLevelModuleNames(SmallVectorImpl<Identifier> &names) const;
859+
/// Collect visible clang modules from the ClangModuleLoader. These modules are
860+
/// not necessarily loaded.
861+
void getVisibleTopLevelClangModules(SmallVectorImpl<clang::Module*> &Modules) const;
862862

863863
private:
864864
/// Register the given generic signature builder to be used as the canonical

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

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -82,13 +82,6 @@ class ModuleLoader {
8282
public:
8383
virtual ~ModuleLoader() = default;
8484

85-
/// Collect visible module names.
86-
///
87-
/// Append visible module names to \p names. Note that names are possibly
88-
/// duplicated, and not guaranteed to be ordered in any way.
89-
virtual void collectVisibleTopLevelModuleNames(
90-
SmallVectorImpl<Identifier> &names) const = 0;
91-
9285
/// Check whether the module with a given name can be imported without
9386
/// importing it.
9487
///

branches/master-next/include/swift/ClangImporter/ClangImporter.h

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -119,11 +119,6 @@ class ClangImporter final : public ClangModuleLoader {
119119
static std::shared_ptr<clang::DependencyCollector>
120120
createDependencyCollector(bool TrackSystemDeps);
121121

122-
/// Append visible module names to \p names. Note that names are possibly
123-
/// duplicated, and not guaranteed to be ordered in any way.
124-
void collectVisibleTopLevelModuleNames(
125-
SmallVectorImpl<Identifier> &names) const override;
126-
127122
/// Check whether the module with a given name can be imported without
128123
/// importing it.
129124
///
@@ -341,7 +336,7 @@ class ClangImporter final : public ClangModuleLoader {
341336
/// Calling this function does not load the module.
342337
void collectSubModuleNames(
343338
ArrayRef<std::pair<Identifier, SourceLoc>> path,
344-
std::vector<std::string> &names) const;
339+
std::vector<std::string> &names);
345340

346341
/// Given a Clang module, decide whether this module is imported already.
347342
static bool isModuleImported(const clang::Module *M);

branches/master-next/include/swift/DWARFImporter/DWARFImporter.h

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -66,9 +66,6 @@ class DWARFImporter final : public ClangModuleLoader {
6666

6767
~DWARFImporter();
6868

69-
void collectVisibleTopLevelModuleNames(
70-
SmallVectorImpl<Identifier> &names) const override;
71-
7269
/// Check whether the module with a given name can be imported without
7370
/// importing it.
7471
///

branches/master-next/include/swift/Frontend/ParseableInterfaceModuleLoader.h

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -154,11 +154,6 @@ class ParseableInterfaceModuleLoader : public SerializedModuleLoaderBase {
154154
RemarkOnRebuildFromInterface));
155155
}
156156

157-
/// Append visible module names to \p names. Note that names are possibly
158-
/// duplicated, and not guaranteed to be ordered in any way.
159-
void collectVisibleTopLevelModuleNames(
160-
SmallVectorImpl<Identifier> &names) const override;
161-
162157
/// Unconditionally build \p InPath (a swiftinterface file) to \p OutPath (as
163158
/// a swiftmodule file).
164159
///

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

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -30,14 +30,8 @@ namespace swift {
3030
const llvm::PreservedAnalyses &) { return false; }
3131

3232
using AAResultBase::getModRefInfo;
33-
llvm::ModRefInfo getModRefInfo(const llvm::CallBase *Call,
34-
const llvm::MemoryLocation &Loc) {
35-
llvm::AAQueryInfo AAQI;
36-
return getModRefInfo(Call, Loc, AAQI);
37-
}
38-
llvm::ModRefInfo getModRefInfo(const llvm::CallBase *Call,
39-
const llvm::MemoryLocation &Loc,
40-
llvm::AAQueryInfo &AAQI);
33+
llvm::ModRefInfo getModRefInfo(llvm::ImmutableCallSite CS,
34+
const llvm::MemoryLocation &Loc);
4135
};
4236

4337
class SwiftAAWrapperPass : public llvm::ImmutablePass {
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/Sema/SourceLoader.h

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -48,11 +48,6 @@ class SourceLoader : public ModuleLoader {
4848
SourceLoader &operator=(const SourceLoader &) = delete;
4949
SourceLoader &operator=(SourceLoader &&) = delete;
5050

51-
/// Append visible module names to \p names. Note that names are possibly
52-
/// duplicated, and not guaranteed to be ordered in any way.
53-
void collectVisibleTopLevelModuleNames(
54-
SmallVectorImpl<Identifier> &names) const override;
55-
5651
/// Check whether the module with a given name can be imported without
5752
/// importing it.
5853
///

0 commit comments

Comments
 (0)