private void calcHash(PcodeOp op, int slot, int method) {
		Varnode root;
		if (slot < 0) {
			root = op.getOutput();
			if (root == null) {
				hash = 0;
				addrresult = Address.NO_ADDRESS;
				return;
			}
		}
		else {
			if (slot >= op.getNumInputs()) {
				hash = 0;
				addrresult = Address.NO_ADDRESS;
				return;
			}
			root = op.getInput(slot);
		}
		vnproc = 0;
		opproc = 0;
		opedgeproc = 0;
		markset = new HashSet<>();
		opedge.add(new ToOpEdge(op, slot));
		switch (method) {
			case 4:
				break;
			case 5:
				gatherUnmarkedOp();
				for (; opproc < markop.size(); ++opproc) {
					buildOpUp(markop.get(opproc));
				}
				gatherUnmarkedVn();
				for (; vnproc < markvn.size(); ++vnproc) {
					buildVnUp(markvn.get(vnproc));
				}
				break;
			case 6:
				gatherUnmarkedOp();
				for (; opproc < markop.size(); ++opproc) {
					buildOpDown(markop.get(opproc));
				}
				gatherUnmarkedVn();
				for (; vnproc < markvn.size(); ++vnproc) {
					buildVnDown(markvn.get(vnproc));
				}
				break;
			default:
				break;
		}
		pieceTogetherHash(root, method);
	}
Encode a particular PcodeOp and slot
@param op is the PcodeOp to preserve
@param slot is the slot to preserve (-1 for output, >=0 for input)
@param method is the method to use for encoding (4, 5, or 6)
Ghidra/Framework/SoftwareModeling/src/main/java/ghidra/program/model/pcode/DynamicHash.java