From c96d05b1eb689cf21ed9ccbf6db2ddfc673ec983 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=A9onard=20G=C3=A9rard?= Date: Thu, 17 Mar 2011 10:02:35 +0100 Subject: [PATCH] updated todo and refactoring. --- compiler/global/static.ml | 13 ++++--------- todo.txt | 2 ++ 2 files changed, 6 insertions(+), 9 deletions(-) diff --git a/compiler/global/static.ml b/compiler/global/static.ml index 23ce68c..30cacc3 100644 --- a/compiler/global/static.ml +++ b/compiler/global/static.ml @@ -92,15 +92,10 @@ let rec eval env se = (** [int_of_static_exp env e] returns the value of the expression [e] in the environment [env], mapping vars to integers. Raises - Instanciation_failed if it cannot be computed (if a var has no value).*) -let int_of_static_exp env se = - match (simplify env se).se_desc with - | Sint i -> i - | _ -> - (Format.eprintf "Internal compiler error, \ - [eval_int] received the static_exp %a.@." - Global_printer.print_static_exp se; - assert false) + Partial_instanciation if it cannot be computed (if a var has no value).*) +let int_of_static_exp env se = match (eval_core env se).se_desc with + | Sint i -> i + | _ -> Misc.internal_error "static int_of_static_exp" 1 (** [is_true env constr] returns whether the constraint is satisfied in the environment (or None if this can be decided) diff --git a/todo.txt b/todo.txt index fb8a486..498fbf2 100644 --- a/todo.txt +++ b/todo.txt @@ -3,6 +3,8 @@ Plus ou moins ordonné du plus urgent au moins urgent. *- Bugs related to matching types without unaliasing it. In lots of parts. Use Modules.unalias_type. +*- Functions in Obc should not be objetcs. + *- Collision entre les noms de params et les idents dans les noeuds. *- Optimisations du genre "if true then ... else ... " ou genre "x,y = if b then a,c else a2,c" qui devrait etre transformé en "x = if b then a else s2; y = c" ...