public static void initializeOptimizerGoalRecords(int size) {
    { ExtensibleVector stack = ((ExtensibleVector)(KeyValueList.dynamicSlotValue(((QueryIterator)(Logic.$QUERYITERATOR$.get())).dynamicSlots, Logic.SYM_LOGIC_OPTIMIZER_GOAL_RECORDS, null)));

      if (stack == null) {
        stack = ExtensibleVector.newExtensibleVector(20);
        KeyValueList.setDynamicSlotValue(((QueryIterator)(Logic.$QUERYITERATOR$.get())).dynamicSlots, Logic.SYM_LOGIC_OPTIMIZER_GOAL_RECORDS, stack, null);
      }
      if (size > stack.length()) {
        stack.insertAt(size, null);
      }
      { int i = Stella.NULL_INTEGER;
        int iter000 = 0;
        int upperBound000 = size - 1;

        for (;iter000 <= upperBound000; iter000 = iter000 + 1) {
          i = iter000;
          { GoalRecord goalrecord = ((GoalRecord)((stack.theArray)[i]));

            if (goalrecord == null) {
              goalrecord = GoalRecord.newGoalRecord();
              (stack.theArray)[i] = goalrecord;
            }
            goalrecord.generatorGoals.clear();
            goalrecord.otherGoals.clear();
          }
        }
      }
    }
  }