Skip to content

Commit 4b2932a

Browse files
committed
---
yaml --- r: 340863 b: refs/heads/rxwei-patch-1 c: 9c08fcc h: refs/heads/master i: 340861: 71bd230 340859: 2131cec 340855: 3d2f6ea 340847: 58779b0 340831: 719546e 340799: fba5d54 340735: 86ac3b2
1 parent 6ae426c commit 4b2932a

Some content is hidden

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

61 files changed

+522
-1091
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1015,7 +1015,7 @@ refs/tags/swift-DEVELOPMENT-SNAPSHOT-2018-08-18-a: b10b1fce14385faa6d44f6b933e95
10151015
refs/heads/rdar-43033749-fix-batch-mode-no-diags-swift-5.0-branch: a14e64eaad30de89f0f5f0b2a782eed7ecdcb255
10161016
refs/heads/revert-19006-error-bridging-integer-type: 8a9065a3696535305ea53fe9b71f91cbe6702019
10171017
refs/heads/revert-19050-revert-19006-error-bridging-integer-type: ecf752d54b05dd0a20f510f0bfa54a3fec3bcaca
1018-
refs/heads/rxwei-patch-1: aa35e4d62f59172983d26541b1f479f5bff1ebb2
1018+
refs/heads/rxwei-patch-1: 9c08fccf08249060afd2d508bb780b3f3cef3a3b
10191019
refs/heads/shahmishal-patch-1: e58ec0f7488258d42bef51bc3e6d7b3dc74d7b2a
10201020
refs/heads/typelist-existential: 4046359efd541fb5c72d69a92eefc0a784df8f5e
10211021
refs/tags/swift-4.2-DEVELOPMENT-SNAPSHOT-2018-08-20-a: 4319ba09e4fb8650ee86061075c74a016b6baab9

branches/rxwei-patch-1/CMakeLists.txt

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -621,9 +621,9 @@ endif()
621621
if(SWIFT_HOST_VARIANT_ARCH)
622622
set(SWIFT_HOST_VARIANT_ARCH_default "${SWIFT_HOST_VARIANT_ARCH}")
623623
else()
624-
if(CMAKE_SYSTEM_PROCESSOR MATCHES "x86_64|AMD64")
624+
if("${CMAKE_SYSTEM_PROCESSOR}" STREQUAL "x86_64")
625625
set(SWIFT_HOST_VARIANT_ARCH_default "x86_64")
626-
elseif(CMAKE_SYSTEM_PROCESSOR MATCHES "aarch64|ARM64")
626+
elseif("${CMAKE_SYSTEM_PROCESSOR}" STREQUAL "aarch64")
627627
set(SWIFT_HOST_VARIANT_ARCH_default "aarch64")
628628
elseif("${CMAKE_SYSTEM_PROCESSOR}" STREQUAL "ppc64")
629629
set(SWIFT_HOST_VARIANT_ARCH_default "powerpc64")
@@ -636,6 +636,8 @@ else()
636636
set(SWIFT_HOST_VARIANT_ARCH_default "armv6")
637637
elseif("${CMAKE_SYSTEM_PROCESSOR}" MATCHES "armv7l|armv7-a")
638638
set(SWIFT_HOST_VARIANT_ARCH_default "armv7")
639+
elseif("${CMAKE_SYSTEM_PROCESSOR}" STREQUAL "AMD64")
640+
set(SWIFT_HOST_VARIANT_ARCH_default "x86_64")
639641
elseif("${CMAKE_SYSTEM_PROCESSOR}" STREQUAL "IA64")
640642
set(SWIFT_HOST_VARIANT_ARCH_default "itanium")
641643
elseif("${CMAKE_SYSTEM_PROCESSOR}" MATCHES "(x86|i686)")

branches/rxwei-patch-1/include/swift/AST/Decl.h

Lines changed: 29 additions & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -344,7 +344,13 @@ class alignas(1 << DeclAlignInBits) Decl {
344344
IsUserAccessible : 1
345345
);
346346

