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

SCM Repository

[diderot] Diff of /branches/charisee/src/compiler/high-to-mid/handleEin.sml
ViewVC logotype

Diff of /branches/charisee/src/compiler/high-to-mid/handleEin.sml

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

revision 3033, Tue Mar 10 15:17:25 2015 UTC revision 3048, Wed Mar 11 20:00:27 2015 UTC
# Line 26  Line 26 
26          of 0=> 1          of 0=> 1
27          | _ =>(print(String.concat n);1)          | _ =>(print(String.concat n);1)
28          (*end case*))          (*end case*))
29        fun test0 n=(*print(String.concat n)*) 1
30      val einappzero=DstIL.EINAPP(setEin([],[],E.Const 0),[])      val einappzero=DstIL.EINAPP(setEin([],[],E.Const 0),[])
31      fun setEinZero y=  (y,einappzero)      fun setEinZero y=  (y,einappzero)
32      fun filterSca e=Filter.filterSca e      fun filterSca e=Filter.filterSca e
# Line 115  Line 116 
116    
117      fun expandEinOp einapp00=let      fun expandEinOp einapp00=let
118          val star="************"          val star="************"
119          val _ =testp[star,"\n Original EinApp",star,"\n\n","start get test",printEINAPP einapp00]          val _ =test0[star,"\n Original EinApp",star,"\n\n","start get test",printEINAPP einapp00]
120          val (y,einapp as DstIL.EINAPP(Ein.EIN{params, index, body},args))=einapp00          val (y,einapp as DstIL.EINAPP(Ein.EIN{params, index, body},args))=einapp00
121    
122          (* ************* Sweep for 0's'*********** *)          (* ************* Sweep for 0's'*********** *)
# Line 140  Line 141 
141          val _ =testp["\n\n Returning \n\n =>",printEINAPP einapp5,          val _ =testp["\n\n Returning \n\n =>",printEINAPP einapp5,
142          " newbies\n\t",String.concatWith",\n\t"(List.map printEINAPP newbies5), "\n",star]          " newbies\n\t",String.concatWith",\n\t"(List.map printEINAPP newbies5), "\n",star]
143    
   
144           (* ************** ProbeEIN *********** *)           (* ************** ProbeEIN *********** *)
145          val code=List.map (fn e=>ProbeEin.expandEinOp e) (newbies5@[einapp5])          val code=List.map (fn e=>ProbeEin.expandEinOp e) (newbies5@[einapp5])
146          val flatcode= List.foldr op@ [] code          val flatcode= List.foldr op@ [] code
147            (*val _=List.map (fn(_,DstIL.EINAPP(e,_))=>checkEin.checkEIN e | _=> 1) flatcode*)
148          in          in
149              List.map (fn (y,rator)=> DstIL.ASSGN(y,rator)) flatcode              List.map (fn (y,rator)=> DstIL.ASSGN(y,rator)) flatcode
150          end          end

Legend:
Removed from v.3033  
changed lines
  Added in v.3048

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