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

SCM Repository

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

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

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

revision 2837, Wed Nov 19 23:42:17 2014 UTC revision 2838, Tue Nov 25 03:40:24 2014 UTC
# Line 109  Line 109 
109            | SrcOp.LoadImage info => assign (DstOp.LoadImage info)            | SrcOp.LoadImage info => assign (DstOp.LoadImage info)
110                | SrcOp.Inside info => assign (DstOp.Inside info)                | SrcOp.Inside info => assign (DstOp.Inside info)
111    
112    (*| SrcOp.Norm ty => assign (DstOp.Norm ty)*)
113    | SrcOp.Normalize d => assign (DstOp.Normalize d)
114    
115              (*Input problems *)              (*Input problems *)
116                (*| SrcOp.Input(ty, s, desc) => assign (DstOp.Input(ty, s, desc))                | SrcOp.Input(ty, s, desc) => assign (DstOp.Input(ty, s, desc))
117                | SrcOp.InputWithDefault(ty, s, desc) =>assign (DstOp.InputWithDefault(ty, s, desc))                | SrcOp.InputWithDefault(ty, s, desc) =>assign (DstOp.InputWithDefault(ty, s, desc))
118         *)  
119            | SrcOp.Transform V=> assign (DstOp.Transform V)            | SrcOp.Transform V=> assign (DstOp.Transform V)
120            | SrcOp.Translate V=> assign(DstOp.Translate V)            | SrcOp.Translate V=> assign(DstOp.Translate V)
121                | rator => raise Fail("bogus operator " ^ SrcOp.toString rator)                | rator => raise Fail("bogus operator " ^ SrcOp.toString rator)
# Line 121  Line 124 
124    
125    
126         val testing=1         val testing=1
127        fun testp c=(case testing
     fun expandEinOp (env, y, e, args) = let  
         val einargs=Env.renameList(env, args)  
         val _ =(case testing  
128              of 0 => 1              of 0 => 1
129              | _  => (print(String.concat(["\n\n new ein \n", DstIL.Var.toString(y),"=",P.printerE(e)]@(List.map (fn e=> (DstIL.Var.toString(e)^",")) einargs)@["\n ** pre gen**"]));1)          | _  => (print(String.concat(c));1)
130              (*end case*))              (*end case*))
131    
132    
133        fun expandEinOp (env, y, e, args) = let
134            val einargs=Env.renameList(env, args)
135            val _ =testp(["\n\n new ein \n", DstIL.Var.toString(y),"=",P.printerE(e)]@(List.map (fn e=> (DstIL.Var.toString(e)^",")) einargs)@["\n ** pre gen**"])
136          val _ = X.checkEIN(e)          val _ = X.checkEIN(e)
137    
138          val (_,code)=S1.genfn(DstIL.Var.name y,e,einargs,args)          val (_,code)=S1.genfn(DstIL.Var.name y,e,einargs,args)
# Line 155  Line 159 
159                | SrcIL.APPLY(f, args) => assign (DstIL.APPLY(f, Env.renameList(env, args)))                | SrcIL.APPLY(f, args) => assign (DstIL.APPLY(f, Env.renameList(env, args)))
160                | SrcIL.CONS(ty, args) => assign (DstIL.CONS(ty, Env.renameList(env, args)))                | SrcIL.CONS(ty, args) => assign (DstIL.CONS(ty, Env.renameList(env, args)))
161            | SrcIL.EINAPP(rator, args) => let            | SrcIL.EINAPP(rator, args) => let
162               val _  = (case testing               val _  = testp["\n ------------------------last name",SrcIL.Var.toString(y)]
                 of 0  => 1  
                 | _  => (print(String.concat["\n ------------------------last name",SrcIL.Var.toString(y)]);1)  
                 (*end case *))  
163              in              in
164                  expandEinOp (env, Env.rename (env, y), rator, args)                  expandEinOp (env, Env.rename (env, y), rator, args)
165              end              end

Legend:
Removed from v.2837  
changed lines
  Added in v.2838

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