index 9d5e1f4af7d58e970c49a0ad2665e0488ff36488..5e74d18a0acfdf31d609959415e0d7a92ecdfc5a 100644 (file)
int cell_size = jvm_cell_size_for_type(proc -> type -> base);
jvm_generate(p, use_size, cell_size, "invokestatic %s%s", full_name, signature);
- if(proc -> type -> base -> class == OBERON_TYPE_VOID)
+ if(proc -> type -> base -> class == OBERON_TYPE_NOTYPE)
{
jvm_generate(p, 0, 0, "return");
}
memset(t, 0, sizeof *t);
type -> gen_type = t;
- if(type -> class != OBERON_TYPE_VOID)
- {
- t -> wide = jvm_is_wide_type(type);
- t -> prefix = jvm_get_prefix(type);
- t -> postfix = jvm_get_postfix(type);
- }
- t -> cell_size = jvm_cell_size_for_type(type);
- t -> desc = jvm_get_descriptor(type);
-
+ gen_module_t * m;
switch(type -> class)
{
- case OBERON_TYPE_VOID:
+ case OBERON_TYPE_NOTYPE:
case OBERON_TYPE_INTEGER:
case OBERON_TYPE_BOOLEAN:
case OBERON_TYPE_ARRAY:
case OBERON_TYPE_CHAR:
case OBERON_TYPE_STRING:
case OBERON_TYPE_SET:
+ case OBERON_TYPE_NIL:
break;
case OBERON_TYPE_RECORD:
- ;
- gen_module_t * m;
m = type -> module -> gen_mod;
oberon_generate_record_class(m, type);
break;
gen_error("oberon_generator_init_type: unk calss %i", type -> class);
break;
}
+
+ if(type -> class != OBERON_TYPE_NOTYPE)
+ {
+ t -> wide = jvm_is_wide_type(type);
+ t -> prefix = jvm_get_prefix(type);
+ t -> postfix = jvm_get_postfix(type);
+ }
+
+ t -> cell_size = jvm_cell_size_for_type(type);
+
+ if(type -> class != OBERON_TYPE_NIL)
+ {
+ t -> desc = jvm_get_descriptor(type);
+ }
}
void