347-
SWIFT_INLINE_BITFIELD(AbstractStorageDecl, ValueDecl, 1+1+2+1+1+1,
347+
SWIFT_INLINE_BITFIELD(AbstractStorageDecl, ValueDecl, 1+1+1+1+2+1+1+1,
348+
/// Whether the getter is mutating.
349+
IsGetterMutating : 1,
350+
351+
/// Whether the setter is mutating.
352+
IsSetterMutating : 1,
353+
348354
/// Whether this represents physical storage.
349355
HasStorage : 1,
350356

@@ -433,7 +439,7 @@ class alignas(1 << DeclAlignInBits) Decl {
433439
HasSingleExpressionBody : 1
434440
);
435441

436-
SWIFT_INLINE_BITFIELD(FuncDecl, AbstractFunctionDecl, 1+2+1+1+1+2,
442+
SWIFT_INLINE_BITFIELD(FuncDecl, AbstractFunctionDecl, 1+2+1+1+2,
437443
/// Whether this function is a 'static' method.
438444
IsStatic : 1,
439445

@@ -446,9 +452,6 @@ class alignas(1 << DeclAlignInBits) Decl {
446452
/// Whether this function has a dynamic Self return type.
447453
HasDynamicSelf : 1,
448454

449-
/// Whether we've computed the 'self' access kind yet.
450-
SelfAccessComputed : 1,
451-
452455
/// Backing bits for 'self' access kind.
453456
SelfAccess : 2
454457
);
@@ -2850,11 +2853,6 @@ class OpaqueTypeDecl : public GenericTypeDecl {
28502853

28512854
ValueDecl *getNamingDecl() const { return NamingDecl; }
28522855

2853-
void setNamingDecl(ValueDecl *D) {
2854-
assert(!NamingDecl && "already have naming decl");
2855-
NamingDecl = D;
2856-
}
2857-
28582856
GenericSignature *getOpaqueInterfaceGenericSignature() const {
28592857
return OpaqueInterfaceGenericSignature;
28602858
}
@@ -4387,10 +4385,6 @@ class ProtocolDecl final : public NominalTypeDecl {
43874385
/// SubscriptDecl, representing potentially settable memory locations.
43884386
class AbstractStorageDecl : public ValueDecl {
43894387
friend class SetterAccessLevelRequest;
4390-
friend class IsGetterMutatingRequest;
4391-
friend class IsSetterMutatingRequest;
4392-
friend class OpaqueReadOwnershipRequest;
4393-
43944388
public:
43954389
static const size_t MaxNumAccessors = 255;
43964390
private:
@@ -4458,22 +4452,17 @@ class AbstractStorageDecl : public ValueDecl {
44584452
Bits.AbstractStorageDecl.SupportsMutation = implInfo.supportsMutation();
44594453
}
44604454

4461-
struct {
4462-
unsigned IsGetterMutatingComputed : 1;
4463-
unsigned IsGetterMutating : 1;
4464-
unsigned IsSetterMutatingComputed : 1;
4465-
unsigned IsSetterMutating : 1;
4466-
unsigned OpaqueReadOwnershipComputed : 1;
4467-
unsigned OpaqueReadOwnership : 2;
4468-
} LazySemanticInfo = { };
4469-
44704455
protected:
44714456
AbstractStorageDecl(DeclKind Kind, bool IsStatic, DeclContext *DC,
44724457
DeclName Name, SourceLoc NameLoc,
44734458
StorageIsMutable_t supportsMutation)
44744459
: ValueDecl(Kind, DC, Name, NameLoc) {
44754460
Bits.AbstractStorageDecl.HasStorage = true;
44764461
Bits.AbstractStorageDecl.SupportsMutation = supportsMutation;
4462+
Bits.AbstractStorageDecl.IsGetterMutating = false;
4463+
Bits.AbstractStorageDecl.IsSetterMutating = true;
4464+
Bits.AbstractStorageDecl.OpaqueReadOwnership =
4465+
unsigned(OpaqueReadOwnership::Owned);
44774466
Bits.AbstractStorageDecl.IsStatic = IsStatic;
44784467
}
44794468

@@ -4557,26 +4546,29 @@ class AbstractStorageDecl : public ValueDecl {
45574546
}
45584547

45594548
/// Return the ownership of values opaquely read from this storage.
4560-
OpaqueReadOwnership getOpaqueReadOwnership() const;
4549+
OpaqueReadOwnership getOpaqueReadOwnership() const {
4550+
return OpaqueReadOwnership(Bits.AbstractStorageDecl.OpaqueReadOwnership);
4551+
}
45614552
void setOpaqueReadOwnership(OpaqueReadOwnership ownership) {
4562-
LazySemanticInfo.OpaqueReadOwnership = unsigned(ownership);
4563-
LazySemanticInfo.OpaqueReadOwnershipComputed = true;
4553+
Bits.AbstractStorageDecl.OpaqueReadOwnership = unsigned(ownership);
45644554
}
45654555

45664556
/// Return true if reading this storage requires the ability to
45674557
/// modify the base value.
4568-
bool isGetterMutating() const;
4558+
bool isGetterMutating() const {
4559+
return Bits.AbstractStorageDecl.IsGetterMutating;
4560+
}
45694561
void setIsGetterMutating(bool isMutating) {
4570-
LazySemanticInfo.IsGetterMutating = isMutating;
4571-
LazySemanticInfo.IsGetterMutatingComputed = true;
4562+
Bits.AbstractStorageDecl.IsGetterMutating = isMutating;
45724563
}
45734564

45744565
/// Return true if modifying this storage requires the ability to
45754566
/// modify the base value.
4576-
bool isSetterMutating() const;
4567+
bool isSetterMutating() const {
4568+
return Bits.AbstractStorageDecl.IsSetterMutating;
4569+
}
45774570
void setIsSetterMutating(bool isMutating) {
4578-
LazySemanticInfo.IsSetterMutating = isMutating;
4579-
LazySemanticInfo.IsSetterMutatingComputed = true;
4571+
Bits.AbstractStorageDecl.IsSetterMutating = isMutating;
45804572
}
45814573

45824574
AccessorDecl *getAccessor(AccessorKind kind) const {
@@ -5941,7 +5933,6 @@ llvm::raw_ostream &operator<<(llvm::raw_ostream &OS, SelfAccessKind SAK);
59415933
/// FuncDecl - 'func' declaration.
59425934
class FuncDecl : public AbstractFunctionDecl {
59435935
friend class AbstractFunctionDecl;
5944-
friend class SelfAccessKindRequest;
59455936

59465937
SourceLoc StaticLoc; // Location of the 'static' token or invalid.
59475938
SourceLoc FuncLoc; // Location of the 'func' token.
@@ -5972,9 +5963,7 @@ class FuncDecl : public AbstractFunctionDecl {
59725963

59735964
Bits.FuncDecl.HasDynamicSelf = false;
59745965
Bits.FuncDecl.ForcedStaticDispatch = false;
5975-
Bits.FuncDecl.SelfAccess =
5976-
static_cast<unsigned>(SelfAccessKind::NonMutating);
5977-
Bits.FuncDecl.SelfAccessComputed = false;
5966+
Bits.FuncDecl.SelfAccess = static_cast<unsigned>(SelfAccessKind::NonMutating);
59785967
}
59795968

59805969
private:
@@ -5987,13 +5976,6 @@ class FuncDecl : public AbstractFunctionDecl {
59875976
DeclContext *Parent,
59885977
ClangNode ClangN);
59895978

5990-
Optional<SelfAccessKind> getCachedSelfAccessKind() const {
5991-
if (Bits.FuncDecl.SelfAccessComputed)
5992-
return static_cast<SelfAccessKind>(Bits.FuncDecl.SelfAccess);
5993-
5994-
return None;
5995-
}
5996-
59975979
public:
59985980
/// Factory function only for use by deserialization.
59995981
static FuncDecl *createDeserialized(ASTContext &Context, SourceLoc StaticLoc,
@@ -6028,7 +6010,7 @@ class FuncDecl : public AbstractFunctionDecl {
60286010
void setStatic(bool IsStatic = true) {
60296011
Bits.FuncDecl.IsStatic = IsStatic;
60306012
}
6031-
6013+
60326014
bool isMutating() const {
60336015
return getSelfAccessKind() == SelfAccessKind::Mutating;
60346016
}
@@ -6039,11 +6021,11 @@ class FuncDecl : public AbstractFunctionDecl {
60396021
return getSelfAccessKind() == SelfAccessKind::__Consuming;
60406022
}
60416023

6042-
SelfAccessKind getSelfAccessKind() const;
6043-
6024+
SelfAccessKind getSelfAccessKind() const {
6025+
return static_cast<SelfAccessKind>(Bits.FuncDecl.SelfAccess);
6026+
}
60446027
void setSelfAccessKind(SelfAccessKind mod) {
60456028
Bits.FuncDecl.SelfAccess = static_cast<unsigned>(mod);
6046-
Bits.FuncDecl.SelfAccessComputed = true;
60476029
}
60486030

60496031
SourceLoc getStaticLoc() const { return StaticLoc; }

branches/rxwei-patch-1/include/swift/AST/DiagnosticsClangImporter.def

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,5 +102,4 @@ WARNING(clang_vfs_overlay_is_ignored,none,
102102
# undef NOTE
103103
# undef WARNING
104104
# undef ERROR
105-
# undef REMARK
106105
#endif

branches/rxwei-patch-1/include/swift/AST/TypeCheckRequests.h

Lines changed: 0 additions & 108 deletions
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,6 @@ class SpecializeAttr;
3636
class TypeAliasDecl;
3737
struct TypeLoc;
3838
class ValueDecl;
39-
class AbstractStorageDecl;
40-
enum class OpaqueReadOwnership: uint8_t;
4139

4240
/// Display a nominal type or extension thereof.
4341
void simple_display(
@@ -676,112 +674,6 @@ class FunctionBuilderTypeRequest :
676674
void noteCycleStep(DiagnosticEngine &diags) const;
677675
};
678676

679-
/// Request a function's self access kind.
680-
class SelfAccessKindRequest :
681-
public SimpleRequest<SelfAccessKindRequest,
682-
CacheKind::SeparatelyCached,
683-
SelfAccessKind,
684-
FuncDecl *> {
685-
public:
686-
using SimpleRequest::SimpleRequest;
687-
688-
private:
689-
friend SimpleRequest;
690-
691-
// Evaluation.
692-
llvm::Expected<SelfAccessKind>
693-
evaluate(Evaluator &evaluator, FuncDecl *func) const;
694-
695-
public:
696-
// Cycle handling
697-
void diagnoseCycle(DiagnosticEngine &diags) const;
698-
void noteCycleStep(DiagnosticEngine &diags) const;
699-
700-
// Separate caching.
701-
bool isCached() const { return true; }
702-
Optional<SelfAccessKind> getCachedResult() const;
703-
void cacheResult(SelfAccessKind value) const;
704-
};
705-
706-
/// Request whether the storage has a mutating getter.
707-
class IsGetterMutatingRequest :
708-
public SimpleRequest<IsGetterMutatingRequest,
709-
CacheKind::SeparatelyCached,
710-
bool, AbstractStorageDecl *> {
711-
public:
712-
using SimpleRequest::SimpleRequest;
713-
714-
private:
715-
friend SimpleRequest;
716-
717-
// Evaluation.
718-
llvm::Expected<bool>
719-
evaluate(Evaluator &evaluator, AbstractStorageDecl *func) const;
720-
721-
public:
722-
// Cycle handling
723-
void diagnoseCycle(DiagnosticEngine &diags) const;
724-
void noteCycleStep(DiagnosticEngine &diags) const;
725-
726-
// Separate caching.
727-
bool isCached() const { return true; }
728-
Optional<bool> getCachedResult() const;
729-
void cacheResult(bool value) const;
730-
};
731-
732-
/// Request whether the storage has a mutating getter.
733-
class IsSetterMutatingRequest :
734-
public SimpleRequest<IsSetterMutatingRequest,
735-
CacheKind::SeparatelyCached,
736-
bool, AbstractStorageDecl *> {
737-
public:
738-
using SimpleRequest::SimpleRequest;
739-
740-
private:
741-
friend SimpleRequest;
742-
743-
// Evaluation.
744-
llvm::Expected<bool>
745-
evaluate(Evaluator &evaluator, AbstractStorageDecl *func) const;
746-
747-
public:
748-
// Cycle handling
749-
void diagnoseCycle(DiagnosticEngine &diags) const;
750-
void noteCycleStep(DiagnosticEngine &diags) const;
751-
752-
// Separate caching.
753-
bool isCached() const { return true; }
754-
Optional<bool> getCachedResult() const;
755-
void cacheResult(bool value) const;
756-
};
757-
758-
/// Request whether reading the storage yields a borrowed value.
759-
class OpaqueReadOwnershipRequest :
760-
public SimpleRequest<OpaqueReadOwnershipRequest,
761-
CacheKind::SeparatelyCached,
762-
OpaqueReadOwnership,
763-
AbstractStorageDecl *> {
764-
public:
765-
using SimpleRequest::SimpleRequest;
766-
767-
private:
768-
friend SimpleRequest;
769-
770-
// Evaluation.
771-
llvm::Expected<OpaqueReadOwnership>
772-
evaluate(Evaluator &evaluator, AbstractStorageDecl *storage) const;
773-
774-
public:
775-
// Cycle handling
776-
void diagnoseCycle(DiagnosticEngine &diags) const;
777-
void noteCycleStep(DiagnosticEngine &diags) const;
778-
779-
// Separate caching.
780-
bool isCached() const { return true; }
781-
Optional<OpaqueReadOwnership> getCachedResult() const;
782-
void cacheResult(OpaqueReadOwnership value) const;
783-
};
784-
785677
// Allow AnyValue to compare two Type values, even though Type doesn't
786678
// support ==.
787679
template<>

branches/rxwei-patch-1/include/swift/AST/TypeCheckerTypeIDZone.def

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,3 @@ SWIFT_TYPEID(PropertyWrapperBackingPropertyTypeRequest)
3535
SWIFT_TYPEID(PropertyWrapperBackingPropertyInfoRequest)
3636
SWIFT_TYPEID(AttachedFunctionBuilderRequest)
3737
SWIFT_TYPEID(FunctionBuilderTypeRequest)
38-
SWIFT_TYPEID(SelfAccessKindRequest)
39-
SWIFT_TYPEID(IsGetterMutatingRequest)
40-
SWIFT_TYPEID(IsSetterMutatingRequest)
41-
SWIFT_TYPEID(OpaqueReadOwnershipRequest)

branches/rxwei-patch-1/include/swift/AST/Types.h

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1071,13 +1071,6 @@ class alignas(1 << TypeAlignInBits) TypeBase {
10711071
const PrintOptions &PO = PrintOptions()) const;
10721072
void print(ASTPrinter &Printer, const PrintOptions &PO) const;
10731073

1074-
/// Can this type be written in source at all?
1075-
///
1076-
/// If not, it shouldn't be shown in fix-its, for instance. The primary
1077-
/// example is opaque result types, which are written `some P` at the point
1078-
/// of definition but cannot be uttered anywhere else.
1079-
bool hasTypeRepr() const;
1080-
10811074
/// Does this type have grammatically simple syntax?
10821075
bool hasSimpleTypeRepr() const;
10831076

branches/rxwei-patch-1/include/swift/Parse/Parser.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1012,7 +1012,6 @@ class Parser {
10121012
ParserResult<VarDecl> parseDeclVarGetSet(Pattern *pattern,
10131013
ParseDeclOptions Flags,
10141014
SourceLoc StaticLoc,
1015-
StaticSpellingKind StaticSpelling,
10161015
SourceLoc VarLoc,
10171016
bool hasInitializer,
10181017
const DeclAttributes &Attributes,

branches/rxwei-patch-1/include/swift/Serialization/ModuleFormat.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ const uint16_t SWIFTMODULE_VERSION_MAJOR = 0;
5252
/// describe what change you made. The content of this comment isn't important;
5353
/// it just ensures a conflict if two people change the module format.
5454
/// Don't worry about adhering to the 80-column limit for this line.
55-
const uint16_t SWIFTMODULE_VERSION_MINOR = 495; // remove superclass from ProtocolLayout
55+
const uint16_t SWIFTMODULE_VERSION_MINOR = 494; // remove linkage from SILVTable
5656

5757
using DeclIDField = BCFixed<31>;
5858

@@ -997,6 +997,7 @@ namespace decls_block {
997997
BCFixed<1>, // objc?
998998
BCFixed<1>, // existential-type-supported?
999999
GenericEnvironmentIDField, // generic environment
1000+
TypeIDField, // superclass
10001001
AccessLevelField, // access level
10011002
BCArray<DeclIDField> // inherited types
10021003
// Trailed by the generic parameters (if any), the members record, and

0 commit comments

Comments
 (0)