Project

General

Profile

Revision 3ca27bc7 src/plugins/scopes/scopes.ml

View differences:

src/plugins/scopes/scopes.ml
105 105
      let find_var = (fun v -> v.var_id = varid) in
106 106
      let instance = 
107 107
	List.find 
108
	  (fun i -> match i with 
108
	  (fun i -> match get_instr_desc i with 
109 109
	  | MStep(p, o, _) -> List.exists find_var p 
110 110
	  | _ -> false
111 111
	  ) 
......
113 113
      in
114 114
      try
115 115
	let variable, instance_node, instance_id = 
116
	  match instance with 
116
	  match get_instr_desc instance with 
117 117
	  | MStep(p, o, _) -> 
118 118
	    (* Format.eprintf "Looking for machine %s@.@?" o; *)
119 119
	    let o_fun, _ = List.assoc o e_machine.mcalls in
......
219 219

  
220 220
let update_machine machine =
221 221
  let stateassign vdecl =
222
    MStateAssign (vdecl, mk_val (LocalVar vdecl) vdecl.var_type)
222
    mkinstr 
223
    (MStateAssign (vdecl, mk_val (LocalVar vdecl) vdecl.var_type))
223 224
  in
224 225
  let local_decls = machine.mstep.step_inputs
225 226
    (* @ machine.mstep.step_outputs   *)
......
230 231
    mstep = { 
231 232
      machine.mstep with 
232 233
        step_instrs = machine.mstep.step_instrs
233
        @ (MComment "Registering all flows")::(List.map stateassign local_decls)
234
        @ (mkinstr (MComment "Registering all flows"))::(List.map stateassign local_decls)
234 235
          
235 236
    }
236 237
  }

Also available in: Unified diff