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 3324, Tue Oct 20 05:22:52 2015 UTC revision 3325, Tue Oct 20 17:04:54 2015 UTC
# Line 12  Line 12 
12      structure DstIL = MidIL      structure DstIL = MidIL
13      structure P=Printer      structure P=Printer
14      structure MidToS=MidToString      structure MidToS=MidToString
15        structure L=LiftEin
16      in      in
17    
18      val testinitial=0      val testinitial=0
# Line 26  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
         (*val _ = Lift.testLeft 1*)  
30    
31          val star="************"          val star="************"
32    val _=print("\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 43  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          (* **************** split phase ************* *)          (* **************** split phase ************* *)
49          val (newbies5)= Split.splitEinApp bind3          val (newbies5)= Split.splitEinApp bind3
50          val _ =test0["\n\n Returning \n\n =>",          val _ =test0["\n\n Returning \n\n =>",
51              String.concatWith",\n\t"(List.map toStringBind newbies5)]              String.concatWith",\n\t"(List.map toStringBind newbies5)]
52    (*
53             (* **************** lift field phase ************* *)
54            val newbies5 = L.testLift  bind3
55    *)
56           (* ************** ProbeEIN *********** *)           (* ************** ProbeEIN *********** *)
         (*val code=List.map (fn e=>ProbeEin.expandEinOp e) (newbies5)*)  
   
57          (*gives probeEIN the set. Could split into a sepearate step*)          (*gives probeEIN the set. Could split into a sepearate step*)
58          val fieldset= einSet.EinSet.empty          val fieldset= einSet.EinSet.empty
59          val isField = ref 0          val isField = ref 0
# Line 80  Line 82 
82    
83          val flatcode= List.foldr op@ [] code          val flatcode= List.foldr op@ [] code
84          (*val _=List.map (fn(_,DstIL.EINAPP(e,_))=>checkEin.checkEIN e | _=> 1) flatcode*)          (*val _=List.map (fn(_,DstIL.EINAPP(e,_))=>checkEin.checkEIN e | _=> 1) flatcode*)
85            val _=print(star^"end")
86          in          in
87              List.map (fn (y,rator)=> DstIL.ASSGN(y,rator)) flatcode              List.map (fn (y,rator)=> DstIL.ASSGN(y,rator)) flatcode
88          end          end

Legend:
Removed from v.3324  
changed lines
  Added in v.3325

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