diff --git a/compiler/obc/obc.ml b/compiler/obc/obc.ml index b84f519..528aa6c 100644 --- a/compiler/obc/obc.ml +++ b/compiler/obc/obc.ml @@ -89,6 +89,7 @@ and block = and var_dec = { v_ident : var_ident; v_type : ty; + v_alias : bool; (* this var_dec only declare a const pointer, no allocation is done *) v_linearity : linearity; v_mutable : bool; v_loc : location } diff --git a/compiler/obc/obc_utils.ml b/compiler/obc/obc_utils.ml index 9988f8b..178bd84 100644 --- a/compiler/obc/obc_utils.ml +++ b/compiler/obc/obc_utils.ml @@ -17,8 +17,9 @@ open Obc open Obc_mapfold open Global_mapfold -let mk_var_dec ?(loc=no_location) ?(linearity = Ltop) ?(mut=false) ident ty = - { v_ident = ident; v_type = ty; v_linearity = linearity; v_mutable = mut; v_loc = loc } +let mk_var_dec ?(loc=no_location) ?(linearity = Ltop) ?(mut=false) ?(alias=false) ident ty = + { v_ident = ident; v_type = ty; v_linearity = linearity; + v_alias = alias; v_mutable = mut; v_loc = loc } let mk_ext_value ?(loc=no_location) ty desc = { w_desc = desc; w_ty = ty; w_loc = loc; }