mirror of
https://github.com/Eaglercraft-TeaVM-Fork/eagler-teavm.git
synced 2025-01-10 08:54:11 -08:00
Fix phi functions in emit API
This commit is contained in:
parent
04c6d77c87
commit
194356d3a3
|
@ -166,7 +166,7 @@ public class ValueEmitter {
|
||||||
return invoke(InvocationType.VIRTUAL, method, arguments);
|
return invoke(InvocationType.VIRTUAL, method, arguments);
|
||||||
}
|
}
|
||||||
|
|
||||||
public ValueEmitter join(ValueEmitter other) {
|
public ValueEmitter join(BasicBlock block, ValueEmitter other, BasicBlock otherBlock) {
|
||||||
Variable var = pe.getProgram().createVariable();
|
Variable var = pe.getProgram().createVariable();
|
||||||
Phi phi = new Phi();
|
Phi phi = new Phi();
|
||||||
phi.setReceiver(var);
|
phi.setReceiver(var);
|
||||||
|
@ -175,7 +175,7 @@ public class ValueEmitter {
|
||||||
incoming.setValue(variable);
|
incoming.setValue(variable);
|
||||||
phi.getIncomings().add(incoming);
|
phi.getIncomings().add(incoming);
|
||||||
incoming = new Incoming();
|
incoming = new Incoming();
|
||||||
incoming.setSource(other.block);
|
incoming.setSource(otherBlock);
|
||||||
incoming.setValue(other.variable);
|
incoming.setValue(other.variable);
|
||||||
phi.getIncomings().add(incoming);
|
phi.getIncomings().add(incoming);
|
||||||
pe.getBlock().getPhis().add(phi);
|
pe.getBlock().getPhis().add(phi);
|
||||||
|
|
Loading…
Reference in New Issue
Block a user