code: public int resolveLabel(int idx) {
          int trueIdx;
  
          if (idx < 0) {
              trueIdx = labels.get(-idx);
              if (trueIdx < 0) {
                  throw new RuntimeException("undefined label: " + idx);
              }
              return trueIdx;
          } else {
              return idx;
          }
      }
docs: a forward reference is first declared and then defined