if (VM.VerifyAssertions) { VM._assert(compilationInProgress, "Failed to acquire compilationInProgress \"lock\"");
if (VM.BuildForOptCompiler) { if (VM.VerifyAssertions) { VM._assert(compilationInProgress, "Failed to acquire compilationInProgress \"lock\""); }  VM_Callbacks.notifyMethodCompile(method, VM_CompiledMethod.JNI); long start = 0; if (VM.MeasureCompilation || VM.BuildForAdaptiveSystem) { start = VM_Thread.getCurrentThread().accumulateCycles(); }  VM_CompiledMethod cm = OPT_Compiler.compile(plan);  if (VM.MeasureCompilation || VM.BuildForAdaptiveSystem) { long end = VM_Thread.getCurrentThread().accumulateCycles(); double compileTime = VM_Time.cyclesToMillis(end - start); cm.setCompilationTime(compileTime); record(OPT_COMPILER, method, cm); }  return cm; } else { if (VM.VerifyAssertions) VM._assert(false); return null;
  private static VM_CompiledMethod optCompile(VM_NormalMethod method,                                               OPT_CompilationPlan plan)     throws OPT_OptimizingCompilerException {    if (VM.VerifyAssertions) {      VM._assert(compilationInProgress, "Failed to acquire compilationInProgress \"lock\"");    }        VM_Callbacks.notifyMethodCompile(method, VM_CompiledMethod.JNI);    long start = 0;    if (VM.MeasureCompilation || VM.BuildForAdaptiveSystem) {      start = VM_Thread.getCurrentThread().accumulateCycles();    }        VM_CompiledMethod cm = OPT_Compiler.compile(plan);    if (VM.MeasureCompilation || VM.BuildForAdaptiveSystem) {      long end = VM_Thread.getCurrentThread().accumulateCycles();      double compileTime = VM_Time.cyclesToMillis(end - start);      cm.setCompilationTime(compileTime);      record(OPT_COMPILER, method, cm);    }        return cm;  }