Skip to content

Commit 3fd4029

Browse files
committed
fewer lastInstruction lookups
1 parent 05ddddf commit 3fd4029

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/compiler/scala/tools/nsc/backend/jvm/GenJVM.scala

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1301,6 +1301,7 @@ abstract class GenJVM extends SubComponent with GenJVMUtil with GenAndroid with
13011301

13021302
/** local variables whose scope appears in this block. */
13031303
val varsInBlock: mutable.Set[Local] = new mutable.HashSet
1304+
val lastInstr = b.lastInstruction
13041305

13051306
for (instr <- b) {
13061307

@@ -1579,8 +1580,7 @@ abstract class GenJVM extends SubComponent with GenJVMUtil with GenAndroid with
15791580
lastLineNr
15801581
}
15811582

1582-
if (b.lastInstruction == instr)
1583-
endPC(b) = jcode.getPC()
1583+
if (instr eq lastInstr) { endPC(b) = jcode.getPC() }
15841584

15851585
//System.err.println("CRTLINE: " + instr.pos + " " +
15861586
// /* (if (instr.pos < clasz.cunit.source.content.length) clasz.cunit.source.content(instr.pos) else '*') + */ " " + crtLine);

0 commit comments

Comments
 (0)