diff options
| author | Graydon Hoare <[email protected]> | 2010-11-03 09:50:25 -0700 |
|---|---|---|
| committer | Graydon Hoare <[email protected]> | 2010-11-03 09:50:25 -0700 |
| commit | 1e22a55ff25612753665a76eb3b83628379334a0 (patch) | |
| tree | a051f47d2326dfce3b4e8f26abe88dac5563dd44 /src/boot/driver/main.ml | |
| parent | Shift obj, type, param decls to have strata rather than effects. (diff) | |
| download | rust-1e22a55ff25612753665a76eb3b83628379334a0.tar.xz rust-1e22a55ff25612753665a76eb3b83628379334a0.zip | |
Code sketch and comment notes on textual crate signatures.
Diffstat (limited to 'src/boot/driver/main.ml')
| -rw-r--r-- | src/boot/driver/main.ml | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/src/boot/driver/main.ml b/src/boot/driver/main.ml index 30310b10..82057766 100644 --- a/src/boot/driver/main.ml +++ b/src/boot/driver/main.ml @@ -33,6 +33,7 @@ let (sess:Session.sess) = Session.sess_log_lex = false; Session.sess_log_parse = false; Session.sess_log_ast = false; + Session.sess_log_sig = false; Session.sess_log_passes = false; Session.sess_log_resolve = false; Session.sess_log_type = false; @@ -116,6 +117,7 @@ let dump_sig (filename:filename) : unit = exit 0 ;; + let dump_meta (filename:filename) : unit = begin match Lib.get_meta sess filename with @@ -168,6 +170,8 @@ let argspecs = "-lparse" "log parsing"); (flag (fun _ -> sess.Session.sess_log_ast <- true) "-last" "log AST"); + (flag (fun _ -> sess.Session.sess_log_sig <- true) + "-lsig" "log signature"); (flag (fun _ -> sess.Session.sess_log_passes <- true) "-lpasses" "log passes at high-level"); (flag (fun _ -> sess.Session.sess_log_resolve <- true) @@ -358,6 +362,17 @@ then Format.set_margin 80; Printf.fprintf stdout "%s\n" (Fmt.fmt_to_str Ast.fmt_crate crate) end +;; + +if sess.Session.sess_log_sig +then + begin + Printf.fprintf stdout "Post-parse signature:\n"; + Format.set_margin 80; + Printf.fprintf stdout "%s\n" (Fmt.fmt_to_str Lib.fmt_iface crate); + end +;; + let list_to_seq ls = Asm.SEQ (Array.of_list ls);; let select_insns (quads:Il.quads) : Asm.frag = |