Skip to content

Commit d60862b

Browse files
---
yaml --- r: 343405 b: refs/heads/master-rebranch c: e4f0f78 h: refs/heads/master i: 343403: 0ca6b67
1 parent 3be0702 commit d60862b

File tree

186 files changed

+5918
-4450
lines changed

Some content is hidden

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

186 files changed

+5918
-4450
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1455,7 +1455,7 @@ refs/tags/swift-DEVELOPMENT-SNAPSHOT-2019-08-02-a: ddd2b2976aa9bfde5f20fe37f6bd2
14551455
refs/tags/swift-DEVELOPMENT-SNAPSHOT-2019-08-03-a: 171cc166f2abeb5ca2a4003700a8a78a108bd300
14561456
refs/heads/benlangmuir-patch-1: baaebaf39d52f3bf36710d4fe40cf212e996b212
14571457
refs/heads/i-do-redeclare: 8c4e6d5de5c1e3f0a2cedccf319df713ea22c48e
1458-
refs/heads/master-rebranch: 23cd3d64f2f84fe8d1e272aa7a7663122eeb0dfd
1458+
refs/heads/master-rebranch: e4f0f78020243786a2574875c191966c4abe4920
14591459
refs/heads/rdar-53901732: 9bd06af3284e18a109cdbf9aa59d833b24eeca7b
14601460
refs/heads/revert-26776-subst-always-returns-a-type: 1b8e18fdd391903a348970a4c848995d4cdd789c
14611461
refs/heads/tensorflow-merge: 8b854f62f80d4476cb383d43c4aac2001dde3cec

branches/master-rebranch/CHANGELOG.md

Lines changed: 0 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -26,29 +26,6 @@ CHANGELOG
2626
Swift Next
2727
----------
2828

29-
* [SE-0253][]:
30-
31-
Values of types that declare `func callAsFunction` methods can be called
32-
like functions. The call syntax is shorthand for applying
33-
`func callAsFunction` methods.
34-
35-
```swift
36-
struct Adder {
37-
var base: Int
38-
func callAsFunction(_ x: Int) -> Int {
39-
return x + base
40-
}
41-
}
42-
var adder = Adder(base: 3)
43-
adder(10) // returns 13, same as `adder.callAsFunction(10)`
44-
```
45-
46-
* `func callAsFunction` argument labels are required at call sites.
47-
* Multiple `func callAsFunction` methods on a single type are supported.
48-
* `mutating func callAsFunction` is supported.
49-
* `func callAsFunction` works with `throws` and `rethrows`.
50-
* `func callAsFunction` works with trailing closures.
51-
5229
* [SR-4206][]:
5330

5431
A method override is no longer allowed to have a generic signature with
@@ -7734,7 +7711,6 @@ Swift 1.0
77347711
[SE-0244]: <https://github.com/apple/swift-evolution/blob/master/proposals/0244-opaque-result-types.md>
77357712
[SE-0245]: <https://github.com/apple/swift-evolution/blob/master/proposals/0245-array-uninitialized-initializer.md>
77367713
[SE-0252]: <https://github.com/apple/swift-evolution/blob/master/proposals/0252-keypath-dynamic-member-lookup.md>
7737-
[SE-0253]: <https://github.com/apple/swift-evolution/blob/master/proposals/0253-callable.md>
77387714
[SE-0254]: <https://github.com/apple/swift-evolution/blob/master/proposals/0254-static-subscripts.md>
77397715

77407716
[SR-106]: <https://bugs.swift.org/browse/SR-106>

