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

SCM Repository

[diderot] Diff of /branches/vis15/src/compiler/simplify/simple-contract.sml
ViewVC logotype

Diff of /branches/vis15/src/compiler/simplify/simple-contract.sml

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

revision 4042, Fri Jun 24 19:04:21 2016 UTC revision 4043, Sun Jun 26 14:00:38 2016 UTC
# Line 80  Line 80 
80            and analyzeExp exp = (case exp            and analyzeExp exp = (case exp
81                   of S.E_Var x => markUsed x                   of S.E_Var x => markUsed x
82                    | S.E_Lit _ => ()                    | S.E_Lit _ => ()
83                      | S.E_Kernel _ => ()
84                    | S.E_Select(x, fld) => (markUsed x; markUsed fld)                    | S.E_Select(x, fld) => (markUsed x; markUsed fld)
85                    | S.E_Apply(f, xs, _) => List.app markUsed xs                    | S.E_Apply(f, xs, _) => List.app markUsed xs
86                    | S.E_Prim(_, _, xs, _) => List.app markUsed xs                    | S.E_Prim(_, _, xs, _) => List.app markUsed xs
# Line 89  Line 90 
90                    | S.E_Coerce{x, ...} => markUsed x                    | S.E_Coerce{x, ...} => markUsed x
91                    | S.E_LoadSeq _ => ()                    | S.E_LoadSeq _ => ()
92                    | S.E_LoadImage _ => ()                    | S.E_LoadImage _ => ()
93                      | S.E_InsideImage(pos, img, _) => (markUsed pos; markUsed img)
94                  (* end case *))                  (* end case *))
95            in            in
96              analyzeBlk blk              analyzeBlk blk
# Line 119  Line 121 
121            fun delete exp = (case exp            fun delete exp = (case exp
122                   of S.E_Var x => unuse x                   of S.E_Var x => unuse x
123                    | S.E_Lit _ => ()                    | S.E_Lit _ => ()
124                      | S.E_Kernel _ => ()
125                    | S.E_Select(x, fld) => (unuse x; unuse fld)                    | S.E_Select(x, fld) => (unuse x; unuse fld)
126                    | S.E_Apply(f, xs, _) => List.app unuse xs                    | S.E_Apply(f, xs, _) => List.app unuse xs
127                    | S.E_Prim(_, _, xs, _) => List.app unuse xs                    | S.E_Prim(_, _, xs, _) => List.app unuse xs
# Line 128  Line 131 
131                    | S.E_Coerce{x, ...} => unuse x                    | S.E_Coerce{x, ...} => unuse x
132                    | S.E_LoadSeq _ => ()                    | S.E_LoadSeq _ => ()
133                    | S.E_LoadImage _ => ()                    | S.E_LoadImage _ => ()
134                      | S.E_InsideImage(pos, img, _) => (unuse pos; unuse img)
135                  (* end case *))                  (* end case *))
136            fun contractBlk (S.Block{props, code}) = let            fun contractBlk (S.Block{props, code}) = let
137                  fun contractStms [] = []                  fun contractStms [] = []

Legend:
Removed from v.4042  
changed lines
  Added in v.4043

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