Change length of Dsizeof from an exp to a dexp

Summary: Change length of Dsizeof from an exp to a dexp.  This make a little progress toward reducing the types that must be mutually recursive with exp.

Reviewed By: sblackshear

Differential Revision: D3541337

fbshipit-source-id: 95d1f70
master
Josh Berdine 9 years ago committed by Facebook Github Bot 0
parent 6ac4db7113
commit 061bb2d799

@ -420,7 +420,7 @@ type dexp =
| Darray of dexp dexp
| Dbinop of binop dexp dexp
| Dconst of const
| Dsizeof of Typ.t (option exp) Subtype.t
| Dsizeof of Typ.t (option dexp) Subtype.t
| Dderef of dexp
| Dfcall of dexp (list dexp) Location.t call_flags
| Darrow of dexp Ident.fieldname

@ -147,7 +147,7 @@ type dexp =
| Darray of dexp dexp
| Dbinop of binop dexp dexp
| Dconst of const
| Dsizeof of Typ.t (option exp) Subtype.t
| Dsizeof of Typ.t (option dexp) Subtype.t
| Dderef of dexp
| Dfcall of dexp (list dexp) Location.t call_flags
| Darrow of dexp Ident.fieldname

@ -387,7 +387,7 @@ and _exp_rv_dexp (_seen : Sil.ExpSet.t) node e : Sil.dexp option =
_exp_rv_dexp seen node e1
| Sil.Sizeof (typ, len, sub) ->
if verbose then (L.d_str "exp_rv_dexp: type "; Sil.d_exp e; L.d_ln ());
Some (Sil.Dsizeof (typ, len, sub))
Some (Sil.Dsizeof (typ, Option.map_default (_exp_rv_dexp seen node) None len, sub))
| _ ->
if verbose then (L.d_str "exp_rv_dexp: no match for "; Sil.d_exp e; L.d_ln ());
None

Loading…
Cancel
Save