code: final boolean detectImplicitPrototypeCycle() {
      // detecting cycle
      this.visited = true;
      ObjectType p = getImplicitPrototype();
      while (p != null) {
        if (p.visited) {
          return true;
        } else {
          p.visited = true;
        }
        p = p.getImplicitPrototype();
      }
  
      // clean up
      p = this;
      do {
        p.visited = false;
        p = p.getImplicitPrototype();
      } while (p != null);
      return false;
    }
docs: Detects a cycle in the implicit prototype chain. This method accesses
  the {@link #getImplicitPrototype()} method and must therefore be
  invoked only after the object is sufficiently initialized to respond to
  calls to this method.<p>
  
  @return True iff an implicit prototype cycle was detected.