diff options
author | Miguel Garcia <miguelalfredo.garcia@epfl.ch> | 2012-07-10 15:24:21 +0200 |
---|---|---|
committer | Miguel Garcia <miguelalfredo.garcia@epfl.ch> | 2012-07-10 15:24:21 +0200 |
commit | df1b94e7d80dd7901336979d255504b76fbe08c1 (patch) | |
tree | 920d7873f21339d7596963a5a46e5f55da11f509 /src/compiler | |
parent | 9a7546db9f2b5e656678960bd8ee2d3e4eac8981 (diff) | |
download | scala-df1b94e7d80dd7901336979d255504b76fbe08c1.tar.gz scala-df1b94e7d80dd7901336979d255504b76fbe08c1.tar.bz2 scala-df1b94e7d80dd7901336979d255504b76fbe08c1.zip |
bandaid in GenASM for SI-6049
Diffstat (limited to 'src/compiler')
-rw-r--r-- | src/compiler/scala/tools/nsc/backend/jvm/GenASM.scala | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/src/compiler/scala/tools/nsc/backend/jvm/GenASM.scala b/src/compiler/scala/tools/nsc/backend/jvm/GenASM.scala index 32c100b026..e7fb287d22 100644 --- a/src/compiler/scala/tools/nsc/backend/jvm/GenASM.scala +++ b/src/compiler/scala/tools/nsc/backend/jvm/GenASM.scala @@ -2237,9 +2237,15 @@ abstract class GenASM extends SubComponent with BytecodeWriters { val st = pending.getOrElseUpdate(lv, mutable.Stack.empty[Label])
st.push(start)
}
- def popScope(lv: Local, end: Label) {
- val start = pending(lv).pop()
- seen ::= LocVarEntry(lv, start, end)
+ def popScope(lv: Local, end: Label, iPos: Position) {
+ pending.get(lv) match {
+ case Some(st) if st.nonEmpty =>
+ val start = st.pop()
+ seen ::= LocVarEntry(lv, start, end)
+ case _ =>
+ // TODO SI-6049
+ getCurrentCUnit().warning(iPos, "Visited SCOPE_EXIT before visiting corresponding SCOPE_ENTER. SI-6049")
+ }
}
def getMerged(): collection.Map[Local, List[Interval]] = {
@@ -2452,7 +2458,7 @@ abstract class GenASM extends SubComponent with BytecodeWriters { // similarly, these labels aren't tracked in the `labels` map.
val end = new asm.Label
jmethod.visitLabel(end)
- scoping.popScope(lv, end)
+ scoping.popScope(lv, end, instr.pos)
}
}
|