Skip to content

Commit 71d2ceb

Browse files
oderskyAdriaan Moors
authored and
Adriaan Moors
committed
Attempt #8 to opimize findMember.
Only consider DEFERRED members in 2nd pass.
1 parent 77e5692 commit 71d2ceb

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/reflect/scala/reflect/internal/Types.scala

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1110,6 +1110,7 @@ trait Types extends api.Types { self: SymbolTable =>
11101110
var lastM: ::[Symbol] = null
11111111
var membertpe: Type = null
11121112
var membertpes: Array[Type] = null
1113+
var required = requiredFlags
11131114
var excluded = excludedFlags | DEFERRED
11141115
var continue = true
11151116
var self: Type = null
@@ -1142,7 +1143,7 @@ trait Types extends api.Types { self: SymbolTable =>
11421143
while (entry ne null) {
11431144
val sym = entry.sym
11441145
val flags = sym.flags
1145-
if ((flags & requiredFlags) == requiredFlags) {
1146+
if ((flags & required) == required) {
11461147
val excl = flags & excluded
11471148
if (excl == 0L &&
11481149
(// omit PRIVATE LOCALS unless selector class is contained in class owning the def.
@@ -1205,6 +1206,7 @@ trait Types extends api.Types { self: SymbolTable =>
12051206
bcs = if (name == nme.CONSTRUCTOR) Nil else bcs.tail
12061207
} // while (!bcs.isEmpty)
12071208
excluded = excludedFlags
1209+
required |= DEFERRED
12081210
} // while (continue)
12091211
Statistics.popTimer(typeOpsStack, start)
12101212
if (suspension ne null) suspension foreach (_.suspended = false)

0 commit comments

Comments
 (0)