@@ -1299,7 +1299,6 @@ object SymDenotations {
1299
1299
override def invalidateInheritedInfo (): Unit = {
1300
1300
myBaseClasses = null
1301
1301
mySuperClassBits = null
1302
- myMemberFingerPrint = FingerPrint .unknown
1303
1302
myMemberCache = null
1304
1303
myMemberCachePeriod = Nowhere
1305
1304
memberNamesCache = SimpleMap .Empty
@@ -1418,42 +1417,6 @@ object SymDenotations {
1418
1417
1419
1418
final override def typeParamCreationFlags = ClassTypeParamCreationFlags
1420
1419
1421
- private [this ] var myMemberFingerPrint : FingerPrint = FingerPrint .unknown
1422
-
1423
- private def computeMemberFingerPrint (implicit ctx : Context ): FingerPrint = {
1424
- var fp = FingerPrint ()
1425
- var e = info.decls.lastEntry
1426
- while (e != null ) {
1427
- fp.include(e.name)
1428
- e = e.prev
1429
- }
1430
- var ps = classParents
1431
- while (ps.nonEmpty) {
1432
- val parent = ps.head.typeSymbol
1433
- parent.denot match {
1434
- case parentDenot : ClassDenotation =>
1435
- fp.include(parentDenot.memberFingerPrint)
1436
- if (parentDenot.isFullyCompleted) parentDenot.setFlag(Frozen )
1437
- case _ =>
1438
- }
1439
- ps = ps.tail
1440
- }
1441
- fp
1442
- }
1443
-
1444
- /** A bloom filter for the names of all members in this class.
1445
- * Makes sense only for parent classes, and should definitely
1446
- * not be used for package classes because cache never
1447
- * gets invalidated.
1448
- */
1449
- def memberFingerPrint (implicit ctx : Context ): FingerPrint =
1450
- if (myMemberFingerPrint != FingerPrint .unknown) myMemberFingerPrint
1451
- else {
1452
- val fp = computeMemberFingerPrint
1453
- if (isFullyCompleted) myMemberFingerPrint = fp
1454
- fp
1455
- }
1456
-
1457
1420
private [this ] var myMemberCache : LRUCache [Name , PreDenotation ] = null
1458
1421
private [this ] var myMemberCachePeriod : Period = Nowhere
1459
1422
@@ -1499,13 +1462,12 @@ object SymDenotations {
1499
1462
1500
1463
/** Enter a symbol in given `scope` without potentially replacing the old copy. */
1501
1464
def enterNoReplace (sym : Symbol , scope : MutableScope )(implicit ctx : Context ): Unit = {
1502
- require((sym.denot.flagsUNSAFE is Private ) || ! (this is Frozen ) || (scope ne this .unforcedDecls))
1465
+ require((sym.denot.flagsUNSAFE is Private ) ||
1466
+ ! (this is Frozen ) ||
1467
+ (scope ne this .unforcedDecls))
1503
1468
scope.enter(sym)
1504
1469
1505
- if (myMemberFingerPrint != FingerPrint .unknown)
1506
- myMemberFingerPrint.include(sym.name)
1507
- if (myMemberCache != null )
1508
- myMemberCache invalidate sym.name
1470
+ if (myMemberCache != null ) myMemberCache invalidate sym.name
1509
1471
}
1510
1472
1511
1473
/** Replace symbol `prev` (if defined in current class) by symbol `replacement`.
@@ -1526,7 +1488,6 @@ object SymDenotations {
1526
1488
def delete (sym : Symbol )(implicit ctx : Context ) = {
1527
1489
require(! (this is Frozen ))
1528
1490
info.decls.openForMutations.unlink(sym)
1529
- myMemberFingerPrint = FingerPrint .unknown
1530
1491
if (myMemberCache != null ) myMemberCache invalidate sym.name
1531
1492
}
1532
1493
@@ -1574,31 +1535,26 @@ object SymDenotations {
1574
1535
}
1575
1536
1576
1537
private [core] def computeNPMembersNamed (name : Name , inherited : Boolean )(implicit ctx : Context ): PreDenotation = /* >|>*/ Stats .track(" computeNPMembersNamed" ) /* <|<*/ {
1577
- if (! inherited ||
1578
- ! Config .useFingerPrints ||
1579
- (memberFingerPrint contains name)) {
1580
- Stats .record(" computeNPMembersNamed after fingerprint" )
1581
- ensureCompleted()
1582
- val ownDenots = info.decls.denotsNamed(name, selectNonPrivate)
1583
- if (debugTrace) // DEBUG
1584
- println(s " $this.member( $name), ownDenots = $ownDenots" )
1585
- def collect (denots : PreDenotation , parents : List [TypeRef ]): PreDenotation = parents match {
1586
- case p :: ps =>
1587
- val denots1 = collect(denots, ps)
1588
- p.symbol.denot match {
1589
- case parentd : ClassDenotation =>
1590
- denots1 union
1591
- parentd.nonPrivateMembersNamed(name, inherited = true )
1592
- .mapInherited(ownDenots, denots1, thisType)
1593
- case _ =>
1594
- denots1
1595
- }
1596
- case nil =>
1597
- denots
1598
- }
1599
- if (name.isConstructorName) ownDenots
1600
- else collect(ownDenots, classParents)
1601
- } else NoDenotation
1538
+ Stats .record(" computeNPMembersNamed after fingerprint" )
1539
+ ensureCompleted()
1540
+ val ownDenots = info.decls.denotsNamed(name, selectNonPrivate)
1541
+ if (debugTrace) // DEBUG
1542
+ println(s " $this.member( $name), ownDenots = $ownDenots" )
1543
+ def collect (denots : PreDenotation , parents : List [TypeRef ]): PreDenotation = parents match {
1544
+ case p :: ps =>
1545
+ val denots1 = collect(denots, ps)
1546
+ p.symbol.denot match {
1547
+ case parentd : ClassDenotation =>
1548
+ denots1 union
1549
+ parentd.nonPrivateMembersNamed(name, inherited = true )
1550
+ .mapInherited(ownDenots, denots1, thisType)
1551
+ case _ =>
1552
+ denots1
1553
+ }
1554
+ case nil =>
1555
+ denots
1556
+ }
1557
+ if (name.isConstructorName) ownDenots else collect(ownDenots, classParents)
1602
1558
}
1603
1559
1604
1560
override final def findMember (name : Name , pre : Type , excluded : FlagSet )(implicit ctx : Context ): Denotation = {
0 commit comments