diff options
author | Pavel Pavlov <pavel.e.pavlov@gmail.com> | 2012-08-27 00:12:07 +0700 |
---|---|---|
committer | Pavel Pavlov <pavel.e.pavlov@gmail.com> | 2012-08-27 19:35:53 +0700 |
commit | 3cd8eb053afcb3592770437112655023ede17505 (patch) | |
tree | e729437cdee551244dd339872f50937c67aaa05c /src/compiler/scala/tools/nsc/transform/LambdaLift.scala | |
parent | a23edefac652e3be1474fceb3ee15d7eaecf1359 (diff) | |
download | scala-3cd8eb053afcb3592770437112655023ede17505.tar.gz scala-3cd8eb053afcb3592770437112655023ede17505.tar.bz2 scala-3cd8eb053afcb3592770437112655023ede17505.zip |
SI-5767 fix + small HashSet/HashMap fixes
- `LinkedHashSet` implementation moved from `FlatHashTable` to `HashTable`
- `remove` time reduced from O(n) to O(1)
- `diff` time reduced from O(n^2) to O(n)
- A bit of refactoring in `HashTable` serialization code
- Putting an element into hash map now avoids double hash code/hash index
calculation (see `HashTable#findOrAddEntry`)
- bugfix: compiler/LambdaLift occasionally breaks LinkedHashSet integrity
Diffstat (limited to 'src/compiler/scala/tools/nsc/transform/LambdaLift.scala')
-rw-r--r-- | src/compiler/scala/tools/nsc/transform/LambdaLift.scala | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/compiler/scala/tools/nsc/transform/LambdaLift.scala b/src/compiler/scala/tools/nsc/transform/LambdaLift.scala index b6d54f114e..c41ff20229 100644 --- a/src/compiler/scala/tools/nsc/transform/LambdaLift.scala +++ b/src/compiler/scala/tools/nsc/transform/LambdaLift.scala @@ -154,7 +154,7 @@ abstract class LambdaLift extends InfoTransform { private def markCalled(sym: Symbol, owner: Symbol) { debuglog("mark called: " + sym + " of " + sym.owner + " is called by " + owner) symSet(called, owner) addEntry sym - if (sym.enclClass != owner.enclClass) calledFromInner addEntry sym + if (sym.enclClass != owner.enclClass) calledFromInner += sym } /** The traverse function */ |