DEADSOFTWARE

Исправлена инициализация записей
[dsw-obn.git] / src / backends / jvm / generator-jvm.c
index 90b0e88f777caa2c3731b55241603b971d126af6..5e74d18a0acfdf31d609959415e0d7a92ecdfc5a 100644 (file)
@@ -475,20 +475,7 @@ oberon_generator_init_type(oberon_context_t * ctx, oberon_type_t * type)
        memset(t, 0, sizeof *t);
        type -> gen_type = t;
 
-       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);
-       }
-
+       gen_module_t * m;
        switch(type -> class)
        {
                case OBERON_TYPE_NOTYPE:
@@ -503,8 +490,6 @@ oberon_generator_init_type(oberon_context_t * ctx, oberon_type_t * type)
                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;
@@ -515,6 +500,20 @@ oberon_generator_init_type(oberon_context_t * ctx, oberon_type_t * type)
                        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