il.append(methodGen.loadIterator());
    public void translate(ClassGenerator classGen, MethodGenerator methodGen) {	final InstructionList il = methodGen.getInstructionList();	final ConstantPoolGen cpg = classGen.getConstantPool();	boolean lastChild = false;	// If we're a part of an pattern's predicate we want to know what	// type of node we want to be looking for (not just any).	if (getParent() instanceof Expression) {	    if (getParent().getParent() instanceof Predicate) {		Predicate pred = (Predicate)getParent().getParent();		_type = pred.getPosType();		if ((_type==DOM.ELEMENT) || (_type==DOM.ATTRIBUTE)) _type = -1;	    }	}	// If we're a part of a step-type expression we want the last of the	// current node's children and not the last in the current iterator.	if (getParent() instanceof Predicate) {	    _type = ((Predicate)getParent()).getPosType();	    if ((_type==DOM.ELEMENT) || (_type==DOM.ATTRIBUTE)) _type = -1;	    if (getParent().getParent() instanceof Step) {		lastChild = true;	    }	}	if (methodGen instanceof CompareGenerator) {	    il.append(((CompareGenerator)methodGen).loadLastNode());	}	else if (classGen.isExternal()) {	    il.append(new ILOAD(LAST_INDEX));	}	else if (_type == -1) {	    final int last = cpg.addInterfaceMethodref(NODE_ITERATOR,						       "getLast", 						       "()I");	    final int git = cpg.addInterfaceMethodref(DOM_INTF,						      "getTypedAxisIterator", 						      "(II)"+NODE_ITERATOR_SIG);	    final int start = cpg.addInterfaceMethodref(NODE_ITERATOR,							"setStartNode", 							"(I)"+							NODE_ITERATOR_SIG);	    if (lastChild) {		il.append(methodGen.loadDOM());		il.append(new PUSH(cpg, Axis.CHILD));		il.append(new PUSH(cpg, DOM.ELEMENT));		il.append(new INVOKEINTERFACE(git, 3));		il.append(methodGen.loadCurrentNode());		il.append(new INVOKEINTERFACE(start, 2));	    }	    else {		il.append(methodGen.loadIterator());	    }	    il.append(new INVOKEINTERFACE(last, 1));	}	else {	    // public int getTypedPosition(NodeIterator iterator, int type) {	    final int last = cpg.addInterfaceMethodref(DOM_INTF,						       "getTypedLast",						       "("+						       NODE_ITERATOR_SIG+						       "II)I");	    il.append(methodGen.loadDOM());	    il.append(methodGen.loadIterator());	    il.append(new PUSH(cpg, _type));	    il.append(methodGen.loadCurrentNode());	    il.append(new INVOKEINTERFACE(last, 4));	}    }