public void snapshot(int address, RegisterSpecSet specs) {
      if (DEBUG) {
        System.err.printf("%04x snapshot %s\n", address, specs);
      }

      int sz = specs.getMaxSize();
      aboutToProcess(address, sz - 1);

      for (int i = 0; i < sz; i++) {
        RegisterSpec oldSpec = regs.get(i);
        RegisterSpec newSpec = filterSpec(specs.get(i));

        if (oldSpec == null) {
          if (newSpec != null) {
            startLocal(address, newSpec);
          }
        } else if (newSpec == null) {
          endLocal(address, oldSpec);
        } else if (!newSpec.equalsUsingSimpleType(oldSpec)) {
          endLocal(address, oldSpec);
          startLocal(address, newSpec);
        }
      }

      if (DEBUG) {
        System.err.printf("%04x snapshot done\n", address);
      }
    }
Sets the local state at the given address to the given snapshot. The first call on this
instance must be to this method, so that the register state can be properly sized.

@param address {@code >= 0;} the address
@param specs {@code non-null;} spec set representing the locals
android/android_framework/dex-maker/src/main/java/com/android/dx/dex/code/LocalList.java