Project

General

Profile

Revision df94cd73 src/corelang.ml

View differences:

src/corelang.ml
719 719
(*        Renaming / Copying                                                      *)
720 720

  
721 721
let copy_var_decl vdecl =
722
  mkvar_decl vdecl.var_loc ~orig:vdecl.var_orig (vdecl.var_id, vdecl.var_dec_type, vdecl.var_dec_clock, vdecl.var_dec_const, vdecl.var_dec_value, vdecl.var_parent_nodeid)
722
  mkvar_decl
723
    vdecl.var_loc
724
    ~orig:vdecl.var_orig
725
    (
726
      vdecl.var_id,
727
      vdecl.var_dec_type,
728
      vdecl.var_dec_clock,
729
      vdecl.var_dec_const,
730
      vdecl.var_dec_value,
731
      vdecl.var_parent_nodeid
732
    )
723 733

  
724 734
let copy_const cdecl =
725 735
  { cdecl with const_type = Types.new_var () }
......
802 812
     Expr_merge (f_var i, List.map (fun (t, h) -> (t, re h)) hl)
803 813
   | Expr_appl (i, e', i') -> 
804 814
     Expr_appl (f_node i, re e', Utils.option_map re i')
805

  
806
 let rename_dec_type f_node f_var t = t (* TODO : do we really want to rename a declared type ? 
807
						     Types.rename_dim_type (Dimension.rename f_node f_var) t*)
808

  
809
 let rename_dec_clock f_node f_var c = c (* TODO : do we really want to rename a declared clock ? assert false  
810
					  Clocks.rename_clock_expr f_var c*)
811 815
   
812 816
 let rename_var f_node f_var v = {
813 817
     (copy_var_decl v) with
814 818
     var_id = f_var v.var_id;
815
     var_dec_type = rename_dec_type f_node f_var v.var_dec_type;
816
     var_dec_clock = rename_dec_clock f_node f_var v.var_dec_clock
819
     var_type = v.var_type;
820
     var_clock = v.var_clock;
817 821
 } 
818 822

  
819 823
 let rename_vars f_node f_var = List.map (rename_var f_node f_var) 

Also available in: Unified diff