code: public <T> Local<T> newLocal(TypeId<T> type) {
          if (localsInitialized) {
              throw new IllegalStateException("Cannot allocate locals after adding instructions");
          }
          Local<T> result = Local.get(this, type);
          locals.add(result);
          return result;
      }
docs: Allocates a new local variable of type {@code type}. It is an error to
  allocate a local after instructions have been emitted.