Skip to content

Commit 994e00e

Browse files
committed
---
yaml --- r: 237567 b: refs/heads/master-next c: 958ee1a h: refs/heads/master i: 237565: 2aeb419 237563: db0e843 237559: 99fd1d2 237551: aa78284 237535: 1f67b8c 237503: a76939f 237439: 5d96e94 237311: 9722d98 237055: 06bfcf7 236543: d881cd7 235519: bcf0f3c 233471: 4aa92c8 229375: 9ccee7d
1 parent 3fddca5 commit 994e00e

File tree

155 files changed

+10558
-60128
lines changed

Some content is hidden

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

155 files changed

+10558
-60128
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: ecf29e694a359d759ff0ce3d04fad1b06ec987ce
3-
refs/heads/master-next: 87dcd37e0bfa647c867224a1d540003f780239f8
3+
refs/heads/master-next: 958ee1a82b30b01a570a0c6058a13667d847864e
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
@@ -88,7 +88,6 @@ set(SWIFT_BENCH_MODULES
8888
single-source/Hash
8989
single-source/HashQuadratic
9090
single-source/Histogram
91-
single-source/InsertCharacter
9291
single-source/Integrate
9392
single-source/IterateData
9493
single-source/Join

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

Lines changed: 0 additions & 98 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
@@ -76,7 +76,6 @@ import Hanoi
7676
import Hash
7777
import HashQuadratic
7878
import Histogram
79-
import InsertCharacter
8079
import Integrate
8180
import IterateData
8281
import Join
@@ -242,7 +241,6 @@ registerBenchmark(Hanoi)
242241
registerBenchmark(HashTest)
243242
registerBenchmark(HashQuadratic)
244243
registerBenchmark(Histogram)
245-
registerBenchmark(InsertCharacter)
246244
registerBenchmark(IntegrateTest)
247245
registerBenchmark(IterateData)
248246
registerBenchmark(Join)

branches/master-next/docs/GenericsManifesto.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -346,7 +346,7 @@ public struct ZipIterator<... Iterators : IteratorProtocol> : Iterator { // zer
346346
public mutating func next() -> Element? {
347347
if reachedEnd { return nil }
348348

349-
guard let values = (iterators.next()...) else { // call "next" on each of the iterators, put the results into a tuple named "values"
349+
guard let values = (iterators.next()...) { // call "next" on each of the iterators, put the results into a tuple named "values"
350350
reachedEnd = true
351351
return nil
352352
}

branches/master-next/docs/WindowsBuild.md

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -89,12 +89,6 @@ set swift_source_dir=path-to-directory-containing-all-cloned-repositories
8989
(`Debug`, `RelWithDebInfoAssert` or `Release`) to avoid conflicts between the debug and
9090
non-debug version of the MSCRT library.
9191

92-
- Set up the `visualc` and `ucrt` modules by copying `ucrt.modulemap` located at
93-
`swift/stdlib/public/Platform/ucrt.modulemap` into
94-
`${UniversalCRTSdkDir}/Include/${UCRTVersion}/ucrt` as `module.modulemap` and copying `visualc.modulemap` located at `swift/stdlib/public/Platform/visualc.modulemap` into `${VCToolsInstallDir}/include` as `module.modulemap`
95-
96-
97-
9892
### 5. Build CMark
9993
- This must be done from within a developer command prompt. CMark is a fairly
10094
small project and should only take a few minutes to build.
@@ -156,9 +150,9 @@ cmake -G "Ninja" "%swift_source_dir%/swift"^
156150
-DSWIFT_PATH_TO_LLVM_BUILD="%swift_source_dir%/build/Ninja-DebugAssert/llvm-windows-amd64"^
157151
-DSWIFT_PATH_TO_CLANG_SOURCE="%swift_source_dir%/llvm/tools/clang"^
158152
-DSWIFT_PATH_TO_CLANG_BUILD="%swift_source_dir%/build/Ninja-DebugAssert/llvm-windows-amd64"^
159-
-DICU_UC_INCLUDE_DIRS="%swift_source_dir%/icu/include"^
153+
-DICU_UC_INCLUDE_DIR="%swift_source_dir%/icu/include"^
160154
-DICU_UC_LIBRARY_DIRS="%swift_source_dir%/icu/lib64"^
161-
-DICU_I18N_INCLUDE_DIRS="%swift_source_dir%/icu/include"^
155+
-DICU_I18N_INCLUDE_DIR="%swift_source_dir%/icu/include"^
162156
-DICU_I18N_LIBRARY_DIRS="%swift_source_dir%/icu/lib64"^
163157
-DICU_UC_LIB_NAME="icuuc"^
164158
-DICU_I18N_LIB_NAME="icuin"^

branches/master-next/docs/WindowsCrossCompile.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,9 @@ export VCToolsInstallDir=".../Microsoft Visual Studio/2017/Community"
1919
## 2. Set up the `visualc` and `ucrt` modules
2020
The `ucrt.modulemap` located at
2121
`swift/stdlib/public/Platform/ucrt.modulemap` needs to be copied into
22-
`${UniversalCRTSdkDir}/Include/${UCRTVersion}/ucrt` as `module.modulemap`. The
23-
`visualc.modulemap` located at `swift/stdlib/public/Platform/visualc.modulemap`
24-
needs to be copied into `${VCToolsInstallDir}/include` as `module.modulemap`
22+
`${UniversalCRTSdkDir}/Include/${UCRTVersion}/ucrt`. The `visualc.modulemap`
23+
located at `swift/stdlib/public/Platform/visualc.modulemap` needs to be copied
24+
into `${VCToolsInstallDir}/include`.
2525

2626
## 3. Configure the runtime to be built with the just built `clang`
2727
Ensure that we use the tools from the just built LLVM and `clang` tools to

branches/master-next/include/swift/ABI/MetadataValues.h

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -880,11 +880,7 @@ using FunctionTypeFlags = TargetFunctionTypeFlags<size_t>;
880880

881881
template <typename int_type>
882882
class TargetParameterTypeFlags {
883-
enum : int_type {
884-
ValueOwnershipMask = 0x7F,
885-
VariadicMask = 0x80,
886-
AutoClosureMask = 0x100,
887-
};
883+
enum : int_type { ValueOwnershipMask = 0x7F, VariadicMask = 0x80 };
888884
int_type Data;
889885

890886
constexpr TargetParameterTypeFlags(int_type Data) : Data(Data) {}
@@ -904,15 +900,8 @@ class TargetParameterTypeFlags {
904900
(isVariadic ? VariadicMask : 0));
905901
}
906902

907-
constexpr TargetParameterTypeFlags<int_type>
908-
withAutoClosure(bool isAutoClosure) const {
909-
return TargetParameterTypeFlags<int_type>(
910-
(Data & ~AutoClosureMask) | (isAutoClosure ? AutoClosureMask : 0));
911-
}
912-
913903
bool isNone() const { return Data == 0; }
914904
bool isVariadic() const { return Data & VariadicMask; }
915-
bool isAutoClosure() const { return Data & AutoClosureMask; }
916905

917906
ValueOwnership getValueOwnership() const {
918907
return (ValueOwnership)(Data & ValueOwnershipMask);

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

Lines changed: 2 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -463,8 +463,7 @@ class alignas(1 << DeclAlignInBits) Decl {
463463
HasStubImplementation : 1
464464
);
465465

466-
SWIFT_INLINE_BITFIELD_EMPTY(TypeDecl, ValueDecl);
467-
SWIFT_INLINE_BITFIELD_EMPTY(AbstractTypeParamDecl, TypeDecl);
466+
SWIFT_INLINE_BITFIELD_EMPTY(AbstractTypeParamDecl, ValueDecl);
468467

469468
SWIFT_INLINE_BITFIELD_FULL(GenericTypeParamDecl, AbstractTypeParamDecl, 16+16,
470469
: NumPadBits,
@@ -473,7 +472,7 @@ class alignas(1 << DeclAlignInBits) Decl {
473472
Index : 16
474473
);
475474

476-
SWIFT_INLINE_BITFIELD_EMPTY(GenericTypeDecl, TypeDecl);
475+
SWIFT_INLINE_BITFIELD_EMPTY(GenericTypeDecl, ValueDecl);
477476

478477
SWIFT_INLINE_BITFIELD(TypeAliasDecl, GenericTypeDecl, 1+1,
479478
/// Whether the typealias forwards perfectly to its underlying type.
@@ -573,22 +572,6 @@ class alignas(1 << DeclAlignInBits) Decl {
573572
HasAnyUnavailableValues : 1
574573
);
575574

576-
SWIFT_INLINE_BITFIELD(ModuleDecl, TypeDecl, 1+1+1+1,
577-
/// If the module was or is being compiled with `-enable-testing`.
578-
TestingEnabled : 1,
579-
580-
/// If the module failed to load
581-
FailedToLoad : 1,
582-
583-
/// Whether the module is resilient.
584-
///
585-
/// \sa ResilienceStrategy
586-
RawResilienceStrategy : 1,
587-
588-
/// Whether all imports have been resolved. Used to detect circular imports.
589-
HasResolvedImports : 1
590-
);
591-
592575
SWIFT_INLINE_BITFIELD(PrecedenceGroupDecl, Decl, 1+2,
593576
/// Is this an assignment operator?
594577
IsAssignment : 1,

branches/master-next/include/swift/AST/DiagnosticsSema.def

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2277,7 +2277,7 @@ ERROR(multiple_enum_raw_types,none,
22772277
ERROR(raw_type_not_first,none,
22782278
"raw type %0 must appear first in the enum inheritance clause", (Type))
22792279
ERROR(raw_type_not_literal_convertible,none,
2280-
"raw type %0 is not expressible by a string, integer, or floating-point literal",
2280+
"raw type %0 is not expressible by any literal",
22812281
(Type))
22822282
ERROR(enum_raw_type_not_equatable,none,
22832283
"RawRepresentable conformance cannot be synthesized because raw type %0 is not "

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

Lines changed: 16 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -536,11 +536,22 @@ class alignas(8) Expr {
536536
LLVM_ATTRIBUTE_DEPRECATED(
537537
void dump() const LLVM_ATTRIBUTE_USED,
538538
"only for use within the debugger");
539-
void dump(raw_ostream &OS, unsigned Indent = 0) const;
540-
void dump(raw_ostream &OS, llvm::function_ref<Type(const Expr *)> getType,
541-
llvm::function_ref<Type(const TypeLoc &)> getTypeOfTypeLoc,
542-
unsigned Indent = 0) const;
543-
539+
LLVM_ATTRIBUTE_DEPRECATED(
540+
void dump(llvm::function_ref<Type(const Expr *)> getType,
541+
llvm::function_ref<Type(const TypeLoc &)> getTypeOfTypeLoc)
542+
const LLVM_ATTRIBUTE_USED,
543+
"only for use within the debugger");
544+
LLVM_ATTRIBUTE_DEPRECATED(
545+
void dump(raw_ostream &OS, llvm::function_ref<Type(const Expr *)> getType,
546+
llvm::function_ref<Type(const TypeLoc &)> getTypeOfTypeLoc)
547+
const LLVM_ATTRIBUTE_USED,
548+
"only for use within the debugger");
549+
550+
void dump(raw_ostream &OS) const;
551+
void print(raw_ostream &OS, unsigned Indent = 0) const;
552+
void print(raw_ostream &OS, llvm::function_ref<Type(const Expr *)> getType,
553+
llvm::function_ref<Type(const TypeLoc &)> getTypeOfTypeLoc,
554+
unsigned Indent = 0) const;
544555
void print(ASTPrinter &Printer, const PrintOptions &Opts) const;
545556

546557
// Only allow allocation of Exprs using the allocator in ASTContext

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

Lines changed: 15 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -241,6 +241,13 @@ class ModuleDecl : public DeclContext, public TypeDecl {
241241
/// \see EntryPointInfoTy
242242
EntryPointInfoTy EntryPointInfo;
243243

244+
struct {
245+
unsigned TestingEnabled : 1;
246+
unsigned FailedToLoad : 1;
247+
unsigned ResilienceStrategy : 1;
248+
unsigned HasResolvedImports : 1;
249+
} Flags;
250+
244251
ModuleDecl(Identifier name, ASTContext &ctx);
245252

246253
public:
@@ -277,32 +284,32 @@ class ModuleDecl : public DeclContext, public TypeDecl {
277284

278285
/// Returns true if this module was or is being compiled for testing.
279286
bool isTestingEnabled() const {
280-
return Bits.ModuleDecl.TestingEnabled;
287+
return Flags.TestingEnabled;
281288
}
282289
void setTestingEnabled(bool enabled = true) {
283-
Bits.ModuleDecl.TestingEnabled = enabled;
290+
Flags.TestingEnabled = enabled;
284291
}
285292

286293
/// Returns true if there was an error trying to load this module.
287294
bool failedToLoad() const {
288-
return Bits.ModuleDecl.FailedToLoad;
295+
return Flags.FailedToLoad;
289296
}
290297
void setFailedToLoad(bool failed = true) {
291-
Bits.ModuleDecl.FailedToLoad = failed;
298+
Flags.FailedToLoad = failed;
292299
}
293300

294301
bool hasResolvedImports() const {
295-
return Bits.ModuleDecl.HasResolvedImports;
302+
return Flags.HasResolvedImports;
296303
}
297304
void setHasResolvedImports() {
298-
Bits.ModuleDecl.HasResolvedImports = true;
305+
Flags.HasResolvedImports = true;
299306
}
300307

301308
ResilienceStrategy getResilienceStrategy() const {
302-
return ResilienceStrategy(Bits.ModuleDecl.RawResilienceStrategy);
309+
return ResilienceStrategy(Flags.ResilienceStrategy);
303310
}
304311
void setResilienceStrategy(ResilienceStrategy strategy) {
305-
Bits.ModuleDecl.RawResilienceStrategy = unsigned(strategy);
312+
Flags.ResilienceStrategy = unsigned(strategy);
306313
}
307314

308315
/// Look up a (possibly overloaded) value set at top-level scope

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,7 @@ class alignas(8) Stmt {
133133
LLVM_ATTRIBUTE_DEPRECATED(
134134
void dump() const LLVM_ATTRIBUTE_USED,
135135
"only for use within the debugger");
136-
void dump(raw_ostream &OS, const ASTContext *Ctx = nullptr, unsigned Indent = 0) const;
136+
void print(raw_ostream &OS, const ASTContext *Ctx = nullptr, unsigned Indent = 0) const;
137137

138138
// Only allow allocation of Exprs using the allocator in ASTContext
139139
// or by doing a placement new.

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

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1726,12 +1726,6 @@ class ParameterTypeFlags {
17261726
| ParameterFlags(uint8_t(ownership) << OwnershipShift);
17271727
}
17281728

1729-
ParameterTypeFlags withAutoClosure(bool isAutoClosure) const {
1730-
return ParameterTypeFlags(isAutoClosure
1731-
? value | ParameterTypeFlags::AutoClosure
1732-
: value - ParameterTypeFlags::AutoClosure);
1733-
}
1734-
17351729
bool operator ==(const ParameterTypeFlags &other) const {
17361730
return value.toRaw() == other.value.toRaw();
17371731
}

branches/master-next/include/swift/Basic/FileSystem.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ namespace llvm {
2323
class Twine;
2424
}
2525

26-
namespace llvm {
26+
namespace clang {
2727
namespace vfs {
2828
class FileSystem;
2929
}
@@ -58,7 +58,7 @@ namespace swift {
5858

5959
namespace vfs {
6060
llvm::ErrorOr<std::unique_ptr<llvm::MemoryBuffer>>
61-
getFileOrSTDIN(llvm::vfs::FileSystem &FS,
61+
getFileOrSTDIN(clang::vfs::FileSystem &FS,
6262
const llvm::Twine &Name, int64_t FileSize = -1,
6363
bool RequiresNullTerminator = true, bool IsVolatile = false);
6464
} // end namespace vfs

0 commit comments

Comments
 (0)