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 /sml/trunk/src/MLRISC/ra/getreg.sml
 [smlnj] / sml / trunk / src / MLRISC / ra / getreg.sml

# Diff of /sml/trunk/src/MLRISC/ra/getreg.sml

revision 1434, Thu Dec 11 23:23:44 2003 UTC revision 1435, Fri Dec 19 21:45:59 2003 UTC
# Line 56  Line 56
56                      andalso Array.sub(proh,r+1) <> stamp                      andalso Array.sub(proh,r+1) <> stamp
57                      andalso Array.sub(allRegs,r)                      andalso Array.sub(allRegs,r)
58                      andalso Array.sub(allRegs,r+1) then r                      andalso Array.sub(allRegs,r+1) then r
59                else let val r = r+1                else let
60                         val r = if r >= limit then first else r                        val nxt = r+1
61                     in  if r = start then raise GetReg                        val nxtR = if nxt+1 >= limit then first else nxt
62                         else search r                     in
63                          if nxtR = start then raise GetReg else search nxtR
64                     end                     end
65                val found = search(start)                val found = search(start)
66                val next = found + 1                val next = found + 1
67                val next = if next >= limit then first else next                val next = if next+1 >= limit then first else next
68        in        in
69            lastReg := next;            lastReg := next;
70            found            found

Legend:
 Removed from v.1434 changed lines Added in v.1435