Skip to content

Commit e7fee9f

Browse files
authored
---
yaml --- r: 349077 b: refs/heads/master c: 96d4050 h: refs/heads/master i: 349075: e6609fd
1 parent f7b89c3 commit e7fee9f

File tree

84 files changed

+1967
-973
lines changed

Some content is hidden

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

84 files changed

+1967
-973
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
refs/heads/master: ce59d76c53e978435ef9648dbfa1b94da5d8e619
2+
refs/heads/master: 96d4050f69c3a041627231b46746cea5bed6b855
33
refs/heads/master-next: 203b3026584ecad859eb328b2e12490099409cd5
44
refs/tags/osx-passed: b6b74147ef8a386f532cf9357a1bde006e552c54
55
refs/tags/swift-2.2-SNAPSHOT-2015-12-01-a: 6bb18e013c2284f2b45f5f84f2df2887dc0f7dea

trunk/cmake/modules/SwiftSource.cmake

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -333,11 +333,6 @@ function(_compile_swift_files
333333
"-emit-module-interface-path" "${interface_file}")
334334
endif()
335335

336-
if (NOT SWIFTFILE_IS_STDLIB_CORE)
337-
list(APPEND swift_module_flags
338-
"-Xfrontend" "-experimental-skip-non-inlinable-function-bodies")
339-
endif()
340-
341336
# If we have extra regexp flags, check if we match any of the regexps. If so
342337
# add the relevant flags to our swift_flags.
343338
if (SWIFT_EXPERIMENTAL_EXTRA_REGEXP_FLAGS OR SWIFT_EXPERIMENTAL_EXTRA_NEGATIVE_REGEXP_FLAGS)

