Add alias to obc vd.

This commit is contained in:
Léonard Gérard 2011-11-17 15:22:28 +01:00
parent fa956a00ad
commit 2a6dab836a
2 changed files with 4 additions and 2 deletions

View file

@ -89,6 +89,7 @@ and block =
and var_dec = and var_dec =
{ v_ident : var_ident; { v_ident : var_ident;
v_type : ty; v_type : ty;
v_alias : bool; (* this var_dec only declare a const pointer, no allocation is done *)
v_linearity : linearity; v_linearity : linearity;
v_mutable : bool; v_mutable : bool;
v_loc : location } v_loc : location }

View file

@ -17,8 +17,9 @@ open Obc
open Obc_mapfold open Obc_mapfold
open Global_mapfold open Global_mapfold
let mk_var_dec ?(loc=no_location) ?(linearity = Ltop) ?(mut=false) ident ty = 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_mutable = mut; v_loc = loc } { 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 = let mk_ext_value ?(loc=no_location) ty desc =
{ w_desc = desc; w_ty = ty; w_loc = loc; } { w_desc = desc; w_ty = ty; w_loc = loc; }