index 2889ae3c718437b3220ae308ba0e446a9fec55bc..48b3951ac5ea30d296263ee7f14338ee23561b9a 100644 (file)
#include <gc.h>
-#include "../../../include/oberon.h"
#include "../../oberon-internals.h"
#include "generator-jvm.h"
#include "generator-jvm-abi.h"
gen_error("jvm_generate_load: unknow storage type %i", src -> storage);
break;
}
+
+ if(src -> typecheck)
+ {
+ jvm_generate(p, 1, 1, "checkcast %s", src -> forcetype -> full_name);
+ }
}
void
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_FRAME:
+ case JVM_STORAGE_FRAME_VAR:
+ break;
case JVM_STORAGE_REGISTER_VAR:
jvm_generate(p, 0, 0, ".var %i is '%s' [%s from start to end", reg, name, desc);
break;
p = proc -> gen_proc;
- jvm_generate_staticlinks_recursive(p, proc -> parent, p -> level);
+ jvm_generate_staticlinks_recursive(p, proc -> parent, p -> level - 1);
}
static void
size_t sz = sizeof(*p -> reg_frame) * max_frames;
p -> max_frames = max_frames;
p -> reg_frame = GC_MALLOC(sz);
- memset(p -> reg_frame, 0, sz);
+ memset(p -> reg_frame, 255, sz);
p -> level = max_frames - 1;
- jvm_create_staticlinks_recursive(p, proc -> parent, p -> level);
+
+ jvm_create_staticlinks_recursive(p, proc -> parent, p -> level - 1);
}
static void