Project

General

Profile

« Previous | Next » 

Revision 95944ba1

Added by Pierre-Loïc Garoche almost 5 years ago

Cleaning up stuff in normalization. Mainly replace arguments with only required elements
node_Table hashtbl is now only available through functions of the corelang.mli

View differences:

src/features/machine_types/machine_types.ml
417 417
  in
418 418
  typing_env := env
419 419

  
420
let type_expr nd expr =
420
let type_expr (parentid, init_vars) expr =
421 421
  let init_env = !typing_env in
422 422
  (* Format.eprintf "Init env: %a@." (Env.pp_env MTypes.print_ty) init_env; *)
423
  let init_vars = nd.node_inputs @ nd.node_outputs @ nd.node_locals in
424 423
  (* Rebuilding the variables environment from accumulated knowledge *)
425 424
  let env,vars = (* First, we add non specified variables *)
426 425
    List.fold_left (fun (env, vars) v ->
......
435 434
  (* Then declared ones *)
436 435
  let env, vars =
437 436
    Hashtbl.fold (fun vdecl machine_type (env, vds) ->
438
      if vdecl.var_parent_nodeid = Some nd.node_id then (
437
      if vdecl.var_parent_nodeid = Some parentid then (
439 438
	 (* Format.eprintf "Adding variable %a to the environement@.@?" Printers.pp_var vdecl;  *)
440 439
	let env = Env.add_value env vdecl.var_id machine_type in
441 440
	env, vdecl::vds

Also available in: Unified diff