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

SCM Repository

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

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

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

revision 3343, Thu Oct 22 14:15:20 2015 UTC revision 3344, Fri Oct 23 04:38:49 2015 UTC
# Line 27  Line 27 
27      fun toStringBind e= MidToS.toStringBind e      fun toStringBind e= MidToS.toStringBind e
28      fun useCount (HighIL.V{useCnt, ...}) = !useCnt      fun useCount (HighIL.V{useCnt, ...}) = !useCnt
29      fun expandEinOp (srcy,bind00)=let      fun expandEinOp (srcy,bind00)=let
30            val _=raise Fail"development branch- do not use"
31          val star="************"          val star="************"
32  val _=print("\n Start"^star)          val _=("\n Start"^star)
33          val _ =test0[star,"\n Original EinApp",star,"\n\n","start get test",toStringBind bind00]          val _ =test0[star,"\n Original EinApp",star,"\n\n","start get test",toStringBind bind00]
34          val (y,einapp as DstIL.EINAPP(Ein.EIN{params, index, body},args))=bind00          val (y,einapp as DstIL.EINAPP(Ein.EIN{params, index, body},args))=bind00
35    
# Line 44  Line 44 
44          val bind3 = (y,DstIL.EINAPP(SummationEin.main ein1,args))          val bind3 = (y,DstIL.EINAPP(SummationEin.main ein1,args))
45          val _ =testp["\n\n summation \n\n =>", toStringBind bind3]          val _ =testp["\n\n summation \n\n =>", toStringBind bind3]
46    
47    (*
48                val (einapp1,e2)=L.testLift  bind3
49                val newbies5=Split.iterAll(einapp1,e2)
50    
51    *)
52    
53             val (einapp1,e2)=L.testLift  bind3
54            val newbies5=  Split.iterAll2(einapp1,e2)
55            val n =length(newbies5)
56            val _ = if (n > 10) then print("\n **** SPLIT Length"^(Int.toString(n))) else print ""
57    
58    (*
59             (* **************** lift field phase ************* *)
60            (*val newbies5 = L.testLift  bind3*)
61            (*List.rev(  [einapp]@code'*)
62            val (einapp1,e2)=L.testLift  bind3
63    
64            val newbies5piece= Split.splitEinApp(einapp1,5)
65            val newbies5= e2 @ newbies5piece
66            val n =length(newbies5)
67            val _ = if (n > 10) then print("\n **** SPLIT Length"^(Int.toString(n))) else print ""
68          (* **************** split phase ************* *)          (* **************** split phase ************* *)
69      val (newbies5)= Split.splitEinApp bind3          (*
70            val (newbies5)= Split.splitEinApp(bind3,1)
71          val _ =test0["\n\n Returning \n\n =>",          val _ =test0["\n\n Returning \n\n =>",
72              String.concatWith",\n\t"(List.map toStringBind newbies5)]              String.concatWith",\n\t"(List.map toStringBind newbies5)]
73            *)
          (* **************** lift field phase ************* *)  
 (*        val newbies5 = L.testLift  bind3  
74  *)  *)
75           (* ************** ProbeEIN *********** *)           (* ************** ProbeEIN *********** *)
76          (*gives probeEIN the set. Could split into a sepearate step*)          (*gives probeEIN the set. Could split into a sepearate step*)
# Line 82  Line 101 
101    
102          val flatcode= List.foldr op@ [] code          val flatcode= List.foldr op@ [] code
103          (*val _=List.map (fn(_,DstIL.EINAPP(e,_))=>checkEin.checkEIN e | _=> 1) flatcode*)          (*val _=List.map (fn(_,DstIL.EINAPP(e,_))=>checkEin.checkEIN e | _=> 1) flatcode*)
104          val _=print(star^"end")          val _=(star^"end")
105          in          in
106              List.map (fn (y,rator)=> DstIL.ASSGN(y,rator)) flatcode              List.map (fn (y,rator)=> DstIL.ASSGN(y,rator)) flatcode
107          end          end

Legend:
Removed from v.3343  
changed lines
  Added in v.3344

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