method vinst = function
| Set((Var v,NoOffset),e,loc) ->
if v.vformal then
begin try
let voff = VarinfoHashtbl.find cursor_to_offset v in
let eoff = match destruct_pointer e with
| None -> assert false
| Some(v2,Some e) ->
begin try
new_exp (BinOp(PlusA,expr_offset v2,e,almost_integer_type))
with Not_found -> assert false end
| Some(v2,None) ->
begin try expr_offset v2
with Not_found -> assert false end
in
ChangeDoChildrenPost
([Set((Var voff,NoOffset),eoff,loc)], fun x -> x)
with Not_found -> DoChildren end
else
begin try
let voff = VarinfoHashtbl.find cursor_to_offset v in
let eoff = match destruct_pointer e with
| None -> assert false
| Some(v2,Some e) ->
begin try
new_exp (BinOp(PlusA,expr_offset v2,e,almost_integer_type))
with Not_found -> e end
| Some(v2,None) ->
begin try expr_offset v2
with Not_found -> constant_expr 0L end
in
ChangeDoChildrenPost
([Set((Var voff,NoOffset),eoff,loc)], fun x -> x)
with Not_found -> DoChildren end
| _ -> DoChildren