mirror of
https://github.com/Eaglercraft-TeaVM-Fork/eagler-teavm.git
synced 2024-12-22 16:14:10 -08:00
Fix wrong previous commit
This commit is contained in:
parent
58e68db2c4
commit
a3eb5f635f
|
@ -23,12 +23,14 @@ import org.teavm.model.ValueType;
|
||||||
import org.teavm.model.emit.PhiEmitter;
|
import org.teavm.model.emit.PhiEmitter;
|
||||||
import org.teavm.model.emit.ProgramEmitter;
|
import org.teavm.model.emit.ProgramEmitter;
|
||||||
import org.teavm.model.emit.ValueEmitter;
|
import org.teavm.model.emit.ValueEmitter;
|
||||||
|
import org.teavm.model.instructions.SwitchInstruction;
|
||||||
|
import org.teavm.model.instructions.SwitchTableEntry;
|
||||||
|
|
||||||
public class SwitchBootstrapSubstitutor implements BootstrapMethodSubstitutor {
|
public class SwitchBootstrapSubstitutor implements BootstrapMethodSubstitutor {
|
||||||
@Override
|
@Override
|
||||||
public ValueEmitter substitute(DynamicCallSite callSite, ProgramEmitter pe) {
|
public ValueEmitter substitute(DynamicCallSite callSite, ProgramEmitter pe) {
|
||||||
boolean enumSwitch = callSite.getBootstrapMethod().getName().equals("enumSwitch");
|
boolean enumSwitch = callSite.getBootstrapMethod().getName().equals("enumSwitch");
|
||||||
List<RuntimeConstant> labels = callSite.getBootstrapArguments();
|
var labels = callSite.getBootstrapArguments();
|
||||||
ValueEmitter target = callSite.getArguments().get(0);
|
ValueEmitter target = callSite.getArguments().get(0);
|
||||||
ValueEmitter restartIdx = callSite.getArguments().get(1);
|
ValueEmitter restartIdx = callSite.getArguments().get(1);
|
||||||
BasicBlock joint = pe.prepareBlock();
|
BasicBlock joint = pe.prepareBlock();
|
||||||
|
|
Loading…
Reference in New Issue
Block a user