private EscapeSet processMoveResultPseudoInsn(SsaInsn insn) {
    RegisterSpec result = insn.getResult();
    SsaInsn prevSsaInsn = getInsnForMove(insn);
    int prevOpcode = prevSsaInsn.getOpcode().getOpcode();
    EscapeSet escSet;
    RegisterSpec prevSource;

    switch (prevOpcode) {
        // New instance / Constant
      case RegOps.NEW_INSTANCE:
      case RegOps.CONST:
        escSet = new EscapeSet(result.getReg(), regCount, EscapeState.NONE);
        break;
        // New array
      case RegOps.NEW_ARRAY:
      case RegOps.FILLED_NEW_ARRAY:
        prevSource = prevSsaInsn.getSources().get(0);
        if (prevSource.getTypeBearer().isConstant()) {
          // New fixed array
          escSet = new EscapeSet(result.getReg(), regCount, EscapeState.NONE);
          escSet.replaceableArray = true;
        } else {
          // New variable array
          escSet = new EscapeSet(result.getReg(), regCount, EscapeState.GLOBAL);
        }
        break;
        // Loading a static object
      case RegOps.GET_STATIC:
        escSet = new EscapeSet(result.getReg(), regCount, EscapeState.GLOBAL);
        break;
        // Type cast / load an object from a field or array
      case RegOps.CHECK_CAST:
      case RegOps.GET_FIELD:
      case RegOps.AGET:
        prevSource = prevSsaInsn.getSources().get(0);
        int setIndex = findSetIndex(prevSource);

        // Set should already exist, try to find it
        if (setIndex != latticeValues.size()) {
          escSet = latticeValues.get(setIndex);
          escSet.regSet.set(result.getReg());
          return escSet;
        }

        // Set not found, must be either null or unknown
        if (prevSource.getType() == Type.KNOWN_NULL) {
          escSet = new EscapeSet(result.getReg(), regCount, EscapeState.NONE);
        } else {
          escSet = new EscapeSet(result.getReg(), regCount, EscapeState.GLOBAL);
        }
        break;
      default:
        return null;
    }

    // Add the newly created escSet to the lattice and return it
    latticeValues.add(escSet);
    return escSet;
  }
Determine the origin of a move result pseudo instruction that generates an object. Creates a
new EscapeSet for the new object accordingly.

@param insn {@code non-null;} move result pseudo instruction to process
@return {@code non-null;} an EscapeSet for the object referred to by the move result pseudo
    instruction
android/android_framework/dex-maker/src/main/java/com/android/dx/ssa/EscapeAnalysis.java