trunk/include/swift/AST/ASTContext.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -109,6 +109,7 @@ namespace swift {
109109
class TypeAliasDecl;
110110
class VarDecl;
111111
class UnifiedStatsReporter;
112+
class IndexSubset;
112113

113114
enum class KnownProtocolKind : uint8_t;
114115

trunk/include/swift/AST/Decl.h

Lines changed: 9 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -369,21 +369,14 @@ class alignas(1 << DeclAlignInBits) Decl {
369369
IsPropertyWrapperBackingProperty : 1
370370
);
371371

372-
SWIFT_INLINE_BITFIELD(ParamDecl, VarDecl, 1+2+1+NumDefaultArgumentKindBits,
372+
SWIFT_INLINE_BITFIELD(ParamDecl, VarDecl, 1+2+NumDefaultArgumentKindBits,
373373
/// Whether we've computed the specifier yet.
374374
SpecifierComputed : 1,
375375

376376
/// The specifier associated with this parameter. This determines
377377
/// the storage semantics of the value e.g. mutability.
378378
Specifier : 2,
379379

380-
/// True if the type is implicitly specified in the source, but this has an
381-
/// apparently valid typeRepr. This is used in accessors, which look like:
382-
/// set (value) {
383-
/// but need to get the typeRepr from the property as a whole so Sema can
384-
/// resolve the type.
385-
IsTypeLocImplicit : 1,
386-
387380
/// Information about a symbolic default argument, like #file.
388381
defaultArgumentKind : NumDefaultArgumentKindBits
389382
);
@@ -2985,9 +2978,6 @@ class TypeAliasDecl : public GenericTypeDecl {
29852978
/// Retrieve a sugared interface type containing the structure of the interface
29862979
/// type before any semantic validation has occured.
29872980
Type getStructuralType() const;
2988-
2989-
/// Set the interface type of this typealias declaration from the underlying type.
2990-
void computeType();
29912981

29922982
bool isCompatibilityAlias() const {
29932983
return Bits.TypeAliasDecl.IsCompatibilityAlias;
@@ -3176,10 +3166,6 @@ class AssociatedTypeDecl : public AbstractTypeParamDecl {
31763166
TrailingWhere = trailingWhereClause;
31773167
}
31783168

3179-
/// Set the interface type of this associated type declaration to a dependent
3180-
/// member type of 'Self'.
3181-
void computeType();
3182-
31833169
/// Retrieve the associated type "anchor", which is the associated type
31843170
/// declaration that will be used to describe this associated type in the
31853171
/// ABI.
@@ -3369,10 +3355,6 @@ class NominalTypeDecl : public GenericTypeDecl, public IterableDeclContext {
33693355
Bits.NominalTypeDecl.AddedImplicitInitializers = true;
33703356
}
33713357

3372-
/// Set the interface type of this nominal type to the metatype of the
3373-
/// declared interface type.
3374-
void computeType();
3375-
33763358
/// getDeclaredType - Retrieve the type declared by this entity, without
33773359
/// any generic parameters bound if this is a generic type.
33783360
Type getDeclaredType() const;
@@ -4804,8 +4786,7 @@ class VarDecl : public AbstractStorageDecl {
48044786
bool issCaptureList, SourceLoc nameLoc, Identifier name,
48054787
DeclContext *dc, StorageIsMutable_t supportsMutation);
48064788

4807-
/// This is the type specified, including location information.
4808-
TypeLoc typeLoc;
4789+
TypeRepr *ParentRepr = nullptr;
48094790

48104791
Type typeInContext;
48114792

@@ -4825,8 +4806,10 @@ class VarDecl : public AbstractStorageDecl {
48254806
return hasName() ? getBaseName().getIdentifier().str() : "_";
48264807
}
48274808

4828-
TypeLoc &getTypeLoc() { return typeLoc; }
4829-
TypeLoc getTypeLoc() const { return typeLoc; }
4809+
/// Retrieve the TypeRepr corresponding to the parsed type of the parent
4810+
/// pattern, if it exists.
4811+
TypeRepr *getTypeRepr() const { return ParentRepr; }
4812+
void setTypeRepr(TypeRepr *repr) { ParentRepr = repr; }
48304813

48314814
bool hasType() const {
48324815
// We have a type if either the type has been computed already or if
@@ -5201,10 +5184,8 @@ class ParamDecl : public VarDecl {
52015184
Identifier argumentName, SourceLoc parameterNameLoc,
52025185
Identifier parameterName, DeclContext *dc);
52035186

5204-
/// Clone constructor, allocates a new ParamDecl identical to the first.
5205-
/// Intentionally not defined as a typical copy constructor to avoid
5206-
/// accidental copies.
5207-
ParamDecl(ParamDecl *PD, bool withTypes);
5187+
/// Create a new ParamDecl identical to the first except without the interface type.
5188+
static ParamDecl *cloneWithoutType(const ASTContext &Ctx, ParamDecl *PD);
52085189

52095190
/// Retrieve the argument (API) name for this function parameter.
52105191
Identifier getArgumentName() const { return ArgumentName; }
@@ -5221,10 +5202,7 @@ class ParamDecl : public VarDecl {
52215202
SourceLoc getParameterNameLoc() const { return ParameterNameLoc; }
52225203

52235204
SourceLoc getSpecifierLoc() const { return SpecifierLoc; }
5224-
5225-
bool isTypeLocImplicit() const { return Bits.ParamDecl.IsTypeLocImplicit; }
5226-
void setIsTypeLocImplicit(bool val) { Bits.ParamDecl.IsTypeLocImplicit = val; }
5227-
5205+
52285206
DefaultArgumentKind getDefaultArgumentKind() const {
52295207
return static_cast<DefaultArgumentKind>(Bits.ParamDecl.defaultArgumentKind);
52305208
}
@@ -5495,10 +5473,6 @@ class SubscriptDecl : public GenericContext, public AbstractStorageDecl {
54955473
TypeLoc &getElementTypeLoc() { return ElementTy; }
54965474
const TypeLoc &getElementTypeLoc() const { return ElementTy; }
54975475

5498-
/// Compute the interface type of this subscript from the parameter and
5499-
/// element types.
5500-
void computeType();
5501-
55025476
/// Determine the kind of Objective-C subscripting this declaration
55035477
/// implies.
55045478
ObjCSubscriptKind getObjCSubscriptKind() const;
@@ -6369,10 +6343,6 @@ class EnumElementDecl : public DeclContext, public ValueDecl {
63696343
return hasName() ? getBaseName().getIdentifier().str() : "_";
63706344
}
63716345

6372-
/// Set the interface type of this enum element to the constructor function
6373-
/// type; (Self.Type) -> Self or (Self.Type) -> (Args...) -> Self.
6374-
void computeType();
6375-
63766346
Type getArgumentInterfaceType() const;
63776347

63786348
void setParameterList(ParameterList *params);

trunk/include/swift/AST/DiagnosticsSema.def

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -381,8 +381,8 @@ ERROR(cannot_convert_argument_value,none,
381381
(Type,Type))
382382

383383
NOTE(candidate_has_invalid_argument_at_position,none,
384-
"candidate expects value of type %0 for parameter #%1",
385-
(Type, unsigned))
384+
"candidate expects %select{|in-out }2value of type %0 for parameter #%1",
385+
(Type, unsigned, bool))
386386

387387
ERROR(cannot_convert_array_to_variadic,none,
388388
"cannot pass array of type %0 as variadic arguments of type %1",
@@ -4533,8 +4533,6 @@ ERROR(property_wrapper_wrong_initial_value_init, none,
45334533
(DeclName, Type, Type))
45344534
ERROR(property_wrapper_failable_init, none,
45354535
"%0 cannot be failable", (DeclName))
4536-
ERROR(property_wrapper_ambiguous_default_value_init, none,
4537-
"property wrapper type %0 has multiple default-value initializers", (Type))
45384536
ERROR(property_wrapper_type_requirement_not_accessible,none,
45394537
"%select{private|fileprivate|internal|public|open}0 %1 %2 cannot have "
45404538
"more restrictive access than its enclosing property wrapper type %3 "

0 commit comments

Comments
 (0)