-
Notifications
You must be signed in to change notification settings - Fork 747
/
Copy pathjnifield.cpp
478 lines (433 loc) · 21 KB
/
jnifield.cpp
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
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
/*******************************************************************************
* Copyright IBM Corp. and others 2021
*
* This program and the accompanying materials are made available under
* the terms of the Eclipse Public License 2.0 which accompanies this
* distribution and is available at https://www.eclipse.org/legal/epl-2.0/
* or the Apache License, Version 2.0 which accompanies this distribution and
* is available at https://www.apache.org/licenses/LICENSE-2.0.
*
* This Source Code may also be made available under the following
* Secondary Licenses when the conditions for such availability set
* forth in the Eclipse Public License, v. 2.0 are satisfied: GNU
* General Public License, version 2 with the GNU Classpath
* Exception [1] and GNU General Public License, version 2 with the
* OpenJDK Assembly Exception [2].
*
* [1] https://www.gnu.org/software/classpath/license.html
* [2] https://openjdk.org/legal/assembly-exception.html
*
* SPDX-License-Identifier: EPL-2.0 OR Apache-2.0 OR GPL-2.0-only WITH Classpath-exception-2.0 OR GPL-2.0-only WITH OpenJDK-assembly-exception-1.0
*******************************************************************************/
#include "j9vm31.h"
jobject JNICALL
GetObjectField(JNIEnv *env, jobject obj, jfieldID fieldID)
{
const jint NUM_ARGS = 3;
J9_CEL4RO64_ArgType argTypes[NUM_ARGS] = { CEL4RO64_type_JNIEnv64, CEL4RO64_type_jobject, CEL4RO64_type_jfieldID };
uint64_t argValues[NUM_ARGS] = { JNIENV64_FROM_JNIENV31(env), obj, fieldID };
jobject returnValue;
FUNCTION_DESCRIPTOR_FROM_JNIENV31(env, GetObjectField);
j9_cel4ro64_call_function(functionDescriptor, argTypes, argValues, NUM_ARGS, CEL4RO64_type_jobject, &returnValue);
return returnValue;
}
jboolean JNICALL
GetBooleanField(JNIEnv *env, jobject obj, jfieldID fieldID)
{
const jint NUM_ARGS = 3;
J9_CEL4RO64_ArgType argTypes[NUM_ARGS] = { CEL4RO64_type_JNIEnv64, CEL4RO64_type_jobject, CEL4RO64_type_jfieldID };
uint64_t argValues[NUM_ARGS] = { JNIENV64_FROM_JNIENV31(env), obj, fieldID };
jboolean returnValue;
FUNCTION_DESCRIPTOR_FROM_JNIENV31(env, GetBooleanField);
j9_cel4ro64_call_function(functionDescriptor, argTypes, argValues, NUM_ARGS, CEL4RO64_type_jboolean, &returnValue);
return returnValue;
}
jbyte JNICALL
GetByteField(JNIEnv *env, jobject obj, jfieldID fieldID)
{
const jint NUM_ARGS = 3;
J9_CEL4RO64_ArgType argTypes[NUM_ARGS] = { CEL4RO64_type_JNIEnv64, CEL4RO64_type_jobject, CEL4RO64_type_jfieldID };
uint64_t argValues[NUM_ARGS] = { JNIENV64_FROM_JNIENV31(env), obj, fieldID };
jbyte returnValue;
FUNCTION_DESCRIPTOR_FROM_JNIENV31(env, GetByteField);
j9_cel4ro64_call_function(functionDescriptor, argTypes, argValues, NUM_ARGS, CEL4RO64_type_jbyte, &returnValue);
return returnValue;
}
jchar JNICALL
GetCharField(JNIEnv *env, jobject obj, jfieldID fieldID)
{
const jint NUM_ARGS = 3;
J9_CEL4RO64_ArgType argTypes[NUM_ARGS] = { CEL4RO64_type_JNIEnv64, CEL4RO64_type_jobject, CEL4RO64_type_jfieldID };
uint64_t argValues[NUM_ARGS] = { JNIENV64_FROM_JNIENV31(env), obj, fieldID };
jchar returnValue;
FUNCTION_DESCRIPTOR_FROM_JNIENV31(env, GetCharField);
j9_cel4ro64_call_function(functionDescriptor, argTypes, argValues, NUM_ARGS, CEL4RO64_type_jchar, &returnValue);
return returnValue;
}
jshort JNICALL
GetShortField(JNIEnv *env, jobject obj, jfieldID fieldID)
{
const jint NUM_ARGS = 3;
J9_CEL4RO64_ArgType argTypes[NUM_ARGS] = { CEL4RO64_type_JNIEnv64, CEL4RO64_type_jobject, CEL4RO64_type_jfieldID };
uint64_t argValues[NUM_ARGS] = { JNIENV64_FROM_JNIENV31(env), obj, fieldID };
jshort returnValue;
FUNCTION_DESCRIPTOR_FROM_JNIENV31(env, GetShortField);
j9_cel4ro64_call_function(functionDescriptor, argTypes, argValues, NUM_ARGS, CEL4RO64_type_jshort, &returnValue);
return returnValue;
}
jint JNICALL
GetIntField(JNIEnv *env, jobject obj, jfieldID fieldID)
{
const jint NUM_ARGS = 3;
J9_CEL4RO64_ArgType argTypes[NUM_ARGS] = { CEL4RO64_type_JNIEnv64, CEL4RO64_type_jobject, CEL4RO64_type_jfieldID };
uint64_t argValues[NUM_ARGS] = { JNIENV64_FROM_JNIENV31(env), obj, fieldID };
jint returnValue;
FUNCTION_DESCRIPTOR_FROM_JNIENV31(env, GetIntField);
j9_cel4ro64_call_function(functionDescriptor, argTypes, argValues, NUM_ARGS, CEL4RO64_type_jint, &returnValue);
return returnValue;
}
jlong JNICALL
GetLongField(JNIEnv *env, jobject obj, jfieldID fieldID)
{
const jint NUM_ARGS = 3;
J9_CEL4RO64_ArgType argTypes[NUM_ARGS] = { CEL4RO64_type_JNIEnv64, CEL4RO64_type_jobject, CEL4RO64_type_jfieldID };
uint64_t argValues[NUM_ARGS] = { JNIENV64_FROM_JNIENV31(env), obj, fieldID };
jlong returnValue;
FUNCTION_DESCRIPTOR_FROM_JNIENV31(env, GetLongField);
j9_cel4ro64_call_function(functionDescriptor, argTypes, argValues, NUM_ARGS, CEL4RO64_type_jlong, &returnValue);
return returnValue;
}
jfloat JNICALL
GetFloatField(JNIEnv *env, jobject obj, jfieldID fieldID)
{
const jint NUM_ARGS = 3;
J9_CEL4RO64_ArgType argTypes[NUM_ARGS] = { CEL4RO64_type_JNIEnv64, CEL4RO64_type_jobject, CEL4RO64_type_jfieldID };
uint64_t argValues[NUM_ARGS] = { JNIENV64_FROM_JNIENV31(env), obj, fieldID };
jfloat returnValue;
FUNCTION_DESCRIPTOR_FROM_JNIENV31(env, GetFloatField);
j9_cel4ro64_call_function(functionDescriptor, argTypes, argValues, NUM_ARGS, CEL4RO64_type_jfloat, &returnValue);
return returnValue;
}
jdouble JNICALL
GetDoubleField(JNIEnv *env, jobject obj, jfieldID fieldID)
{
const jint NUM_ARGS = 3;
J9_CEL4RO64_ArgType argTypes[NUM_ARGS] = { CEL4RO64_type_JNIEnv64, CEL4RO64_type_jobject, CEL4RO64_type_jfieldID };
uint64_t argValues[NUM_ARGS] = { JNIENV64_FROM_JNIENV31(env), obj, fieldID };
jdouble returnValue;
FUNCTION_DESCRIPTOR_FROM_JNIENV31(env, GetDoubleField);
j9_cel4ro64_call_function(functionDescriptor, argTypes, argValues, NUM_ARGS, CEL4RO64_type_jdouble, &returnValue);
return returnValue;
}
void JNICALL
SetObjectField(JNIEnv *env, jobject obj, jfieldID fieldID, jobject value)
{
const jint NUM_ARGS = 4;
J9_CEL4RO64_ArgType argTypes[NUM_ARGS] = { CEL4RO64_type_JNIEnv64, CEL4RO64_type_jobject, CEL4RO64_type_jfieldID, CEL4RO64_type_jobject};
uint64_t argValues[NUM_ARGS] = { JNIENV64_FROM_JNIENV31(env), obj, fieldID, value };
FUNCTION_DESCRIPTOR_FROM_JNIENV31(env, SetObjectField);
j9_cel4ro64_call_function(functionDescriptor, argTypes, argValues, NUM_ARGS, CEL4RO64_type_void, NULL);
return;
}
void JNICALL
SetBooleanField(JNIEnv *env, jobject obj, jfieldID fieldID, jboolean value)
{
const jint NUM_ARGS = 4;
J9_CEL4RO64_ArgType argTypes[NUM_ARGS] = { CEL4RO64_type_JNIEnv64, CEL4RO64_type_jobject, CEL4RO64_type_jfieldID, CEL4RO64_type_jboolean};
uint64_t argValues[NUM_ARGS] = { JNIENV64_FROM_JNIENV31(env), obj, fieldID, value };
FUNCTION_DESCRIPTOR_FROM_JNIENV31(env, SetBooleanField);
j9_cel4ro64_call_function(functionDescriptor, argTypes, argValues, NUM_ARGS, CEL4RO64_type_void, NULL);
return;
}
void JNICALL
SetByteField(JNIEnv *env, jobject obj, jfieldID fieldID, jbyte value)
{
const jint NUM_ARGS = 4;
J9_CEL4RO64_ArgType argTypes[NUM_ARGS] = { CEL4RO64_type_JNIEnv64, CEL4RO64_type_jobject, CEL4RO64_type_jfieldID, CEL4RO64_type_jbyte};
uint64_t argValues[NUM_ARGS] = { JNIENV64_FROM_JNIENV31(env), obj, fieldID, value };
FUNCTION_DESCRIPTOR_FROM_JNIENV31(env, SetByteField);
j9_cel4ro64_call_function(functionDescriptor, argTypes, argValues, NUM_ARGS, CEL4RO64_type_void, NULL);
return;
}
void JNICALL
SetCharField(JNIEnv *env, jobject obj, jfieldID fieldID, jchar value)
{
const jint NUM_ARGS = 4;
J9_CEL4RO64_ArgType argTypes[NUM_ARGS] = { CEL4RO64_type_JNIEnv64, CEL4RO64_type_jobject, CEL4RO64_type_jfieldID, CEL4RO64_type_jchar};
uint64_t argValues[NUM_ARGS] = { JNIENV64_FROM_JNIENV31(env), obj, fieldID, value };
FUNCTION_DESCRIPTOR_FROM_JNIENV31(env, SetCharField);
j9_cel4ro64_call_function(functionDescriptor, argTypes, argValues, NUM_ARGS, CEL4RO64_type_void, NULL);
return;
}
void JNICALL
SetShortField(JNIEnv *env, jobject obj, jfieldID fieldID, jshort value)
{
const jint NUM_ARGS = 4;
J9_CEL4RO64_ArgType argTypes[NUM_ARGS] = { CEL4RO64_type_JNIEnv64, CEL4RO64_type_jobject, CEL4RO64_type_jfieldID, CEL4RO64_type_jshort};
uint64_t argValues[NUM_ARGS] = { JNIENV64_FROM_JNIENV31(env), obj, fieldID, value };
FUNCTION_DESCRIPTOR_FROM_JNIENV31(env, SetShortField);
j9_cel4ro64_call_function(functionDescriptor, argTypes, argValues, NUM_ARGS, CEL4RO64_type_void, NULL);
return;
}
void JNICALL
SetIntField(JNIEnv *env, jobject obj, jfieldID fieldID, jint value)
{
const jint NUM_ARGS = 4;
J9_CEL4RO64_ArgType argTypes[NUM_ARGS] = { CEL4RO64_type_JNIEnv64, CEL4RO64_type_jobject, CEL4RO64_type_jfieldID, CEL4RO64_type_jint};
uint64_t argValues[NUM_ARGS] = { JNIENV64_FROM_JNIENV31(env), obj, fieldID, value };
FUNCTION_DESCRIPTOR_FROM_JNIENV31(env, SetIntField);
j9_cel4ro64_call_function(functionDescriptor, argTypes, argValues, NUM_ARGS, CEL4RO64_type_void, NULL);
return;
}
void JNICALL
SetLongField(JNIEnv *env, jobject obj, jfieldID fieldID, jlong value)
{
const jint NUM_ARGS = 4;
J9_CEL4RO64_ArgType argTypes[NUM_ARGS] = { CEL4RO64_type_JNIEnv64, CEL4RO64_type_jobject, CEL4RO64_type_jfieldID, CEL4RO64_type_jlong};
uint64_t argValues[NUM_ARGS] = { JNIENV64_FROM_JNIENV31(env), obj, fieldID, value };
FUNCTION_DESCRIPTOR_FROM_JNIENV31(env, SetLongField);
j9_cel4ro64_call_function(functionDescriptor, argTypes, argValues, NUM_ARGS, CEL4RO64_type_void, NULL);
return;
}
void JNICALL
SetFloatField(JNIEnv *env, jobject obj, jfieldID fieldID, jfloat value)
{
const jint NUM_ARGS = 4;
J9_CEL4RO64_ArgType argTypes[NUM_ARGS] = { CEL4RO64_type_JNIEnv64, CEL4RO64_type_jobject, CEL4RO64_type_jfieldID, CEL4RO64_type_jfloat};
uint64_t argValues[NUM_ARGS] = { JNIENV64_FROM_JNIENV31(env), obj, fieldID, 0 };
/* Floating point parameters requires special handling */
jfloat *floatArgPtr = (jfloat *)(&(argValues[3]));
*floatArgPtr = value;
FUNCTION_DESCRIPTOR_FROM_JNIENV31(env, SetFloatField);
j9_cel4ro64_call_function(functionDescriptor, argTypes, argValues, NUM_ARGS, CEL4RO64_type_void, NULL);
return;
}
void JNICALL
SetDoubleField(JNIEnv *env, jobject obj, jfieldID fieldID, jdouble value)
{
const jint NUM_ARGS = 4;
J9_CEL4RO64_ArgType argTypes[NUM_ARGS] = { CEL4RO64_type_JNIEnv64, CEL4RO64_type_jobject, CEL4RO64_type_jfieldID, CEL4RO64_type_jdouble};
uint64_t argValues[NUM_ARGS] = { JNIENV64_FROM_JNIENV31(env), obj, fieldID, 0 };
/* Floating point parameters requires special handling */
jdouble *doubleArgPtr = (jdouble *)(&(argValues[3]));
*doubleArgPtr = value;
FUNCTION_DESCRIPTOR_FROM_JNIENV31(env, SetDoubleField);
j9_cel4ro64_call_function(functionDescriptor, argTypes, argValues, NUM_ARGS, CEL4RO64_type_void, NULL);
return;
}
jobject JNICALL
GetStaticObjectField(JNIEnv *env, jclass clazz, jfieldID fieldID)
{
const jint NUM_ARGS = 3;
J9_CEL4RO64_ArgType argTypes[NUM_ARGS] = { CEL4RO64_type_JNIEnv64, CEL4RO64_type_jobject, CEL4RO64_type_jfieldID };
uint64_t argValues[NUM_ARGS] = { JNIENV64_FROM_JNIENV31(env), clazz, fieldID };
jobject returnValue;
FUNCTION_DESCRIPTOR_FROM_JNIENV31(env, GetStaticObjectField);
j9_cel4ro64_call_function(functionDescriptor, argTypes, argValues, NUM_ARGS, CEL4RO64_type_jobject, &returnValue);
return returnValue;
}
jboolean JNICALL
GetStaticBooleanField(JNIEnv *env, jclass clazz, jfieldID fieldID)
{
const jint NUM_ARGS = 3;
J9_CEL4RO64_ArgType argTypes[NUM_ARGS] = { CEL4RO64_type_JNIEnv64, CEL4RO64_type_jobject, CEL4RO64_type_jfieldID };
uint64_t argValues[NUM_ARGS] = { JNIENV64_FROM_JNIENV31(env), clazz, fieldID };
jboolean returnValue;
FUNCTION_DESCRIPTOR_FROM_JNIENV31(env, GetStaticBooleanField);
j9_cel4ro64_call_function(functionDescriptor, argTypes, argValues, NUM_ARGS, CEL4RO64_type_jboolean, &returnValue);
return returnValue;
}
jbyte JNICALL
GetStaticByteField(JNIEnv *env, jclass clazz, jfieldID fieldID)
{
const jint NUM_ARGS = 3;
J9_CEL4RO64_ArgType argTypes[NUM_ARGS] = { CEL4RO64_type_JNIEnv64, CEL4RO64_type_jobject, CEL4RO64_type_jfieldID };
uint64_t argValues[NUM_ARGS] = { JNIENV64_FROM_JNIENV31(env), clazz, fieldID };
jbyte returnValue;
FUNCTION_DESCRIPTOR_FROM_JNIENV31(env, GetStaticByteField);
j9_cel4ro64_call_function(functionDescriptor, argTypes, argValues, NUM_ARGS, CEL4RO64_type_jbyte, &returnValue);
return returnValue;
}
jchar JNICALL
GetStaticCharField(JNIEnv *env, jclass clazz, jfieldID fieldID)
{
const jint NUM_ARGS = 3;
J9_CEL4RO64_ArgType argTypes[NUM_ARGS] = { CEL4RO64_type_JNIEnv64, CEL4RO64_type_jobject, CEL4RO64_type_jfieldID };
uint64_t argValues[NUM_ARGS] = { JNIENV64_FROM_JNIENV31(env), clazz, fieldID };
jchar returnValue;
FUNCTION_DESCRIPTOR_FROM_JNIENV31(env, GetStaticCharField);
j9_cel4ro64_call_function(functionDescriptor, argTypes, argValues, NUM_ARGS, CEL4RO64_type_jchar, &returnValue);
return returnValue;
}
jshort JNICALL
GetStaticShortField(JNIEnv *env, jclass clazz, jfieldID fieldID)
{
const jint NUM_ARGS = 3;
J9_CEL4RO64_ArgType argTypes[NUM_ARGS] = { CEL4RO64_type_JNIEnv64, CEL4RO64_type_jobject, CEL4RO64_type_jfieldID };
uint64_t argValues[NUM_ARGS] = { JNIENV64_FROM_JNIENV31(env), clazz, fieldID };
jshort returnValue;
FUNCTION_DESCRIPTOR_FROM_JNIENV31(env, GetStaticShortField);
j9_cel4ro64_call_function(functionDescriptor, argTypes, argValues, NUM_ARGS, CEL4RO64_type_jshort, &returnValue);
return returnValue;
}
jint JNICALL
GetStaticIntField(JNIEnv *env, jclass clazz, jfieldID fieldID)
{
const jint NUM_ARGS = 3;
J9_CEL4RO64_ArgType argTypes[NUM_ARGS] = { CEL4RO64_type_JNIEnv64, CEL4RO64_type_jobject, CEL4RO64_type_jfieldID };
uint64_t argValues[NUM_ARGS] = { JNIENV64_FROM_JNIENV31(env), clazz, fieldID };
jint returnValue;
FUNCTION_DESCRIPTOR_FROM_JNIENV31(env, GetStaticIntField);
j9_cel4ro64_call_function(functionDescriptor, argTypes, argValues, NUM_ARGS, CEL4RO64_type_jint, &returnValue);
return returnValue;
}
jlong JNICALL
GetStaticLongField(JNIEnv *env, jclass clazz, jfieldID fieldID)
{
const jint NUM_ARGS = 3;
J9_CEL4RO64_ArgType argTypes[NUM_ARGS] = { CEL4RO64_type_JNIEnv64, CEL4RO64_type_jobject, CEL4RO64_type_jfieldID };
uint64_t argValues[NUM_ARGS] = { JNIENV64_FROM_JNIENV31(env), clazz, fieldID };
jlong returnValue;
FUNCTION_DESCRIPTOR_FROM_JNIENV31(env, GetStaticLongField);
j9_cel4ro64_call_function(functionDescriptor, argTypes, argValues, NUM_ARGS, CEL4RO64_type_jlong, &returnValue);
return returnValue;
}
jfloat JNICALL
GetStaticFloatField(JNIEnv *env, jclass clazz, jfieldID fieldID)
{
const jint NUM_ARGS = 3;
J9_CEL4RO64_ArgType argTypes[NUM_ARGS] = { CEL4RO64_type_JNIEnv64, CEL4RO64_type_jobject, CEL4RO64_type_jfieldID };
uint64_t argValues[NUM_ARGS] = { JNIENV64_FROM_JNIENV31(env), clazz, fieldID };
jfloat returnValue;
FUNCTION_DESCRIPTOR_FROM_JNIENV31(env, GetStaticFloatField);
j9_cel4ro64_call_function(functionDescriptor, argTypes, argValues, NUM_ARGS, CEL4RO64_type_jfloat, &returnValue);
return returnValue;
}
jdouble JNICALL
GetStaticDoubleField(JNIEnv *env, jclass clazz, jfieldID fieldID)
{
const jint NUM_ARGS = 3;
J9_CEL4RO64_ArgType argTypes[NUM_ARGS] = { CEL4RO64_type_JNIEnv64, CEL4RO64_type_jobject, CEL4RO64_type_jfieldID };
uint64_t argValues[NUM_ARGS] = { JNIENV64_FROM_JNIENV31(env), clazz, fieldID };
jdouble returnValue;
FUNCTION_DESCRIPTOR_FROM_JNIENV31(env, GetStaticDoubleField);
j9_cel4ro64_call_function(functionDescriptor, argTypes, argValues, NUM_ARGS, CEL4RO64_type_jdouble, &returnValue);
return returnValue;
}
void JNICALL
SetStaticObjectField(JNIEnv *env, jclass clazz, jfieldID fieldID, jobject value)
{
const jint NUM_ARGS = 4;
J9_CEL4RO64_ArgType argTypes[NUM_ARGS] = { CEL4RO64_type_JNIEnv64, CEL4RO64_type_jobject, CEL4RO64_type_jfieldID, CEL4RO64_type_jobject};
uint64_t argValues[NUM_ARGS] = { JNIENV64_FROM_JNIENV31(env), clazz, fieldID, value };
FUNCTION_DESCRIPTOR_FROM_JNIENV31(env, SetStaticObjectField);
j9_cel4ro64_call_function(functionDescriptor, argTypes, argValues, NUM_ARGS, CEL4RO64_type_void, NULL);
return;
}
void JNICALL
SetStaticBooleanField(JNIEnv *env, jclass clazz, jfieldID fieldID, jboolean value)
{
const jint NUM_ARGS = 4;
J9_CEL4RO64_ArgType argTypes[NUM_ARGS] = { CEL4RO64_type_JNIEnv64, CEL4RO64_type_jobject, CEL4RO64_type_jfieldID, CEL4RO64_type_jboolean};
uint64_t argValues[NUM_ARGS] = { JNIENV64_FROM_JNIENV31(env), clazz, fieldID, value };
FUNCTION_DESCRIPTOR_FROM_JNIENV31(env, SetStaticBooleanField);
j9_cel4ro64_call_function(functionDescriptor, argTypes, argValues, NUM_ARGS, CEL4RO64_type_void, NULL);
return;
}
void JNICALL
SetStaticByteField(JNIEnv *env, jclass clazz, jfieldID fieldID, jbyte value)
{
const jint NUM_ARGS = 4;
J9_CEL4RO64_ArgType argTypes[NUM_ARGS] = { CEL4RO64_type_JNIEnv64, CEL4RO64_type_jobject, CEL4RO64_type_jfieldID, CEL4RO64_type_jbyte};
uint64_t argValues[NUM_ARGS] = { JNIENV64_FROM_JNIENV31(env), clazz, fieldID, value };
FUNCTION_DESCRIPTOR_FROM_JNIENV31(env, SetStaticByteField);
j9_cel4ro64_call_function(functionDescriptor, argTypes, argValues, NUM_ARGS, CEL4RO64_type_void, NULL);
return;
}
void JNICALL
SetStaticCharField(JNIEnv *env, jclass clazz, jfieldID fieldID, jchar value)
{
const jint NUM_ARGS = 4;
J9_CEL4RO64_ArgType argTypes[NUM_ARGS] = { CEL4RO64_type_JNIEnv64, CEL4RO64_type_jobject, CEL4RO64_type_jfieldID, CEL4RO64_type_jchar};
uint64_t argValues[NUM_ARGS] = { JNIENV64_FROM_JNIENV31(env), clazz, fieldID, value };
FUNCTION_DESCRIPTOR_FROM_JNIENV31(env, SetStaticCharField);
j9_cel4ro64_call_function(functionDescriptor, argTypes, argValues, NUM_ARGS, CEL4RO64_type_void, NULL);
return;
}
void JNICALL
SetStaticShortField(JNIEnv *env, jclass clazz, jfieldID fieldID, jshort value)
{
const jint NUM_ARGS = 4;
J9_CEL4RO64_ArgType argTypes[NUM_ARGS] = { CEL4RO64_type_JNIEnv64, CEL4RO64_type_jobject, CEL4RO64_type_jfieldID, CEL4RO64_type_jshort};
uint64_t argValues[NUM_ARGS] = { JNIENV64_FROM_JNIENV31(env), clazz, fieldID, value };
FUNCTION_DESCRIPTOR_FROM_JNIENV31(env, SetStaticShortField);
j9_cel4ro64_call_function(functionDescriptor, argTypes, argValues, NUM_ARGS, CEL4RO64_type_void, NULL);
return;
}
void JNICALL
SetStaticIntField(JNIEnv *env, jclass clazz, jfieldID fieldID, jint value)
{
const jint NUM_ARGS = 4;
J9_CEL4RO64_ArgType argTypes[NUM_ARGS] = { CEL4RO64_type_JNIEnv64, CEL4RO64_type_jobject, CEL4RO64_type_jfieldID, CEL4RO64_type_jint};
uint64_t argValues[NUM_ARGS] = { JNIENV64_FROM_JNIENV31(env), clazz, fieldID, value };
FUNCTION_DESCRIPTOR_FROM_JNIENV31(env, SetStaticIntField);
j9_cel4ro64_call_function(functionDescriptor, argTypes, argValues, NUM_ARGS, CEL4RO64_type_void, NULL);
return;
}
void JNICALL
SetStaticLongField(JNIEnv *env, jclass clazz, jfieldID fieldID, jlong value)
{
const jint NUM_ARGS = 4;
J9_CEL4RO64_ArgType argTypes[NUM_ARGS] = { CEL4RO64_type_JNIEnv64, CEL4RO64_type_jobject, CEL4RO64_type_jfieldID, CEL4RO64_type_jlong};
uint64_t argValues[NUM_ARGS] = { JNIENV64_FROM_JNIENV31(env), clazz, fieldID, value };
FUNCTION_DESCRIPTOR_FROM_JNIENV31(env, SetStaticLongField);
j9_cel4ro64_call_function(functionDescriptor, argTypes, argValues, NUM_ARGS, CEL4RO64_type_void, NULL);
return;
}
void JNICALL
SetStaticFloatField(JNIEnv *env, jclass clazz, jfieldID fieldID, jfloat value)
{
const jint NUM_ARGS = 4;
J9_CEL4RO64_ArgType argTypes[NUM_ARGS] = { CEL4RO64_type_JNIEnv64, CEL4RO64_type_jobject, CEL4RO64_type_jfieldID, CEL4RO64_type_jfloat};
uint64_t argValues[NUM_ARGS] = { JNIENV64_FROM_JNIENV31(env), clazz, fieldID, 0 };
/* Floating point parameters requires special handling */
jfloat *floatArgPtr = (jfloat *)(&(argValues[3]));
*floatArgPtr = value;
FUNCTION_DESCRIPTOR_FROM_JNIENV31(env, SetStaticFloatField);
j9_cel4ro64_call_function(functionDescriptor, argTypes, argValues, NUM_ARGS, CEL4RO64_type_void, NULL);
return;
}
void JNICALL
SetStaticDoubleField(JNIEnv *env, jclass clazz, jfieldID fieldID, jdouble value)
{
const jint NUM_ARGS = 4;
J9_CEL4RO64_ArgType argTypes[NUM_ARGS] = { CEL4RO64_type_JNIEnv64, CEL4RO64_type_jobject, CEL4RO64_type_jfieldID, CEL4RO64_type_jdouble};
uint64_t argValues[NUM_ARGS] = { JNIENV64_FROM_JNIENV31(env), clazz, fieldID, 0 };
/* Floating point parameters requires special handling */
jdouble *doubleArgPtr = (jdouble *)(&(argValues[3]));
*doubleArgPtr = value;
FUNCTION_DESCRIPTOR_FROM_JNIENV31(env, SetStaticDoubleField);
j9_cel4ro64_call_function(functionDescriptor, argTypes, argValues, NUM_ARGS, CEL4RO64_type_void, NULL);
return;
}
jobject JNICALL
GetObjectArrayElement(JNIEnv *env, jobjectArray array, jsize index)
{
const jint NUM_ARGS = 3;
J9_CEL4RO64_ArgType argTypes[NUM_ARGS] = { CEL4RO64_type_JNIEnv64, CEL4RO64_type_jarray, CEL4RO64_type_jsize };
uint64_t argValues[NUM_ARGS] = { JNIENV64_FROM_JNIENV31(env), array, index };
jobject returnValue;
FUNCTION_DESCRIPTOR_FROM_JNIENV31(env, GetObjectArrayElement);
j9_cel4ro64_call_function(functionDescriptor, argTypes, argValues, NUM_ARGS, CEL4RO64_type_jobject, &returnValue);
return returnValue;
}
void JNICALL
SetObjectArrayElement(JNIEnv *env, jobjectArray array, jsize index, jobject value)
{
const jint NUM_ARGS = 4;
J9_CEL4RO64_ArgType argTypes[NUM_ARGS] = { CEL4RO64_type_JNIEnv64, CEL4RO64_type_jarray, CEL4RO64_type_jsize, CEL4RO64_type_jobject };
uint64_t argValues[NUM_ARGS] = { JNIENV64_FROM_JNIENV31(env), array, index , value };
FUNCTION_DESCRIPTOR_FROM_JNIENV31(env, SetObjectArrayElement);
j9_cel4ro64_call_function(functionDescriptor, argTypes, argValues, NUM_ARGS, CEL4RO64_type_void, NULL);
return;
}