branches/master-rebranch/benchmark/CMakeLists.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,6 @@ set(SWIFT_BENCH_MODULES
8787
single-source/Exclusivity
8888
single-source/ExistentialPerformance
8989
single-source/Fibonacci
90-
single-source/FindStringNaive
9190
single-source/FlattenList
9291
single-source/FloatingPointParsing
9392
single-source/FloatingPointPrinting

branches/master-rebranch/benchmark/single-source/FindStringNaive.swift

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

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

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,6 @@ import ErrorHandling
7575
import Exclusivity
7676
import ExistentialPerformance
7777
import Fibonacci
78-
import FindStringNaive
7978
import FlattenList
8079
import FloatingPointParsing
8180
import FloatingPointPrinting
@@ -254,7 +253,6 @@ registerBenchmark(ErrorHandling)
254253
registerBenchmark(Exclusivity)
255254
registerBenchmark(ExistentialPerformance)
256255
registerBenchmark(Fibonacci)
257-
registerBenchmark(FindStringNaive)
258256
registerBenchmark(FlattenListLoop)
259257
registerBenchmark(FlattenListFlatMap)
260258
registerBenchmark(FloatingPointParsing)

branches/master-rebranch/cmake/modules/AddSwift.cmake

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2370,7 +2370,7 @@ function(_add_swift_executable_single name)
23702370
# NOTE(compnerd) use the C linker language to invoke `clang` rather than
23712371
# `clang++` as we explicitly link against the C++ runtime. We were previously
23722372
# actually passing `-nostdlib++` to avoid the C++ runtime linkage.
2373-
if(${SWIFTEXE_SINGLE_SDK} STREQUAL ANDROID)
2373+
if(SWIFTEXE_SINGLE_SDK STREQUAL ANDROID)
23742374
set_property(TARGET "${name}" PROPERTY
23752375
LINKER_LANGUAGE "C")
23762376
else()

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

Lines changed: 14 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,7 @@ namespace swift {
6969
class LazyGenericContextData;
7070
class LazyIterableDeclContextData;
7171
class LazyMemberLoader;
72+
class LazyMemberParser;
7273
class LazyResolver;
7374
class PatternBindingDecl;
7475
class PatternBindingInitializer;
@@ -111,10 +112,6 @@ namespace swift {
111112

112113
enum class KnownProtocolKind : uint8_t;
113114

114-
namespace namelookup {
115-
class ImportCache;
116-
}
117-
118115
namespace syntax {
119116
class SyntaxArena;
120117
}
@@ -424,6 +421,12 @@ class ASTContext final {
424421
void setLazyResolver(LazyResolver *resolver);
425422

426423
public:
424+
/// Add a lazy parser for resolving members later.
425+
void addLazyParser(LazyMemberParser *parser);
426+
427+
/// Remove a lazy parser.
428+
void removeLazyParser(LazyMemberParser *parser);
429+
427430
/// getIdentifier - Return the uniqued and AST-Context-owned version of the
428431
/// specified string.
429432
Identifier getIdentifier(StringRef Str) const;
@@ -680,9 +683,7 @@ class ASTContext final {
680683
/// If there is no Clang module loader, returns a null pointer.
681684
/// The loader is owned by the AST context.
682685
ClangModuleLoader *getDWARFModuleLoader() const;
683-
684-
namelookup::ImportCache &getImportCache() const;
685-
686+
686687
/// Asks every module loader to verify the ASTs it has loaded.
687688
///
688689
/// Does nothing in non-asserts (NDEBUG) builds.
@@ -815,6 +816,12 @@ class ASTContext final {
815816
LazyContextData *getOrCreateLazyContextData(const DeclContext *decl,
816817
LazyMemberLoader *lazyLoader);
817818

819+
/// Use the lazy parsers associated with the context to populate the members
820+
/// of the given decl context.
821+
///
822+
/// \param IDC The context whose member decls should be lazily parsed.
823+
void parseMembers(IterableDeclContext *IDC);
824+
818825
/// Get the lazy function data for the given generic context.
819826
///
820827
/// \param lazyLoader If non-null, the lazy loader to use when creating the

branches/master-rebranch/include/swift/AST/ASTTypeIDZone.def

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,4 +33,3 @@ SWIFT_TYPEID(AncestryFlags)
3333
SWIFT_TYPEID_NAMED(GenericSignature *, GenericSignature)
3434
SWIFT_TYPEID_NAMED(GenericTypeParamType *, GenericTypeParamType)
3535
SWIFT_TYPEID(Requirement)
36-
SWIFT_TYPEID_NAMED(IterableDeclContext *, IterableDeclContext)

branches/master-rebranch/include/swift/AST/ASTTypeIDs.h

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -17,26 +17,19 @@
1717
#ifndef SWIFT_AST_ASTTYPEIDS_H
1818
#define SWIFT_AST_ASTTYPEIDS_H
1919

20-
#include "swift/Basic/LLVM.h"
2120
#include "swift/Basic/TypeID.h"
2221
namespace swift {
2322

2423
class CustomAttr;
25-
class Decl;
2624
class GenericSignature;
2725
class GenericTypeParamType;
28-
class IterableDeclContext;
2926
class NominalTypeDecl;
30-
class OperatorDecl;
3127
struct PropertyWrapperBackingPropertyInfo;
3228
struct PropertyWrapperTypeInfo;
3329
enum class CtorInitializerKind;
3430
struct PropertyWrapperMutability;
35-
class ProtocolDecl;
3631
class Requirement;
37-
enum class ResilienceExpansion : unsigned;
3832
class Type;
39-
class ValueDecl;
4033
class VarDecl;
4134
class TypeAliasDecl;
4235
class Type;

branches/master-rebranch/include/swift/AST/Attr.def

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -362,7 +362,8 @@ SIMPLE_DECL_ATTR(_weakLinked, WeakLinked,
362362
OnSubscript | OnConstructor | OnEnumElement | OnExtension | UserInaccessible,
363363
75)
364364
SIMPLE_DECL_ATTR(frozen, Frozen,
365-
OnEnum | OnStruct,
365+
OnEnum | OnStruct |
366+
UserInaccessible,
366367
76)
367368
DECL_ATTR_ALIAS(_frozen, Frozen)
368369
SIMPLE_DECL_ATTR(_forbidSerializingReference, ForbidSerializingReference,

branches/master-rebranch/include/swift/AST/Builtins.def

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -418,14 +418,6 @@ BUILTIN_MISC_OPERATION(Strideof, "strideof", "n", Special)
418418
/// IsPOD has type T.Type -> Bool
419419
BUILTIN_MISC_OPERATION(IsPOD, "ispod", "n", Special)
420420

421-
/// IsConcrete has type (T.Type) -> Bool
422-
///
423-
/// If the meta type T is concrete, we can always transform this to `true` at
424-
/// any time in SIL. If it's generic, then we lower it to `false` right before
425-
/// IRGen in IRGenPrepare. This allows for the optimizer to specialize this at
426-
/// -O and eliminate conditional code.
427-
BUILTIN_MISC_OPERATION(IsConcrete, "isConcrete", "n", Special)
428-
429421
/// IsBitwiseTakable has type T.Type -> Bool
430422
BUILTIN_MISC_OPERATION(IsBitwiseTakable, "isbitwisetakable", "n", Special)
431423

0 commit comments

Comments
 (0)