Commit b475dfba authored by Erwan Jahier's avatar Erwan Jahier
Browse files

Merge /home/raymond/git/lurette into HEAD

parents 884eeb2a 84039b64
......@@ -132,14 +132,18 @@ printf "check_exp\n";
| ICONST_n id -> CkTypeEff.integer
| RCONST_n id -> CkTypeEff.real
| IDENT_n id -> (
(* tout sauf une macro ... *)
(* tout sauf une macro ... (01/2012 : meme zeroaire !) *)
match (CheckEnv.nature_of_ident env id) with
Macro_ident (_, prof) -> (
let msg = sprintf "arity error, get a macro where a scalar was expected" in
raise (Compile_error (e.src, msg))
(*
match CkTypeEff.split_prof prof with
([], [t]) -> t
| (til, _) -> (
arity_error e.src 0 (List.length til)
)
*)
)
| _ -> CheckEnv.type_of_ident env id
)
......@@ -467,7 +471,9 @@ and check_let
(* macro definie *)
(* mise en place de l'env *)
let rkey = CheckEnv.add_formal_params env li.lti_inputs in
(* 01/2012 lift ref ! *)
let tcalc = check_exp env exp in
let tcalc = try CkTypeEff.lift_ref tcalc with Failure _ -> tcalc in
let res = (
match li.lti_type with
Some te -> (
......
......@@ -544,7 +544,11 @@ let create_alias
(edef : CoAlgExp.t)
(te : CkTypeEff.t )
(sstack : CoIdent.scope_stack) = (
Verbose.put ~flag:dbg " Create alias %s=%s\n" (CoIdent.to_string tgtid) (CoAlgExp.lus_dumps edef);
Verbose.put ~flag:dbg " Create alias %s = %s\n type: %s\n"
(CoIdent.to_string tgtid)
(CoAlgExp.lus_dumps edef)
(CkTypeEff.to_string te)
;
assert (CkTypeEff.is_data te);
let src = get_src_stack i.src sstack in
let ctrl = CoAlgExp.is_controlable edef in
......@@ -899,8 +903,8 @@ Verbose.put ~flag:dbg "treat_trace_ident_ref %s\n" (CkIdentInfo.to_string info);
) with Not_found -> (
(* pas encore vu ... *)
match (CkIdentInfo.get_nature info) with
Def_ident li -> (
(* forcement defini ! *)
| Def_ident li -> (
(* Forcement defini ! *)
let def = match li.lti_def with
Some d -> d
| _ -> assert false
......@@ -911,7 +915,11 @@ Verbose.put ~flag:dbg "treat_trace_ident_ref %s\n" (CkIdentInfo.to_string info);
let tgtid = fresh_trace_id zeres id.it in
new_trace zeres id_decl tgtid edef sstack ;
CoTraceExp.of_ref tgtid
) | _ -> (assert false)
)
| _ -> (
Printf.fprintf stderr "unexpected ident:\n %s\n" (CkIdentInfo.to_string info);
assert false
)
)
)
)
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment