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/mltree/mltree-labexp.sml
ViewVC logotype

Diff of /sml/trunk/src/MLRISC/mltree/mltree-labexp.sml

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

revision 889, Thu Jul 19 20:35:20 2001 UTC revision 909, Fri Aug 24 17:48:53 2001 UTC
# Line 40  Line 40 
40     (*     (*
41      * Hashing      * Hashing
42      *)      *)
43     fun hashLabel(Label.Label{id,...}) = w id     val hashLabel = Label.hash
44     and hasher() = {stm=hashStm, rexp=hashRexp, fexp=hashFexp, ccexp=hashCCexp}     fun hasher() = {stm=hashStm, rexp=hashRexp, fexp=hashFexp, ccexp=hashCCexp}
45     and hashCtrl ctrl = wv ctrl     and hashCtrl ctrl = wv ctrl
46     and hashStm stm =     and hashStm stm =
47        case stm of        case stm of
# Line 179  Line 179 
179    and hashCCexps([],h) = h    and hashCCexps([],h) = h
180      | hashCCexps(e::es,h) = hashCCexps(es,hashCCexp e + h)      | hashCCexps(e::es,h) = hashCCexps(es,hashCCexp e + h)
181    
182    fun eqLabel(Label.Label{id=x,...},Label.Label{id=y,...}) = x=y    val eqLabel = Label.same
183    and eqLabels([],[]) = true    fun eqLabels([],[]) = true
184      | eqLabels(a::b,c::d) = eqLabel(a,c) andalso eqLabels(b,d)      | eqLabels(a::b,c::d) = eqLabel(a,c) andalso eqLabels(b,d)
185      | eqLabels _ = false      | eqLabels _ = false
186    and eqCell(C.CELL{id=x, ...},C.CELL{id=y, ...}) = x=y    and eqCell(C.CELL{id=x, ...},C.CELL{id=y, ...}) = x=y
# Line 447  Line 447 
447    
448    fun toString le = toStr(le, 0)    fun toString le = toStr(le, 0)
449    
450    and toStr(T.LABEL lab, _) = Label.nameOf lab    and toStr(T.LABEL lab, _) = Label.toString lab
451      | toStr(T.LABEXP le, p) = toStr(le, p)      | toStr(T.LABEXP le, p) = toStr(le, p)
452      | toStr(T.CONST c, _) =      | toStr(T.CONST c, _) =
453          if !resolveConstants then prInt(Constant.valueOf c)          if !resolveConstants then prInt(Constant.valueOf c)

Legend:
Removed from v.889  
changed lines
  Added in v.909

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