DEADSOFTWARE

Иправлен(?) мемори коррапшн
[dsw-obn.git] / src / backends / jvm / generator-jvm-basic.c
index 1757cb6221fe49317bb5336c9ff136ed7572ffde..27f1c56390802b409621ef18779d6781c6f10595 100644 (file)
@@ -53,7 +53,7 @@ jvm_get_descriptor(oberon_type_t * type)
 
        switch(type -> class)
        {
-               case OBERON_TYPE_VOID:
+               case OBERON_TYPE_NOTYPE:
                        return new_string("V");
                        break;
                case OBERON_TYPE_INTEGER:
@@ -194,6 +194,7 @@ jvm_get_prefix(oberon_type_t * type)
                case OBERON_TYPE_RECORD:
                case OBERON_TYPE_POINTER:
                case OBERON_TYPE_STRING:
+               case OBERON_TYPE_NIL:
                        return 'a';
                        break;
                case OBERON_TYPE_REAL:
@@ -261,6 +262,7 @@ jvm_get_postfix(oberon_type_t * type)
                case OBERON_TYPE_RECORD:
                case OBERON_TYPE_POINTER:
                case OBERON_TYPE_STRING:
+               case OBERON_TYPE_NIL:
                        return 'a';
                        break;
                case OBERON_TYPE_REAL:
@@ -364,6 +366,7 @@ jvm_get_class_full_name(oberon_type_t * type)
 
                        int num = type -> num_decl;
                        oberon_object_t * arg = type -> decl;
+
                        for(int i = 0; i < num; i++)
                        {
                                desc = jvm_get_descriptor_safe(arg -> type);
@@ -384,36 +387,6 @@ jvm_get_class_full_name(oberon_type_t * type)
        return name;
 }
 
-char *
-jvm_get_procedure_signature(oberon_type_t * proc)
-{
-       char * signature;
-       char * desc;
-
-       signature = new_string("(");
-
-       int num = proc -> num_decl;
-       oberon_object_t * arg = proc -> decl;
-       for(int i = 0; i < num; i++)
-       {
-               desc = jvm_get_descriptor(arg -> type);
-               if(arg -> class == OBERON_CLASS_VAR_PARAM)
-               {
-                       signature = new_string("%s[%sI", signature, desc);
-               }
-               else
-               {
-                       signature = new_string("%s%s", signature, desc);
-               }
-               arg = arg -> next;
-       }
-
-       desc = jvm_get_descriptor(proc -> base);
-       signature = new_string("%s)%s", signature, desc);
-
-       return signature;
-}
-
 int
 jvm_cell_size_for_type(oberon_type_t * type)
 {
@@ -427,7 +400,7 @@ jvm_cell_size_for_type(oberon_type_t * type)
                        return 2;
                }
        }
-       else if(type -> class == OBERON_TYPE_VOID)
+       else if(type -> class == OBERON_TYPE_NOTYPE)
        {
                return 0;
        }