示例#1
0
JAVA_OBJECT java_lang_Class_getDeclaredMethods__(JAVA_OBJECT me)
{
    //XMLVM_BEGIN_NATIVE[java_lang_Class_getDeclaredMethods__]
    java_lang_Class* thiz = (java_lang_Class*) me;
    __TIB_DEFINITION_TEMPLATE* tib = (__TIB_DEFINITION_TEMPLATE*) thiz->fields.java_lang_Class.tib_;
    int numMethods = tib->numDeclaredMethods;
    Func_OOOO dispatcher = tib->methodDispatcherFunc;
    if (!__TIB_java_lang_reflect_Method.classInitialized) __INIT_java_lang_reflect_Method();
    org_xmlvm_runtime_XMLVMArray* methods = XMLVMArray_createSingleDimension(__CLASS_java_lang_reflect_Method, numMethods);
    JAVA_ARRAY_OBJECT* methodArray = (JAVA_ARRAY_OBJECT*) methods->fields.org_xmlvm_runtime_XMLVMArray.array_;
    JAVA_INT slot = 0;
    for (slot = 0; slot < numMethods; slot++) {
        java_lang_reflect_Method* method = __NEW_java_lang_reflect_Method();
        XMLVM_METHOD_REFLECTION_DATA* currentMethod = (tib->declaredMethods) + slot;
        int numParameters = currentMethod->numParameterTypes;
        org_xmlvm_runtime_XMLVMArray* parameters = XMLVMArray_createSingleDimension(__CLASS_java_lang_Class, numParameters);
        JAVA_ARRAY_OBJECT* parameterArray = (JAVA_ARRAY_OBJECT*) parameters->fields.org_xmlvm_runtime_XMLVMArray.array_;
        int j = 0;
        JAVA_OBJECT** paramTypes = currentMethod->parameterTypes;
        for (j = 0; j < numParameters; j++) {
            parameterArray[j] = *(paramTypes[j]);
        }
        java_lang_String* name = xmlvm_create_java_string(currentMethod->name);
        JAVA_OBJECT*  checkedExceptions = JAVA_NULL;
        int          numCheckedExceptions = 0;
        int          modifiers = 0;
        java_lang_String* signature = xmlvm_create_java_string(currentMethod->signature);
        JAVA_OBJECT  annotations = JAVA_NULL;
        JAVA_OBJECT  parameterAnnotations = JAVA_NULL;
        java_lang_reflect_Method___INIT____java_lang_String_java_lang_Class_java_lang_Class_1ARRAY_java_lang_Class_1ARRAY_int_java_lang_Object_int_java_lang_String_byte_1ARRAY_byte_1ARRAY(method, name, tib->clazz, parameters, checkedExceptions, modifiers, dispatcher, slot, signature, annotations, parameterAnnotations);
        methodArray[slot] = method;
    }
    return methods;
    //XMLVM_END_NATIVE
}
示例#2
0
JAVA_OBJECT java_lang_Class_getDeclaredFields__(JAVA_OBJECT me)
{
    //XMLVM_BEGIN_NATIVE[java_lang_Class_getDeclaredFields__]
    java_lang_Class* thiz = (java_lang_Class*) me;
    __TIB_DEFINITION_TEMPLATE* tib = (__TIB_DEFINITION_TEMPLATE*) thiz->fields.java_lang_Class.tib_;
    int numFields = tib->numDeclaredFields;
    if (!__TIB_java_lang_reflect_Field.classInitialized) __INIT_java_lang_reflect_Field();
    org_xmlvm_runtime_XMLVMArray* fields = XMLVMArray_createSingleDimension(__CLASS_java_lang_reflect_Field, numFields);
    JAVA_ARRAY_OBJECT* fieldsArray = (JAVA_ARRAY_OBJECT*) fields->fields.org_xmlvm_runtime_XMLVMArray.array_;
    int i = 0;
    for (i = 0; i < numFields; i++) {
        java_lang_reflect_Field* field = __NEW_java_lang_reflect_Field();
        XMLVM_FIELD_REFLECTION_DATA* currentField = (tib->declaredFields) + i;
        java_lang_Class* declaringClass = tib->clazz;
        java_lang_String* name = xmlvm_create_java_string(currentField->name);
        java_lang_Class* type = *(currentField->type);
        JAVA_INT modifiers = currentField->modifiers;
        JAVA_INT offset = currentField->offset;
        JAVA_OBJECT* address = currentField->address;
        java_lang_String* signature = xmlvm_create_java_string(currentField->signature);
        org_xmlvm_runtime_XMLVMArray* annotations = currentField->annotations;
        java_lang_reflect_Field___INIT____java_lang_Class_java_lang_String_java_lang_Class_int_int_java_lang_Object_java_lang_String_byte_1ARRAY(field, declaringClass, name, type, modifiers, offset, address, signature, annotations);                                                                                                                     
        fieldsArray[i] = field;
    }
    return fields;
    //XMLVM_END_NATIVE
}
JAVA_OBJECT org_apache_harmony_luni_internal_nls_Messages_getString___java_lang_String_java_lang_Object_java_lang_Object(JAVA_OBJECT n1, JAVA_OBJECT n2, JAVA_OBJECT n3)
{
    if (!__TIB_org_apache_harmony_luni_internal_nls_Messages.classInitialized) __INIT_org_apache_harmony_luni_internal_nls_Messages();
    //XMLVM_BEGIN_WRAPPER[org_apache_harmony_luni_internal_nls_Messages_getString___java_lang_String_java_lang_Object_java_lang_Object]
    XMLVM_ENTER_METHOD("org.apache.harmony.luni.internal.nls.Messages", "getString", "?")
    XMLVMElem _r0;
    XMLVMElem _r1;
    XMLVMElem _r2;
    XMLVMElem _r3;
    XMLVMElem _r4;
    _r2.o = n1;
    _r3.o = n2;
    _r4.o = n3;
    XMLVM_SOURCE_POSITION("Messages.java", 123)
    _r0.i = 2;
    if (!__TIB_java_lang_Object.classInitialized) __INIT_java_lang_Object();
    _r0.o = XMLVMArray_createSingleDimension(__CLASS_java_lang_Object, _r0.i);
    _r1.i = 0;
    XMLVM_CHECK_NPE(0)
    XMLVM_CHECK_ARRAY_BOUNDS(_r0.o, _r1.i);
    ((JAVA_ARRAY_OBJECT*) (((org_xmlvm_runtime_XMLVMArray*) _r0.o)->fields.org_xmlvm_runtime_XMLVMArray.array_))[_r1.i] = _r3.o;
    _r1.i = 1;
    XMLVM_CHECK_NPE(0)
    XMLVM_CHECK_ARRAY_BOUNDS(_r0.o, _r1.i);
    ((JAVA_ARRAY_OBJECT*) (((org_xmlvm_runtime_XMLVMArray*) _r0.o)->fields.org_xmlvm_runtime_XMLVMArray.array_))[_r1.i] = _r4.o;
    _r0.o = org_apache_harmony_luni_internal_nls_Messages_getString___java_lang_String_java_lang_Object_1ARRAY(_r2.o, _r0.o);
    XMLVM_EXIT_METHOD()
    return _r0.o;
    //XMLVM_END_WRAPPER
}
JAVA_OBJECT java_io_File_getLinkImpl___byte_1ARRAY(JAVA_OBJECT me, JAVA_OBJECT n1)
{
    //XMLVM_BEGIN_NATIVE[java_io_File_getLinkImpl___byte_1ARRAY]
    const char* fileName = XMLVMUtil_convertFromByteArray(n1);
    char* resolved = readlink_malloc(fileName);
    if(resolved == NULL) {
        return n1;
    } else {
	XMLVMElem _r0;
        int length = strlen(resolved);
        _r0.o = XMLVMArray_createSingleDimension(__CLASS_byte, length);
        char* data = (char*) ((org_xmlvm_runtime_XMLVMArray*) _r0.o)->fields.org_xmlvm_runtime_XMLVMArray.array_;
        XMLVM_MEMCPY(data, resolved, length);
	return _r0.o;
    }
    //XMLVM_END_NATIVE
}
JAVA_OBJECT java_lang_ClassLoader_defineClass___java_lang_String_java_nio_ByteBuffer_java_security_ProtectionDomain(JAVA_OBJECT me, JAVA_OBJECT n1, JAVA_OBJECT n2, JAVA_OBJECT n3)
{
    //XMLVM_BEGIN_WRAPPER[java_lang_ClassLoader_defineClass___java_lang_String_java_nio_ByteBuffer_java_security_ProtectionDomain]
    XMLVM_ENTER_METHOD("java.lang.ClassLoader", "defineClass", "?")
    XMLVMElem _r0;
    XMLVMElem _r1;
    XMLVMElem _r2;
    XMLVMElem _r3;
    XMLVMElem _r4;
    XMLVMElem _r5;
    XMLVMElem _r6;
    XMLVMElem _r7;
    XMLVMElem _r8;
    XMLVMElem _r9;
    _r6.o = me;
    _r7.o = n1;
    _r8.o = n2;
    _r9.o = n3;
    XMLVM_SOURCE_POSITION("ClassLoader.java", 273)
    XMLVM_CHECK_NPE(8)
    _r0.i = java_nio_Buffer_remaining__(_r8.o);
    if (!__TIB_byte.classInitialized) __INIT_byte();
    _r2.o = XMLVMArray_createSingleDimension(__CLASS_byte, _r0.i);
    XMLVM_SOURCE_POSITION("ClassLoader.java", 274)
    XMLVM_CHECK_NPE(8)
    java_nio_ByteBuffer_get___byte_1ARRAY(_r8.o, _r2.o);
    XMLVM_SOURCE_POSITION("ClassLoader.java", 275)
    _r3.i = 0;
    _r4.i = XMLVMArray_count(((org_xmlvm_runtime_XMLVMArray*) _r2.o));
    _r0 = _r6;
    _r1 = _r7;
    _r5 = _r9;
    XMLVM_CHECK_NPE(0)
    _r0.o = java_lang_ClassLoader_defineClass___java_lang_String_byte_1ARRAY_int_int_java_security_ProtectionDomain(_r0.o, _r1.o, _r2.o, _r3.i, _r4.i, _r5.o);
    XMLVM_EXIT_METHOD()
    return _r0.o;
    //XMLVM_END_WRAPPER
}
JAVA_OBJECT java_lang_System_getPropertyList__()
{
    //XMLVM_BEGIN_NATIVE[java_lang_System_getPropertyList__]
    return XMLVMArray_createSingleDimension(__CLASS_java_lang_String, 0);
    //XMLVM_END_NATIVE
}
void java_lang_Thread_State___CLINIT_()
{
    //XMLVM_BEGIN_WRAPPER[java_lang_Thread_State___CLINIT___]
    XMLVM_ENTER_METHOD("java.lang.Thread$State", "<clinit>", "?")
    XMLVMElem _r0;
    XMLVMElem _r1;
    XMLVMElem _r2;
    XMLVMElem _r3;
    XMLVMElem _r4;
    XMLVMElem _r5;
    XMLVMElem _r6;
    XMLVMElem _r7;
    _r7.i = 4;
    _r6.i = 3;
    _r5.i = 2;
    _r4.i = 1;
    _r3.i = 0;
    XMLVM_SOURCE_POSITION("Thread.java", 78)
    _r0.o = __NEW_java_lang_Thread_State();
    // "NEW"
    _r1.o = xmlvm_create_java_string_from_pool(810);
    XMLVM_CHECK_NPE(0)
    java_lang_Thread_State___INIT____java_lang_String_int(_r0.o, _r1.o, _r3.i);
    java_lang_Thread_State_PUT_NEW( _r0.o);
    XMLVM_SOURCE_POSITION("Thread.java", 82)
    _r0.o = __NEW_java_lang_Thread_State();
    // "RUNNABLE"
    _r1.o = xmlvm_create_java_string_from_pool(811);
    XMLVM_CHECK_NPE(0)
    java_lang_Thread_State___INIT____java_lang_String_int(_r0.o, _r1.o, _r4.i);
    java_lang_Thread_State_PUT_RUNNABLE( _r0.o);
    XMLVM_SOURCE_POSITION("Thread.java", 86)
    _r0.o = __NEW_java_lang_Thread_State();
    // "BLOCKED"
    _r1.o = xmlvm_create_java_string_from_pool(812);
    XMLVM_CHECK_NPE(0)
    java_lang_Thread_State___INIT____java_lang_String_int(_r0.o, _r1.o, _r5.i);
    java_lang_Thread_State_PUT_BLOCKED( _r0.o);
    XMLVM_SOURCE_POSITION("Thread.java", 90)
    _r0.o = __NEW_java_lang_Thread_State();
    // "WAITING"
    _r1.o = xmlvm_create_java_string_from_pool(813);
    XMLVM_CHECK_NPE(0)
    java_lang_Thread_State___INIT____java_lang_String_int(_r0.o, _r1.o, _r6.i);
    java_lang_Thread_State_PUT_WAITING( _r0.o);
    XMLVM_SOURCE_POSITION("Thread.java", 94)
    _r0.o = __NEW_java_lang_Thread_State();
    // "TIMED_WAITING"
    _r1.o = xmlvm_create_java_string_from_pool(814);
    XMLVM_CHECK_NPE(0)
    java_lang_Thread_State___INIT____java_lang_String_int(_r0.o, _r1.o, _r7.i);
    java_lang_Thread_State_PUT_TIMED_WAITING( _r0.o);
    XMLVM_SOURCE_POSITION("Thread.java", 98)
    _r0.o = __NEW_java_lang_Thread_State();
    // "TERMINATED"
    _r1.o = xmlvm_create_java_string_from_pool(815);
    _r2.i = 5;
    XMLVM_CHECK_NPE(0)
    java_lang_Thread_State___INIT____java_lang_String_int(_r0.o, _r1.o, _r2.i);
    java_lang_Thread_State_PUT_TERMINATED( _r0.o);
    XMLVM_SOURCE_POSITION("Thread.java", 74)
    _r0.i = 6;
    if (!__TIB_java_lang_Thread_State.classInitialized) __INIT_java_lang_Thread_State();
    _r0.o = XMLVMArray_createSingleDimension(__CLASS_java_lang_Thread_State, _r0.i);
    _r1.o = java_lang_Thread_State_GET_NEW();
    XMLVM_CHECK_NPE(0)
    XMLVM_CHECK_ARRAY_BOUNDS(_r0.o, _r3.i);
    ((JAVA_ARRAY_OBJECT*) (((org_xmlvm_runtime_XMLVMArray*) _r0.o)->fields.org_xmlvm_runtime_XMLVMArray.array_))[_r3.i] = _r1.o;
    _r1.o = java_lang_Thread_State_GET_RUNNABLE();
    XMLVM_CHECK_NPE(0)
    XMLVM_CHECK_ARRAY_BOUNDS(_r0.o, _r4.i);
    ((JAVA_ARRAY_OBJECT*) (((org_xmlvm_runtime_XMLVMArray*) _r0.o)->fields.org_xmlvm_runtime_XMLVMArray.array_))[_r4.i] = _r1.o;
    _r1.o = java_lang_Thread_State_GET_BLOCKED();
    XMLVM_CHECK_NPE(0)
    XMLVM_CHECK_ARRAY_BOUNDS(_r0.o, _r5.i);
    ((JAVA_ARRAY_OBJECT*) (((org_xmlvm_runtime_XMLVMArray*) _r0.o)->fields.org_xmlvm_runtime_XMLVMArray.array_))[_r5.i] = _r1.o;
    _r1.o = java_lang_Thread_State_GET_WAITING();
    XMLVM_CHECK_NPE(0)
    XMLVM_CHECK_ARRAY_BOUNDS(_r0.o, _r6.i);
    ((JAVA_ARRAY_OBJECT*) (((org_xmlvm_runtime_XMLVMArray*) _r0.o)->fields.org_xmlvm_runtime_XMLVMArray.array_))[_r6.i] = _r1.o;
    _r1.o = java_lang_Thread_State_GET_TIMED_WAITING();
    XMLVM_CHECK_NPE(0)
    XMLVM_CHECK_ARRAY_BOUNDS(_r0.o, _r7.i);
    ((JAVA_ARRAY_OBJECT*) (((org_xmlvm_runtime_XMLVMArray*) _r0.o)->fields.org_xmlvm_runtime_XMLVMArray.array_))[_r7.i] = _r1.o;
    _r1.i = 5;
    _r2.o = java_lang_Thread_State_GET_TERMINATED();
    XMLVM_CHECK_NPE(0)
    XMLVM_CHECK_ARRAY_BOUNDS(_r0.o, _r1.i);
    ((JAVA_ARRAY_OBJECT*) (((org_xmlvm_runtime_XMLVMArray*) _r0.o)->fields.org_xmlvm_runtime_XMLVMArray.array_))[_r1.i] = _r2.o;
    java_lang_Thread_State_PUT__VALUES( _r0.o);
    XMLVM_EXIT_METHOD()
    return;
    //XMLVM_END_WRAPPER
}
示例#8
0
void nbody_NBodySystem___INIT___(JAVA_OBJECT me)
{
    //XMLVM_BEGIN_WRAPPER[nbody_NBodySystem___INIT___]
    XMLVM_ENTER_METHOD("nbody.NBodySystem", "<init>", "?")
    XMLVMElem _r0;
    XMLVMElem _r1;
    XMLVMElem _r2;
    XMLVMElem _r3;
    XMLVMElem _r4;
    XMLVMElem _r5;
    XMLVMElem _r6;
    XMLVMElem _r7;
    XMLVMElem _r8;
    XMLVMElem _r9;
    XMLVMElem _r10;
    XMLVMElem _r11;
    XMLVMElem _r12;
    _r12.o = me;
    _r11.i = 0;
    _r3.d = 0.0;
    XMLVM_SOURCE_POSITION("nbody.java", 39)
    XMLVM_CHECK_NPE(12)
    java_lang_Object___INIT___(_r12.o);
    XMLVM_SOURCE_POSITION("nbody.java", 40)
    _r0.i = 5;
    XMLVM_CLASS_INIT(nbody_Body)
    _r0.o = XMLVMArray_createSingleDimension(__CLASS_nbody_Body, _r0.i);
    _r1.o = nbody_Body_sun__();
    XMLVM_CHECK_NPE(0)
    XMLVM_CHECK_ARRAY_BOUNDS(_r0.o, _r11.i);
    ((JAVA_ARRAY_OBJECT*) (((org_xmlvm_runtime_XMLVMArray*) _r0.o)->fields.org_xmlvm_runtime_XMLVMArray.array_))[_r11.i] = _r1.o;
    _r1.i = 1;
    _r2.o = nbody_Body_jupiter__();
    XMLVM_CHECK_NPE(0)
    XMLVM_CHECK_ARRAY_BOUNDS(_r0.o, _r1.i);
    ((JAVA_ARRAY_OBJECT*) (((org_xmlvm_runtime_XMLVMArray*) _r0.o)->fields.org_xmlvm_runtime_XMLVMArray.array_))[_r1.i] = _r2.o;
    _r1.i = 2;
    _r2.o = nbody_Body_saturn__();
    XMLVM_CHECK_NPE(0)
    XMLVM_CHECK_ARRAY_BOUNDS(_r0.o, _r1.i);
    ((JAVA_ARRAY_OBJECT*) (((org_xmlvm_runtime_XMLVMArray*) _r0.o)->fields.org_xmlvm_runtime_XMLVMArray.array_))[_r1.i] = _r2.o;
    _r1.i = 3;
    _r2.o = nbody_Body_uranus__();
    XMLVM_CHECK_NPE(0)
    XMLVM_CHECK_ARRAY_BOUNDS(_r0.o, _r1.i);
    ((JAVA_ARRAY_OBJECT*) (((org_xmlvm_runtime_XMLVMArray*) _r0.o)->fields.org_xmlvm_runtime_XMLVMArray.array_))[_r1.i] = _r2.o;
    _r1.i = 4;
    _r2.o = nbody_Body_neptune__();
    XMLVM_CHECK_NPE(0)
    XMLVM_CHECK_ARRAY_BOUNDS(_r0.o, _r1.i);
    ((JAVA_ARRAY_OBJECT*) (((org_xmlvm_runtime_XMLVMArray*) _r0.o)->fields.org_xmlvm_runtime_XMLVMArray.array_))[_r1.i] = _r2.o;
    XMLVM_CHECK_NPE(12)
    ((nbody_NBodySystem*) _r12.o)->fields.nbody_NBodySystem.bodies_ = _r0.o;
    _r0 = _r11;
    _r5 = _r3;
    _r1 = _r3;
    label48:;
    XMLVM_SOURCE_POSITION("nbody.java", 51)
    XMLVM_CHECK_NPE(12)
    _r7.o = ((nbody_NBodySystem*) _r12.o)->fields.nbody_NBodySystem.bodies_;
    _r7.i = XMLVMArray_count(((org_xmlvm_runtime_XMLVMArray*) _r7.o));
    if (_r0.i >= _r7.i) goto label98;
    XMLVM_SOURCE_POSITION("nbody.java", 52)
    XMLVM_CHECK_NPE(12)
    _r7.o = ((nbody_NBodySystem*) _r12.o)->fields.nbody_NBodySystem.bodies_;
    XMLVM_CHECK_NPE(7)
    XMLVM_CHECK_ARRAY_BOUNDS(_r7.o, _r0.i);
    _r7.o = ((JAVA_ARRAY_OBJECT*) (((org_xmlvm_runtime_XMLVMArray*) _r7.o)->fields.org_xmlvm_runtime_XMLVMArray.array_))[_r0.i];
    XMLVM_CHECK_NPE(7)
    _r7.d = ((nbody_Body*) _r7.o)->fields.nbody_Body.vx_;
    XMLVM_CHECK_NPE(12)
    _r9.o = ((nbody_NBodySystem*) _r12.o)->fields.nbody_NBodySystem.bodies_;
    XMLVM_CHECK_NPE(9)
    XMLVM_CHECK_ARRAY_BOUNDS(_r9.o, _r0.i);
    _r9.o = ((JAVA_ARRAY_OBJECT*) (((org_xmlvm_runtime_XMLVMArray*) _r9.o)->fields.org_xmlvm_runtime_XMLVMArray.array_))[_r0.i];
    XMLVM_CHECK_NPE(9)
    _r9.d = ((nbody_Body*) _r9.o)->fields.nbody_Body.mass_;
    _r7.d = _r7.d * _r9.d;
    _r1.d = _r1.d + _r7.d;
    XMLVM_SOURCE_POSITION("nbody.java", 53)
    XMLVM_CHECK_NPE(12)
    _r7.o = ((nbody_NBodySystem*) _r12.o)->fields.nbody_NBodySystem.bodies_;
    XMLVM_CHECK_NPE(7)
    XMLVM_CHECK_ARRAY_BOUNDS(_r7.o, _r0.i);
    _r7.o = ((JAVA_ARRAY_OBJECT*) (((org_xmlvm_runtime_XMLVMArray*) _r7.o)->fields.org_xmlvm_runtime_XMLVMArray.array_))[_r0.i];
    XMLVM_CHECK_NPE(7)
    _r7.d = ((nbody_Body*) _r7.o)->fields.nbody_Body.vy_;
    XMLVM_CHECK_NPE(12)
    _r9.o = ((nbody_NBodySystem*) _r12.o)->fields.nbody_NBodySystem.bodies_;
    XMLVM_CHECK_NPE(9)
    XMLVM_CHECK_ARRAY_BOUNDS(_r9.o, _r0.i);
    _r9.o = ((JAVA_ARRAY_OBJECT*) (((org_xmlvm_runtime_XMLVMArray*) _r9.o)->fields.org_xmlvm_runtime_XMLVMArray.array_))[_r0.i];
    XMLVM_CHECK_NPE(9)
    _r9.d = ((nbody_Body*) _r9.o)->fields.nbody_Body.mass_;
    _r7.d = _r7.d * _r9.d;
    _r3.d = _r3.d + _r7.d;
    XMLVM_SOURCE_POSITION("nbody.java", 54)
    XMLVM_CHECK_NPE(12)
    _r7.o = ((nbody_NBodySystem*) _r12.o)->fields.nbody_NBodySystem.bodies_;
    XMLVM_CHECK_NPE(7)
    XMLVM_CHECK_ARRAY_BOUNDS(_r7.o, _r0.i);
    _r7.o = ((JAVA_ARRAY_OBJECT*) (((org_xmlvm_runtime_XMLVMArray*) _r7.o)->fields.org_xmlvm_runtime_XMLVMArray.array_))[_r0.i];
    XMLVM_CHECK_NPE(7)
    _r7.d = ((nbody_Body*) _r7.o)->fields.nbody_Body.vz_;
    XMLVM_CHECK_NPE(12)
    _r9.o = ((nbody_NBodySystem*) _r12.o)->fields.nbody_NBodySystem.bodies_;
    XMLVM_CHECK_NPE(9)
    XMLVM_CHECK_ARRAY_BOUNDS(_r9.o, _r0.i);
    _r9.o = ((JAVA_ARRAY_OBJECT*) (((org_xmlvm_runtime_XMLVMArray*) _r9.o)->fields.org_xmlvm_runtime_XMLVMArray.array_))[_r0.i];
    XMLVM_CHECK_NPE(9)
    _r9.d = ((nbody_Body*) _r9.o)->fields.nbody_Body.mass_;
    _r7.d = _r7.d * _r9.d;
    _r5.d = _r5.d + _r7.d;
    _r0.i = _r0.i + 1;
    goto label48;
    label98:;
    XMLVM_SOURCE_POSITION("nbody.java", 56)
    XMLVM_CHECK_NPE(12)
    _r0.o = ((nbody_NBodySystem*) _r12.o)->fields.nbody_NBodySystem.bodies_;
    XMLVM_CHECK_NPE(0)
    XMLVM_CHECK_ARRAY_BOUNDS(_r0.o, _r11.i);
    _r0.o = ((JAVA_ARRAY_OBJECT*) (((org_xmlvm_runtime_XMLVMArray*) _r0.o)->fields.org_xmlvm_runtime_XMLVMArray.array_))[_r11.i];
    XMLVM_CHECK_NPE(0)
    nbody_Body_offsetMomentum___double_double_double(_r0.o, _r1.d, _r3.d, _r5.d);
    XMLVM_SOURCE_POSITION("nbody.java", 57)
    XMLVM_EXIT_METHOD()
    return;
    //XMLVM_END_WRAPPER
}
JAVA_OBJECT org_apache_harmony_luni_internal_nls_Messages_format___java_lang_String_java_lang_Object_1ARRAY(JAVA_OBJECT n1, JAVA_OBJECT n2)
{
    if (!__TIB_org_apache_harmony_luni_internal_nls_Messages.classInitialized) __INIT_org_apache_harmony_luni_internal_nls_Messages();
    //XMLVM_BEGIN_WRAPPER[org_apache_harmony_luni_internal_nls_Messages_format___java_lang_String_java_lang_Object_1ARRAY]
    XMLVM_ENTER_METHOD("org.apache.harmony.luni.internal.nls.Messages", "format", "?")
    XMLVMElem _r0;
    XMLVMElem _r1;
    XMLVMElem _r2;
    XMLVMElem _r3;
    XMLVMElem _r4;
    XMLVMElem _r5;
    XMLVMElem _r6;
    XMLVMElem _r7;
    XMLVMElem _r8;
    XMLVMElem _r9;
    XMLVMElem _r10;
    _r9.o = n1;
    _r10.o = n2;
    _r8.i = 123;
    _r7.i = 1;
    XMLVM_SOURCE_POSITION("Messages.java", 181)
    _r0.o = __NEW_java_lang_StringBuilder();
    //java_lang_String_length__[8]
    XMLVM_CHECK_NPE(9)
    _r5.i = (*(JAVA_INT (*)(JAVA_OBJECT)) ((java_lang_String*) _r9.o)->tib->vtable[8])(_r9.o);
    _r6.i = XMLVMArray_count(((org_xmlvm_runtime_XMLVMArray*) _r10.o));
    _r6.i = _r6.i * 20;
    _r5.i = _r5.i + _r6.i;
    XMLVM_CHECK_NPE(0)
    java_lang_StringBuilder___INIT____int(_r0.o, _r5.i);
    XMLVM_SOURCE_POSITION("Messages.java", 183)
    _r5.i = XMLVMArray_count(((org_xmlvm_runtime_XMLVMArray*) _r10.o));
    if (!__TIB_java_lang_String.classInitialized) __INIT_java_lang_String();
    _r1.o = XMLVMArray_createSingleDimension(__CLASS_java_lang_String, _r5.i);
    _r3.i = 0;
    label20:;
    XMLVM_SOURCE_POSITION("Messages.java", 184)
    _r5.i = XMLVMArray_count(((org_xmlvm_runtime_XMLVMArray*) _r10.o));
    if (_r3.i >= _r5.i) goto label43;
    XMLVM_SOURCE_POSITION("Messages.java", 185)
    XMLVM_CHECK_NPE(10)
    XMLVM_CHECK_ARRAY_BOUNDS(_r10.o, _r3.i);
    _r5.o = ((JAVA_ARRAY_OBJECT*) (((org_xmlvm_runtime_XMLVMArray*) _r10.o)->fields.org_xmlvm_runtime_XMLVMArray.array_))[_r3.i];
    if (_r5.o != JAVA_NULL) goto label34;
    XMLVM_SOURCE_POSITION("Messages.java", 186)
    // "<null>"
    _r5.o = xmlvm_create_java_string_from_pool(140);
    XMLVM_CHECK_NPE(1)
    XMLVM_CHECK_ARRAY_BOUNDS(_r1.o, _r3.i);
    ((JAVA_ARRAY_OBJECT*) (((org_xmlvm_runtime_XMLVMArray*) _r1.o)->fields.org_xmlvm_runtime_XMLVMArray.array_))[_r3.i] = _r5.o;
    label31:;
    _r3.i = _r3.i + 1;
    goto label20;
    label34:;
    XMLVM_SOURCE_POSITION("Messages.java", 188)
    XMLVM_CHECK_NPE(10)
    XMLVM_CHECK_ARRAY_BOUNDS(_r10.o, _r3.i);
    _r5.o = ((JAVA_ARRAY_OBJECT*) (((org_xmlvm_runtime_XMLVMArray*) _r10.o)->fields.org_xmlvm_runtime_XMLVMArray.array_))[_r3.i];
    //java_lang_Object_toString__[5]
    XMLVM_CHECK_NPE(5)
    _r5.o = (*(JAVA_OBJECT (*)(JAVA_OBJECT)) ((java_lang_Object*) _r5.o)->tib->vtable[5])(_r5.o);
    XMLVM_CHECK_NPE(1)
    XMLVM_CHECK_ARRAY_BOUNDS(_r1.o, _r3.i);
    ((JAVA_ARRAY_OBJECT*) (((org_xmlvm_runtime_XMLVMArray*) _r1.o)->fields.org_xmlvm_runtime_XMLVMArray.array_))[_r3.i] = _r5.o;
    goto label31;
    label43:;
    XMLVM_SOURCE_POSITION("Messages.java", 190)
    _r4.i = 0;
    _r5.i = 0;
    XMLVM_SOURCE_POSITION("Messages.java", 191)
    XMLVM_CHECK_NPE(9)
    _r3.i = java_lang_String_indexOf___int_int(_r9.o, _r8.i, _r5.i);
    label49:;
    if (_r3.i < 0) goto label169;
    XMLVM_SOURCE_POSITION("Messages.java", 193)
    if (_r3.i == 0) goto label84;
    _r5.i = _r3.i - _r7.i;
    //java_lang_String_charAt___int[6]
    XMLVM_CHECK_NPE(9)
    _r5.i = (*(JAVA_CHAR (*)(JAVA_OBJECT, JAVA_INT)) ((java_lang_String*) _r9.o)->tib->vtable[6])(_r9.o, _r5.i);
    _r6.i = 92;
    if (_r5.i != _r6.i) goto label84;
    XMLVM_SOURCE_POSITION("Messages.java", 195)
    if (_r3.i == _r7.i) goto label74;
    XMLVM_SOURCE_POSITION("Messages.java", 196)
    _r5.i = _r3.i - _r7.i;
    XMLVM_CHECK_NPE(9)
    _r5.o = java_lang_String_substring___int_int(_r9.o, _r4.i, _r5.i);
    XMLVM_CHECK_NPE(0)
    java_lang_StringBuilder_append___java_lang_String(_r0.o, _r5.o);
    label74:;
    XMLVM_SOURCE_POSITION("Messages.java", 197)
    //java_lang_StringBuilder_append___char[6]
    XMLVM_CHECK_NPE(0)
    (*(JAVA_OBJECT (*)(JAVA_OBJECT, JAVA_CHAR)) ((java_lang_StringBuilder*) _r0.o)->tib->vtable[6])(_r0.o, _r8.i);
    XMLVM_SOURCE_POSITION("Messages.java", 198)
    _r4.i = _r3.i + 1;
    label79:;
    XMLVM_CHECK_NPE(9)
    _r3.i = java_lang_String_indexOf___int_int(_r9.o, _r8.i, _r4.i);
    goto label49;
    label84:;
    XMLVM_SOURCE_POSITION("Messages.java", 201)
    //java_lang_String_length__[8]
    XMLVM_CHECK_NPE(9)
    _r5.i = (*(JAVA_INT (*)(JAVA_OBJECT)) ((java_lang_String*) _r9.o)->tib->vtable[8])(_r9.o);
    _r6.i = 3;
    _r5.i = _r5.i - _r6.i;
    if (_r3.i <= _r5.i) goto label108;
    XMLVM_SOURCE_POSITION("Messages.java", 203)
    //java_lang_String_length__[8]
    XMLVM_CHECK_NPE(9)
    _r5.i = (*(JAVA_INT (*)(JAVA_OBJECT)) ((java_lang_String*) _r9.o)->tib->vtable[8])(_r9.o);
    XMLVM_CHECK_NPE(9)
    _r5.o = java_lang_String_substring___int_int(_r9.o, _r4.i, _r5.i);
    XMLVM_CHECK_NPE(0)
    java_lang_StringBuilder_append___java_lang_String(_r0.o, _r5.o);
    XMLVM_SOURCE_POSITION("Messages.java", 204)
    //java_lang_String_length__[8]
    XMLVM_CHECK_NPE(9)
    _r4.i = (*(JAVA_INT (*)(JAVA_OBJECT)) ((java_lang_String*) _r9.o)->tib->vtable[8])(_r9.o);
    goto label79;
    label108:;
    XMLVM_SOURCE_POSITION("Messages.java", 206)
    _r5.i = _r3.i + 1;
    //java_lang_String_charAt___int[6]
    XMLVM_CHECK_NPE(9)
    _r5.i = (*(JAVA_CHAR (*)(JAVA_OBJECT, JAVA_INT)) ((java_lang_String*) _r9.o)->tib->vtable[6])(_r9.o, _r5.i);
    _r6.i = 10;
    _r5.i = java_lang_Character_digit___char_int(_r5.i, _r6.i);
    _r2.i = (_r5.i << 24) >> 24;
    if (_r2.i < 0) goto label133;
    XMLVM_SOURCE_POSITION("Messages.java", 208)
    _r5.i = _r3.i + 2;
    //java_lang_String_charAt___int[6]
    XMLVM_CHECK_NPE(9)
    _r5.i = (*(JAVA_CHAR (*)(JAVA_OBJECT, JAVA_INT)) ((java_lang_String*) _r9.o)->tib->vtable[6])(_r9.o, _r5.i);
    _r6.i = 125;
    if (_r5.i == _r6.i) goto label145;
    label133:;
    XMLVM_SOURCE_POSITION("Messages.java", 210)
    _r5.i = _r3.i + 1;
    XMLVM_CHECK_NPE(9)
    _r5.o = java_lang_String_substring___int_int(_r9.o, _r4.i, _r5.i);
    XMLVM_CHECK_NPE(0)
    java_lang_StringBuilder_append___java_lang_String(_r0.o, _r5.o);
    XMLVM_SOURCE_POSITION("Messages.java", 211)
    _r4.i = _r3.i + 1;
    goto label79;
    label145:;
    XMLVM_SOURCE_POSITION("Messages.java", 214)
    XMLVM_CHECK_NPE(9)
    _r5.o = java_lang_String_substring___int_int(_r9.o, _r4.i, _r3.i);
    XMLVM_CHECK_NPE(0)
    java_lang_StringBuilder_append___java_lang_String(_r0.o, _r5.o);
    XMLVM_SOURCE_POSITION("Messages.java", 215)
    _r5.i = XMLVMArray_count(((org_xmlvm_runtime_XMLVMArray*) _r1.o));
    if (_r2.i < _r5.i) goto label163;
    XMLVM_SOURCE_POSITION("Messages.java", 216)
    // "<missing argument>"
    _r5.o = xmlvm_create_java_string_from_pool(141);
    XMLVM_CHECK_NPE(0)
    java_lang_StringBuilder_append___java_lang_String(_r0.o, _r5.o);
    label160:;
    XMLVM_SOURCE_POSITION("Messages.java", 219)
    _r4.i = _r3.i + 3;
    goto label79;
    label163:;
    XMLVM_SOURCE_POSITION("Messages.java", 218)
    XMLVM_CHECK_NPE(1)
    XMLVM_CHECK_ARRAY_BOUNDS(_r1.o, _r2.i);
    _r5.o = ((JAVA_ARRAY_OBJECT*) (((org_xmlvm_runtime_XMLVMArray*) _r1.o)->fields.org_xmlvm_runtime_XMLVMArray.array_))[_r2.i];
    XMLVM_CHECK_NPE(0)
    java_lang_StringBuilder_append___java_lang_String(_r0.o, _r5.o);
    goto label160;
    label169:;
    XMLVM_SOURCE_POSITION("Messages.java", 224)
    //java_lang_String_length__[8]
    XMLVM_CHECK_NPE(9)
    _r5.i = (*(JAVA_INT (*)(JAVA_OBJECT)) ((java_lang_String*) _r9.o)->tib->vtable[8])(_r9.o);
    if (_r4.i >= _r5.i) goto label186;
    XMLVM_SOURCE_POSITION("Messages.java", 225)
    //java_lang_String_length__[8]
    XMLVM_CHECK_NPE(9)
    _r5.i = (*(JAVA_INT (*)(JAVA_OBJECT)) ((java_lang_String*) _r9.o)->tib->vtable[8])(_r9.o);
    XMLVM_CHECK_NPE(9)
    _r5.o = java_lang_String_substring___int_int(_r9.o, _r4.i, _r5.i);
    XMLVM_CHECK_NPE(0)
    java_lang_StringBuilder_append___java_lang_String(_r0.o, _r5.o);
    label186:;
    XMLVM_SOURCE_POSITION("Messages.java", 226)
    //java_lang_StringBuilder_toString__[5]
    XMLVM_CHECK_NPE(0)
    _r5.o = (*(JAVA_OBJECT (*)(JAVA_OBJECT)) ((java_lang_StringBuilder*) _r0.o)->tib->vtable[5])(_r0.o);
    XMLVM_EXIT_METHOD()
    return _r5.o;
    //XMLVM_END_WRAPPER
}