diff options
author | Martin Odersky <odersky@gmail.com> | 2012-07-13 14:44:14 +0200 |
---|---|---|
committer | Adriaan Moors <adriaan.moors@epfl.ch> | 2012-07-14 12:09:33 +0200 |
commit | 71d2ceb15dd39db6e031c33ed5d1be0182cc5a7f (patch) | |
tree | db4dc04a2d03d202dd23f6d88914c07f8412faca | |
parent | 77e56927603ba7f155c65f89135ac357c9ec3d35 (diff) | |
download | scala-71d2ceb15dd39db6e031c33ed5d1be0182cc5a7f.tar.gz scala-71d2ceb15dd39db6e031c33ed5d1be0182cc5a7f.tar.bz2 scala-71d2ceb15dd39db6e031c33ed5d1be0182cc5a7f.zip |
Attempt #8 to opimize findMember.
Only consider DEFERRED members in 2nd pass.
-rw-r--r-- | src/reflect/scala/reflect/internal/Types.scala | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/reflect/scala/reflect/internal/Types.scala b/src/reflect/scala/reflect/internal/Types.scala index 3f27dbba76..3cddec5ace 100644 --- a/src/reflect/scala/reflect/internal/Types.scala +++ b/src/reflect/scala/reflect/internal/Types.scala @@ -1110,6 +1110,7 @@ trait Types extends api.Types { self: SymbolTable => var lastM: ::[Symbol] = null var membertpe: Type = null var membertpes: Array[Type] = null + var required = requiredFlags var excluded = excludedFlags | DEFERRED var continue = true var self: Type = null @@ -1142,7 +1143,7 @@ trait Types extends api.Types { self: SymbolTable => while (entry ne null) { val sym = entry.sym val flags = sym.flags - if ((flags & requiredFlags) == requiredFlags) { + if ((flags & required) == required) { val excl = flags & excluded if (excl == 0L && (// omit PRIVATE LOCALS unless selector class is contained in class owning the def. @@ -1205,6 +1206,7 @@ trait Types extends api.Types { self: SymbolTable => bcs = if (name == nme.CONSTRUCTOR) Nil else bcs.tail } // while (!bcs.isEmpty) excluded = excludedFlags + required |= DEFERRED } // while (continue) Statistics.popTimer(typeOpsStack, start) if (suspension ne null) suspension foreach (_.suspended = false) |