Skip to content

Commit 405283b

Browse files
committed
---
yaml --- r: 349084 b: refs/heads/master c: 23db8d0 h: refs/heads/master
1 parent a4a18b8 commit 405283b

33 files changed

+354
-330
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: 033e31d3cb67f90cb8fdfd44a28811741a719d00
2+
refs/heads/master: 23db8d0e2ecc997462c8fefdeb3d3a1a6a7bec10
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: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,6 @@ endif()
1111
list(APPEND CMAKE_MODULE_PATH
1212
"${CMAKE_CURRENT_SOURCE_DIR}/cmake/modules")
1313

14-
set(CMAKE_DISABLE_IN_SOURCE_BUILD YES)
15-
1614
if(DEFINED CMAKE_JOB_POOLS)
1715
# CMake < 3.11 doesn't support CMAKE_JOB_POOLS. Manually set the property.
1816
set_property(GLOBAL PROPERTY JOB_POOLS "${CMAKE_JOB_POOLS}")

trunk/docs/WindowsBuild.md

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,8 @@ 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. Make sure that the build
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
103104
type for LLVM/Clang is compatible with the build type for Swift. That is,
104105
either build everything `Debug` or some variant of `Release` (e.g. `Release`,
105106
`RelWithDebInfo`).
@@ -125,8 +126,8 @@ ninja
125126
path S:\b\llvm\bin;%PATH%
126127
```
127128
## 7. Build CMark
128-
- This must be done from within a developer command prompt.
129-
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.
130131
```cmd
131132
md "S:\b\cmark"
132133
cd "S:\b\cmark"
@@ -179,8 +180,8 @@ cmake -G "Visual Studio 2017" -A x64 -T "host=x64"^ ...
179180
```
180181

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

trunk/include/swift/AST/Decl.h

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2978,6 +2978,9 @@ class TypeAliasDecl : public GenericTypeDecl {
29782978
/// Retrieve a sugared interface type containing the structure of the interface
29792979
/// type before any semantic validation has occured.
29802980
Type getStructuralType() const;
2981+
2982+
/// Set the interface type of this typealias declaration from the underlying type.
2983+
void computeType();
29812984

29822985
bool isCompatibilityAlias() const {
29832986
return Bits.TypeAliasDecl.IsCompatibilityAlias;
@@ -3166,6 +3169,10 @@ class AssociatedTypeDecl : public AbstractTypeParamDecl {
31663169
TrailingWhere = trailingWhereClause;
31673170
}
31683171

3172+
/// Set the interface type of this associated type declaration to a dependent
3173+
/// member type of 'Self'.
3174+
void computeType();
3175+
31693176
/// Retrieve the associated type "anchor", which is the associated type
31703177
/// declaration that will be used to describe this associated type in the
31713178
/// ABI.
@@ -3355,6 +3362,10 @@ class NominalTypeDecl : public GenericTypeDecl, public IterableDeclContext {
33553362
Bits.NominalTypeDecl.AddedImplicitInitializers = true;
33563363
}
33573364

3365+
/// Set the interface type of this nominal type to the metatype of the
3366+
/// declared interface type.
3367+
void computeType();
3368+
33583369
/// getDeclaredType - Retrieve the type declared by this entity, without
33593370
/// any generic parameters bound if this is a generic type.
33603371
Type getDeclaredType() const;
@@ -5473,6 +5484,10 @@ class SubscriptDecl : public GenericContext, public AbstractStorageDecl {
54735484
TypeLoc &getElementTypeLoc() { return ElementTy; }
54745485
const TypeLoc &getElementTypeLoc() const { return ElementTy; }
54755486

5487+
/// Compute the interface type of this subscript from the parameter and
5488+
/// element types.
5489+
void computeType();
5490+
54765491
/// Determine the kind of Objective-C subscripting this declaration
54775492
/// implies.
54785493
ObjCSubscriptKind getObjCSubscriptKind() const;
@@ -6343,6 +6358,10 @@ class EnumElementDecl : public DeclContext, public ValueDecl {
63436358
return hasName() ? getBaseName().getIdentifier().str() : "_";
63446359
}
63456360

6361+
/// Set the interface type of this enum element to the constructor function
6362+
/// type; (Self.Type) -> Self or (Self.Type) -> (Args...) -> Self.
6363+
void computeType();
6364+
63466365
Type getArgumentInterfaceType() const;
63476366

63486367
void setParameterList(ParameterList *params);

trunk/include/swift/AST/DiagnosticsCommon.def

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -163,11 +163,6 @@ 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-
171166
#ifndef DIAG_NO_UNDEF
172167
# if defined(DIAG)
173168
# undef DIAG

trunk/include/swift/AST/TypeCheckRequests.h

Lines changed: 0 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1362,29 +1362,6 @@ class ParamSpecifierRequest
13621362
void cacheResult(ParamSpecifier value) const;
13631363
};
13641364

1365-
/// Determines the result type of a function or element type of a subscript.
1366-
class ResultTypeRequest
1367-
: public SimpleRequest<ResultTypeRequest,
1368-
Type(ValueDecl *),
1369-
CacheKind::SeparatelyCached> {
1370-
public:
1371-
using SimpleRequest::SimpleRequest;
1372-
1373-
private:
1374-
friend SimpleRequest;
1375-
1376-
TypeLoc &getResultTypeLoc() const;
1377-
1378-
// Evaluation.
1379-
llvm::Expected<Type> evaluate(Evaluator &evaluator, ValueDecl *decl) const;
1380-
1381-
public:
1382-
// Separate caching.
1383-
bool isCached() const { return true; }
1384-
Optional<Type> getCachedResult() const;
1385-
void cacheResult(Type value) const;
1386-
};
1387-
13881365
// Allow AnyValue to compare two Type values, even though Type doesn't
13891366
// support ==.
13901367
template<>

trunk/include/swift/AST/TypeCheckerTypeIDZone.def

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -153,5 +153,3 @@ SWIFT_REQUEST(TypeChecker, NeedsNewVTableEntryRequest,
153153
bool(AbstractFunctionDecl *), SeparatelyCached, NoLocationInfo)
154154
SWIFT_REQUEST(TypeChecker, ParamSpecifierRequest,
155155
ParamDecl::Specifier(ParamDecl *), SeparatelyCached, NoLocationInfo)
156-
SWIFT_REQUEST(TypeChecker, ResultTypeRequest,
157-
Type(ValueDecl *), SeparatelyCached, NoLocationInfo)

trunk/include/swift/Sema/IDETypeChecking.h

Lines changed: 9 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -20,31 +20,21 @@
2020
#define SWIFT_SEMA_IDETYPECHECKING_H
2121

2222
#include "llvm/ADT/MapVector.h"
23-
#include "swift/AST/Identifier.h"
2423
#include "swift/Basic/SourceLoc.h"
2524
#include <memory>
2625

2726
namespace swift {
2827
class AbstractFunctionDecl;
29-
class ASTContext;
30-
class ConcreteDeclRef;
3128
class Decl;
32-
class DeclContext;
33-
class DeclName;
34-
enum class DeclRefKind;
3529
class Expr;
3630
class ExtensionDecl;
37-
class FunctionType;
38-
class NominalTypeDecl;
39-
class PatternBindingDecl;
4031
class ProtocolDecl;
41-
class SourceFile;
42-
class SubscriptDecl;
43-
class TopLevelCodeDecl;
4432
class Type;
4533
class TypeChecker;
34+
class DeclContext;
35+
class ConcreteDeclRef;
4636
class ValueDecl;
47-
struct PrintOptions;
37+
class DeclName;
4838

4939
/// Typecheck binding initializer at \p bindingIndex.
5040
void typeCheckPatternBinding(PatternBindingDecl *PBD, unsigned bindingIndex);
@@ -137,6 +127,12 @@ namespace swift {
137127
/// \returns true on success, false on error.
138128
bool typeCheckTopLevelCodeDecl(TopLevelCodeDecl *TLCD);
139129

130+
/// Creates a type checker instance on the given AST context, if it
131+
/// doesn't already have one.
132+
///
133+
/// \returns a reference to the type checker instance.
134+
TypeChecker &createTypeChecker(ASTContext &Ctx);
135+
140136
struct ExtensionInfo {
141137
// The extension with the declarations to apply.
142138
ExtensionDecl *Ext;

trunk/include/swift/Subsystems.h

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,6 @@ namespace swift {
6565
class SyntaxParsingCache;
6666
class Token;
6767
class TopLevelContext;
68-
class TypeChecker;
6968
struct TypeLoc;
7069
class UnifiedStatsReporter;
7170
enum class SourceFileKind;
@@ -195,12 +194,6 @@ namespace swift {
195194
SkipNonInlinableFunctionBodies = 1 << 4,
196195
};
197196

198-
/// Creates a type checker instance on the given AST context, if it
199-
/// doesn't already have one.
200-
///
201-
/// \returns a reference to the type checker instance.
202-
TypeChecker &createTypeChecker(ASTContext &Ctx);
203-
204197
/// Once parsing and name-binding are complete, this walks the AST to resolve
205198
/// types and diagnose problems therein.
206199
///

0 commit comments

Comments
 (0)