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

SCM Repository

[diderot] Diff of /trunk/src/compiler/simplify/eval.sml
ViewVC logotype

Diff of /trunk/src/compiler/simplify/eval.sml

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

revision 269, Wed Aug 11 04:42:30 2010 UTC revision 511, Tue Feb 8 17:01:43 2011 UTC
# Line 1  Line 1 
1  (* eval.sml  (* eval.sml
2   *   *
3   * COPYRIGHT (c) 2010 The Diderot Project (http://diderot.cs.uchicago.edu)   * COPYRIGHT (c) 2010 The Diderot Project (http://diderot-language.cs.uchicago.edu)
4   * All rights reserved.   * All rights reserved.
5   *   *
6   * Evaluation of "static" expressions.   * Evaluation of "static" expressions.
# Line 106  Line 106 
106  *)  *)
107                  (BV.op_not,             fn [BV b] => BV(not b)),                  (BV.op_not,             fn [BV b] => BV(not b)),
108  (*  (*
                 (BV.op_subscript,       fn (y, [SK, NK], xs) => ??),  
109                  (BV.fn_CL,              fn (y, _, xs) => assign(y, Op.CL, xs)),                  (BV.fn_CL,              fn (y, _, xs) => assign(y, Op.CL, xs)),
110  *)  *)
111                  (BV.op_convolve,        fn [Img info, KV h] => FV(FieldDef.CONV(0, info, h))),                  (BV.op_convolve,        fn [Img info, KV h] => FV(FieldDef.CONV(0, info, h))),
# Line 179  Line 178 
178              | S.E_Tuple _ => raise Fail "E_Tuple"              | S.E_Tuple _ => raise Fail "E_Tuple"
179              | S.E_Apply(f, mvs, xs, _) => apply(env, f, mvs, xs)              | S.E_Apply(f, mvs, xs, _) => apply(env, f, mvs, xs)
180              | S.E_Cons xs => raise Fail "TODO: E_Cons"              | S.E_Cons xs => raise Fail "TODO: E_Cons"
181                | S.E_Slice(e, indices, _) => raise Fail "TODO: E_Slice"
182              | S.E_Input(ty, name, optDefault) => raise Fail "impossible"              | S.E_Input(ty, name, optDefault) => raise Fail "impossible"
183              | S.E_Field fld => SOME(FV fld)              | S.E_Field fld => SOME(FV fld)
184              | S.E_LoadImage info => SOME(Img info)              | S.E_LoadImage info => SOME(Img info)
# Line 214  Line 214 
214                                else env                                else env
215                          | S.S_Assign(x, e) => (case evalExp(env, e)                          | S.S_Assign(x, e) => (case evalExp(env, e)
216                               of SOME v =>                               of SOME v =>
217  (print(concat[Var.uniqueNameOf x, " = ", toString v, "\n"]);  (Log.msg(concat["eval assignment: ", Var.uniqueNameOf x, " = ", toString v, "\n"]);
218                                  VMap.insert(env, x, v)                                  VMap.insert(env, x, v)
219  )  )
220                                | NONE => env                                | NONE => env
# Line 225  Line 225 
225                                | SOME _ => raise Fail "type error"                                | SOME _ => raise Fail "type error"
226                                | NONE => raise (Done env)                                | NONE => raise (Done env)
227                              (* end case *))                              (* end case *))
228                          | S.S_New _ => raise Fail "unexpected new actor"                          | S.S_New _ => raise Fail "unexpected new strand"
229                          | S.S_Die => raise Fail "unexpected die"                          | S.S_Die => raise Fail "unexpected die"
230                          | S.S_Stabilize => raise Fail "unexpected stabilize"                          | S.S_Stabilize => raise Fail "unexpected stabilize"
231                        (* end case *))                        (* end case *))

Legend:
Removed from v.269  
changed lines
  Added in v.511

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