java readded
This commit is contained in:
parent
740114764c
commit
220db42076
2 changed files with 12 additions and 5 deletions
|
@ -41,7 +41,7 @@ let write_obc_file p =
|
|||
let no_conf () = ()
|
||||
|
||||
let targets = [ "c",(Obc_no_params Cmain.program, no_conf);
|
||||
(*"java", (Obc Java_main.program, Java_main.java_conf);*)
|
||||
"java", (Obc Java_main.program, Java_main.java_conf);
|
||||
"obc", (Obc write_obc_file, no_conf);
|
||||
"obc_np", (Obc_no_params write_obc_file, no_conf);
|
||||
"epo", (Minils write_object_file, no_conf) ]
|
||||
|
@ -68,7 +68,7 @@ let generate_target p s =
|
|||
let p_list = Callgraph.program p in
|
||||
let o_list = List.map Mls2obc.program p_list in
|
||||
let o_list = List.map Obc_compiler.compile_program o_list in
|
||||
List.iter convert_fun o_list
|
||||
List.iter convert_fun o_list
|
||||
|
||||
let load_conf () =
|
||||
let target_conf s =
|
||||
|
|
|
@ -399,9 +399,16 @@ let const_dec_list cd_l = match cd_l with
|
|||
|
||||
|
||||
let program p =
|
||||
let classes = const_dec_list p.p_consts in
|
||||
let classes = type_dec_list classes p.p_types in
|
||||
let p = class_def_list classes p.p_classes in
|
||||
let rec program_descs pds (ns,cs,ts) = match pds with
|
||||
| [] -> ns,cs,ts
|
||||
| Obc.Pclass n :: pds -> program_descs pds (n::ns,cs,ts)
|
||||
| Obc.Pconst c :: pds -> program_descs pds (ns,c::cs,ts)
|
||||
| Obc.Ptype t :: pds -> program_descs pds (ns,cs,t::ts)
|
||||
in
|
||||
let ns,cs,ts = program_descs p.p_desc ([],[],[]) in
|
||||
let classes = const_dec_list cs in
|
||||
let classes = type_dec_list classes ts in
|
||||
let p = class_def_list classes ns in
|
||||
get_classes()@p
|
||||
|
||||
|
||||
|
|
Loading…
Reference in a new issue