Skip to content

Commit 80cd87f

Browse files
committed
---
yaml --- r: 349078 b: refs/heads/master c: ff4f234 h: refs/heads/master
1 parent e7fee9f commit 80cd87f

28 files changed

+339
-238
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: 96d4050f69c3a041627231b46746cea5bed6b855
2+
refs/heads/master: ff4f234333575fb948c2b29e4a7d4cf3fe64218b
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/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/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)