public void makeInitialized(Type type) {
    if (stackPtr == 0) {
      // We have to check for this before checking for immutability.
      return;
    }

    throwIfImmutable();

    Type initializedType = type.getInitializedType();

    for (int i = 0; i < stackPtr; i++) {
      if (stack[i] == type) {
        stack[i] = initializedType;
      }
    }
  }
Replaces all the occurrences of the given uninitialized type in this stack with its initialized
equivalent.

@param type {@code non-null;} type to replace
android/android_framework/dex-maker/src/main/java/com/android/dx/cf/code/ExecutionStack.java