Skip to content

Commit aba0f1e

Browse files
msimacektomasstupka
authored andcommitted
Compute offsets from startOffset
1 parent 6aa7674 commit aba0f1e

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

graalpython/com.oracle.graal.python/src/com/oracle/graal/python/compiler/CodeUnit.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ OpCodes codeForBC(int bc) {
126126

127127
public int bciToSrcOffset(int bci) {
128128
int diffIdx = 0;
129-
int currentOffset = 0;
129+
int currentOffset = startOffset;
130130

131131
int bytecodeNumber = 0;
132132
for (int i = 0; i < code.length;) {

graalpython/com.oracle.graal.python/src/com/oracle/graal/python/compiler/CompilationUnit.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -196,7 +196,7 @@ public CodeUnit assemble(int flags) {
196196

197197
Block b = startBlock;
198198
HashMap<Block, List<Block>> handlerBlocks = new HashMap<>();
199-
int lastSrcOffset = 0;
199+
int lastSrcOffset = startOffset;
200200
while (b != null) {
201201
b.startBci = buf.size();
202202
BlockInfo.AbstractExceptionHandler handler = b.findExceptionHandler();

0 commit comments

Comments
 (0)