global env misc
This commit is contained in:
parent
24c394d2cb
commit
b86555e013
4 changed files with 4 additions and 5 deletions
|
@ -174,8 +174,8 @@ let replace_const f v =
|
|||
|
||||
let find_value x = QualEnv.find x g_env.values
|
||||
let find_type x = QualEnv.find x g_env.types
|
||||
let find_constrs x = Tid (QualEnv.find x g_env.constrs)
|
||||
let find_field x = QualEnv.find x g_env.fields (* TODO master : the result should be Tid(...) *)
|
||||
let find_constrs x = QualEnv.find x g_env.constrs
|
||||
let find_field x = QualEnv.find x g_env.fields
|
||||
let find_const x = QualEnv.find x g_env.consts
|
||||
|
||||
(** @return the fields of a record type. *)
|
||||
|
|
|
@ -220,7 +220,7 @@ let find_with_error find_fun f =
|
|||
with Not_found -> error (Eundefined(fullname f))
|
||||
|
||||
let find_value v = find_with_error find_value v
|
||||
let find_constrs c = find_with_error find_constrs c
|
||||
let find_constrs c = Tid (find_with_error find_constrs c)
|
||||
let find_field f = find_with_error find_field f
|
||||
|
||||
|
||||
|
|
|
@ -31,7 +31,6 @@ let compile_program p =
|
|||
let p = pass "Level clock" true Level_clock.program p pp in
|
||||
|
||||
(* Dataglow minimization *)
|
||||
|
||||
let p =
|
||||
let call_tomato = !tomato or (List.length !tomato_nodes > 0) in
|
||||
let p = pass "Extended value inlining" call_tomato Inline_extvalues.program p pp in
|
||||
|
|
|
@ -102,7 +102,7 @@ let translate_constructor_name_2 q q_ty =
|
|||
{ qual = QualModule classe; name = String.uppercase q.name }
|
||||
|
||||
let translate_constructor_name q =
|
||||
match Modules.unalias_type (Modules.find_constrs q) with
|
||||
match Modules.unalias_type (Types.Tid (Modules.find_constrs q)) with
|
||||
| Types.Tid q_ty when q_ty = Initial.pbool -> q |> shortname |> local_qn
|
||||
| Types.Tid q_ty -> translate_constructor_name_2 q q_ty
|
||||
| _ -> assert false
|
||||
|
|
Loading…
Reference in a new issue