mirror of
https://github.com/Eaglercraft-TeaVM-Fork/eagler-teavm.git
synced 2024-12-23 00:24:11 -08:00
Fix bug in metaprogramming API
This commit is contained in:
parent
378111d767
commit
92403f9ec0
|
@ -681,6 +681,7 @@ public class CompositeMethodGenerator {
|
||||||
BasicBlock target = program.basicBlockAt(returnBlockIndex);
|
BasicBlock target = program.basicBlockAt(returnBlockIndex);
|
||||||
|
|
||||||
if (valueToReturn != null) {
|
if (valueToReturn != null) {
|
||||||
|
Variable valueToReturnResolved = var(valueToReturn);
|
||||||
if (resultVar == null) {
|
if (resultVar == null) {
|
||||||
resultVar = program.createVariable();
|
resultVar = program.createVariable();
|
||||||
resultPhi = new Phi();
|
resultPhi = new Phi();
|
||||||
|
@ -689,7 +690,7 @@ public class CompositeMethodGenerator {
|
||||||
}
|
}
|
||||||
Incoming incoming = new Incoming();
|
Incoming incoming = new Incoming();
|
||||||
incoming.setSource(program.basicBlockAt(blockIndex));
|
incoming.setSource(program.basicBlockAt(blockIndex));
|
||||||
incoming.setValue(var(valueToReturn));
|
incoming.setValue(valueToReturnResolved);
|
||||||
resultPhi.getIncomings().add(incoming);
|
resultPhi.getIncomings().add(incoming);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user