- JavaByteCodeDisassembler jk_new_structure
authorvranyj1
Mon, 08 Oct 2012 10:12:31 +0000
branchjk_new_structure
changeset 1712 1db1b33d116c
parent 1711 38b4f702653e
child 1713 34b8f77e6b8f
- JavaByteCodeDisassembler changed: #switch:
src/JavaByteCodeDisassembler.st
--- a/src/JavaByteCodeDisassembler.st	Fri Sep 28 21:02:13 2012 +0000
+++ b/src/JavaByteCodeDisassembler.st	Mon Oct 08 10:12:31 2012 +0000
@@ -1836,12 +1836,13 @@
     "Modified: / 21-03-2011 / 15:28:12 / Marcel Hlopko <hlopkmar@fel.cvut.cz>"
 !
 
-switch: op
+switch: opcode
 
     | lno |
-    lno := method quickLineNumberForPC: instrPointer.
+    "bytecode positions in line number table starts with 0, not 1"
+    lno := method quickLineNumberForPC: instrPointer - 1.
     lastLno ~~ lno ifTrue:[self writeLine: (lastLno := lno)].
-    ^super switch: op
+    ^super switch: opcode
 
     "Created: / 22-03-2011 / 20:57:42 / Jan Vrany <jan.vrany@fit.cvut.cz>"
 ! !