Home My Page Projects Code Snippets Project Openings SML/NJ
Summary Activity Forums Tracker Lists Tasks Docs Surveys News SCM Files

SCM Repository

[smlnj] Diff of /MLRISC/trunk/flowgraph/cfgView.sml
ViewVC logotype

Diff of /MLRISC/trunk/flowgraph/cfgView.sml

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 959, Fri Oct 12 21:21:41 2001 UTC revision 984, Wed Nov 21 19:00:08 2001 UTC
# Line 3  Line 3 
3   * Copyright (c) 2001 Bell Laboratories.   * Copyright (c) 2001 Bell Laboratories.
4   *)   *)
5  functor CFGView  functor CFGView
6    (structure CFG : CONTROL_FLOW_GRAPH    (structure Asm : INSTRUCTION_EMITTER
7     structure Asm : INSTRUCTION_EMITTER     structure CFG : CONTROL_FLOW_GRAPH
8                     where I = CFG.I                     where I = Asm.I
9                       and P = CFG.P                       and P = Asm.S.P
10    ) : CFG_VIEW =    ) : CFG_VIEW =
11    
12  struct  struct
# Line 47  Line 47 
47           |  NONE => ()           |  NONE => ()
48          ) handle Overflow => print("Bad footer\n")          ) handle Overflow => print("Bad footer\n")
49    
50    fun emitStuff outline annotations    fun emitStuff outline annotations (block as CFG.BLOCK{insns,labels,...}) =
            (block as CFG.BLOCK{insns,data,labels,...}) =  
51         let val S as S.STREAM{pseudoOp,defineLabel,emit,...} =         let val S as S.STREAM{pseudoOp,defineLabel,emit,...} =
52                 Asm.makeStream annotations                 Asm.makeStream annotations
53         in  emitHeader S block;         in  emitHeader S block;
            app (fn CFG.PSEUDO p => pseudoOp p  
                  | CFG.LABEL l  => defineLabel l) (!data);  
54             app defineLabel (!labels);             app defineLabel (!labels);
55             if outline then () else app emit (rev (!insns));             if outline then () else app emit (rev (!insns));
56             emitFooter S block             emitFooter S block

Legend:
Removed from v.959  
changed lines
  Added in v.984

root@smlnj-gforge.cs.uchicago.edu
ViewVC Help
Powered by ViewVC 1.0.0