if (VM.VerifyAssertions)   VM.assert(declaringClass.isResolved());
if (VM.VerifyAssertions)   VM._assert(declaringClass.isResolved());
  final synchronized void compile() {    if (VM.VerifyAssertions) VM.assert(isLoaded());    if (isCompiled()) return;    if (VM.VerifyBytecode) {      VM_Verifier verifier = new VM_Verifier();      try {        boolean success = verifier.verifyMethod(this);        if (!success) {          VM.sysWrite("Method " + this + " fails bytecode verification!\n");        }      } catch(Exception e) {        VM.sysWrite("Method " + this + " fails bytecode verification!\n");      }    }    if (VM.BuildForEventLogging && VM.EventLoggingEnabled) VM_EventLogger.logCompilationEvent();    if (VM.VerifyAssertions)   VM.assert(declaringClass.isResolved());    if (VM.TraceClassLoading && VM.runningVM)  VM.sysWrite("VM_Method: (begin) compiling " + this + "\n");    VM_CompiledMethod cm;    if (isAbstract()) {      VM_Entrypoints.unexpectedAbstractMethodCallMethod.compile();      cm = VM_Entrypoints.unexpectedAbstractMethodCallMethod.getCurrentCompiledMethod();    } else if (isNative() && !resolveNativeMethod()) {      // if fail to resolve native, get code to throw unsatifiedLinkError      VM_Entrypoints.unimplementedNativeMethodMethod.compile();      cm = VM_Entrypoints.unimplementedNativeMethodMethod.getCurrentCompiledMethod();    } else {      // Normal case. Compile the method.      //      if (VM.writingBootImage)        cm = VM_BootImageCompiler.compile(this); // use compiler specified by RVM_BOOT_IMAGE_COMPILER_PATH      else if (VM.runningVM)        cm = VM_RuntimeCompiler.compile(this);   // use compiler specified by RVM_RUNTIME_COMPILER_PATH      else        cm = VM_BaselineCompiler.compile(this);  // use baseline compiler (assumption: we're producing information for debugger)    }    // Ensure that cm wasn't invalidated while it was being compiled.        synchronized(cm) {      if (cm.isInvalid()) {	VM_CompiledMethods.setCompiledMethodObsolete(cm);      } else {	currentCompiledMethod = cm;      }    }    if (VM.TraceClassLoading && VM.runningVM)  VM.sysWrite("VM_Method: (end)   compiling " + this + "\n");  }