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/branches/arith64/compiler/FLINT/cps/cpstrans.sml
ViewVC logotype

Diff of /sml/branches/arith64/compiler/FLINT/cps/cpstrans.sml

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

revision 4829, Thu Sep 13 19:37:44 2018 UTC revision 4874, Fri Oct 5 14:33:11 2018 UTC
# Line 183  Line 183 
183    
184    (*** this special case is a temporary hack; ask ZHONG for details *)    (*** this special case is a temporary hack; ask ZHONG for details *)
185  (*  (*
186      | PURE(P.wrap,[u],w,t as PTRt(FPT _),ce) =>      | PURE(P.box,[u],w,t as PTRt(FPT _),ce) =>
187            (addty(w, t); PURE(P.wrap, [vtrans u], w, t, cexptrans ce))            (addty(w, t); PURE(P.box, [vtrans u], w, t, cexptrans ce))
188      | PURE(P.unwrap,[u],w,t as PTRt(FPT _),ce) =>      | PURE(P.unbox,[u],w,t as PTRt(FPT _),ce) =>
189            (addty(w, t); PURE(P.unwrap, [vtrans u], w, t, cexptrans ce))            (addty(w, t); PURE(P.unbox, [vtrans u], w, t, cexptrans ce))
190  *)  *)
191    
192      | PURE(P.wrap,[u],w,t,ce) =>      | PURE(P.box,[u],w,t,ce) =>
193            (addvl(w,vtrans u); cexptrans ce)            (addvl(w,vtrans u); cexptrans ce)
194      | PURE(P.unwrap,[u],w,t,ce) =>      | PURE(P.unbox,[u],w,t,ce) =>
195            (case u of VAR z => addty(z,t)            (case u of VAR z => addty(z,t)
196                     | _ => ();                     | _ => ();
197             addvl(w,vtrans u); cexptrans ce)             addvl(w,vtrans u); cexptrans ce)
198      | PURE(P.fwrap,[u],w,t,ce) =>      | PURE(p as P.wrap(P.INT sz), [u], w, t, ce) =>
199            if (sz <= Target.defaultIntSz)
200              then (addvl(w,vtrans u); cexptrans ce) (* remove wrapping of tagged ints *)
201              else (addty(w,t); PURE(p, [vtrans u], w, t, cexptrans ce))
202        | PURE(p as P.unwrap(P.INT sz), [u], w, t, ce) =>
203            if (sz <= Target.defaultIntSz)
204              then (addvl(w,vtrans u); cexptrans ce) (* remove unwrapping of tagged ints *)
205              else (addty(w,t); PURE(p,[ vtrans u], w, t, cexptrans ce))
206        | PURE(p as P.wrap(P.FLOAT _), [u], w, t, ce) =>
207          if unboxedfloat          if unboxedfloat
208            then (addty(w,t); PURE(P.fwrap,[vtrans u],w,t,cexptrans ce))            then (addty(w,t); PURE(p, [vtrans u], w, t, cexptrans ce))
209            else (addvl(w,vtrans u); cexptrans ce)            else (addvl(w,vtrans u); cexptrans ce)
210      | PURE(P.funwrap,[u],w,t,ce) =>      | PURE(p as P.unwrap(P.FLOAT _), [u], w, t, ce) =>
211          if unboxedfloat          if unboxedfloat
212            then (addty(w,t); PURE(P.funwrap,[vtrans u],w,t,cexptrans ce))            then (addty(w,t); PURE(p, [vtrans u], w, t, cexptrans ce))
213            else (addvl(w,vtrans u); cexptrans ce)            else (addvl(w,vtrans u); cexptrans ce)
     | PURE(P.iwrap,[u],w,t,ce) => (addvl(w,vtrans u); cexptrans ce)  
     | PURE(P.iunwrap,[u],w,t,ce) => (addvl(w,vtrans u); cexptrans ce)  
     | PURE(P.i32wrap,[u],w,t,ce) =>     (* 64BIT: FIXME *)  
         (addty(w,t); PURE(P.i32wrap,[vtrans u],w,t,cexptrans ce))  
     | PURE(P.i32unwrap,[u],w,t,ce) =>  
         (addty(w,t); PURE(P.i32unwrap,[vtrans u],w,t,cexptrans ce))  
214      | PURE(P.getcon,[u],w,t,ce) =>      | PURE(P.getcon,[u],w,t,ce) =>
215          (addty(w,t); select(0,vtrans u,w,t,cexptrans ce))          (addty(w,t); select(0,vtrans u,w,t,cexptrans ce))
216      | PURE(P.getexn,[u],w,t,ce) =>      | PURE(P.getexn,[u],w,t,ce) =>

Legend:
Removed from v.4829  
changed lines
  Added in v.4874

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