summaryrefslogtreecommitdiff
path: root/src/msil/ch/epfl/lamp/compiler/msil/emit/ILGenerator.scala
diff options
context:
space:
mode:
Diffstat (limited to 'src/msil/ch/epfl/lamp/compiler/msil/emit/ILGenerator.scala')
-rw-r--r--src/msil/ch/epfl/lamp/compiler/msil/emit/ILGenerator.scala14
1 files changed, 9 insertions, 5 deletions
diff --git a/src/msil/ch/epfl/lamp/compiler/msil/emit/ILGenerator.scala b/src/msil/ch/epfl/lamp/compiler/msil/emit/ILGenerator.scala
index c7899c7f54..2223a6db0f 100644
--- a/src/msil/ch/epfl/lamp/compiler/msil/emit/ILGenerator.scala
+++ b/src/msil/ch/epfl/lamp/compiler/msil/emit/ILGenerator.scala
@@ -402,16 +402,20 @@ import ILGenerator._
* sets the line of the source file corresponding to the next instruction
*/
def setPosition(line: Int) {
- if (line != 0)
- lineNums.put(lastLabel, Integer.toString(line))
+ if (line != 0) lineNums.put(lastLabel, Integer.toString(line))
}
def setPosition(line: Int, filename: String) {
- if (line != 0)
- lineNums.put(lastLabel, line + " '" + filename + "'")
+ if (line != 0) lineNums.put(lastLabel, line + " '" + filename + "'")
}
- def getLocals(): Array[LocalBuilder] = localList.toArray
+ def setPosition(startLine: Int, endLine: Int, startCol: Int, endCol: Int, filename: String) {
+ val lineRange = startLine + "," + endLine
+ val colRange = startCol + "," + endCol
+ lineNums.put(lastLabel, lineRange + ":" + colRange + " '" + filename + "'")
+ }
+
+ def getLocals(): Array[LocalBuilder] = localList.toArray
def getLabelIterator() = labelList.iterator