DEADSOFTWARE

JVM: исправлены указатели на процедуры: больше не требуется поддержка со стороны...
[dsw-obn.git] / src / backends / jvm / generator-jvm.h
1 #define MAX_REGISTERS 256
3 struct gen_register_file
4 {
5 struct
6 {
7 bool used;
8 bool wide;
9 } reg[MAX_REGISTERS];
10 int num_used;
11 int max_used;
12 };
14 struct gen_stack
15 {
16 int pointer;
17 int max_pointer;
18 };
20 struct gen_class
21 {
22 char * full_name;
23 FILE * fp;
24 gen_proc_t * p;
25 struct gen_class * base;
26 };
28 enum gen_storage
29 {
30 JVM_STORAGE_UNKNOWN,
31 JVM_STORAGE_REGISTER,
32 JVM_STORAGE_STATIC,
33 JVM_STORAGE_FIELD
34 };
37 struct gen_proc_t
38 {
39 int label_id;
40 struct gen_register_file * rf;
41 struct gen_stack * stack;
42 struct gen_class * class;
43 };
45 struct gen_type_t
46 {
47 int rec_id;
48 struct gen_class * class;
49 };
51 struct gen_var_t
52 {
53 enum gen_storage storage;
54 int reg;
55 char * full_name;
56 char * desc;
57 };
59 struct gen_context_t
60 {
61 gen_module_t * current_m;
62 };
64 struct gen_module_t
65 {
66 struct gen_class * class;
67 int rec_id;
68 };