private void calcHash(Varnode root, int method) {
		vnproc = 0;
		opproc = 0;
		opedgeproc = 0;
		markset = new HashSet<>();

		vnedge.add(root);
		gatherUnmarkedVn();
		for (int i = vnproc; i < markvn.size(); ++i) {
			buildVnUp(markvn.get(i));
		}
		for (; vnproc < markvn.size(); ++vnproc) {
			buildVnDown(markvn.get(vnproc));
		}

		switch (method) {
			case 0:
				break;
			case 1:
				gatherUnmarkedOp();
				for (; opproc < markop.size(); ++opproc) {
					buildOpUp(markop.get(opproc));
				}

				gatherUnmarkedVn();
				for (; vnproc < markvn.size(); ++vnproc) {
					buildVnUp(markvn.get(vnproc));
				}
				break;
			case 2:
				gatherUnmarkedOp();
				for (; opproc < markop.size(); ++opproc) {
					buildOpDown(markop.get(opproc));
				}

				gatherUnmarkedVn();
				for (; vnproc < markvn.size(); ++vnproc) {
					buildVnDown(markvn.get(vnproc));
				}
				break;
			case 3:
				gatherUnmarkedOp();
				for (; opproc < markop.size(); ++opproc) {
					buildOpUp(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