for (int i=0; i<numCompiledMethods(); i++) {
for (int i=0; i<max; i++) {
  public static void snipObsoleteCompiledMethods() {    VM_Magic.isync();    if (!scanForObsoleteMethods) return;    scanForObsoleteMethods = false;    VM_Magic.sync();        int max = numCompiledMethods();     for (int i=0; i<numCompiledMethods(); i++) {      VM_CompiledMethod cm = compiledMethods[i];      if (cm != null) {        if (cm.isActiveOnStack()) {          if (cm.isObsolete()) {            // can't get it this time; force us to look again next GC            scanForObsoleteMethods = true;            VM_Magic.sync();          }          cm.clearActiveOnStack();        } else {          if (cm.isObsolete()) {            // obsolete and not active on a thread stack: it's garbage!            compiledMethods[i] = null;          }        }      }    }  }