for (int i=0; i<compiledMethods.length; i++) {
for (int i=0; i<numCompiledMethods(); i++) {
  public static void spaceReport() {    //-#if RVM_WITH_QUICK_COMPILER    int[] codeCount = new int[VM_CompiledMethod.NUM_COMPILER_TYPES+1];    int[] codeBytes = new int[VM_CompiledMethod.NUM_COMPILER_TYPES+1];    int[] mapBytes = new int[VM_CompiledMethod.NUM_COMPILER_TYPES+1];    //-#else    int[] codeCount = new int[5];    int[] codeBytes = new int[5];    int[] mapBytes = new int[5];    //-#endif    VM_Array codeArray = VM_Type.CodeArrayType.asArray();    for (int i=0; i<compiledMethods.length; i++) {      VM_CompiledMethod cm = compiledMethods[i];      if (cm == null || !cm.isCompiled()) continue;      int ct = cm.getCompilerType();      codeCount[ct]++;      int size = codeArray.getInstanceSize(cm.numberOfInstructions());      codeBytes[ct] += VM_Memory.alignUp(size, BYTES_IN_ADDRESS);      mapBytes[ct] += cm.size();    }    VM.sysWriteln("Compiled code space report\n");    VM.sysWriteln("  Baseline Compiler");    VM.sysWriteln("\tNumber of compiled methods = " + codeCount[VM_CompiledMethod.BASELINE]);    VM.sysWriteln("\tTotal size of code (bytes) =         " + codeBytes[VM_CompiledMethod.BASELINE]);    VM.sysWriteln("\tTotal size of mapping data (bytes) = " + mapBytes[VM_CompiledMethod.BASELINE]);    if (codeCount[VM_CompiledMethod.OPT] > 0) {      VM.sysWriteln("  Optimizing Compiler");      VM.sysWriteln("\tNumber of compiled methods = " + codeCount[VM_CompiledMethod.OPT]);      VM.sysWriteln("\tTotal size of code (bytes) =         " + codeBytes[VM_CompiledMethod.OPT]);      VM.sysWriteln("\tTotal size of mapping data (bytes) = " +mapBytes[VM_CompiledMethod.OPT]);    }    //-#if RVM_WITH_QUICK_COMPILER    if (codeCount[VM_CompiledMethod.QUICK] > 0) {      VM.sysWriteln("  Quick Compiler");      VM.sysWriteln("\tNumber of compiled methods = " + codeCount[VM_CompiledMethod.QUICK]);      VM.sysWriteln("\tTotal size of code (bytes) =         " + codeBytes[VM_CompiledMethod.QUICK]);      VM.sysWriteln("\tTotal size of mapping data (bytes) = " +mapBytes[VM_CompiledMethod.QUICK]);    }    //-#endif    if (codeCount[VM_CompiledMethod.JNI] > 0) {      VM.sysWriteln("  JNI Stub Compiler (Java->C stubs for native methods)");      VM.sysWriteln("\tNumber of compiled methods = " + codeCount[VM_CompiledMethod.JNI]);      VM.sysWriteln("\tTotal size of code (bytes) =         " + codeBytes[VM_CompiledMethod.JNI]);      VM.sysWriteln("\tTotal size of mapping data (bytes) = " + mapBytes[VM_CompiledMethod.JNI]);    } }