VM_Scheduler.boot(applicationArguments);  if (VM.VerifyAssertions) VM._assert(VM.NOT_REACHED);
VM_Scheduler.boot();   VM_Thread.getCurrentThread().initializeJNIEnv();   runClassInitializer("java.lang.Double");  runClassInitializer("com.ibm.oti.util.Msg");     if (VM.verbose >= 1) VM.sysWriteln("Initializing runtime compiler"); VM_RuntimeCompiler.boot();    if (VM.verboseClassLoading) VM.sysWrite("[VM booted]\n");     if (VM.verbose >= 1) VM.sysWriteln("Constructing mainThread"); Thread      xx         = new MainThread(applicationArguments); VM_Address  yy         = VM_Magic.objectAsAddress(xx); VM_Thread   mainThread = (VM_Thread)VM_Magic.addressAsObject(yy);   mainThread.start();   VM_Thread t = new DebuggerThread(); t.start(VM_Scheduler.debuggerQueue);    if (VM.TraceThreads) VM_Scheduler.trace("VM.boot", "completed - terminating"); VM_Thread.terminate(); if (VM.VerifyAssertions) VM._assert(VM.NOT_REACHED);
  public static void boot() throws Exception, VM_PragmaLogicallyUninterruptible {    VM.writingBootImage = false;    VM.runningVM        = true;    VM.runningAsSubsystem = false;    if (verbose >= 1) VM.sysWriteln("Booting");    // Set up the current VM_Processor object.  The bootstrap program    // has placed a pointer to the current VM_Processor in a special    // register.    if (verbose >= 1) VM.sysWriteln("Setting up current VM_Processor");    VM_ProcessorLocalState.boot();    // Finish thread initialization that couldn't be done in boot image.    // The "stackLimit" must be set before any method calls,     // because it's accessed by compiler-generated stack overflow checks.    //    if (verbose >= 1) VM.sysWriteln("Doing thread initialization");    VM_Thread currentThread  = VM_Scheduler.threads[VM_Magic.getThreadId() >>> VM_ThinLockConstants.TL_THREAD_ID_SHIFT];    currentThread.stackLimit = VM_Magic.objectAsAddress(currentThread.stack).add(STACK_SIZE_GUARD);    VM_Processor.getCurrentProcessor().activeThreadStackLimit = currentThread.stackLimit;    // get pthread_id from OS and store into vm_processor field    //     if (!BuildForSingleVirtualProcessor)      VM_Processor.getCurrentProcessor().pthread_id =         VM.sysCall0(VM_BootRecord.the_boot_record.sysPthreadSelfIP);    VM.TraceClassLoading = (VM_BootRecord.the_boot_record.traceClassLoading == 1);       // Initialize memory manager's write barrier.    // This must happen before any putfield or arraystore of object refs    // because the buffer is accessed by compiler-generated write barrier code.    //    if (verbose >= 1) VM.sysWriteln("Setting up write barrier");    VM_Interface.setupProcessor( VM_Processor.getCurrentProcessor() );    // Initialize memory manager.    //    This must happen before any uses of "new".    //    if (verbose >= 1) VM.sysWriteln("Setting up memory manager: bootrecord = ", VM_Magic.objectAsAddress(VM_BootRecord.the_boot_record));    VM_Interface.boot(VM_BootRecord.the_boot_record);    // Reset the options for the baseline compiler to avoid carrying them over from    // bootimage writing time.    //     VM_BaselineCompiler.initOptions();    // Create class objects for static synchronized methods in the bootimage.    // This must happen before any bootimage static synchronized methods     // can be invoked.    if (verbose >= 1) VM.sysWriteln("Creating class objects for static synchronized methods");    createClassObjects();    // Fetch arguments from program command line.    //    if (verbose >= 1) VM.sysWriteln("Fetching command-line arguments");    VM_CommandLineArgs.fetchCommandLineArguments();    // Initialize class loader.    //    if (verbose >= 1) VM.sysWriteln("Initializing class loader");    String vmClasses = VM_CommandLineArgs.getVMClasses();    VM_ClassLoader.boot(vmClasses);    VM_SystemClassLoader.boot();    //    // At this point the virtual machine is running as a single thread     // that can perform dynamic compilation and linking (by compiler/linker     // that's part of boot image).  All that remains is to initialize the     // java class libraries, start up the thread subsystem, and launch    // the user level "main" thread.    //    // Initialize statics that couldn't be placed in bootimage, either     // because they refer to external state (open files), or because they     // appear in fields that are unique to RVM implementation of     // standard class library (not part of standard jdk).    // We discover the latter by observing "host has no field" and     // "object not part of bootimage" messages printed out by bootimage     // writer.    //    if (verbose >= 1) VM.sysWriteln("Running various class initializers");    //-#if RVM_WITH_GNU_CLASSPATH    java.lang.ref.JikesRVMSupport.setReferenceLock( new Object() );    //-#else    runClassInitializer("java.io.FileDescriptor");    runClassInitializer("java.io.File");    //-#endif    runClassInitializer("java.lang.Runtime");    //-#if RVM_WITH_GNU_CLASSPATH    runClassInitializer("java.io.FileDescriptor");    runClassInitializer("java.lang.System");    runClassInitializer("java.io.File");    //-#else    runClassInitializer("java.lang.System");    System.boot();    //-#endif    runClassInitializer("java.lang.Boolean");    runClassInitializer("java.lang.Byte");    runClassInitializer("java.lang.Short");    //-#if RVM_WITH_GNU_CLASSPATH    runClassInitializer("java.lang.Number");    //-#endif    runClassInitializer("java.lang.Integer");    runClassInitializer("java.lang.Long");    runClassInitializer("java.lang.Float");    // needs jni with classpath, so done later    // runClassInitializer("java.lang.Double");    runClassInitializer("java.lang.Character");    //-#if RVM_WITH_GNU_CLASSPATH    //-#else    runClassInitializer("com.ibm.oti.io.CharacterConverter");    runClassInitializer("java.util.Hashtable");    runClassInitializer("java.lang.String");    //-#endif    //-#if RVM_WITH_GNU_CLASSPATH    runClassInitializer("gnu.java.io.EncodingManager");    runClassInitializer("java.lang.Thread");    runClassInitializer("java.lang.ThreadGroup");    runClassInitializer("java.io.PrintWriter");    runClassInitializer("gnu.java.lang.SystemClassLoader");    runClassInitializer("java.lang.String");    runClassInitializer("gnu.java.security.provider.DefaultPolicy");    runClassInitializer("java.security.Policy");    //-#endif    runClassInitializer("java.lang.ClassLoader");    runClassInitializer("com.ibm.JikesRVM.librarySupport.ReflectionSupport");    runClassInitializer("java.lang.Math");    //-#if RVM_WITH_GNU_CLASSPATH    //-#else    runClassInitializer("java.lang.RuntimePermission");    //-#endif    runClassInitializer("java.util.TimeZone");    runClassInitializer("java.util.Locale");    runClassInitializer("java.util.Calendar");    runClassInitializer("java.util.GregorianCalendar");    runClassInitializer("java.util.ResourceBundle");    runClassInitializer("java.util.zip.ZipEntry");    runClassInitializer("java.util.zip.Inflater");    runClassInitializer("java.util.zip.DeflaterHuffman");    runClassInitializer("java.util.zip.InflaterDynHeader");    runClassInitializer("java.util.zip.InflaterHuffmanTree");    //-#if RVM_WITH_GNU_CLASSPATH    runClassInitializer("java.util.Date");    //-#endif    //-#if RVM_WITH_ALL_CLASSES    runClassInitializer("java.util.jar.Attributes$Name");    //-#endif    // Process virtual machine directives.    //    if (verbose >= 1) VM.sysWriteln("Processing VM directives");    String[] applicationArguments = VM_CommandLineArgs.processCommandLineArguments();    if (applicationArguments.length == 0) {        VM.sysWrite("vm: please specify a class to execute\n");      VM.sysExit(1);    }    // Now that we've processed the command line arguments,     // enable HPM if the command lines indicate that we should    VM_HardwarePerformanceMonitors.boot();    // Allow Baseline compiler to respond to command line arguments    // The baseline compiler ignores command line arguments until all are processed    // otherwise printing may occur because of compilations ahead of processing the    // method_to_print restriction    //    if (verbose >= 1) VM.sysWriteln("Compiler processing rest of boot options");    VM_BaselineCompiler.postBootOptions();    // Allow Collector to respond to command line arguments    //    if (verbose >= 1) VM.sysWriteln("Collector processing rest of boot options");    VM_Interface.postBoot();    VM_Lock.boot();        // Begin multiprocessing.    //    VM_Scheduler.boot(applicationArguments);    if (VM.VerifyAssertions)       VM._assert(VM.NOT_REACHED);  }