-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathjni.inc
266 lines (256 loc) · 11.7 KB
/
jni.inc
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
; Java Native Interface
; NASM include file
; Copyright (C) 2002 Matthijs Laan <[email protected]>
; jboolean constants
JNI_FALSE equ 0
JNI_TRUE equ 1
; possible return values for JNI functions
JNI_OK equ 0 ; success
JNI_ERR equ -1 ; unknown error
JNI_EDETACHED equ -2 ; thread detached from the VM
JNI_EVERSION equ -3 ; JNI version error
JNI_ENOMEM equ -4 ; not enough memory
JNI_EEXIST equ -5 ; VM already created
JNI_EINVAL equ -6 ; invalid arguments
; used in ReleaseScalarArrayElements
JNI_COMMIT equ 1
JNI_ABORT equ 2
; used in RegisterNatives to describe native method name, signature,
; and function pointer
struc JNINativeMethod
.name resd 1
.signature resd 1
.fnPtr resd 1
endstruc
; JNI Native Method Interface
struc JNIEnv
.reserved0 resd 1
.reserved1 resd 1
.reserved2 resd 1
.reserved3 resd 1
.GetVersion resd 1
.DefineClass resd 1
.FindClass resd 1
.FromReflectedMethod resd 1
.FromReflectedField resd 1
.ToReflectedMethod resd 1
.GetSuperclass resd 1
.IsAssignableFrom resd 1
.ToReflectedField resd 1
.Throw resd 1
.ThrowNew resd 1
.ExceptionOccurred resd 1
.ExceptionDescribe resd 1
.ExceptionClear resd 1
.FatalError resd 1
.PushLocalFrame resd 1
.PopLocalFrame resd 1
.NewGlobalRef resd 1
.DeleteGlobalRef resd 1
.DeleteLocalRef resd 1
.IsSameObject resd 1
.NewLocalRef resd 1
.EnsureLocalCapacity resd 1
.AllocObject resd 1
.NewObject resd 1
.NewObjectV resd 1
.NewObjectA resd 1
.GetObjectClass resd 1
.IsInstanceOf resd 1
.GetMethodID resd 1
.CallObjectMethod resd 1
.CallObjectMethodV resd 1
.CallObjectMethodA resd 1
.CallBooleanMethod resd 1
.CallBooleanMethodV resd 1
.CallBooleanMethodA resd 1
.CallByteMethod resd 1
.CallByteMethodV resd 1
.CallByteMethodA resd 1
.CallCharMethod resd 1
.CallCharMethodV resd 1
.CallCharMethodA resd 1
.CallShortMethod resd 1
.CallShortMethodV resd 1
.CallShortMethodA resd 1
.CallIntMethod resd 1
.CallIntMethodV resd 1
.CallIntMethodA resd 1
.CallLongMethod resd 1
.CallLongMethodV resd 1
.CallLongMethodA resd 1
.CallFloatMethod resd 1
.CallFloatMethodV resd 1
.CallFloatMethodA resd 1
.CallDoubleMethod resd 1
.CallDoubleMethodV resd 1
.CallDoubleMethodA resd 1
.CallVoidMethod resd 1
.CallVoidMethodV resd 1
.CallVoidMethodA resd 1
.CallNonvirtualObjectMethod resd 1
.CallNonvirtualObjectMethodV resd 1
.CallNonvirtualObjectMethodA resd 1
.CallNonvirtualBooleanMethod resd 1
.CallNonvirtualBooleanMethodV resd 1
.CallNonvirtualBooleanMethodA resd 1
.CallNonvirtualByteMethod resd 1
.CallNonvirtualByteMethodV resd 1
.CallNonvirtualByteMethodA resd 1
.CallNonvirtualCharMethod resd 1
.CallNonvirtualCharMethodV resd 1
.CallNonvirtualCharMethodA resd 1
.CallNonvirtualShortMethod resd 1
.CallNonvirtualShortMethodV resd 1
.CallNonvirtualShortMethodA resd 1
.CallNonvirtualIntMethod resd 1
.CallNonvirtualIntMethodV resd 1
.CallNonvirtualIntMethodA resd 1
.CallNonvirtualLongMethod resd 1
.CallNonvirtualLongMethodV resd 1
.CallNonvirtualLongMethodA resd 1
.CallNonvirtualFloatMethod resd 1
.CallNonvirtualFloatMethodV resd 1
.CallNonvirtualFloatMethodA resd 1
.CallNonvirtualDoubleMethod resd 1
.CallNonvirtualDoubleMethodV resd 1
.CallNonvirtualDoubleMethodA resd 1
.CallNonvirtualVoidMethod resd 1
.CallNonvirtualVoidMethodV resd 1
.CallNonvirtualVoidMethodA resd 1
.GetFieldID resd 1
.GetObjectField resd 1
.GetBooleanField resd 1
.GetByteField resd 1
.GetCharField resd 1
.GetShortField resd 1
.GetIntField resd 1
.GetLongField resd 1
.GetFloatField resd 1
.GetDoubleField resd 1
.SetObjectField resd 1
.SetBooleanField resd 1
.SetByteField resd 1
.SetCharField resd 1
.SetShortField resd 1
.SetIntField resd 1
.SetLongField resd 1
.SetFloatField resd 1
.SetDoubleField resd 1
.GetStaticMethodID resd 1
.CallStaticObjectMethod resd 1
.CallStaticObjectMethodV resd 1
.CallStaticObjectMethodA resd 1
.CallStaticBooleanMethod resd 1
.CallStaticBooleanMethodV resd 1
.CallStaticBooleanMethodA resd 1
.CallStaticByteMethod resd 1
.CallStaticByteMethodV resd 1
.CallStaticByteMethodA resd 1
.CallStaticCharMethod resd 1
.CallStaticCharMethodV resd 1
.CallStaticCharMethodA resd 1
.CallStaticShortMethod resd 1
.CallStaticShortMethodV resd 1
.CallStaticShortMethodA resd 1
.CallStaticIntMethod resd 1
.CallStaticIntMethodV resd 1
.CallStaticIntMethodA resd 1
.CallStaticLongMethod resd 1
.CallStaticLongMethodV resd 1
.CallStaticLongMethodA resd 1
.CallStaticFloatMethod resd 1
.CallStaticFloatMethodV resd 1
.CallStaticFloatMethodA resd 1
.CallStaticDoubleMethod resd 1
.CallStaticDoubleMethodV resd 1
.CallStaticDoubleMethodA resd 1
.CallStaticVoidMethod resd 1
.CallStaticVoidMethodV resd 1
.CallStaticVoidMethodA resd 1
.GetStaticFieldID resd 1
.GetStaticObjectField resd 1
.GetStaticBooleanField resd 1
.GetStaticByteField resd 1
.GetStaticCharField resd 1
.GetStaticShortField resd 1
.GetStaticIntField resd 1
.GetStaticLongField resd 1
.GetStaticFloatField resd 1
.GetStaticDoubleField resd 1
.SetStaticObjectField resd 1
.SetStaticBooleanField resd 1
.SetStaticByteField resd 1
.SetStaticCharField resd 1
.SetStaticShortField resd 1
.SetStaticIntField resd 1
.SetStaticLongField resd 1
.SetStaticFloatField resd 1
.SetStaticDoubleField resd 1
.NewString resd 1
.GetStringLength resd 1
.GetStringChars resd 1
.ReleaseStringChars resd 1
.NewStringUTF resd 1
.GetStringUTFLength resd 1
.GetStringUTFChars resd 1
.ReleaseStringUTFChars resd 1
.GetArrayLength resd 1
.NewObjectArray resd 1
.GetObjectArrayElement resd 1
.SetObjectArrayElement resd 1
.NewBooleanArray resd 1
.NewByteArray resd 1
.NewCharArray resd 1
.NewShortArray resd 1
.NewIntArray resd 1
.NewLongArray resd 1
.NewFloatArray resd 1
.NewDoubleArray resd 1
.GetBooleanArrayElements resd 1
.GetByteArrayElements resd 1
.GetCharArrayElements resd 1
.GetShortArrayElements resd 1
.GetIntArrayElements resd 1
.GetLongArrayElements resd 1
.GetFloatArrayElements resd 1
.GetDoubleArrayElements resd 1
.ReleaseBooleanArrayElements resd 1
.ReleaseByteArrayElements resd 1
.ReleaseCharArrayElements resd 1
.ReleaseShortArrayElements resd 1
.ReleaseIntArrayElements resd 1
.ReleaseLongArrayElements resd 1
.ReleaseFloatArrayElements resd 1
.ReleaseDoubleArrayElements resd 1
.GetBooleanArrayRegion resd 1
.GetByteArrayRegion resd 1
.GetCharArrayRegion resd 1
.GetShortArrayRegion resd 1
.GetIntArrayRegion resd 1
.GetLongArrayRegion resd 1
.GetFloatArrayRegion resd 1
.GetDoubleArrayRegion resd 1
.SetBooleanArrayRegion resd 1
.SetByteArrayRegion resd 1
.SetCharArrayRegion resd 1
.SetShortArrayRegion resd 1
.SetIntArrayRegion resd 1
.SetLongArrayRegion resd 1
.SetFloatArrayRegion resd 1
.SetDoubleArrayRegion resd 1
.RegisterNatives resd 1
.UnregisterNatives resd 1
.MonitorEnter resd 1
.MonitorExit resd 1
.GetJavaVM resd 1
.GetStringRegion resd 1
.GetStringUTFRegion resd 1
.GetPrimitiveArrayCritical resd 1
.ReleasePrimitiveArrayCritical resd 1
.GetStringCritical resd 1
.ReleaseStringCritical resd 1
.NewWeakGlobalRef resd 1
.DeleteWeakGlobalRef resd 1
.ExceptionCheck resd 1
endstruc