Skip to content

Commit

Permalink
JACOBIN-536 Updating location of increments to f.PC
Browse files Browse the repository at this point in the history
  • Loading branch information
platypusguy committed Jun 28, 2024
1 parent 0fdf05c commit d3e0bcf
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/jvm/run.go
Original file line number Diff line number Diff line change
Expand Up @@ -284,7 +284,6 @@ frameInterpreter:

case opcodes.LDC2_W: // 0x14 (push long or double from CP indexed by next two bytes)
idx := (int(f.Meth[f.PC+1]) * 256) + int(f.Meth[f.PC+2])
f.PC += 2

CPe := classloader.FetchCPentry(f.CP.(*classloader.CPool), idx)
if CPe.RetType == classloader.IS_INT64 { // push value twice (due to 64-bit width)
Expand All @@ -302,6 +301,8 @@ frameInterpreter:
return errors.New(errMsg) // applies only if in test
}
}
f.PC += 2

case opcodes.ILOAD, // 0x15 (push int from local var, using next byte as index)
opcodes.FLOAD, // 0x17 (push float from local var, using next byte as index)
opcodes.ALOAD: // 0x19 (push ref from local var, using next byte as index)
Expand Down

0 comments on commit d3e0bcf

Please sign in to comment.