Home My Page Projects Code Snippets Project Openings diderot
Summary Activity Tracker Tasks SCM

SCM Repository

[diderot] Diff of /branches/pure-cfg/src/compiler/translate/translate.sml
ViewVC logotype

Diff of /branches/pure-cfg/src/compiler/translate/translate.sml

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

revision 540, Wed Feb 16 03:08:40 2011 UTC revision 541, Wed Feb 16 05:30:57 2011 UTC
# Line 197  Line 197 
197                                  env,                                  env,
198                                  IL.CFG{entry = IL.CFG.entry cfg, exit = joinNd},                                  IL.CFG{entry = IL.CFG.entry cfg, exit = joinNd},
199                                  stms))                                  stms))
200                          (* the join node has only zero or one predecessors, so                          (* the join node has only zero predecessors, so
201                           * it was killed.                           * it was killed.
202                           *)                           *)
203                            | (env, NONE) => raise Fail "unimplemented" (* FIXME *)                            | (env, NONE) => raise Fail "unimplemented" (* FIXME *)
# Line 227  Line 227 
227            val entry = IL.Node.mkENTRY ()            val entry = IL.Node.mkENTRY ()
228            val exit = IL.Node.mkEXIT ()            val exit = IL.Node.mkEXIT ()
229            in            in
230                if IL.CFG.isEmpty cfg
231                  then IL.Node.addEdge (entry, exit)
232                  else (
233              IL.Node.addEdge (entry, IL.CFG.entry cfg);              IL.Node.addEdge (entry, IL.CFG.entry cfg);
234            (* NOTE: this addEdge could fail if all control paths end in DIE or STABILIZE,            (* NOTE: this addEdge could fail if all control paths end in DIE or STABILIZE,
235             * so we wrap it in a handler             * so we wrap it in a handler
236             *)             *)
237              IL.Node.addEdge (IL.CFG.exit cfg, exit) handle _ => ();                  IL.Node.addEdge (IL.CFG.exit cfg, exit) handle _ => ());
238              (IL.CFG{entry = entry, exit = exit}, env)              (IL.CFG{entry = entry, exit = exit}, env)
239            end            end
240    

Legend:
Removed from v.540  
changed lines
  Added in v.541

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