public void inheritSupercontexts() {
    { Module module = this;

      if (!module.multipleParentsP()) {
        { Module onlyparent = ((Module)(module.parentModules.first()));

          if (onlyparent != null) {
            module.allSuperContexts = Cons.cons(onlyparent, onlyparent.allSuperContexts);
            return;
          }
        }
      }
      { Cons allsupercontexts = Stella.NIL;
        Cons sublist = null;

        Module.normalizeParentModules(module);
        module.parentModules.reverse();
        { Module parent = null;
          Cons iter000 = module.parentModules.theConsList;

          for (;!(iter000 == Stella.NIL); iter000 = iter000.rest) {
            parent = ((Module)(iter000.value));
            sublist = Stella.NIL;
            { Context ancestor = null;
              Cons iter001 = parent.allSuperContexts;
              Cons collect000 = null;

              for (;!(iter001 == Stella.NIL); iter001 = iter001.rest) {
                ancestor = ((Context)(iter001.value));
                if (!allsupercontexts.memberP(ancestor)) {
                  if (collect000 == null) {
                    {
                      collect000 = Cons.cons(ancestor, Stella.NIL);
                      if (sublist == Stella.NIL) {
                        sublist = collect000;
                      }
                      else {
                        Cons.addConsToEndOfConsList(sublist, collect000);
                      }
                    }
                  }
                  else {
                    {
                      collect000.rest = Cons.cons(ancestor, Stella.NIL);
                      collect000 = collect000.rest;
                    }
                  }
                }
              }
            }
            sublist = Cons.cons(parent, sublist);
            allsupercontexts = sublist.concatenate(allsupercontexts, Stella.NIL);
          }
        }
        module.allSuperContexts = allsupercontexts;
        module.parentModules.reverse();
      }
    }
  }