Skip to content

Commit decb5b9

Browse files
committed
---
yaml --- r: 349534 b: refs/heads/master-next c: bb83c39 h: refs/heads/master
1 parent 66ac745 commit decb5b9

File tree

13 files changed

+600
-955
lines changed

13 files changed

+600
-955
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: 8b17a1aa4952495df286165341f517c8d1a768fb
3+
refs/heads/master-next: bb83c392ffb3cce181857195d4533f61bfd534c5
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/include/swift/AST/ASTScope.h

Lines changed: 77 additions & 54 deletions
Large diffs are not rendered by default.

branches/master-next/include/swift/Basic/Statistics.def

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -160,6 +160,22 @@ FRONTEND_STATISTIC(AST, NumUnqualifiedLookup)
160160
/// AnyObject lookup.
161161
FRONTEND_STATISTIC(AST, NumModuleLookupClassMember)
162162

163+
/// Number of body scopes for iterable types
164+
FRONTEND_STATISTIC(AST, NumIterableTypeBodyASTScopes)
165+
166+
/// Number of expansions of body scopes for iterable types
167+
FRONTEND_STATISTIC(AST, NumIterableTypeBodyASTScopeExpansions)
168+
169+
/// Number of brace statment scopes for iterable types
170+
FRONTEND_STATISTIC(AST, NumBraceStmtASTScopes)
171+
172+
/// Number of expansions of brace statement scopes for iterable types
173+
FRONTEND_STATISTIC(AST, NumBraceStmtASTScopeExpansions)
174+
175+
/// Number of ASTScope lookups
176+
FRONTEND_STATISTIC(AST, NumASTScopeLookups)
177+
178+
163179
/// Number of full function bodies parsed.
164180
FRONTEND_STATISTIC(Parse, NumFunctionsParsed)
165181

branches/master-next/include/swift/Frontend/Frontend.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -297,6 +297,7 @@ class CompilerInvocation {
297297
/// Called from lldb, see rdar://53971116
298298
void disableASTScopeLookup() {
299299
LangOpts.EnableASTScopeLookup = false;
300+
LangOpts.LazyASTScopes = false;
300301
}
301302

302303
CodeCompletionCallbacksFactory *getCodeCompletionFactory() const {

branches/master-next/lib/AST/ASTScope.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,8 @@ llvm::SmallVector<const ASTScopeImpl *, 0> ASTScope::unqualifiedLookup(
4141
SourceFile *SF, DeclName name, SourceLoc loc,
4242
const DeclContext *startingContext,
4343
namelookup::AbstractASTScopeDeclConsumer &consumer) {
44+
if (auto *s = SF->getASTContext().Stats)
45+
++s->getFrontendCounters().NumASTScopeLookups;
4446
return ASTScopeImpl::unqualifiedLookup(SF, name, loc, startingContext,
4547
consumer);
4648
}
@@ -82,7 +84,7 @@ AbstractClosureScope::getClosureIfClosureScope() const {
8284

8385
// Conservative, because using precise info would be circular
8486
SourceRange
85-
AttachedPropertyWrapperScope::getSourceRangeFor(const VarDecl *const vd) {
87+
AttachedPropertyWrapperScope::getSourceRangeOfVarDecl(const VarDecl *const vd) {
8688
SourceRange sr;
8789
for (auto *attr : vd->getAttrs().getAttributes<CustomAttr>()) {
8890
if (sr.isInvalid())

0 commit comments

Comments
 (0)