DEADSOFTWARE

Исправлено падение при использовании процедурного типа
[dsw-obn.git] / src / backends / jvm / generator-jvm-abi.c
index d0dabd2d914edf2f7b7168725b6f5730845b14a2..1d634a5ea0ddfcbaad19f707f4521202389ebec6 100644 (file)
@@ -257,12 +257,17 @@ jvm_generate_var(gen_var_t * v)
                case JVM_STORAGE_REGISTER:
                case JVM_STORAGE_PARAM:
                case JVM_STORAGE_PARAM_VAR:
+               case JVM_STORAGE_FRAME:
+               case JVM_STORAGE_FRAME_VAR:
+               case JVM_STORAGE_FRAME_PARAM:
+               case JVM_STORAGE_FRAME_PARAM_VAR:
                        jvm_generate(p, 0, 0, ".var %i is %s %s from start to end", reg, name, desc);
                        break;
                case JVM_STORAGE_REGISTER_VAR:
                        jvm_generate(p, 0, 0, ".var %i is %s [%s from start to end", reg, name, desc);
                        break;
                case JVM_STORAGE_PARAM_VARPTR:
+               case JVM_STORAGE_FRAME_PARAM_VARPTR:
                        jvm_generate(p, 0, 0, ".var %i is %s [%s from start to end", reg, name, desc);
                        jvm_generate(p, 0, 0, ".var %i is %s$offset I from start to end", reg + 1, name);
                        break;
@@ -278,13 +283,6 @@ jvm_generate_var(gen_var_t * v)
                case JVM_STORAGE_FIELD_VAR:
                        fprintf(v -> class -> fp, ".field public %s [%s\n\n", name, desc);
                        break;
-               case JVM_STORAGE_FRAME:
-               case JVM_STORAGE_FRAME_VAR:
-               case JVM_STORAGE_FRAME_PARAM:
-               case JVM_STORAGE_FRAME_PARAM_VAR:
-               case JVM_STORAGE_FRAME_PARAM_VARPTR:
-                       /* См. ниже jvm_generate_frame_class() */
-                       break;
                default:
                        gen_error("jvm_generate_var: invalid storage %i", storage);
                        break;
@@ -358,6 +356,7 @@ jvm_generate_var_initialization(gen_proc_t * p, gen_var_t * v)
        }
 }
 
+/*
 static void
 jvm_generate_abstract_frame_class()
 {
@@ -383,6 +382,7 @@ jvm_generate_abstract_frame_class()
 
        jvm_destroy_class(class);
 }
+*/
 
 static struct gen_class *
 jvm_generate_frame_class(oberon_object_t * proc)
@@ -396,7 +396,7 @@ jvm_generate_frame_class(oberon_object_t * proc)
        abscname = "SYSTEM$FRAME";
        cname = jvm_get_field_full_name_safe(proc);
        cname = new_string("%s$FRAME", cname);
-       class = jvm_create_class(cname);
+       class = jvm_create_class(proc -> gen_proc -> class -> dir, cname);
        fp = class -> fp;
 
        class -> full_name = cname;
@@ -478,7 +478,8 @@ jvm_generate_procedure_frame(oberon_object_t * proc)
 
        p = proc -> gen_proc;
 
-       jvm_generate_abstract_frame_class();
+//     jvm_generate_abstract_frame_class();
+
        class = jvm_generate_frame_class(proc);
 
        t = GC_MALLOC(sizeof *t);