if (VM.VerifyAssertions) { VM._assert(plan.method.isForOsrSpecialization());} if (compilationInProgress) {
if (VM.BuildForOptCompiler) { if (VM.VerifyAssertions) { VM._assert(plan.method.isForOsrSpecialization());} if (compilationInProgress) { return null; }  try { compilationInProgress = true;   VM_CompiledMethod cm = optCompile(plan.method, plan);    return cm; } catch (OPT_OptimizingCompilerException e) { e.printStackTrace(); String msg = "Optimizing compiler " +"(via recompileWithOptOnStackSpecialization): " +"can't optimize \"" + plan.method + "\" (error was: " + e + ")\n";  if (e.isFatal && VM.ErrorsFatal) { VM.sysFail(msg); } else { VM.sysWrite(msg); } return null; } finally { compilationInProgress = false; } } else { if (VM.VerifyAssertions) VM._assert(false);
  public static VM_CompiledMethod recompileWithOptOnStackSpecialization(OPT_CompilationPlan plan) {    if (VM.VerifyAssertions) { VM._assert(plan.method.isForOsrSpecialization());}    if (compilationInProgress) {      return null;    }    try {      compilationInProgress = true;      // the compiler will check if isForOsrSpecialization of the method      VM_CompiledMethod cm = optCompile(plan.method, plan);      // we donot replace the compiledMethod of original method,       // because it is temporary method      return cm;    } catch (OPT_OptimizingCompilerException e) {      e.printStackTrace();      String msg = "Optimizing compiler "         +"(via recompileWithOptOnStackSpecialization): "        +"can't optimize \"" + plan.method + "\" (error was: " + e + ")\n";       if (e.isFatal && VM.ErrorsFatal) {        VM.sysFail(msg);      } else {        VM.sysWrite(msg);      }      return null;          } finally {      compilationInProgress = false;    }  }