~ubuntu-branches/ubuntu/vivid/emscripten/vivid

« back to all changes in this revision

Viewing changes to tests/nbody-java/java_nio_charset_Charset_1.c

  • Committer: Package Import Robot
  • Author(s): Sylvestre Ledru
  • Date: 2013-06-11 15:45:24 UTC
  • mfrom: (1.2.1) (2.1.1 experimental)
  • Revision ID: package-import@ubuntu.com-20130611154524-rppb3w6tixlegv4n
Tags: 1.4.7~20130611~a1eb425-1
* New snapshot release
* Upload to unstable

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#include "xmlvm.h"
 
2
#include "java_nio_charset_Charset.h"
 
3
#include "org_apache_harmony_niochar_CharsetProviderImpl.h"
 
4
 
 
5
#include "java_nio_charset_Charset_1.h"
 
6
 
 
7
#define XMLVM_CURRENT_CLASS_NAME Charset_1
 
8
#define XMLVM_CURRENT_PKG_CLASS_NAME java_nio_charset_Charset_1
 
9
 
 
10
__TIB_DEFINITION_java_nio_charset_Charset_1 __TIB_java_nio_charset_Charset_1 = {
 
11
    0, // classInitializationBegan
 
12
    0, // classInitialized
 
13
    -1, // initializerThreadId
 
14
    __INIT_java_nio_charset_Charset_1, // classInitializer
 
15
    "java.nio.charset.Charset$1", // className
 
16
    "java.nio.charset", // package
 
17
    "java.nio.charset.Charset", // enclosingClassName
 
18
    JAVA_NULL, // enclosingMethodName
 
19
    "Ljava/lang/Object;Ljava/security/PrivilegedAction<Lorg/apache/harmony/niochar/CharsetProviderImpl;>;", // signature
 
20
    (__TIB_DEFINITION_TEMPLATE*) &__TIB_java_lang_Object, // extends
 
21
    sizeof(java_nio_charset_Charset_1), // sizeInstance
 
22
    XMLVM_TYPE_CLASS};
 
23
 
 
24
JAVA_OBJECT __CLASS_java_nio_charset_Charset_1;
 
25
JAVA_OBJECT __CLASS_java_nio_charset_Charset_1_1ARRAY;
 
26
JAVA_OBJECT __CLASS_java_nio_charset_Charset_1_2ARRAY;
 
27
JAVA_OBJECT __CLASS_java_nio_charset_Charset_1_3ARRAY;
 
28
//XMLVM_BEGIN_IMPLEMENTATION
 
29
//XMLVM_END_IMPLEMENTATION
 
30
 
 
31
 
 
32
#include "xmlvm-reflection.h"
 
33
 
 
34
static XMLVM_FIELD_REFLECTION_DATA __field_reflection_data[] = {
 
35
};
 
36
 
 
37
static XMLVM_CONSTRUCTOR_REFLECTION_DATA __constructor_reflection_data[] = {
 
38
};
 
39
 
 
40
static JAVA_OBJECT constructor_dispatcher(JAVA_OBJECT constructor, JAVA_OBJECT arguments)
 
41
{
 
42
    XMLVM_NOT_IMPLEMENTED();
 
43
}
 
44
 
 
45
static XMLVM_METHOD_REFLECTION_DATA __method_reflection_data[] = {
 
46
};
 
47
 
 
48
static JAVA_OBJECT method_dispatcher(JAVA_OBJECT method, JAVA_OBJECT receiver, JAVA_OBJECT arguments)
 
49
{
 
50
    XMLVM_NOT_IMPLEMENTED();
 
51
}
 
52
 
 
53
void __INIT_java_nio_charset_Charset_1()
 
54
{
 
55
    staticInitializerLock(&__TIB_java_nio_charset_Charset_1);
 
56
 
 
57
    // While the static initializer mutex is locked, locally store the value of
 
58
    // whether class initialization began or not
 
59
    int initBegan = __TIB_java_nio_charset_Charset_1.classInitializationBegan;
 
60
 
 
61
    // Whether or not class initialization had already began, it has begun now
 
62
    __TIB_java_nio_charset_Charset_1.classInitializationBegan = 1;
 
63
 
 
64
    staticInitializerUnlock(&__TIB_java_nio_charset_Charset_1);
 
65
 
 
66
    JAVA_LONG curThreadId = (JAVA_LONG)pthread_self();
 
67
    if (initBegan) {
 
68
        if (__TIB_java_nio_charset_Charset_1.initializerThreadId != curThreadId) {
 
69
            // Busy wait until the other thread finishes initializing this class
 
70
            while (!__TIB_java_nio_charset_Charset_1.classInitialized) {
 
71
                // do nothing
 
72
            }
 
73
        }
 
74
    } else {
 
75
        __TIB_java_nio_charset_Charset_1.initializerThreadId = curThreadId;
 
76
        XMLVM_CLASS_USED("java.nio.charset.Charset$1")
 
77
        __INIT_IMPL_java_nio_charset_Charset_1();
 
78
    }
 
79
}
 
