Skip to content

Commit 1392416

Browse files
committed
---
yaml --- r: 349221 b: refs/heads/master-next c: 1cce12f h: refs/heads/master i: 349219: 358364f
1 parent 77e71d6 commit 1392416

File tree

259 files changed

+3299
-8391
lines changed

Some content is hidden

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

259 files changed

+3299
-8391
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: 3574c513bbc5578dd9346b4ea9ab5995c5927bb5
3-
refs/heads/master-next: c6d51a975c1f68731da57fc5e893fccd3c4dfef2
3+
refs/heads/master-next: 1cce12f20c283d980d017f12324eb42b6f9bf298
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 & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ Swift Next
8181
mutableSelf.someProperty = newValue // Okay
8282
}
8383
}
84-
```
84+
```
8585

8686
* [SE-0253][]:
8787

@@ -145,8 +145,6 @@ Swift Next
145145
Swift 5.1
146146
---------
147147

148-
### 2019-09-20 (Xcode 11.0)
149-
150148
* [SR-8974][]:
151149

152150
Duplicate tuple element labels are no longer allowed, because it leads

branches/master-next/cmake/modules/SwiftSource.cmake

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -310,13 +310,9 @@ function(_compile_swift_files
310310
set(module_base "${module_dir}/${SWIFTFILE_MODULE_NAME}")
311311
if(SWIFTFILE_SDK IN_LIST SWIFT_APPLE_PLATFORMS)
312312
set(specific_module_dir "${module_base}.swiftmodule")
313-
set(specific_module_private_dir "${specific_module_dir}/Private")
314-
set(source_info_file "${specific_module_private_dir}/${SWIFTFILE_ARCHITECTURE}.swiftsourceinfo")
315313
set(module_base "${module_base}.swiftmodule/${SWIFTFILE_ARCHITECTURE}")
316314
else()
317315
set(specific_module_dir)
318-
set(specific_module_private_dir)
319-
set(source_info_file "${module_base}.swiftsourceinfo")
320316
endif()
321317
set(module_file "${module_base}.swiftmodule")
322318
set(module_doc_file "${module_base}.swiftdoc")
@@ -353,8 +349,7 @@ function(_compile_swift_files
353349
swift_install_in_component(DIRECTORY "${specific_module_dir}"
354350
DESTINATION "lib${LLVM_LIBDIR_SUFFIX}/swift/${library_subdir}"
355351
COMPONENT "${SWIFTFILE_INSTALL_IN_COMPONENT}"
356-
OPTIONAL
357-
PATTERN "Private" EXCLUDE)
352+
OPTIONAL)
358353
else()
359354
swift_install_in_component(FILES ${module_outputs}
360355
DESTINATION "lib${LLVM_LIBDIR_SUFFIX}/swift/${library_subdir}"
@@ -495,11 +490,9 @@ function(_compile_swift_files
495490
COMMAND
496491
"${CMAKE_COMMAND}" "-E" "make_directory" ${module_dir}
497492
${specific_module_dir}
498-
${specific_module_private_dir}
499493
COMMAND
500494
"${PYTHON_EXECUTABLE}" "${line_directive_tool}" "@${file_path}" --
501495
"${swift_compiler_tool}" "-emit-module" "-o" "${module_file}"
502-
"-emit-module-source-info-path" "${source_info_file}"
503496
${swift_flags} ${swift_module_flags} "@${file_path}"
504497
${command_touch_module_outputs}
505498
OUTPUT ${module_outputs}

branches/master-next/docs/ABI/Mangling.rst

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -290,7 +290,6 @@ Entities
290290
entity-spec ::= type 'fu' INDEX // implicit anonymous closure
291291
entity-spec ::= 'fA' INDEX // default argument N+1 generator
292292
entity-spec ::= 'fi' // non-local variable initializer
293-
entity-spec ::= 'fP' // property wrapper backing initializer
294293
entity-spec ::= 'fD' // deallocating destructor; untyped
295294
entity-spec ::= 'fd' // non-deallocating destructor; untyped
296295
entity-spec ::= 'fE' // ivar destroyer; untyped

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

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -124,8 +124,6 @@ class ASTMangler : public Mangler {
124124
SymbolKind SKind);
125125

126126
std::string mangleInitializerEntity(const VarDecl *var, SymbolKind SKind);
127-
std::string mangleBackingInitializerEntity(const VarDecl *var,
128-
SymbolKind SKind);
129127

130128
std::string mangleNominalType(const NominalTypeDecl *decl);
131129

@@ -313,7 +311,6 @@ class ASTMangler : public Mangler {
313311
void appendDefaultArgumentEntity(const DeclContext *ctx, unsigned index);
314312

315313
void appendInitializerEntity(const VarDecl *var);
316-
void appendBackingInitializerEntity(const VarDecl *var);
317314

318315
CanType getDeclTypeForMangling(const ValueDecl *decl,
319316
GenericSignature *&genericSig,

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

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,14 +28,12 @@ SWIFT_TYPEID_NAMED(Decl *, Decl)
2828
SWIFT_TYPEID_NAMED(GenericParamList *, GenericParamList)
2929
SWIFT_TYPEID_NAMED(GenericSignature *, GenericSignature)
3030
SWIFT_TYPEID_NAMED(GenericTypeParamType *, GenericTypeParamType)
31-
SWIFT_TYPEID_NAMED(InfixOperatorDecl *, InfixOperatorDecl)
3231
SWIFT_TYPEID_NAMED(IterableDeclContext *, IterableDeclContext)
3332
SWIFT_TYPEID_NAMED(ModuleDecl *, ModuleDecl)
3433
SWIFT_TYPEID_NAMED(NominalTypeDecl *, NominalTypeDecl)
3534
SWIFT_TYPEID_NAMED(OperatorDecl *, OperatorDecl)
3635
SWIFT_TYPEID_NAMED(Optional<PropertyWrapperMutability>,
3736
PropertyWrapperMutability)
38-
SWIFT_TYPEID_NAMED(PrecedenceGroupDecl *, PrecedenceGroupDecl)
3937
SWIFT_TYPEID_NAMED(ProtocolDecl *, ProtocolDecl)
4038
SWIFT_TYPEID_NAMED(TypeAliasDecl *, TypeAliasDecl)
4139
SWIFT_TYPEID_NAMED(ValueDecl *, ValueDecl)

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

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,19 +21,15 @@
2121
#include "swift/Basic/TypeID.h"
2222
namespace swift {
2323

24-
class AbstractFunctionDecl;
25-
class BraceStmt;
2624
class CustomAttr;
2725
class Decl;
2826
class GenericParamList;
2927
class GenericSignature;
3028
class GenericTypeParamType;
31-
class InfixOperatorDecl;
3229
class IterableDeclContext;
3330
class ModuleDecl;
3431
class NominalTypeDecl;
3532
class OperatorDecl;
36-
class PrecedenceGroupDecl;
3733
struct PropertyWrapperBackingPropertyInfo;
3834
struct PropertyWrapperTypeInfo;
3935
enum class CtorInitializerKind;

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

Lines changed: 25 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -5689,8 +5689,7 @@ class AbstractFunctionDecl : public GenericContext, public ValueDecl {
56895689
/// Note that a true return value does not imply that the body was actually
56905690
/// parsed.
56915691
bool hasBody() const {
5692-
return getBodyKind() != BodyKind::None &&
5693-
getBodyKind() != BodyKind::Skipped;
5692+
return getBodyKind() != BodyKind::None;
56945693
}
56955694

56965695
/// Returns true if the text of this function's body can be retrieved either
@@ -5717,22 +5716,14 @@ class AbstractFunctionDecl : public GenericContext, public ValueDecl {
57175716
/// Note that the body was skipped for this function. Function body
57185717
/// cannot be attached after this call.
57195718
void setBodySkipped(SourceRange bodyRange) {
5720-
// FIXME: Remove 'Parsed' from this once we can delay parsing function
5721-
// bodies. Right now -experimental-skip-non-inlinable-function-bodies
5722-
// requires being able to change the state from Parsed to Skipped,
5723-
// because we're still eagerly parsing function bodies.
5724-
assert(getBodyKind() == BodyKind::None ||
5725-
getBodyKind() == BodyKind::Unparsed ||
5726-
getBodyKind() == BodyKind::Parsed);
5727-
assert(bodyRange.isValid());
5719+
assert(getBodyKind() == BodyKind::None);
57285720
BodyRange = bodyRange;
57295721
setBodyKind(BodyKind::Skipped);
57305722
}
57315723

57325724
/// Note that parsing for the body was delayed.
57335725
void setBodyDelayed(SourceRange bodyRange) {
57345726
assert(getBodyKind() == BodyKind::None);
5735-
assert(bodyRange.isValid());
57365727
BodyRange = bodyRange;
57375728
setBodyKind(BodyKind::Unparsed);
57385729
}
@@ -5778,10 +5769,6 @@ class AbstractFunctionDecl : public GenericContext, public ValueDecl {
57785769
return getBodyKind() == BodyKind::TypeChecked;
57795770
}
57805771

5781-
bool isBodySkipped() const {
5782-
return getBodyKind() == BodyKind::Skipped;
5783-
}
5784-
57855772
bool isMemberwiseInitializer() const {
57865773
return getBodyKind() == BodyKind::MemberwiseInitializer;
57875774
}
@@ -6342,7 +6329,9 @@ class EnumElementDecl : public DeclContext, public ValueDecl {
63426329

63436330
/// The raw value literal for the enum element, or null.
63446331
LiteralExpr *RawValueExpr;
6345-
6332+
/// The type-checked raw value expression.
6333+
Expr *TypeCheckedRawValueExpr = nullptr;
6334+
63466335
public:
63476336
EnumElementDecl(SourceLoc IdentifierLoc, DeclName Name,
63486337
ParameterList *Params,
@@ -6375,6 +6364,13 @@ class EnumElementDecl : public DeclContext, public ValueDecl {
63756364
bool hasRawValueExpr() const { return RawValueExpr; }
63766365
LiteralExpr *getRawValueExpr() const { return RawValueExpr; }
63776366
void setRawValueExpr(LiteralExpr *e) { RawValueExpr = e; }
6367+
6368+
Expr *getTypeCheckedRawValueExpr() const {
6369+
return TypeCheckedRawValueExpr;
6370+
}
6371+
void setTypeCheckedRawValueExpr(Expr *e) {
6372+
TypeCheckedRawValueExpr = e;
6373+
}
63786374

63796375
/// Return the containing EnumDecl.
63806376
EnumDecl *getParentEnum() const {
@@ -6913,6 +6909,7 @@ class OperatorDecl : public Decl {
69136909
/// \endcode
69146910
class InfixOperatorDecl : public OperatorDecl {
69156911
SourceLoc ColonLoc;
6912+
PrecedenceGroupDecl *PrecedenceGroup = nullptr;
69166913

69176914
public:
69186915
InfixOperatorDecl(DeclContext *DC, SourceLoc operatorLoc, Identifier name,
@@ -6923,6 +6920,14 @@ class InfixOperatorDecl : public OperatorDecl {
69236920
identifiers, identifierLocs),
69246921
ColonLoc(colonLoc) {}
69256922

6923+
InfixOperatorDecl(DeclContext *DC, SourceLoc operatorLoc, Identifier name,
6924+
SourceLoc nameLoc, SourceLoc colonLoc,
6925+
PrecedenceGroupDecl *precedenceGroup,
6926+
ArrayRef<NominalTypeDecl *> designatedNominalTypes)
6927+
: OperatorDecl(DeclKind::InfixOperator, DC, operatorLoc, name, nameLoc,
6928+
designatedNominalTypes),
6929+
ColonLoc(colonLoc), PrecedenceGroup(precedenceGroup) {}
6930+
69266931
SourceLoc getEndLoc() const {
69276932
auto identifierLocs = getIdentifierLocs();
69286933
if (identifierLocs.empty())
@@ -6937,7 +6942,10 @@ class InfixOperatorDecl : public OperatorDecl {
69376942

69386943
SourceLoc getColonLoc() const { return ColonLoc; }
69396944

6940-
PrecedenceGroupDecl *getPrecedenceGroup() const;
6945+
PrecedenceGroupDecl *getPrecedenceGroup() const { return PrecedenceGroup; }
6946+
void setPrecedenceGroup(PrecedenceGroupDecl *PGD) {
6947+
PrecedenceGroup = PGD;
6948+
}
69416949

69426950
/// True if this decl's attributes conflict with those declared by another
69436951
/// operator.

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

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -409,15 +409,6 @@ class alignas(1 << DeclContextAlignInBits) DeclContext {
409409
const_cast<DeclContext *>(this)->getInnermostDeclarationDeclContext();
410410
}
411411

412-
/// Returns the innermost context that is an AbstractFunctionDecl whose
413-
/// body has been skipped.
414-
LLVM_READONLY
415-
DeclContext *getInnermostSkippedFunctionContext();
416-
const DeclContext *getInnermostSkippedFunctionContext() const {
417-
return
418-
const_cast<DeclContext *>(this)->getInnermostSkippedFunctionContext();
419-
}
420-
421412
/// Returns the semantic parent of this context. A context has a
422413
/// parent if and only if it is not a module context.
423414
DeclContext *getParent() const {

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

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,16 +18,15 @@
1818
#ifndef SWIFT_BASIC_DIAGNOSTICENGINE_H
1919
#define SWIFT_BASIC_DIAGNOSTICENGINE_H
2020

21+
#include "swift/AST/Attr.h"
2122
#include "swift/AST/TypeLoc.h"
2223
#include "swift/AST/DeclNameLoc.h"
2324
#include "swift/AST/DiagnosticConsumer.h"
2425
#include "llvm/ADT/StringMap.h"
2526
#include "llvm/Support/Allocator.h"
26-
#include "llvm/Support/VersionTuple.h"
2727

2828
namespace swift {
2929
class Decl;
30-
class DeclAttribute;
3130
class DiagnosticEngine;
3231
class SourceManager;
3332
class ValueDecl;

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

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -124,13 +124,8 @@ ERROR(error_mode_cannot_emit_module,none,
124124
"this mode does not support emitting modules", ())
125125
ERROR(error_mode_cannot_emit_module_doc,none,
126126
"this mode does not support emitting module documentation files", ())
127-
ERROR(error_mode_cannot_emit_module_source_info,none,
128-
"this mode does not support emitting module source info files", ())
129127
ERROR(error_mode_cannot_emit_interface,none,
130128
"this mode does not support emitting module interface files", ())
131-
ERROR(cannot_emit_ir_skipping_function_bodies,none,
132-
"-experimental-skip-non-inlinable-function-bodies does not support "
133-
"emitting IR", ())
134129

135130
WARNING(emit_reference_dependencies_without_primary_file,none,
136131
"ignoring -emit-reference-dependencies (requires -primary-file)", ())

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

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1116,8 +1116,6 @@ ERROR(missing_argument_named,none,
11161116
"missing argument for parameter %0 in call", (Identifier))
11171117
ERROR(missing_argument_positional,none,
11181118
"missing argument for parameter #%0 in call", (unsigned))
1119-
ERROR(missing_arguments_in_call,none,
1120-
"missing arguments for parameters %0 in call", (StringRef))
11211119
ERROR(extra_argument_named,none,
11221120
"extra argument %0 in call", (Identifier))
11231121
ERROR(extra_argument_positional,none,
@@ -3495,10 +3493,6 @@ ERROR(single_tuple_parameter_mismatch_normal,none,
34953493
(DescriptiveDeclKind, DeclBaseName, Type, StringRef))
34963494
ERROR(unknown_single_tuple_parameter_mismatch,none,
34973495
"single parameter of type %0 is expected in call", (Type))
3498-
ERROR(cannot_convert_single_tuple_into_multiple_arguments,none,
3499-
"%0 %select{%1 |}2expects %3 separate arguments"
3500-
"%select{|; remove extra parentheses to change tuple into separate arguments}4",
3501-
(DescriptiveDeclKind, DeclName, bool, unsigned, bool))
35023496

35033497
ERROR(enum_element_pattern_assoc_values_mismatch,none,
35043498
"pattern with associated values does not match enum case %0",
@@ -4534,6 +4528,8 @@ ERROR(property_wrapper_wrong_initial_value_init, none,
45344528
(DeclName, Type, Type))
45354529
ERROR(property_wrapper_failable_init, none,
45364530
"%0 cannot be failable", (DeclName))
4531+
ERROR(property_wrapper_ambiguous_initial_value_init, none,
4532+
"property wrapper type %0 has multiple initial-value initializers", (Type))
45374533
ERROR(property_wrapper_ambiguous_default_value_init, none,
45384534
"property wrapper type %0 has multiple default-value initializers", (Type))
45394535
ERROR(property_wrapper_type_requirement_not_accessible,none,

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

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,13 +19,13 @@
1919

2020
#include "swift/AST/CaptureInfo.h"
2121
#include "swift/AST/ConcreteDeclRef.h"
22-
#include "swift/AST/DeclContext.h"
2322
#include "swift/AST/DeclNameLoc.h"
2423
#include "swift/AST/FunctionRefKind.h"
2524
#include "swift/AST/ProtocolConformanceRef.h"
2625
#include "swift/AST/TrailingCallArguments.h"
2726
#include "swift/AST/TypeAlignments.h"
2827
#include "swift/AST/TypeLoc.h"
28+
#include "swift/AST/TypeRepr.h"
2929
#include "swift/AST/Availability.h"
3030
#include "swift/Basic/InlineBitfield.h"
3131
#include "llvm/Support/TrailingObjects.h"
@@ -40,9 +40,7 @@ namespace swift {
4040
class ArchetypeType;
4141
class ASTContext;
4242
class AvailabilitySpec;
43-
class IdentTypeRepr;
4443
class Type;
45-
class TypeRepr;
4644
class ValueDecl;
4745
class Decl;
4846
class DeclRefExpr;

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

Lines changed: 0 additions & 51 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@
1919
#include "swift/AST/SimpleRequest.h"
2020
#include "swift/AST/ASTTypeIDs.h"
2121
#include "swift/Basic/Statistic.h"
22-
#include "llvm/ADT/Hashing.h"
2322
#include "llvm/ADT/TinyPtrVector.h"
2423

2524
namespace swift {
@@ -274,56 +273,6 @@ class GenericParamListRequest :
274273
void cacheResult(GenericParamList *value) const;
275274
};
276275

277-
struct PrecedenceGroupDescriptor {
278-
DeclContext *dc;
279-
Identifier ident;
280-
SourceLoc nameLoc;
281-
282-
SourceLoc getLoc() const;
283-
284-
friend llvm::hash_code hash_value(const PrecedenceGroupDescriptor &owner) {
285-
return hash_combine(llvm::hash_value(owner.dc),
286-
llvm::hash_value(owner.ident.getAsOpaquePointer()),
287-
llvm::hash_value(owner.nameLoc.getOpaquePointerValue()));
288-
}
289-
290-
friend bool operator==(const PrecedenceGroupDescriptor &lhs,
291-
const PrecedenceGroupDescriptor &rhs) {
292-
return lhs.dc == rhs.dc &&
293-
lhs.ident == rhs.ident &&
294-
lhs.nameLoc == rhs.nameLoc;
295-
}
296-
297-
friend bool operator!=(const PrecedenceGroupDescriptor &lhs,
298-
const PrecedenceGroupDescriptor &rhs) {
299-
return !(lhs == rhs);
300-
}
301-
};
302-
303-
void simple_display(llvm::raw_ostream &out, const PrecedenceGroupDescriptor &d);
304-
305-
class LookupPrecedenceGroupRequest
306-
: public SimpleRequest<LookupPrecedenceGroupRequest,
307-
PrecedenceGroupDecl *(PrecedenceGroupDescriptor),
308-
CacheKind::Cached> {
309-
public:
310-
using SimpleRequest::SimpleRequest;
311-
312-
private:
313-
friend SimpleRequest;
314-
315-
// Evaluation.
316-
llvm::Expected<PrecedenceGroupDecl *>
317-
evaluate(Evaluator &evaluator, PrecedenceGroupDescriptor descriptor) const;
318-
319-
public:
320-
// Source location
321-
SourceLoc getNearestLoc() const;
322-
323-
// Separate caching.
324-
bool isCached() const { return true; }
325-
};
326-
327276
#define SWIFT_TYPEID_ZONE NameLookup
328277
#define SWIFT_TYPEID_HEADER "swift/AST/NameLookupTypeIDZone.def"
329278
#include "swift/Basic/DefineTypeIDZone.h"

0 commit comments

Comments
 (0)