if (expr) context.createNewFixnum(fixnumNode.getValue());
}
public void compileFlip(Node node, BodyCompiler context, boolean expr) {
final FlipNode flipNode = (FlipNode) node;
context.getVariableCompiler().retrieveLocalVariable(flipNode.getIndex(), flipNode.getDepth());
if (flipNode.isExclusive()) {
context.performBooleanBranch(new BranchCallback() {
public void branch(BodyCompiler context) {
compile(flipNode.getEndNode(), context,true);
context.performBooleanBranch(new BranchCallback() {
public void branch(BodyCompiler context) {
context.loadFalse();
context.getVariableCompiler().assignLocalVariable(flipNode.getIndex(), flipNode.getDepth(), false);
}
}, new BranchCallback() {
public void branch(BodyCompiler context) {
}
});
context.loadTrue();
}
}, new BranchCallback() {
public void branch(BodyCompiler context) {
compile(flipNode.getBeginNode(), context,true);
becomeTrueOrFalse(context);
context.getVariableCompiler().assignLocalVariable(flipNode.getIndex(), flipNode.getDepth(), true);
}
});
} else {
context.performBooleanBranch(new BranchCallback() {
public void branch(BodyCompiler context) {
compile(flipNode.getEndNode(), context,true);
context.performBooleanBranch(new BranchCallback() {
public void branch(BodyCompiler context) {
context.loadFalse();
context.getVariableCompiler().assignLocalVariable(flipNode.getIndex(), flipNode.getDepth(), false);
}
}, new BranchCallback() {
public void branch(BodyCompiler context) {
}
});
context.loadTrue();
}
}, new BranchCallback() {
public void branch(BodyCompiler context) {
compile(flipNode.getBeginNode(), context,true);
context.performBooleanBranch(new BranchCallback() {
public void branch(BodyCompiler context) {
compile(flipNode.getEndNode(), context,true);
flipTrueOrFalse(context);
context.getVariableCompiler().assignLocalVariable(flipNode.getIndex(), flipNode.getDepth(), false);
context.loadTrue();
}
}, new BranchCallback() {
public void branch(BodyCompiler context) {