os.setObjectRef(clInitCaller);
// Call VmClass.loadFromBootClassArray
final VmType<?> vmClassClass = loadClass(VmType.class);
final VmMethod lfbcaMethod = vmClassClass.getMethod(
"loadFromBootClassArray", "([Lorg/jnode/vm/classmgr/VmType;)V");
final VmType<?> vmMethodClass = loadClass(VmMethod.class);
final VmInstanceField nativeCodeField = (VmInstanceField) vmMethodClass
.getField("nativeCode");
final GPR aax = os.isCode32() ? (GPR) X86Register.EAX : X86Register.RAX;
final GPR abx = os.isCode32() ? (GPR) X86Register.EBX : X86Register.RBX;
os.writeMOV_Const(aax, bootClasses);
os.writePUSH(aax);
os.writeMOV_Const(aax, lfbcaMethod);
os.writeMOV(abx.getSize(), abx, aax, nativeCodeField.getOffset());
os.writeCALL(abx);
// Now call all static initializers
for (int i = 0; (i < bootClasses.length); i++) {
VmType<?> vmClass = bootClasses[i];
if ((vmClass instanceof VmClassType)
&& (((VmClassType<?>) vmClass).getInstanceCount() > 0)) {
VmMethod clInit = vmClass.getMethod("<clinit>", "()V");
if (clInit != null) {
// os.setObjectRef(clInitCaller + "$$" + vmClass.getName());
log("Missing static initializer in class "
+ vmClass.getName(), Project.MSG_WARN);
}