upgrade to java 22 and fix miscompile of variable loads

This commit is contained in:
Alex Zenla
2025-03-15 21:16:48 -07:00
parent 6e225aab88
commit 4100752f1c
5 changed files with 33 additions and 16 deletions

View File

@ -30,7 +30,9 @@ class IrStubOpEmitter(val irDefinition: IrDefinition, val code: CodeBuilder) : I
if (callOrStubVar.stubVar != null) {
code.emit(Opcode.LoadLocal, listOf(callOrStubVar.stubVar.index))
} else {
code.emit(Opcode.Integer, listOf(code.nextOpInst() + 2u))
val retRel = MutableRel(0u)
retRel.rel = code.nextOpInst() + 2u
code.patch(Opcode.ReturnAddress, listOf(0u), 0, symbol, retRel)
code.patch(Opcode.Call, listOf(0u), mapOf(0 to callOrStubVar.call!!))
}
}