--- trunk/src/compiler/simplify/simplify.sml 2010/10/14 20:08:18 398 +++ trunk/src/compiler/simplify/simplify.sml 2010/10/14 20:08:35 399 @@ -143,10 +143,18 @@ in (stms, S.E_Cons xs) end - | AST.E_Slice(e, indices) => let (* tensor slicing *) + | AST.E_Slice(e, indices, ty) => let (* tensor slicing *) val (stms, x) = simplifyExpToVar (e, stms) + fun f ([], ys, stms) = (stms, List.rev ys) + | f (NONE::es, ys, stms) = f (es, NONE::ys, stms) + | f (SOME e::es, ys, stms) = let + val (stms, y) = simplifyExpToVar (e, stms) + in + f (es, SOME y::ys, stms) + end + val (stms, indices) = f (indices, [], stms) in - raise Fail "FIXME" + (stms, S.E_Slice(x, indices, ty)) end | AST.E_Cond(e1, e2, e3) => let (* a conditional expression gets turned into an if-then-else statememt *)
Click to toggle
does not end with </html> tag
does not end with </body> tag
The output has ended thus: e1, e2, e3) => let (* a conditional expression gets turned into an if-then-else statememt *)