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/staged-alloc/allocator/staged-allocation-fn.sml
ViewVC logotype

Diff of /MLRISC/trunk/staged-alloc/allocator/staged-allocation-fn.sml

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

revision 3166, Wed Jul 30 00:03:25 2008 UTC revision 3173, Thu Jul 31 01:11:27 2008 UTC
# Line 89  Line 89 
89          end          end
90      end (* local *)      end (* local *)
91    
92      (* bit width of a machine location *)
93        fun width (REG (w, _, _)) = w
94          | width (BLOCK_OFFSET (w, _, _)) = w
95          | width (COMBINE (l1, l2)) = width l1 + width l2
96          | width (NARROW (_, w, _)) = w
97    
98      fun useRegs rs = let      fun useRegs rs = let
99          val c = freshCounter ()          val c = freshCounter ()
100          in          in
# Line 145  Line 151 
151                     if (w <= f w)                     if (w <= f w)
152                        then let                        then let
153                          val (SOME loc, store') = step stages ((f w, k, al), store)                          val (SOME loc, store') = step stages ((f w, k, al), store)
154                          val loc' = NARROW(loc, w, k)                          val loc' = if w = f w
155                                       then loc   (* eliminate unnecessary narrowed locations *)
156                                       else NARROW(loc, w, k)
157                          in                          in
158                             (SOME loc', store')                             (SOME loc', store')
159                          end                          end

Legend:
Removed from v.3166  
changed lines
  Added in v.3173

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