Method from com.sun.tools.javac.jvm.Items$CondItem Detail: |
void drop() {
load().drop();
}
|
void duplicate() {
load().duplicate();
}
|
boolean isFalse() {
return trueJumps == null && opcode == dontgoto;
}
|
boolean isTrue() {
return falseJumps == null && opcode == goto_;
}
|
Chain jumpFalse() {
if (tree == null) return Code.mergeChains(falseJumps, code.branch(Code.negate(opcode)));
// we should proceed further in -Xjcov mode only
int startpc = code.curPc();
Chain c = Code.mergeChains(falseJumps, code.branch(Code.negate(opcode)));
code.crt.put(tree, CRTable.CRT_BRANCH_FALSE, startpc, code.curPc());
return c;
}
|
Chain jumpTrue() {
if (tree == null) return Code.mergeChains(trueJumps, code.branch(opcode));
// we should proceed further in -Xjcov mode only
int startpc = code.curPc();
Chain c = Code.mergeChains(trueJumps, code.branch(opcode));
code.crt.put(tree, CRTable.CRT_BRANCH_TRUE, startpc, code.curPc());
return c;
}
|
Item load() {
Chain trueChain = null;
Chain falseChain = jumpFalse();
if (!isFalse()) {
code.resolve(trueJumps);
code.emitop0(iconst_1);
trueChain = code.branch(goto_);
}
if (falseChain != null) {
code.resolve(falseChain);
code.emitop0(iconst_0);
}
code.resolve(trueChain);
return stackItem[typecode];
}
|
CondItem mkCond() {
return this;
}
|
CondItem negate() {
CondItem c = new CondItem(Code.negate(opcode), falseJumps, trueJumps);
c.tree = tree;
return c;
}
|
void stash(int toscode) {
Assert.error();
}
|
public String toString() {
return "cond(" + Code.mnem(opcode) + ")";
}
|
int width() {
// a CondItem doesn't have a size on the stack per se.
throw new AssertionError();
}
|