diff options
author | Paul Phillips <paulp@improving.org> | 2010-10-14 17:34:54 +0000 |
---|---|---|
committer | Paul Phillips <paulp@improving.org> | 2010-10-14 17:34:54 +0000 |
commit | 185700607dc2fd12cf47a61f583bdbafd726558b (patch) | |
tree | de5ce98a84176042276101368c07cd828625b334 /test/files/jvm/t3102.scala | |
parent | 920449d6eeb0267f96b115a47866ccd53a5a3c55 (diff) | |
download | scala-185700607dc2fd12cf47a61f583bdbafd726558b.tar.gz scala-185700607dc2fd12cf47a61f583bdbafd726558b.tar.bz2 scala-185700607dc2fd12cf47a61f583bdbafd726558b.zip |
Modification to the widening logic to treat loc...
Modification to the widening logic to treat locally defined symbols like
final members thus allowing more constants to be inlined. Concretely,
that means that in code like this:
def f: Unit = { val b = false ; if (b) println("ok") }
The call to println is no longer generated at all, and in this code:
def f(x: Int) = { val X = 1 ; val Y = 2; x match { case X => 1 ; case Y => 2 } }
A tableswitch is generated instead of the present if/then/else.
I also added a big comment to the former widenIfNotFinal (now
widenIfNecessary for obvious reasons.) Review by rytz.
Diffstat (limited to 'test/files/jvm/t3102.scala')
0 files changed, 0 insertions, 0 deletions