Skip to content
Snippets Groups Projects
Commit 0cb88859 authored by erwan's avatar erwan
Browse files

Some work on the experimental -rte option

parent de4ee4a4
No related branches found
No related tags found
No related merge requests found
(* Time-stamp: <modified the 06/03/2024 (at 17:05) by Erwan Jahier> *) (* Time-stamp: <modified the 19/04/2024 (at 10:25) by Erwan Jahier> *)
(* (*
This module is used both for This module is used both for
...@@ -501,17 +501,24 @@ and (string_of_by_pos_op_eff: ...@@ -501,17 +501,24 @@ and (string_of_by_pos_op_eff:
if AstPredef.is_a_predef_op (snd(fst op.it)) then if AstPredef.is_a_predef_op (snd(fst op.it)) then
let op_str = snd (fst op.it) in let op_str = snd (fst op.it) in
let op_short_str,rte = match global_opt.rte, op_str with let op_short_str,rte = match global_opt.rte, op_str with
| Some _, ("plus"|"slash"|"minus"|"uminus"|"times"|"iplus" | Some t, ("plus"|"slash"|"minus"|"uminus"|"times"
|"islash"|"iminus"|"iuminus"|"itimes"|"mod" |"iplus"|"islash"|"iminus"|"iuminus"|"itimes"
|"mod"
|"div") -> ( |"div") -> (
try try
let ve = List.hd vel in let ve = List.hd vel in
(match ve.ve_typ with (match ve.ve_typ with
| Real_type_eff::_
| Int_type_eff::_ -> "rte_" ^ op_str ^"_"^t, true
| (External_type_eff(_,mint))::_ -> | (External_type_eff(_,mint))::_ ->
"rte_" ^ op_str ^"_"^mint, true "rte_" ^ op_str ^"_"^mint, true
| [] -> assert false
| _ -> assert false (* SNO *) | _ -> assert false (* SNO *)
) )
with _ -> assert false (* SNO *) with e ->
(* op2string (AstPredef.string_to_op op_str), false *)
Printf.printf "Error: operator '%s' not supported with -rte\n%s\n%!" op_str (Printexc.to_string e);
assert false (* SNO *)
) )
| _,_ -> op2string (AstPredef.string_to_op op_str), false | _,_ -> op2string (AstPredef.string_to_op op_str), false
in in
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment