diff options
author | Bernhard Schommer <bernhardschommer@gmail.com> | 2015-10-08 15:33:47 +0200 |
---|---|---|
committer | Bernhard Schommer <bernhardschommer@gmail.com> | 2015-10-08 15:33:47 +0200 |
commit | f0a5038b4e4220300637d3e9e918d9ec31623108 (patch) | |
tree | 2d1e5f006d7a9bcd4c2a1ddcf5803be97b105db9 /powerpc/Asmexpand.ml | |
parent | ed1f32134283d3cd4f939a26dfd99992ec48da86 (diff) | |
download | compcert-f0a5038b4e4220300637d3e9e918d9ec31623108.tar.gz compcert-f0a5038b4e4220300637d3e9e918d9ec31623108.zip |
Added versions of the tranform_* functions in AST to work with functions
taking the ident as argument.
This functions are currently not used inside the proven part but it
is nice to have them already there, when they are used by some future
pass. They also come equiped with the corresponding proofs.
Diffstat (limited to 'powerpc/Asmexpand.ml')
-rw-r--r-- | powerpc/Asmexpand.ml | 23 |
1 files changed, 1 insertions, 22 deletions
diff --git a/powerpc/Asmexpand.ml b/powerpc/Asmexpand.ml index 878c7e5d..bf7e4c3e 100644 --- a/powerpc/Asmexpand.ml +++ b/powerpc/Asmexpand.ml @@ -713,26 +713,5 @@ let expand_fundef id = function | External ef -> Errors.OK (External ef) -let rec transform_partial_prog transfun p = - match p with - | [] -> Errors.OK [] - | (id,Gvar v)::l -> - (match transform_partial_prog transfun l with - | Errors.OK x -> Errors.OK ((id,Gvar v)::x) - | Errors.Error msg -> Errors.Error msg) - | (id,Gfun f)::l -> - (match transfun id f with - | Errors.OK tf -> - (match transform_partial_prog transfun l with - | Errors.OK x -> Errors.OK ((id,Gfun tf)::x) - | Errors.Error msg -> Errors.Error msg) - | Errors.Error msg -> - Errors.Error ((Errors.MSG (coqstring_of_camlstring "In function"))::((Errors.CTX - id) :: (Errors.MSG (coqstring_of_camlstring ": ") :: msg)))) - let expand_program (p: Asm.program) : Asm.program Errors.res = - match transform_partial_prog expand_fundef p.prog_defs with - | Errors.OK x-> - Errors.OK { prog_defs = x; prog_public = p.prog_public; prog_main = - p.prog_main } - | Errors.Error msg -> Errors.Error msg + AST.transform_partial_ident_program expand_fundef p |