mirror of
https://github.com/Eaglercraft-TeaVM-Fork/eagler-teavm.git
synced 2025-01-08 16:04:10 -08:00
Add support for reference equality condition emitter
This commit is contained in:
parent
8ba1598c08
commit
ce525f0a78
|
@ -580,11 +580,27 @@ public class ValueEmitter {
|
|||
}
|
||||
|
||||
public ConditionEmitter isEqualTo(ValueEmitter other) {
|
||||
return new ConditionEmitter(pe, fork(BinaryBranchingCondition.NOT_EQUAL, other));
|
||||
return new ConditionEmitter(pe, fork(BinaryBranchingCondition.EQUAL, other));
|
||||
}
|
||||
|
||||
public ConditionEmitter isNotEqualTo(ValueEmitter other) {
|
||||
return new ConditionEmitter(pe, fork(BinaryBranchingCondition.EQUAL, other));
|
||||
return new ConditionEmitter(pe, fork(BinaryBranchingCondition.NOT_EQUAL, other));
|
||||
}
|
||||
|
||||
public ConditionEmitter isSame(ValueEmitter other) {
|
||||
return new ConditionEmitter(pe, fork(BinaryBranchingCondition.REFERENCE_EQUAL, other));
|
||||
}
|
||||
|
||||
public ConditionEmitter isNotSame(ValueEmitter other) {
|
||||
return new ConditionEmitter(pe, fork(BinaryBranchingCondition.REFERENCE_NOT_EQUAL, other));
|
||||
}
|
||||
|
||||
public ConditionEmitter isNull() {
|
||||
return isSame(pe.constantNull(getType()));
|
||||
}
|
||||
|
||||
public ConditionEmitter isNotNull() {
|
||||
return isNotSame(pe.constantNull(getType()));
|
||||
}
|
||||
|
||||
public ConditionEmitter isGreaterThan(ValueEmitter other) {
|
||||
|
|
Loading…
Reference in New Issue
Block a user