Skip to content
Snippets Groups Projects
Commit b79024fc authored by Erwan Jahier's avatar Erwan Jahier
Browse files

Fixing ec the backend (cont'): I was printing some useless (because

expansed) type  definitions that were containing struct  or arrays in
the expand_structs mode.
parent 9cf36928
No related branches found
No related tags found
No related merge requests found
(** Time-stamp: <modified the 25/02/2009 (at 14:50) by Erwan Jahier> *)
(** Time-stamp: <modified the 25/02/2009 (at 15:34) by Erwan Jahier> *)
open Lxm
......@@ -457,10 +457,13 @@ and (type_check_do: t -> Ident.long -> Lxm.t -> SymbolTab.t -> bool ->
Struct_type_eff (n, eff_fields)
)
in
let is_struct_or_array = match type_def.it with
StructType _ -> true
| ArrayType _ -> true
| _ -> false in
let is_struct_or_array = match type_eff with
| Array_type_eff(_)
| Struct_type_eff(_) -> true
| Any | Overload | Bool_type_eff | Int_type_eff | Real_type_eff
| External_type_eff(_) | Abstract_type_eff(_) | Enum_type_eff(_)
-> false
in
if
(not provide_flag)
&& (not (!Global.expand_structs & is_struct_or_array))
......
(** Time-stamp: <modified the 25/02/2009 (at 15:14) by Erwan Jahier> *)
(** Time-stamp: <modified the 25/02/2009 (at 15:34) by Erwan Jahier> *)
open Printf
open Lxm
......@@ -287,7 +287,7 @@ and (string_of_by_pos_op_eff: Eff.by_pos_op srcflagged -> Eff.val_exp list -> st
match posop.it,vel with
| Predef (Predef.DIESE_n,_), [ve1] ->
if !Global.lv4
then sov ve1 (* lv4 does no accept to apply # on One var only ! *)
then sov ve1 (* lv4 does no accept to apply # on One var only! *)
else ((op2string Predef.DIESE_n) ^ (tuple_par [ve1]))
| Predef (Predef.IF_n,_), [ve1; ve2; ve3] ->
......
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