imm_union value;
- switch (f->parseddesc->decltype) {
+ switch (f->parseddesc->primitivetype) {
case PRIMITIVETYPE_BOOLEAN:
case PRIMITIVETYPE_BYTE:
case PRIMITIVETYPE_CHAR:
/* Now box the primitive types. */
- java_handle_t* object = Primitive::box(f->parseddesc->decltype, value);
+ java_handle_t* object = Primitive::box(f->parseddesc->primitivetype, value);
return (jobject) object;
}
/* check the field type and return the value */
- switch (f->parseddesc->decltype) {
+ switch (f->parseddesc->primitivetype) {
case PRIMITIVETYPE_BOOLEAN:
return (int32_t) _field_get_int(f, ho);
default:
/* check the field type and return the value */
- switch (f->parseddesc->decltype) {
+ switch (f->parseddesc->primitivetype) {
case PRIMITIVETYPE_BYTE:
return (int32_t) _field_get_int(f, ho);
default:
/* check the field type and return the value */
- switch (f->parseddesc->decltype) {
+ switch (f->parseddesc->primitivetype) {
case PRIMITIVETYPE_CHAR:
return (int32_t) _field_get_int(f, ho);
default:
/* check the field type and return the value */
- switch (f->parseddesc->decltype) {
+ switch (f->parseddesc->primitivetype) {
case PRIMITIVETYPE_BYTE:
case PRIMITIVETYPE_SHORT:
return (int32_t) _field_get_int(f, ho);
/* check the field type and return the value */
- switch (f->parseddesc->decltype) {
+ switch (f->parseddesc->primitivetype) {
case PRIMITIVETYPE_BYTE:
case PRIMITIVETYPE_CHAR:
case PRIMITIVETYPE_SHORT:
/* check the field type and return the value */
- switch (f->parseddesc->decltype) {
+ switch (f->parseddesc->primitivetype) {
case PRIMITIVETYPE_BYTE:
case PRIMITIVETYPE_CHAR:
case PRIMITIVETYPE_SHORT:
/* check the field type and return the value */
- switch (f->parseddesc->decltype) {
+ switch (f->parseddesc->primitivetype) {
case PRIMITIVETYPE_BYTE:
case PRIMITIVETYPE_CHAR:
case PRIMITIVETYPE_SHORT:
/* check the field type and return the value */
- switch (f->parseddesc->decltype) {
+ switch (f->parseddesc->primitivetype) {
case PRIMITIVETYPE_BYTE:
case PRIMITIVETYPE_CHAR:
case PRIMITIVETYPE_SHORT:
types the value has to be retrieved from the wrapping
object */
- switch (df->parseddesc->decltype) {
+ switch (df->parseddesc->primitivetype) {
case PRIMITIVETYPE_BOOLEAN: {
int32_t val;
if ((sc == NULL) || !(sf = class_findfield(sc, utf_value, utf_Z)))
break;
- switch (sf->parseddesc->decltype) {
+ switch (sf->parseddesc->primitivetype) {
case PRIMITIVETYPE_BOOLEAN:
val = java_lang_Boolean(hvalue).get_value();
break;
if ((sc == NULL) || !(sf = class_findfield(sc, utf_value, utf_B)))
break;
- switch (sf->parseddesc->decltype) {
+ switch (sf->parseddesc->primitivetype) {
case PRIMITIVETYPE_BYTE:
val = java_lang_Byte(hvalue).get_value();
break;
if ((sc == NULL) || !(sf = class_findfield(sc, utf_value, utf_C)))
break;
- switch (sf->parseddesc->decltype) {
+ switch (sf->parseddesc->primitivetype) {
case PRIMITIVETYPE_CHAR:
val = java_lang_Character(hvalue).get_value();
break;
if ((sc == NULL) || !(sf = class_findfield_by_name(sc, utf_value)))
break;
- switch (sf->parseddesc->decltype) {
+ switch (sf->parseddesc->primitivetype) {
case PRIMITIVETYPE_BYTE:
val = java_lang_Byte(hvalue).get_value();
break;
if ((sc == NULL) || !(sf = class_findfield_by_name(sc, utf_value)))
break;
- switch (sf->parseddesc->decltype) {
+ switch (sf->parseddesc->primitivetype) {
case PRIMITIVETYPE_BYTE:
val = java_lang_Byte(hvalue).get_value();
break;
if ((sc == NULL) || !(sf = class_findfield_by_name(sc, utf_value)))
break;
- switch (sf->parseddesc->decltype) {
+ switch (sf->parseddesc->primitivetype) {
case PRIMITIVETYPE_BYTE:
val = java_lang_Byte(hvalue).get_value();
break;
if ((sc == NULL) || !(sf = class_findfield_by_name(sc, utf_value)))
break;
- switch (sf->parseddesc->decltype) {
+ switch (sf->parseddesc->primitivetype) {
case PRIMITIVETYPE_BYTE:
val = java_lang_Byte(hvalue).get_value();
break;
if ((sc == NULL) || !(sf = class_findfield_by_name(sc, utf_value)))
break;
- switch (sf->parseddesc->decltype) {
+ switch (sf->parseddesc->primitivetype) {
case PRIMITIVETYPE_BYTE:
val = java_lang_Byte(hvalue).get_value();
break;
/* check the field type and set the value */
- switch (f->parseddesc->decltype) {
+ switch (f->parseddesc->primitivetype) {
case PRIMITIVETYPE_BOOLEAN:
_field_set_int(f, ho, value);
break;
/* check the field type and set the value */
- switch (f->parseddesc->decltype) {
+ switch (f->parseddesc->primitivetype) {
case PRIMITIVETYPE_BYTE:
case PRIMITIVETYPE_SHORT:
case PRIMITIVETYPE_INT:
/* check the field type and set the value */
- switch (f->parseddesc->decltype) {
+ switch (f->parseddesc->primitivetype) {
case PRIMITIVETYPE_CHAR:
case PRIMITIVETYPE_INT:
_field_set_int(f, ho, value);
/* check the field type and set the value */
- switch (f->parseddesc->decltype) {
+ switch (f->parseddesc->primitivetype) {
case PRIMITIVETYPE_SHORT:
case PRIMITIVETYPE_INT:
_field_set_int(f, ho, value);
/* check the field type and set the value */
- switch (f->parseddesc->decltype) {
+ switch (f->parseddesc->primitivetype) {
case PRIMITIVETYPE_INT:
_field_set_int(f, ho, value);
break;
/* check the field type and set the value */
- switch (f->parseddesc->decltype) {
+ switch (f->parseddesc->primitivetype) {
case PRIMITIVETYPE_LONG:
_field_set_long(f, ho, value);
break;
/* check the field type and set the value */
- switch (f->parseddesc->decltype) {
+ switch (f->parseddesc->primitivetype) {
case PRIMITIVETYPE_FLOAT:
_field_set_float(f, ho, value);
break;
/* check the field type and set the value */
- switch (f->parseddesc->decltype) {
+ switch (f->parseddesc->primitivetype) {
case PRIMITIVETYPE_DOUBLE:
_field_set_double(f, ho, value);
break;
}
for (j = 0; i < md->paramcount; i++, j++, pd++, td++) {
- switch (td->decltype) {
+ switch (td->primitivetype) {
case TYPE_INT:
argument_vmarray_store_int(array, pd, args[j].i);
break;
LLNI_class_get(param, c);
type = Primitive_get_type_by_wrapperclass(c);
- switch (td->decltype) {
+ switch (td->primitivetype) {
case PRIMITIVETYPE_BOOLEAN:
switch (type) {
case PRIMITIVETYPE_BOOLEAN:
default:
vm_abort("argument_vmarray_from_objectarray: invalid type %d",
- td->decltype);
+ td->primitivetype);
}
value = Primitive_unbox(param);
LLNI_class_get(param, c);
type = Primitive_get_type_by_wrapperclass(c);
- assert(td->decltype == PRIMITIVETYPE_LONG);
+ assert(td->primitivetype == PRIMITIVETYPE_LONG);
switch (type) {
case PRIMITIVETYPE_BYTE:
LLNI_class_get(param, c);
type = Primitive_get_type_by_wrapperclass(c);
- assert(td->decltype == PRIMITIVETYPE_FLOAT);
+ assert(td->primitivetype == PRIMITIVETYPE_FLOAT);
switch (type) {
case PRIMITIVETYPE_FLOAT:
LLNI_class_get(param, c);
type = Primitive_get_type_by_wrapperclass(c);
- assert(td->decltype == PRIMITIVETYPE_DOUBLE);
+ assert(td->primitivetype == PRIMITIVETYPE_DOUBLE);
switch (type) {
case PRIMITIVETYPE_FLOAT:
if (name) {
/* a reference type */
td->type = TYPE_ADR;
- td->decltype = TYPE_ADR;
+ td->primitivetype = TYPE_ADR;
td->arraydim = 0;
for (utf_ptr = name->text; *utf_ptr == '['; ++utf_ptr)
td->arraydim++;
/* a primitive type */
switch (*utf_ptr) {
case 'B':
- td->decltype = PRIMITIVETYPE_BYTE;
+ td->primitivetype = PRIMITIVETYPE_BYTE;
td->type = TYPE_INT;
break;
case 'C':
- td->decltype = PRIMITIVETYPE_CHAR;
+ td->primitivetype = PRIMITIVETYPE_CHAR;
td->type = TYPE_INT;
break;
case 'S':
- td->decltype = PRIMITIVETYPE_SHORT;
+ td->primitivetype = PRIMITIVETYPE_SHORT;
td->type = TYPE_INT;
break;
case 'Z':
- td->decltype = PRIMITIVETYPE_BOOLEAN;
+ td->primitivetype = PRIMITIVETYPE_BOOLEAN;
td->type = TYPE_INT;
break;
case 'I':
- td->decltype = PRIMITIVETYPE_INT;
+ td->primitivetype = PRIMITIVETYPE_INT;
td->type = TYPE_INT;
break;
case 'D':
- td->decltype = PRIMITIVETYPE_DOUBLE;
+ td->primitivetype = PRIMITIVETYPE_DOUBLE;
td->type = TYPE_DBL;
break;
case 'F':
- td->decltype = PRIMITIVETYPE_FLOAT;
+ td->primitivetype = PRIMITIVETYPE_FLOAT;
td->type = TYPE_FLT;
break;
case 'J':
- td->decltype = PRIMITIVETYPE_LONG;
+ td->primitivetype = PRIMITIVETYPE_LONG;
td->type = TYPE_LNG;
break;
case 'V':
- td->decltype = PRIMITIVETYPE_VOID;
+ td->primitivetype = PRIMITIVETYPE_VOID;
td->type = TYPE_VOID;
break;
default:
if ((mflags != ACC_UNDEF) && !(mflags & ACC_STATIC)) {
td->type = TYPE_ADR;
- td->decltype = TYPE_ADR;
+ td->primitivetype = TYPE_ADR;
td->arraydim = 0;
td->classref = thisclass;
/* fill in first argument `this' */
td->type = TYPE_ADR;
- td->decltype = TYPE_ADR;
+ td->primitivetype = TYPE_ADR;
td->arraydim = 0;
td->classref = thisclass;
fprintf(file,"<class=NULL>");
}
else {
- switch (d->decltype) {
+ switch (d->primitivetype) {
case PRIMITIVETYPE_INT : ch='I'; break;
case PRIMITIVETYPE_CHAR : ch='C'; break;
case PRIMITIVETYPE_BYTE : ch='B'; break;
/* src/vmcore/descriptor.h - checking and parsing of field / method descriptors
- Copyright (C) 1996-2005, 2006, 2007 R. Grafl, A. Krall, C. Kruegel,
- C. Oates, R. Obermaisser, M. Platter, M. Probst, S. Ring,
- E. Steiner, C. Thalinger, D. Thuernbeck, P. Tomsich, C. Ullrich,
- J. Wenninger, Institut f. Computersprachen - TU Wien
+ Copyright (C) 1996-2005, 2006, 2007, 2008
+ CACAOVM - Verein zur Foerderung der freien virtuellen Maschine CACAO
This file is part of CACAO.
/* data structures for parsed field/method descriptors ************************/
struct typedesc {
- constant_classref *classref; /* class reference for TYPE_ADR types */
- u1 type; /* TYPE_??? constant [1] */
- u1 decltype; /* (PRIMITIVE)TYPE_??? constant [2] */
- u1 arraydim; /* array dimension (0 if no array) */
+ constant_classref *classref; /* class reference for TYPE_ADR types */
+ u1 type; /* TYPE_??? constant [1] */
+ u1 primitivetype; /* (PRIMITIVE)TYPE_??? constant [2] */
+ u1 arraydim; /* array dimension (0 if no array) */
};
/* [1]...the type field contains the basic type used within the VM. So ints, */
/* shorts, chars, bytes, booleans all have TYPE_INT. */
-/* [2]...the decltype field contains the declared type. */
+/* [2]...the primitivetype field contains the declared type. */
/* So short is PRIMITIVETYPE_SHORT, char is PRIMITIVETYPE_CHAR. */
-/* For non-primitive types decltype is TYPE_ADR. */
+/* For non-primitive types primitivetype is TYPE_ADR. */
struct paramdesc {
#if defined(__MIPS__)