final String processorId = System.getProperty("cpu", "p5");
final String dir = System.getProperty("classes.dir", ".");
final String archName = System.getProperty("arch", "x86");
final VmX86Architecture arch;
if (archName.equals("x86_64")) {
arch = new VmX86Architecture64();
} else {
arch = new VmX86Architecture32();
}
final VmSystemClassLoader cl = new VmSystemClassLoader(new java.net.URL[]{
new File("./core/build/classes/").getCanonicalFile().toURI().toURL(),
new File("./distr/build/classes/").getCanonicalFile().toURI().toURL(),
new URL("jar:" + new File("./all/lib/classlib.jar").getCanonicalFile().toURI().toURL() + "!/"),
}, arch);
final VmImpl vm = new VmImpl("?", arch, cl.getSharedStatics(), false, cl, null);
vm.toString();
VmType.initializeForBootImage(cl);
System.out.println("Architecture: " + arch.getFullName());
//final ObjectResolver resolver = new DummyResolver();
final X86CpuID cpuId = X86CpuID.createID(processorId);
//NativeCodeCompiler c = cs[0];
final NativeCodeCompiler[] cs = {