80
 
 
81
void __INIT_IMPL_java_nio_charset_Charset_1()
 
82
{
 
83
    // Initialize base class if necessary
 
84
    XMLVM_CLASS_INIT(java_lang_Object)
 
85
    __TIB_java_nio_charset_Charset_1.newInstanceFunc = __NEW_INSTANCE_java_nio_charset_Charset_1;
 
86
    // Copy vtable from base class
 
87
    XMLVM_MEMCPY(__TIB_java_nio_charset_Charset_1.vtable, __TIB_java_lang_Object.vtable, sizeof(__TIB_java_lang_Object.vtable));
 
88
    // Initialize vtable for this class
 
89
    __TIB_java_nio_charset_Charset_1.vtable[6] = (VTABLE_PTR) &java_nio_charset_Charset_1_run__;
 
90
    // Initialize interface information
 
91
    __TIB_java_nio_charset_Charset_1.numImplementedInterfaces = 1;
 
92
    __TIB_java_nio_charset_Charset_1.implementedInterfaces = (__TIB_DEFINITION_TEMPLATE* (*)[1]) XMLVM_MALLOC(sizeof(__TIB_DEFINITION_TEMPLATE*) * 1);
 
93
 
 
94
    // Initialize interfaces if necessary and assign tib to implementedInterfaces
 
95
 
 
96
    XMLVM_CLASS_INIT(java_security_PrivilegedAction)
 
97
 
 
98
    __TIB_java_nio_charset_Charset_1.implementedInterfaces[0][0] = &__TIB_java_security_PrivilegedAction;
 
99
    // Initialize itable for this class
 
100
    __TIB_java_nio_charset_Charset_1.itableBegin = &__TIB_java_nio_charset_Charset_1.itable[0];
 
101
    __TIB_java_nio_charset_Charset_1.itable[XMLVM_ITABLE_IDX_java_security_PrivilegedAction_run__] = __TIB_java_nio_charset_Charset_1.vtable[6];
 
102
 
 
103
 
 
104
    __TIB_java_nio_charset_Charset_1.declaredFields = &__field_reflection_data[0];
 
105
    __TIB_java_nio_charset_Charset_1.numDeclaredFields = sizeof(__field_reflection_data) / sizeof(XMLVM_FIELD_REFLECTION_DATA);
 
106
    __TIB_java_nio_charset_Charset_1.constructorDispatcherFunc = constructor_dispatcher;
 
107
    __TIB_java_nio_charset_Charset_1.declaredConstructors = &__constructor_reflection_data[0];
 
108
    __TIB_java_nio_charset_Charset_1.numDeclaredConstructors = sizeof(__constructor_reflection_data) / sizeof(XMLVM_CONSTRUCTOR_REFLECTION_DATA);
 
109
    __TIB_java_nio_charset_Charset_1.methodDispatcherFunc = method_dispatcher;
 
110
    __TIB_java_nio_charset_Charset_1.declaredMethods = &__method_reflection_data[0];
 
111
    __TIB_java_nio_charset_Charset_1.numDeclaredMethods = sizeof(__method_reflection_data) / sizeof(XMLVM_METHOD_REFLECTION_DATA);
 
112
    __CLASS_java_nio_charset_Charset_1 = XMLVM_CREATE_CLASS_OBJECT(&__TIB_java_nio_charset_Charset_1);
 
113
    __TIB_java_nio_charset_Charset_1.clazz = __CLASS_java_nio_charset_Charset_1;
 
114
    __TIB_java_nio_charset_Charset_1.baseType = JAVA_NULL;
 
115
    __CLASS_java_nio_charset_Charset_1_1ARRAY = XMLVM_CREATE_ARRAY_CLASS_OBJECT(__CLASS_java_nio_charset_Charset_1);
 
116
    __CLASS_java_nio_charset_Charset_1_2ARRAY = XMLVM_CREATE_ARRAY_CLASS_OBJECT(__CLASS_java_nio_charset_Charset_1_1ARRAY);
 
117
    __CLASS_java_nio_charset_Charset_1_3ARRAY = XMLVM_CREATE_ARRAY_CLASS_OBJECT(__CLASS_java_nio_charset_Charset_1_2ARRAY);
 
118
    //XMLVM_BEGIN_WRAPPER[__INIT_java_nio_charset_Charset_1]
 
119
    //XMLVM_END_WRAPPER
 
120
 
 
121
    __TIB_java_nio_charset_Charset_1.classInitialized = 1;
 
122
}
 
