public static void walkTopLevelTree(Cons tree, boolean createannotationP) {
    { Object old$Currenttranslationunit$000 = Stella.$CURRENTTRANSLATIONUNIT$.get();

      try {
        Native.setSpecial(Stella.$CURRENTTRANSLATIONUNIT$, null);
        { String annotation = null;

          if (createannotationP) {
            annotation = Cons.createAnnotation(tree);
            if (((Integer)(Stella.$TRANSLATIONVERBOSITYLEVEL$.get())).intValue() >= 2) {
              System.out.println("Defining `" + annotation + "'");
            }
          }
          { GeneralizedSymbol testValue000 = ((GeneralizedSymbol)(tree.value));

            if (testValue000 == Stella.SYM_STELLA_DEFCLASS) {
              Cons.walkDefclassTree(tree);
            }
            else if (testValue000 == Stella.SYM_STELLA_DEFSLOT) {
              Cons.walkDefslotTree(tree);
            }
            else if ((testValue000 == Stella.SYM_STELLA_DEFMETHOD) ||
                ((testValue000 == Stella.SYM_STELLA_DEFUN) ||
                 (testValue000 == Stella.SYM_STELLA_DEFOPERATOR))) {
              if (tree.value == Stella.SYM_STELLA_DEFOPERATOR) {
                tree.firstSetter(Stella.SYM_STELLA_DEFMETHOD);
              }
              Cons.walkDefmethodTree(tree);
            }
            else if ((testValue000 == Stella.SYM_STELLA_DEFGLOBAL) ||
                ((testValue000 == Stella.SYM_STELLA_DEFSPECIAL) ||
                 (testValue000 == Stella.SYM_STELLA_DEFCONSTANT))) {
              Cons.walkDefglobalTree(tree);
            }
            else if (testValue000 == Stella.SYM_STELLA_DEFTYPE) {
              Cons.walkDeftypeTree(tree);
            }
            else if (testValue000 == Stella.SYM_STELLA_DEFMODULE) {
              Cons.walkDefmoduleTree(tree);
            }
            else if (testValue000 == Stella.SYM_STELLA_DEFMACRO) {
              Cons.walkDefmacroTree(tree);
            }
            else if (testValue000 == Stella.SYM_STELLA_STARTUP_TIME_PROGN) {
              Cons.walkStartupTimePrognTree(tree);
            }
            else if (testValue000 == Stella.SYM_STELLA_VERBATIM) {
              Cons.walkVerbatimDefinitionTree(tree);
            }
            else if (testValue000 == Stella.SYM_STELLA_PROGN) {
              { Stella_Object form = null;
                Cons iter000 = tree.rest;

                for (;!(iter000 == Stella.NIL); iter000 = iter000.rest) {
                  form = iter000.value;
                  Cons.walkTopLevelTree(((Cons)(form)), createannotationP);
                }
              }
              return;
            }
            else {
              if (Symbol.lookupMacro(((Symbol)(tree.value))) != null) {
                { Stella_Object expansion = Cons.expandMacro(tree);

                  if (expansion != null) {
                    Cons.walkTopLevelTree(((Cons)(expansion)), createannotationP);
                  }
                }
              }
              else {
                if (!(Stella.incrementalTranslationP() ||
                    (Symbol.lookupCommand(((Symbol)(tree.value))) != null))) {
                  { Object old$PrintreadablyP$000 = Stella.$PRINTREADABLYp$.get();

                    try {
                      Native.setBooleanSpecial(Stella.$PRINTREADABLYp$, true);
                      Stella.signalTranslationWarning();
                      if (!(Stella.suppressWarningsP())) {
                        Stella.printErrorContext(">> WARNING: ", Stella.STANDARD_WARNING);
                        {
                          Stella.STANDARD_WARNING.nativeStream.println();
                          Stella.STANDARD_WARNING.nativeStream.println(" Illegal top-level statement:");
                          Stella.STANDARD_WARNING.nativeStream.println("   `" + Stella_Object.deUglifyParseTree(tree) + "'");
                          Stella.STANDARD_WARNING.nativeStream.println(" Wrapping it into a 'startup-time-progn'.");
                        }
;
                      }

                    } finally {
                      Stella.$PRINTREADABLYp$.set(old$PrintreadablyP$000);
                    }
                  }
                }
                tree = Cons.list$(Cons.cons(Stella.SYM_STELLA_STARTUP_TIME_PROGN, Cons.cons(tree, Cons.cons(Stella.NIL, Stella.NIL))));
                Cons.walkTopLevelTree(tree, false);
              }
              return;
            }
          }
          if (((TranslationUnit)(Stella.$CURRENTTRANSLATIONUNIT$.get())) != null) {
            ((List)(Stella.$TRANSLATIONUNITS$.get())).push(((TranslationUnit)(Stella.$CURRENTTRANSLATIONUNIT$.get())));
            ((TranslationUnit)(Stella.$CURRENTTRANSLATIONUNIT$.get())).annotation = annotation;
          }
        }

      } finally {
        Stella.$CURRENTTRANSLATIONUNIT$.set(old$Currenttranslationunit$000);
      }
    }
  }