diff options
author | Martin Odersky <odersky@gmail.com> | 2014-02-24 17:21:18 +0100 |
---|---|---|
committer | Martin Odersky <odersky@gmail.com> | 2014-02-24 18:56:49 +0100 |
commit | a995ab85b7747275a1798cf29ac54466fbe82e2f (patch) | |
tree | 9ccf359de71fe9ade478932636ccba391f74b651 /src/dotty/tools/dotc/util/Positions.scala | |
parent | ed7755b781bd1b444d38329cb22eacaa3fc1c005 (diff) | |
download | dotty-a995ab85b7747275a1798cf29ac54466fbe82e2f.tar.gz dotty-a995ab85b7747275a1798cf29ac54466fbe82e2f.tar.bz2 dotty-a995ab85b7747275a1798cf29ac54466fbe82e2f.zip |
Misc performance improvements by eliminating stupid allocations
- Avoid closure creation in Position.
- Avoid creating debug string in SymDenotations
- Avoid creating Flag translation tables in pickle buffers
Diffstat (limited to 'src/dotty/tools/dotc/util/Positions.scala')
-rw-r--r-- | src/dotty/tools/dotc/util/Positions.scala | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/dotty/tools/dotc/util/Positions.scala b/src/dotty/tools/dotc/util/Positions.scala index 21ee788ca..293bb4a4c 100644 --- a/src/dotty/tools/dotc/util/Positions.scala +++ b/src/dotty/tools/dotc/util/Positions.scala @@ -125,7 +125,7 @@ object Positions { def Position(start: Int, end: Int, point: Int): Position = { val pointDelta = (point - start) max 0 val pos = fromOffsets(start, end, if (pointDelta >= SyntheticPointDelta) 0 else pointDelta) - assert(pos.isSourceDerived, pos+" "+SyntheticPointDelta) + assert(pos.isSourceDerived) pos } |