public void visit(Register reg) { if (!vstack.uses(reg)) { throw new InternalError( "Register " + reg + " is in use outsite of the vstack at bytecode address " + curAddress); } } });  }
public void visit(Register reg) { if (!vstack.uses(reg)) { throw new InternalError("Register " + reg + " is in use outsite of the vstack in method " + currentMethod + " at bytecode address " + curAddress); } } });  vstack.fpuStack.visitItems(new ItemVisitor() { public void visit(Item item) { if (!vstack.contains(item)) { throw new InternalError( "Item " + item + " is not on the vstack, but still of the fpu stack in method " + currentMethod + " at address " + curAddress); } } });  vstack.visitItems(new ItemVisitor() { public void visit(Item item) { if (item.getKind() == 0) { throw new InternalError("Item " + item + " is kind 0 in method " + currentMethod + " at address " + curAddress); } if (item.isRegister()) { if (item instanceof WordItem) { if (pool.getOwner(((WordItem)item).getRegister()) != item) { throw new InternalError("Item " + item + " uses a register which is not registered in the register ppol in method " + currentMethod + " at address " + curAddress); } } else { if (pool.getOwner(((DoubleWordItem)item).getLsbRegister()) != item) { throw new InternalError("Item " + item + " uses an LSB register which is not registered in the register ppol in method " + currentMethod + " at address " + curAddress); } if (pool.getOwner(((DoubleWordItem)item).getMsbRegister()) != item) { throw new InternalError("Item " + item + " uses an MSB register which is not registered in the register ppol in method " + currentMethod + " at address " + curAddress); } } } } });   }
    public void endInstruction() {        // Verify the register usage        // No registers can be in use, unless they are on the virtual stack.        final X86RegisterPool pool = eContext.getPool();        pool.visitUsedRegisters(new RegisterVisitor() {            public void visit(Register reg) {                if (!vstack.uses(reg)) { throw new InternalError(                        "Register "                                + reg                                + " is in use outsite of the vstack at bytecode address "                                + curAddress); }            }        });        // Nothing to do here    }