123
 
 
124
void __DELETE_java_nio_charset_Charset_1(void* me, void* client_data)
 
125
{
 
126
    //XMLVM_BEGIN_WRAPPER[__DELETE_java_nio_charset_Charset_1]
 
127
    //XMLVM_END_WRAPPER
 
128
}
 
129
 
 
130
void __INIT_INSTANCE_MEMBERS_java_nio_charset_Charset_1(JAVA_OBJECT me, int derivedClassWillRegisterFinalizer)
 
131
{
 
132
    __INIT_INSTANCE_MEMBERS_java_lang_Object(me, 0 || derivedClassWillRegisterFinalizer);
 
133
    //XMLVM_BEGIN_WRAPPER[__INIT_INSTANCE_MEMBERS_java_nio_charset_Charset_1]
 
134
    //XMLVM_END_WRAPPER
 
135
}
 
136
 
 
137
JAVA_OBJECT __NEW_java_nio_charset_Charset_1()
 
138
{    XMLVM_CLASS_INIT(java_nio_charset_Charset_1)
 
139
java_nio_charset_Charset_1* me = (java_nio_charset_Charset_1*) XMLVM_MALLOC(sizeof(java_nio_charset_Charset_1));
 
140
    me->tib = &__TIB_java_nio_charset_Charset_1;
 
141
    __INIT_INSTANCE_MEMBERS_java_nio_charset_Charset_1(me, 0);
 
142
    //XMLVM_BEGIN_WRAPPER[__NEW_java_nio_charset_Charset_1]
 
143
    //XMLVM_END_WRAPPER
 
144
    return me;
 
145
}
 
146
 
 
147
JAVA_OBJECT __NEW_INSTANCE_java_nio_charset_Charset_1()
 
148
{
 
149
    JAVA_OBJECT me = JAVA_NULL;
 
150
    me = __NEW_java_nio_charset_Charset_1();
 
151
    java_nio_charset_Charset_1___INIT___(me);
 
152
    return me;
 
153
}
 
154
 
 
155
void java_nio_charset_Charset_1___INIT___(JAVA_OBJECT me)
 
156
{
 
157
    //XMLVM_BEGIN_WRAPPER[java_nio_charset_Charset_1___INIT___]
 
158
    XMLVM_ENTER_METHOD("java.nio.charset.Charset$1", "<init>", "?")
 
159
    XMLVMElem _r0;
 
160
    _r0.o = me;
 
161
    XMLVM_SOURCE_POSITION("Charset.java", 117)
 
162
    XMLVM_CHECK_NPE(0)
 
163
    java_lang_Object___INIT___(_r0.o);
 
164
    XMLVM_SOURCE_POSITION("Charset.java", 1)
 
165
    XMLVM_EXIT_METHOD()
 
166
    return;
 
167
    //XMLVM_END_WRAPPER
 
168
}
 
169
 
 
170
JAVA_OBJECT java_nio_charset_Charset_1_run__(JAVA_OBJECT me)
 
171
{
 
172
    //XMLVM_BEGIN_WRAPPER[java_nio_charset_Charset_1_run__]
 
173
    XMLVM_ENTER_METHOD("java.nio.charset.Charset$1", "run", "?")
 
174
    XMLVMElem _r0;
 
175
    XMLVMElem _r1;
 
176
    _r1.o = me;
 
177
    XMLVM_SOURCE_POSITION("Charset.java", 119)
 
178
    _r0.o = __NEW_org_apache_harmony_niochar_CharsetProviderImpl();
 
179
    XMLVM_CHECK_NPE(0)
 
180
    org_apache_harmony_niochar_CharsetProviderImpl___INIT___(_r0.o);
 
181
    XMLVM_EXIT_METHOD()
 
182
    return _r0.o;
 
183
    //XMLVM_END_WRAPPER
 
184
}
 
185