1 /* This file has been automatically generated from "util.m4.c" */
2
3 /*
4 ----------------------------------------------------------------------
5 _svmf_get_byte_array_element
6 ----------------------------------------------------------------------
7 */
8
9 inline static jbyte
_svmf_get_byte_array_element(_svmt_array_instance * array,jint indx)10 _svmf_get_byte_array_element (_svmt_array_instance *array, jint indx)
11 {
12 jbyte *elements;
13
14 #ifndef _SABLEVM_INLINED_THREADED_INTERPRETER
15 assert (array != NULL);
16 assert (array->vtable->type->is_array);
17 assert (indx >= 0 && indx < array->size);
18 #endif
19
20 elements = (jbyte *) (void *)
21 (((char *) array) + _svmf_aligned_size_t (sizeof (_svmt_array_instance)));
22
23 return elements[indx];
24 }
25
26 /*
27 ----------------------------------------------------------------------
28 _svmf_set_byte_array_element
29 ----------------------------------------------------------------------
30 */
31
32 inline static void
_svmf_set_byte_array_element(_svmt_array_instance * array,jint indx,jbyte value)33 _svmf_set_byte_array_element (_svmt_array_instance *array, jint indx, jbyte value)
34 {
35 jbyte *elements;
36
37 #ifndef _SABLEVM_INLINED_THREADED_INTERPRETER
38 assert (array != NULL);
39 assert (array->vtable->type->is_array);
40 assert (indx >= 0 && indx < array->size);
41 #endif
42
43 elements = (jbyte *) (void *)
44 (((char *) array) + _svmf_aligned_size_t (sizeof (_svmt_array_instance)));
45
46 elements[indx] = value;
47 }
48
49
50 /*
51 ----------------------------------------------------------------------
52 _svmf_get_char_array_element
53 ----------------------------------------------------------------------
54 */
55
56 inline static jchar
_svmf_get_char_array_element(_svmt_array_instance * array,jint indx)57 _svmf_get_char_array_element (_svmt_array_instance *array, jint indx)
58 {
59 jchar *elements;
60
61 #ifndef _SABLEVM_INLINED_THREADED_INTERPRETER
62 assert (array != NULL);
63 assert (array->vtable->type->is_array);
64 assert (indx >= 0 && indx < array->size);
65 #endif
66
67 elements = (jchar *) (void *)
68 (((char *) array) + _svmf_aligned_size_t (sizeof (_svmt_array_instance)));
69
70 return elements[indx];
71 }
72
73 /*
74 ----------------------------------------------------------------------
75 _svmf_set_char_array_element
76 ----------------------------------------------------------------------
77 */
78
79 inline static void
_svmf_set_char_array_element(_svmt_array_instance * array,jint indx,jchar value)80 _svmf_set_char_array_element (_svmt_array_instance *array, jint indx, jchar value)
81 {
82 jchar *elements;
83
84 #ifndef _SABLEVM_INLINED_THREADED_INTERPRETER
85 assert (array != NULL);
86 assert (array->vtable->type->is_array);
87 assert (indx >= 0 && indx < array->size);
88 #endif
89
90 elements = (jchar *) (void *)
91 (((char *) array) + _svmf_aligned_size_t (sizeof (_svmt_array_instance)));
92
93 elements[indx] = value;
94 }
95
96
97 /*
98 ----------------------------------------------------------------------
99 _svmf_get_short_array_element
100 ----------------------------------------------------------------------
101 */
102
103 inline static jshort
_svmf_get_short_array_element(_svmt_array_instance * array,jint indx)104 _svmf_get_short_array_element (_svmt_array_instance *array, jint indx)
105 {
106 jshort *elements;
107
108 #ifndef _SABLEVM_INLINED_THREADED_INTERPRETER
109 assert (array != NULL);
110 assert (array->vtable->type->is_array);
111 assert (indx >= 0 && indx < array->size);
112 #endif
113
114 elements = (jshort *) (void *)
115 (((char *) array) + _svmf_aligned_size_t (sizeof (_svmt_array_instance)));
116
117 return elements[indx];
118 }
119
120 /*
121 ----------------------------------------------------------------------
122 _svmf_set_short_array_element
123 ----------------------------------------------------------------------
124 */
125
126 inline static void
_svmf_set_short_array_element(_svmt_array_instance * array,jint indx,jshort value)127 _svmf_set_short_array_element (_svmt_array_instance *array, jint indx, jshort value)
128 {
129 jshort *elements;
130
131 #ifndef _SABLEVM_INLINED_THREADED_INTERPRETER
132 assert (array != NULL);
133 assert (array->vtable->type->is_array);
134 assert (indx >= 0 && indx < array->size);
135 #endif
136
137 elements = (jshort *) (void *)
138 (((char *) array) + _svmf_aligned_size_t (sizeof (_svmt_array_instance)));
139
140 elements[indx] = value;
141 }
142
143
144 /*
145 ----------------------------------------------------------------------
146 _svmf_get_int_array_element
147 ----------------------------------------------------------------------
148 */
149
150 inline static jint
_svmf_get_int_array_element(_svmt_array_instance * array,jint indx)151 _svmf_get_int_array_element (_svmt_array_instance *array, jint indx)
152 {
153 jint *elements;
154
155 #ifndef _SABLEVM_INLINED_THREADED_INTERPRETER
156 assert (array != NULL);
157 assert (array->vtable->type->is_array);
158 assert (indx >= 0 && indx < array->size);
159 #endif
160
161 elements = (jint *) (void *)
162 (((char *) array) + _svmf_aligned_size_t (sizeof (_svmt_array_instance)));
163
164 return elements[indx];
165 }
166
167 /*
168 ----------------------------------------------------------------------
169 _svmf_set_int_array_element
170 ----------------------------------------------------------------------
171 */
172
173 inline static void
_svmf_set_int_array_element(_svmt_array_instance * array,jint indx,jint value)174 _svmf_set_int_array_element (_svmt_array_instance *array, jint indx, jint value)
175 {
176 jint *elements;
177
178 #ifndef _SABLEVM_INLINED_THREADED_INTERPRETER
179 assert (array != NULL);
180 assert (array->vtable->type->is_array);
181 assert (indx >= 0 && indx < array->size);
182 #endif
183
184 elements = (jint *) (void *)
185 (((char *) array) + _svmf_aligned_size_t (sizeof (_svmt_array_instance)));
186
187 elements[indx] = value;
188 }
189
190
191 /*
192 ----------------------------------------------------------------------
193 _svmf_get_long_array_element
194 ----------------------------------------------------------------------
195 */
196
197 inline static jlong
_svmf_get_long_array_element(_svmt_array_instance * array,jint indx)198 _svmf_get_long_array_element (_svmt_array_instance *array, jint indx)
199 {
200 jlong *elements;
201
202 #ifndef _SABLEVM_INLINED_THREADED_INTERPRETER
203 assert (array != NULL);
204 assert (array->vtable->type->is_array);
205 assert (indx >= 0 && indx < array->size);
206 #endif
207
208 elements = (jlong *) (void *)
209 (((char *) array) + _svmf_aligned_size_t (sizeof (_svmt_array_instance)));
210
211 return elements[indx];
212 }
213
214 /*
215 ----------------------------------------------------------------------
216 _svmf_set_long_array_element
217 ----------------------------------------------------------------------
218 */
219
220 inline static void
_svmf_set_long_array_element(_svmt_array_instance * array,jint indx,jlong value)221 _svmf_set_long_array_element (_svmt_array_instance *array, jint indx, jlong value)
222 {
223 jlong *elements;
224
225 #ifndef _SABLEVM_INLINED_THREADED_INTERPRETER
226 assert (array != NULL);
227 assert (array->vtable->type->is_array);
228 assert (indx >= 0 && indx < array->size);
229 #endif
230
231 elements = (jlong *) (void *)
232 (((char *) array) + _svmf_aligned_size_t (sizeof (_svmt_array_instance)));
233
234 elements[indx] = value;
235 }
236
237
238 /*
239 ----------------------------------------------------------------------
240 _svmf_get_float_array_element
241 ----------------------------------------------------------------------
242 */
243
244 inline static jfloat
_svmf_get_float_array_element(_svmt_array_instance * array,jint indx)245 _svmf_get_float_array_element (_svmt_array_instance *array, jint indx)
246 {
247 jfloat *elements;
248
249 #ifndef _SABLEVM_INLINED_THREADED_INTERPRETER
250 assert (array != NULL);
251 assert (array->vtable->type->is_array);
252 assert (indx >= 0 && indx < array->size);
253 #endif
254
255 elements = (jfloat *) (void *)
256 (((char *) array) + _svmf_aligned_size_t (sizeof (_svmt_array_instance)));
257
258 return elements[indx];
259 }
260
261 /*
262 ----------------------------------------------------------------------
263 _svmf_set_float_array_element
264 ----------------------------------------------------------------------
265 */
266
267 inline static void
_svmf_set_float_array_element(_svmt_array_instance * array,jint indx,jfloat value)268 _svmf_set_float_array_element (_svmt_array_instance *array, jint indx, jfloat value)
269 {
270 jfloat *elements;
271
272 #ifndef _SABLEVM_INLINED_THREADED_INTERPRETER
273 assert (array != NULL);
274 assert (array->vtable->type->is_array);
275 assert (indx >= 0 && indx < array->size);
276 #endif
277
278 elements = (jfloat *) (void *)
279 (((char *) array) + _svmf_aligned_size_t (sizeof (_svmt_array_instance)));
280
281 elements[indx] = value;
282 }
283
284
285 /*
286 ----------------------------------------------------------------------
287 _svmf_get_double_array_element
288 ----------------------------------------------------------------------
289 */
290
291 inline static jdouble
_svmf_get_double_array_element(_svmt_array_instance * array,jint indx)292 _svmf_get_double_array_element (_svmt_array_instance *array, jint indx)
293 {
294 jdouble *elements;
295
296 #ifndef _SABLEVM_INLINED_THREADED_INTERPRETER
297 assert (array != NULL);
298 assert (array->vtable->type->is_array);
299 assert (indx >= 0 && indx < array->size);
300 #endif
301
302 elements = (jdouble *) (void *)
303 (((char *) array) + _svmf_aligned_size_t (sizeof (_svmt_array_instance)));
304
305 return elements[indx];
306 }
307
308 /*
309 ----------------------------------------------------------------------
310 _svmf_set_double_array_element
311 ----------------------------------------------------------------------
312 */
313
314 inline static void
_svmf_set_double_array_element(_svmt_array_instance * array,jint indx,jdouble value)315 _svmf_set_double_array_element (_svmt_array_instance *array, jint indx, jdouble value)
316 {
317 jdouble *elements;
318
319 #ifndef _SABLEVM_INLINED_THREADED_INTERPRETER
320 assert (array != NULL);
321 assert (array->vtable->type->is_array);
322 assert (indx >= 0 && indx < array->size);
323 #endif
324
325 elements = (jdouble *) (void *)
326 (((char *) array) + _svmf_aligned_size_t (sizeof (_svmt_array_instance)));
327
328 elements[indx] = value;
329 }
330
331
332 /*
333 ----------------------------------------------------------------------
334 _svmf_get_BYTE_field
335 ----------------------------------------------------------------------
336 */
337
338 inline static jbyte
_svmf_get_BYTE_field(_svmt_object_instance * instance,size_t offset)339 _svmf_get_BYTE_field (_svmt_object_instance *instance, size_t offset)
340 {
341 return *((jbyte *) (void *) (((char *) instance) + offset));
342 }
343
344 /*
345 ----------------------------------------------------------------------
346 _svmf_put_BYTE_field
347 ----------------------------------------------------------------------
348 */
349
350 inline static void
_svmf_put_BYTE_field(_svmt_object_instance * instance,size_t offset,jbyte value)351 _svmf_put_BYTE_field (_svmt_object_instance *instance, size_t offset, jbyte value)
352 {
353 *((jbyte *) (void *) (((char *) instance) + offset)) = value;
354 }
355
356
357 /*
358 ----------------------------------------------------------------------
359 _svmf_get_CHAR_field
360 ----------------------------------------------------------------------
361 */
362
363 inline static jchar
_svmf_get_CHAR_field(_svmt_object_instance * instance,size_t offset)364 _svmf_get_CHAR_field (_svmt_object_instance *instance, size_t offset)
365 {
366 return *((jchar *) (void *) (((char *) instance) + offset));
367 }
368
369 /*
370 ----------------------------------------------------------------------
371 _svmf_put_CHAR_field
372 ----------------------------------------------------------------------
373 */
374
375 inline static void
_svmf_put_CHAR_field(_svmt_object_instance * instance,size_t offset,jchar value)376 _svmf_put_CHAR_field (_svmt_object_instance *instance, size_t offset, jchar value)
377 {
378 *((jchar *) (void *) (((char *) instance) + offset)) = value;
379 }
380
381
382 /*
383 ----------------------------------------------------------------------
384 _svmf_get_SHORT_field
385 ----------------------------------------------------------------------
386 */
387
388 inline static jshort
_svmf_get_SHORT_field(_svmt_object_instance * instance,size_t offset)389 _svmf_get_SHORT_field (_svmt_object_instance *instance, size_t offset)
390 {
391 return *((jshort *) (void *) (((char *) instance) + offset));
392 }
393
394 /*
395 ----------------------------------------------------------------------
396 _svmf_put_SHORT_field
397 ----------------------------------------------------------------------
398 */
399
400 inline static void
_svmf_put_SHORT_field(_svmt_object_instance * instance,size_t offset,jshort value)401 _svmf_put_SHORT_field (_svmt_object_instance *instance, size_t offset, jshort value)
402 {
403 *((jshort *) (void *) (((char *) instance) + offset)) = value;
404 }
405
406
407 /*
408 ----------------------------------------------------------------------
409 _svmf_get_INT_field
410 ----------------------------------------------------------------------
411 */
412
413 inline static jint
_svmf_get_INT_field(_svmt_object_instance * instance,size_t offset)414 _svmf_get_INT_field (_svmt_object_instance *instance, size_t offset)
415 {
416 return *((jint *) (void *) (((char *) instance) + offset));
417 }
418
419 /*
420 ----------------------------------------------------------------------
421 _svmf_put_INT_field
422 ----------------------------------------------------------------------
423 */
424
425 inline static void
_svmf_put_INT_field(_svmt_object_instance * instance,size_t offset,jint value)426 _svmf_put_INT_field (_svmt_object_instance *instance, size_t offset, jint value)
427 {
428 *((jint *) (void *) (((char *) instance) + offset)) = value;
429 }
430
431
432 /*
433 ----------------------------------------------------------------------
434 _svmf_get_LONG_field
435 ----------------------------------------------------------------------
436 */
437
438 inline static jlong
_svmf_get_LONG_field(_svmt_object_instance * instance,size_t offset)439 _svmf_get_LONG_field (_svmt_object_instance *instance, size_t offset)
440 {
441 return *((jlong *) (void *) (((char *) instance) + offset));
442 }
443
444 /*
445 ----------------------------------------------------------------------
446 _svmf_put_LONG_field
447 ----------------------------------------------------------------------
448 */
449
450 inline static void
_svmf_put_LONG_field(_svmt_object_instance * instance,size_t offset,jlong value)451 _svmf_put_LONG_field (_svmt_object_instance *instance, size_t offset, jlong value)
452 {
453 *((jlong *) (void *) (((char *) instance) + offset)) = value;
454 }
455
456
457 /*
458 ----------------------------------------------------------------------
459 _svmf_get_FLOAT_field
460 ----------------------------------------------------------------------
461 */
462
463 inline static jfloat
_svmf_get_FLOAT_field(_svmt_object_instance * instance,size_t offset)464 _svmf_get_FLOAT_field (_svmt_object_instance *instance, size_t offset)
465 {
466 return *((jfloat *) (void *) (((char *) instance) + offset));
467 }
468
469 /*
470 ----------------------------------------------------------------------
471 _svmf_put_FLOAT_field
472 ----------------------------------------------------------------------
473 */
474
475 inline static void
_svmf_put_FLOAT_field(_svmt_object_instance * instance,size_t offset,jfloat value)476 _svmf_put_FLOAT_field (_svmt_object_instance *instance, size_t offset, jfloat value)
477 {
478 *((jfloat *) (void *) (((char *) instance) + offset)) = value;
479 }
480
481
482 /*
483 ----------------------------------------------------------------------
484 _svmf_get_DOUBLE_field
485 ----------------------------------------------------------------------
486 */
487
488 inline static jdouble
_svmf_get_DOUBLE_field(_svmt_object_instance * instance,size_t offset)489 _svmf_get_DOUBLE_field (_svmt_object_instance *instance, size_t offset)
490 {
491 return *((jdouble *) (void *) (((char *) instance) + offset));
492 }
493
494 /*
495 ----------------------------------------------------------------------
496 _svmf_put_DOUBLE_field
497 ----------------------------------------------------------------------
498 */
499
500 inline static void
_svmf_put_DOUBLE_field(_svmt_object_instance * instance,size_t offset,jdouble value)501 _svmf_put_DOUBLE_field (_svmt_object_instance *instance, size_t offset, jdouble value)
502 {
503 *((jdouble *) (void *) (((char *) instance) + offset)) = value;
504 }
505
506
507 /*
508 ----------------------------------------------------------------------
509 _svmf_get_BOOLEAN_static
510 ----------------------------------------------------------------------
511 */
512
513 inline static jboolean
_svmf_get_BOOLEAN_static(jvalue * pvalue)514 _svmf_get_BOOLEAN_static (jvalue *pvalue)
515 {
516 return pvalue->z;
517 }
518
519 /*
520 ----------------------------------------------------------------------
521 _svmf_put_BOOLEAN_static
522 ----------------------------------------------------------------------
523 */
524
525 inline static void
_svmf_put_BOOLEAN_static(jvalue * pvalue,jboolean value)526 _svmf_put_BOOLEAN_static (jvalue *pvalue, jboolean value)
527 {
528 pvalue->z = value;
529 }
530
531
532 /*
533 ----------------------------------------------------------------------
534 _svmf_get_BYTE_static
535 ----------------------------------------------------------------------
536 */
537
538 inline static jbyte
_svmf_get_BYTE_static(jvalue * pvalue)539 _svmf_get_BYTE_static (jvalue *pvalue)
540 {
541 return pvalue->b;
542 }
543
544 /*
545 ----------------------------------------------------------------------
546 _svmf_put_BYTE_static
547 ----------------------------------------------------------------------
548 */
549
550 inline static void
_svmf_put_BYTE_static(jvalue * pvalue,jbyte value)551 _svmf_put_BYTE_static (jvalue *pvalue, jbyte value)
552 {
553 pvalue->b = value;
554 }
555
556
557 /*
558 ----------------------------------------------------------------------
559 _svmf_get_CHAR_static
560 ----------------------------------------------------------------------
561 */
562
563 inline static jchar
_svmf_get_CHAR_static(jvalue * pvalue)564 _svmf_get_CHAR_static (jvalue *pvalue)
565 {
566 return pvalue->c;
567 }
568
569 /*
570 ----------------------------------------------------------------------
571 _svmf_put_CHAR_static
572 ----------------------------------------------------------------------
573 */
574
575 inline static void
_svmf_put_CHAR_static(jvalue * pvalue,jchar value)576 _svmf_put_CHAR_static (jvalue *pvalue, jchar value)
577 {
578 pvalue->c = value;
579 }
580
581
582 /*
583 ----------------------------------------------------------------------
584 _svmf_get_SHORT_static
585 ----------------------------------------------------------------------
586 */
587
588 inline static jshort
_svmf_get_SHORT_static(jvalue * pvalue)589 _svmf_get_SHORT_static (jvalue *pvalue)
590 {
591 return pvalue->s;
592 }
593
594 /*
595 ----------------------------------------------------------------------
596 _svmf_put_SHORT_static
597 ----------------------------------------------------------------------
598 */
599
600 inline static void
_svmf_put_SHORT_static(jvalue * pvalue,jshort value)601 _svmf_put_SHORT_static (jvalue *pvalue, jshort value)
602 {
603 pvalue->s = value;
604 }
605
606
607 /*
608 ----------------------------------------------------------------------
609 _svmf_get_INT_static
610 ----------------------------------------------------------------------
611 */
612
613 inline static jint
_svmf_get_INT_static(jvalue * pvalue)614 _svmf_get_INT_static (jvalue *pvalue)
615 {
616 return pvalue->i;
617 }
618
619 /*
620 ----------------------------------------------------------------------
621 _svmf_put_INT_static
622 ----------------------------------------------------------------------
623 */
624
625 inline static void
_svmf_put_INT_static(jvalue * pvalue,jint value)626 _svmf_put_INT_static (jvalue *pvalue, jint value)
627 {
628 pvalue->i = value;
629 }
630
631
632 /*
633 ----------------------------------------------------------------------
634 _svmf_get_LONG_static
635 ----------------------------------------------------------------------
636 */
637
638 inline static jlong
_svmf_get_LONG_static(jvalue * pvalue)639 _svmf_get_LONG_static (jvalue *pvalue)
640 {
641 return pvalue->j;
642 }
643
644 /*
645 ----------------------------------------------------------------------
646 _svmf_put_LONG_static
647 ----------------------------------------------------------------------
648 */
649
650 inline static void
_svmf_put_LONG_static(jvalue * pvalue,jlong value)651 _svmf_put_LONG_static (jvalue *pvalue, jlong value)
652 {
653 pvalue->j = value;
654 }
655
656
657 /*
658 ----------------------------------------------------------------------
659 _svmf_get_FLOAT_static
660 ----------------------------------------------------------------------
661 */
662
663 inline static jfloat
_svmf_get_FLOAT_static(jvalue * pvalue)664 _svmf_get_FLOAT_static (jvalue *pvalue)
665 {
666 return pvalue->f;
667 }
668
669 /*
670 ----------------------------------------------------------------------
671 _svmf_put_FLOAT_static
672 ----------------------------------------------------------------------
673 */
674
675 inline static void
_svmf_put_FLOAT_static(jvalue * pvalue,jfloat value)676 _svmf_put_FLOAT_static (jvalue *pvalue, jfloat value)
677 {
678 pvalue->f = value;
679 }
680
681
682 /*
683 ----------------------------------------------------------------------
684 _svmf_get_DOUBLE_static
685 ----------------------------------------------------------------------
686 */
687
688 inline static jdouble
_svmf_get_DOUBLE_static(jvalue * pvalue)689 _svmf_get_DOUBLE_static (jvalue *pvalue)
690 {
691 return pvalue->d;
692 }
693
694 /*
695 ----------------------------------------------------------------------
696 _svmf_put_DOUBLE_static
697 ----------------------------------------------------------------------
698 */
699
700 inline static void
_svmf_put_DOUBLE_static(jvalue * pvalue,jdouble value)701 _svmf_put_DOUBLE_static (jvalue *pvalue, jdouble value)
702 {
703 pvalue->d = value;
704 }
705
706