runClassInitializer("java.lang.System"); runClassInitializer("java.io.File");
java.lang.JikesRVMSupport.javaLangSystemEarlyInitializers();  runClassInitializer("java.lang.System");
  private static void finishBooting() throws InterruptiblePragma {        // get pthread_id from OS and store into vm_processor field    //     if (!BuildForSingleVirtualProcessor) {      VM_SysCall.sysPthreadSetupSignalHandling();      VM_Processor.getCurrentProcessor().pthread_id =         VM_SysCall.sysPthreadSelf();    }    // Initialize memory manager's virtual processor local state.    // This must happen before any putfield or arraystore of object refs    // because the buffer is accessed by compiler-generated write barrier code.    //    if (verboseBoot >= 1) VM.sysWriteln("Setting up write barrier");    MM_Interface.setupProcessor(VM_Processor.getCurrentProcessor());        // Initialize memory manager.    //    This must happen before any uses of "new".    //    if (verboseBoot >= 1) VM.sysWriteln("Setting up memory manager: bootrecord = ", VM_Magic.objectAsAddress(VM_BootRecord.the_boot_record));    MM_Interface.boot(VM_BootRecord.the_boot_record);        // Start calculation of cycles to millsecond conversion factor    if (verboseBoot >= 1) VM.sysWriteln("Stage one of booting VM_Time");    VM_Time.bootStageOne();    // Reset the options for the baseline compiler to avoid carrying     // them over from bootimage writing time.    //     if (verboseBoot >= 1) VM.sysWriteln("Initializing baseline compiler options to defaults");    VM_BaselineCompiler.initOptions();    //-#if RVM_WITH_QUICK_COMPILER    // Reset the options for the quick compiler to avoid carrying     // them over from bootimage writing time.    //     if (verboseBoot >= 1) VM.sysWriteln("Initializing quick compiler options to defaults");    VM_QuickCompiler.initOptions();    //-#endif    // Create class objects for static synchronized methods in the bootimage.    // This must happen before any static synchronized methods of bootimage     // classes can be invoked.    if (verboseBoot >= 1) VM.sysWriteln("Creating class objects for static synchronized methods");    createClassObjects();    // Fetch arguments from program command line.    //    if (verboseBoot >= 1) VM.sysWriteln("Fetching command-line arguments");    VM_CommandLineArgs.fetchCommandLineArguments();    // Process most virtual machine command line arguments.    //    if (verboseBoot >= 1) VM.sysWriteln("Early stage processing of command line");    VM_CommandLineArgs.earlyProcessCommandLineArguments();    // Allow Memory Manager to respond to its command line arguments    //    if (verboseBoot >= 1) VM.sysWriteln("Collector processing rest of boot options");    MM_Interface.postBoot();    // Initialize class loader.    //    if (verboseBoot >= 1) VM.sysWriteln("Initializing class loader");    String vmClasses = VM_CommandLineArgs.getVMClasses();    VM_ClassLoader.boot(vmClasses);    VM_SystemClassLoader.boot();    // Complete calculation of cycles to millsecond conversion factor    // Must be done before any dynamic compilation occurs.    if (verboseBoot >= 1) VM.sysWriteln("Stage two of booting VM_Time");    VM_Time.bootStageTwo();    // 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 Jikes 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 (verboseBoot >= 1) VM.sysWriteln("Running various class initializers");    runClassInitializer("java.lang.Runtime");    runClassInitializer("java.lang.System");    runClassInitializer("java.io.File");    runClassInitializer("java.lang.Void");    runClassInitializer("java.lang.Boolean");    runClassInitializer("java.lang.Byte");    runClassInitializer("java.lang.Short");    runClassInitializer("java.lang.Number");    runClassInitializer("java.lang.Integer");    runClassInitializer("java.lang.Long");    runClassInitializer("java.lang.Float");    runClassInitializer("java.lang.Character");    runClassInitializer("java.util.WeakHashMap"); // Need for ThreadLocal    // Turn off security checks; about to hit EncodingManager.    // Commented out because we haven't incorporated this into the CVS head    // yet.     // java.security.JikesRVMSupport.turnOffChecks();    runClassInitializer("java.lang.Thread");    runClassInitializer("java.lang.ThreadGroup");    /* We can safely allocate a java.lang.Thread now.  The boot       thread (running right now, as a VM_Thread) has to become a full-fledged       Thread, since we're about to encounter a security check:       EncodingManager checks a system property,         which means that the permissions checks have to be working,        which means that VMAccessController will be invoked,        which means that ThreadLocal.get() will be called,        which calls Thread.getCurrentThread().        So the boot VM_Thread needs to be associated with a real Thread for        Thread.getCurrentThread() to return. */    VM.safeToAllocateJavaThread = true;    VM_Scheduler.giveBootVM_ThreadAJavaLangThread();    runClassInitializer("java.lang.ThreadLocal");    // Possibly fix VMAccessController's contexts and inGetContext fields    runClassInitializer("java.security.VMAccessController");        runClassInitializer("gnu.java.io.EncodingManager");    runClassInitializer("java.io.PrintWriter");    runClassInitializer("gnu.java.lang.SystemClassLoader");    runClassInitializer("java.lang.String");    runClassInitializer("java.lang.VMString");    runClassInitializer("gnu.java.security.provider.DefaultPolicy");    runClassInitializer("java.security.Policy");    runClassInitializer("java.net.URL"); // needed for URLClassLoader    /* Needed for ApplicationClassLoader, which in turn is needed by       VMClassLoader.getSystemClassLoader()  */    runClassInitializer("java.net.URLClassLoader");     runClassInitializer("java.lang.ClassLoader");    runClassInitializer("java.lang.Math");    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");    runClassInitializer("gnu.java.locale.Calendar");    runClassInitializer("java.util.Date");    //-#if RVM_WITH_ALL_CLASSES    runClassInitializer("java.util.jar.Attributes$Name");    //-#endif    if (verboseBoot >= 1) VM.sysWriteln("Booting VM_Lock");    VM_Lock.boot();        // set up HPM    //-#if RVM_WITH_HPM    if (BuildForHPM) {      if (VM_HardwarePerformanceMonitors.enabled()) {        // assume only one Java thread is executing!        if(VM_HardwarePerformanceMonitors.verbose>=2)          VM.sysWriteln("VM.boot() call VM_HardwarePerformanceMonitors.boot()");        VM_HardwarePerformanceMonitors.boot();      }    }    //-#endif    // Enable multiprocessing.    // Among other things, after this returns, GC and dynamic class loading are enabled.    //     if (verboseBoot >= 1) VM.sysWriteln("Booting scheduler");    VM_Scheduler.boot();    VM.dynamicClassLoadingEnabled = true;    // Create JNI Environment for boot thread.      // After this point the boot thread can invoke native methods.    com.ibm.JikesRVM.jni.VM_JNIEnvironment.boot();    if (verboseBoot >= 1) VM.sysWriteln("Initializing JNI for boot thread");    VM_Thread.getCurrentThread().initializeJNIEnv();    //-#if RVM_WITH_HPM    runClassInitializer("com.ibm.JikesRVM.Java2HPM");    VM_HardwarePerformanceMonitors.setUpHPMinfo();    //-#endif    // Run class intializers that require JNI    if (verboseBoot >= 1) VM.sysWriteln("Running late class initializers");    runClassInitializer("gnu.java.nio.channels.FileChannelImpl");    runClassInitializer("java.io.FileDescriptor");    runClassInitializer("java.lang.Double");    runClassInitializer("java.util.PropertyPermission");    runClassInitializer("com.ibm.JikesRVM.VM_Process");    // Initialize java.lang.System.out, java.lang.System.err, java.lang.System.in    VM_FileSystem.initializeStandardStreams();    ///////////////////////////////////////////////////////////////    // The VM is now fully booted.                               //    // By this we mean that we can execute arbitrary Java code.  //    ///////////////////////////////////////////////////////////////    if (verboseBoot >= 1) VM.sysWriteln("VM is now fully booted");        // Inform interested subsystems that VM is fully booted.    VM.fullyBooted = true;    MM_Interface.fullyBootedVM();    VM_BaselineCompiler.fullyBootedVM();    //-#if RVM_WITH_QUICK_COMPILER    VM_QuickCompiler.fullyBootedVM();    //-#endif    // Allow profile information to be read in from a file    //     VM_EdgeCounts.boot();    // Initialize compiler that compiles dynamically loaded classes.    //    if (verboseBoot >= 1) VM.sysWriteln("Initializing runtime compiler");    VM_RuntimeCompiler.boot();    // Process remainder of the VM's command line arguments.    if (verboseBoot >= 1) VM.sysWriteln("Late stage processing of command line");    String[] applicationArguments = VM_CommandLineArgs.lateProcessCommandLineArguments();    if (VM.verboseClassLoading || verboseBoot >= 1) VM.sysWrite("[VM booted]\n");    // set up JikesRVM socket I/O    if (verboseBoot >= 1) VM.sysWriteln("Initializing socket factories");    JikesRVMSocketImpl.boot();    //-#if RVM_WITH_ADAPTIVE_SYSTEM    if (verboseBoot >= 1) VM.sysWriteln("Initializing adaptive system");    com.ibm.JikesRVM.adaptive.VM_Controller.boot();    //-#endif    // Turn on security checks again.    // Commented out because we haven't incorporated this into the main CVS    // tree yet.     // java.security.JikesRVMSupport.fullyBootedVM();    // The first argument must be a class name.    if (verboseBoot >= 1) VM.sysWriteln("Extracting name of class to execute");    if (applicationArguments.length == 0) {      pleaseSpecifyAClass();    }    if (applicationArguments.length > 0 &&         ! VM_TypeDescriptorParsing.isJavaClassName(applicationArguments[0])) {      VM.sysWrite("vm: \"");      VM.sysWrite(applicationArguments[0]);      VM.sysWrite("\" is not a legal Java class name.\n");      pleaseSpecifyAClass();    }    // Schedule "main" thread for execution.    if (verboseBoot >= 2) VM.sysWriteln("Creating main thread");    // Create main thread.    if (verboseBoot >= 1) VM.sysWriteln("Constructing mainThread");    Thread mainThread = new MainThread(applicationArguments);    // Schedule "main" thread for execution.    if (verboseBoot >= 1) VM.sysWriteln("Starting main thread");    mainThread.start();    if (verboseBoot >= 1) VM.sysWriteln("Starting debugger thread");    // Create one debugger thread.    VM_Thread t = new DebuggerThread();    t.start(VM_Scheduler.debuggerQueue);    //-#if RVM_WITH_HPM    if (VM_HardwarePerformanceMonitors.enabled()) {      // IS THIS NEEDED?      if (!VM_HardwarePerformanceMonitors.thread_group) {        if(VM_HardwarePerformanceMonitors.verbose>=2)          VM.sysWrite(" VM.boot() call sysHPMresetMyThread()\n");        VM_SysCall.sysHPMresetMyThread();      }    }    //-#endif    // End of boot thread.    //    if (VM.TraceThreads) VM_Scheduler.trace("VM.boot", "completed - terminating");    if (verboseBoot >= 2)       VM.sysWriteln("Boot sequence completed; finishing boot thread");        VM_Thread.terminate();    if (VM.VerifyAssertions) VM._assert(VM.NOT_REACHED);  }