From 194356d3a3b06fbefc149bfb5d378050ca61b4f9 Mon Sep 17 00:00:00 2001 From: Alexey Andreev Date: Tue, 30 Jun 2015 23:24:14 +0300 Subject: [PATCH] Fix phi functions in emit API --- .../src/main/java/org/teavm/model/emit/ValueEmitter.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/teavm-core/src/main/java/org/teavm/model/emit/ValueEmitter.java b/teavm-core/src/main/java/org/teavm/model/emit/ValueEmitter.java index e72b238de..deee5501d 100644 --- a/teavm-core/src/main/java/org/teavm/model/emit/ValueEmitter.java +++ b/teavm-core/src/main/java/org/teavm/model/emit/ValueEmitter.java @@ -166,7 +166,7 @@ public class ValueEmitter { 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(); Phi phi = new Phi(); phi.setReceiver(var); @@ -175,7 +175,7 @@ public class ValueEmitter { incoming.setValue(variable); phi.getIncomings().add(incoming); incoming = new Incoming(); - incoming.setSource(other.block); + incoming.setSource(otherBlock); incoming.setValue(other.variable); phi.getIncomings().add(incoming); pe.getBlock().getPhis().add(phi);