Skip to content

Commit 72e1905

Browse files
---
yaml --- r: 349093 b: refs/heads/master c: 9a4abf4 h: refs/heads/master i: 349091: 8a23159
1 parent 68d5241 commit 72e1905

File tree

95 files changed

+2151
-1005
lines changed

Some content is hidden

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

95 files changed

+2151
-1005
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: e4e162d25f3c58379388e4047bcace8535f2d113
2+
refs/heads/master: 9a4abf47a450aeff6a3231225fd2cf18cc7a940a
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/CMakeLists.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@ endif()
1111
list(APPEND CMAKE_MODULE_PATH
1212
"${CMAKE_CURRENT_SOURCE_DIR}/cmake/modules")
1313

14+
set(CMAKE_DISABLE_IN_SOURCE_BUILD YES)
15+
1416
if(DEFINED CMAKE_JOB_POOLS)
1517
# CMake < 3.11 doesn't support CMAKE_JOB_POOLS. Manually set the property.
1618
set_property(GLOBAL PROPERTY JOB_POOLS "${CMAKE_JOB_POOLS}")

trunk/benchmark/scripts/run_smoke_bench

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,10 @@ def main():
9393
argparser.add_argument(
9494
'-num-samples', type=int,
9595
help='The (minimum) number of samples to run', default=3)
96+
argparser.add_argument(
97+
'-num-reruns', type=int,
98+
help="The number of re-runs until it's assumed to be a real change",
99+
default=8)
96100
argparser.add_argument(
97101
'-platform', type=str,
98102
help='The benchmark build platform', default='macosx')
@@ -120,7 +124,7 @@ def test_opt_levels(args):
120124
if test_performance(opt_level, args.oldbuilddir[0],
121125
args.newbuilddir[0],
122126
float(args.threshold) / 100, args.num_samples,
123-
output_file):
127+
args.num_reruns, output_file):
124128
changes = True
125129

126130
# There is no point in reporting code size for Onone.
@@ -171,7 +175,7 @@ def merge(results, other_results):
171175

172176

173177
def test_performance(opt_level, old_dir, new_dir, threshold, num_samples,
174-
output_file):
178+
num_reruns, output_file):
175179
"""Detect performance changes in benchmarks.
176180
177181
Start fast with few samples per benchmark and gradually spend more time
@@ -185,7 +189,7 @@ def test_performance(opt_level, old_dir, new_dir, threshold, num_samples,
185189
tests = TestComparator(results[0], results[1], threshold)
186190
changed = tests.decreased + tests.increased
187191

188-
while len(changed) > 0 and unchanged_length_count < 10:
192+
while len(changed) > 0 and unchanged_length_count < num_reruns:
189193
i += 1
190194
if VERBOSE:
191195
log(' test again: ' + str([test.name for test in changed]))

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/docs/WindowsBuild.md

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -99,8 +99,7 @@ mklink "%VCToolsInstallDir%\include\visualc.apinotes" S:\swift\stdlib\public\Pla
9999
Warning: Creating the above links usually requires administrator privileges. The quick and easy way to do this is to open a second developer prompt by right clicking whatever shortcut you used to open the first one, choosing Run As Administrator, and pasting the above commands into the resulting window. You can then close the privileged prompt; this is the only step which requires elevation.
100100

101101
## 6. Build LLVM/Clang
102-
- This must be done from within a developer command prompt. LLVM and Clang are
103-
large projects, so building might take a few hours. Make sure that the build
102+
- This must be done from within a developer command prompt. Make sure that the build
104103
type for LLVM/Clang is compatible with the build type for Swift. That is,
105104
either build everything `Debug` or some variant of `Release` (e.g. `Release`,
106105
`RelWithDebInfo`).
@@ -126,8 +125,8 @@ ninja
126125
path S:\b\llvm\bin;%PATH%
127126
```
128127
## 7. Build CMark
129-
- This must be done from within a developer command prompt. CMark is a fairly
130-
small project and should only take a few minutes to build.
128+
- This must be done from within a developer command prompt.
129+
131130
```cmd
132131
md "S:\b\cmark"
133132
cd "S:\b\cmark"
@@ -180,8 +179,8 @@ cmake -G "Visual Studio 2017" -A x64 -T "host=x64"^ ...
180179
```
181180

182181
## 9. Build lldb
183-
- This must be done from within a developer command prompt and could take hours
184-
depending on your system.
182+
- This must be done from within a developer command prompt.
183+
185184
```cmd
186185
md "S:\b\lldb"
187186
cd "S:\b\lldb"

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/DiagnosticsCommon.def

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -163,6 +163,11 @@ ERROR(circular_protocol_def,none,
163163
NOTE(kind_declname_declared_here,none,
164164
"%0 %1 declared here", (DescriptiveDeclKind, DeclName))
165165

166+
WARNING(warn_property_wrapper_module_scope,none,
167+
"ignoring associated type %0 in favor of module-scoped property "
168+
"wrapper %0; please qualify the reference with %1",
169+
(DeclName, Identifier))
170+
166171
#ifndef DIAG_NO_UNDEF
167172
# if defined(DIAG)
168173
# undef DIAG

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)