From 8f0f0598de5d459a9fc80883d49786762fafe7cc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Le=CC=81onard=20Ge=CC=81rard?= Date: Sat, 18 Sep 2010 22:25:32 +0200 Subject: [PATCH] Small comments. --- compiler/heptagon/parsing/hept_parsetree.ml | 3 ++- compiler/heptagon/parsing/hept_scoping.ml | 10 ++++++---- compiler/minils/mls_utils.ml | 1 + 3 files changed, 9 insertions(+), 5 deletions(-) diff --git a/compiler/heptagon/parsing/hept_parsetree.ml b/compiler/heptagon/parsing/hept_parsetree.ml index af894bb..bca7bc7 100644 --- a/compiler/heptagon/parsing/hept_parsetree.ml +++ b/compiler/heptagon/parsing/hept_parsetree.ml @@ -193,7 +193,8 @@ and interface_desc = | Iconstdef of const_dec | Isignature of signature -(* Helper functions to create AST. *) +(* {3 Helper functions to create AST} *) + let mk_exp desc loc = { e_desc = desc; e_loc = loc } diff --git a/compiler/heptagon/parsing/hept_scoping.ml b/compiler/heptagon/parsing/hept_scoping.ml index ac9dcea..cc0bc6a 100644 --- a/compiler/heptagon/parsing/hept_scoping.ml +++ b/compiler/heptagon/parsing/hept_scoping.ml @@ -7,7 +7,7 @@ It is built with [build_const]. When qualifying a constant var, it is first check in the local_const env, so qualified with [local_qn] - if not found we try to qualify with the global env. *) + if not found we try to qualify it with the global env. *) (* The global environement is initialized by the scoping pass. This allow at the same time @@ -18,10 +18,12 @@ used to map a var name to a var ident. It is initialized at node declaration level with the inputs and outputs, and then appended with the local var declarations at each block level - with the [build] function. *) + with the [build] function. + It checks that if a var is used with a last, it is declared as a last.*) -(* convention : static params are set as the first static args, - op (a3) == op (a2,a3) == op (a1,a2,a3) *) +(* convention : Static operators get static params and static args. + This scoping set the static params as the first static args : + op (a3) ==> op (a2,a3) ==> op (a1,a2,a3) *) open Location open Types diff --git a/compiler/minils/mls_utils.ml b/compiler/minils/mls_utils.ml index 322ecec..dfbee6a 100644 --- a/compiler/minils/mls_utils.ml +++ b/compiler/minils/mls_utils.ml @@ -20,6 +20,7 @@ let err_message ?(exp=void) ?(loc=exp.e_loc) = function print_exp exp; raise Errors.Error +(*TODO faux pour l'instant, besoin d'une passe de best effort exp->static_exp*) let rec static_exp_of_exp e = match e.e_desc with | Econst se -> se