Home My Page Projects Code Snippets Project Openings diderot

# SCM Repository

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

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

revision 2398, Sat Jul 6 23:07:40 2013 UTC revision 2400, Sun Jul 7 13:29:54 2013 UTC
# Line 169  Line 169
169
170          (****************************)          (****************************)
171
172    (*Is coeff val ints? if so don't need decideadd function, can just used addI *)
173
174      fun expandEvalKernel (result, d, h, k, [x]) = let      fun expandEvalKernel (result, d, h, k, [x]) = let
175            val {isCont, segs} = Kernel.curve (h, k)            val {isCont, segs} = Kernel.curve (h, k)
176          (* degree of polynomial *)          (* degree of polynomial *)
# Line 183  Line 185
185            val ty = DstTy.vecTy d            val ty = DstTy.vecTy d
186            val coeffs = List.tabulate (deg+1,            val coeffs = List.tabulate (deg+1,
187                  fn i => DstIL.Var.new("a"^Int.toString i, ty))                  fn i => DstIL.Var.new("a"^Int.toString i, ty))
188
189          (* code to define the coefficient vectors *)          (* code to define the coefficient vectors *)
190            val coeffVecs = let            val coeffVecs = let
191                  fun mk (x, (i, code)) = let                  fun mk (x, (i, code)) = let
# Line 219  Line 222
222                        stms*)                        stms*)
223
225                (*I think add here is just used on ints, so don't need decideAdd function*)
226                  val stms =                  val stms =
227                                (m', DstIL.OP(DstOp.IMul, [x, s])) ::                                (m', DstIL.OP(DstOp.IMul, [x, s])) ::