aboutsummaryrefslogtreecommitdiffstats
path: root/cfrontend/Ctyping.v
diff options
context:
space:
mode:
authorxleroy <xleroy@fca1b0fc-160b-0410-b1d3-a4f43f01ea2e>2006-09-05 12:32:59 +0000
committerxleroy <xleroy@fca1b0fc-160b-0410-b1d3-a4f43f01ea2e>2006-09-05 12:32:59 +0000
commit6c0511a03c8c970435d8b97e600312ac45340801 (patch)
treed42b16c8f77d1aa34e570647eb6728a4a9f4e72b /cfrontend/Ctyping.v
parent81afbd38d1597cefc03dd699fd115c4261c6877f (diff)
downloadcompcert-kvx-6c0511a03c8c970435d8b97e600312ac45340801.tar.gz
compcert-kvx-6c0511a03c8c970435d8b97e600312ac45340801.zip
Revu traitement des variables globales dans AST.program et dans Globalenvs.
Adaptation frontend, backend en consequence. Integration passe C -> C#minor dans common/Main.v. git-svn-id: https://yquem.inria.fr/compcert/svn/compcert/trunk@77 fca1b0fc-160b-0410-b1d3-a4f43f01ea2e
Diffstat (limited to 'cfrontend/Ctyping.v')
-rw-r--r--cfrontend/Ctyping.v8
1 files changed, 4 insertions, 4 deletions
diff --git a/cfrontend/Ctyping.v b/cfrontend/Ctyping.v
index 8b2f90f2..7c6a3790 100644
--- a/cfrontend/Ctyping.v
+++ b/cfrontend/Ctyping.v
@@ -136,11 +136,11 @@ Inductive wt_fundef: typenv -> fundef -> Prop :=
wt_fundef env (External id args res).
Definition add_global_var
- (env: typenv) (id_ty_init: ident * type * list init_data) : typenv :=
- match id_ty_init with (id, ty, init) => PTree.set id ty env end.
+ (env: typenv) (id_ty_init: ident * list init_data * type) : typenv :=
+ match id_ty_init with (id, init, ty) => PTree.set id ty env end.
Definition add_global_vars
- (env: typenv) (vars: list(ident * type * list init_data)) : typenv :=
+ (env: typenv) (vars: list(ident * list init_data * type)) : typenv :=
List.fold_left add_global_var vars env.
Definition add_global_fun
@@ -152,7 +152,7 @@ Definition add_global_funs
List.fold_left add_global_fun funs env.
Definition global_typenv (p: program) :=
- add_global_vars (add_global_funs (PTree.empty type) p.(prog_funct)) p.(prog_defs).
+ add_global_vars (add_global_funs (PTree.empty type) p.(prog_funct)) p.(prog_vars).
Record wt_program (p: program) : Prop := mk_wt_program {
wt_program_funct: