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

SCM Repository

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

Diff of /branches/vis12/src/compiler/simplify/eval.sml

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

revision 236, Thu Aug 5 21:57:57 2010 UTC revision 240, Fri Aug 6 04:59:16 2010 UTC
# Line 17  Line 17 
17        | Img of ImageInfo.info        | Img of ImageInfo.info
18        | KV of Kernel.kernel        | KV of Kernel.kernel
19    
20      val evalStatics : Simple.program -> value Var.Map.map      val evalStatics : Simple.block -> value Var.Map.map
21    
22    end = struct    end = struct
23    
# Line 154  Line 154 
154                       of SOME evalFn => evalFn (List.map (evalVar env) xs)                       of SOME evalFn => evalFn (List.map (evalVar env) xs)
155                        | NONE => raise Fail("Eval.exvalExp: unknown function " ^ Var.nameOf f)                        | NONE => raise Fail("Eval.exvalExp: unknown function " ^ Var.nameOf f)
156                      (* end case *))                      (* end case *))
157                  ) handle ex => raise Fail (concat [                  ) handle ex => (
158                      TextIO.output (TextIO.stdErr, concat [
159                      Var.uniqueNameOf f, "(",                      Var.uniqueNameOf f, "(",
160                      String.concatWith "," (List.map Var.uniqueNameOf xs),                      String.concatWith "," (List.map Var.uniqueNameOf xs),
161                      ") fails with exception ", exnName ex                        ") fails with exception ", exnName ex, "\n"
162                    ]))                      ]);
163                      raise ex))
164              | S.E_Cons xs => raise Fail "TODO: E_Cons"              | S.E_Cons xs => raise Fail "TODO: E_Cons"
165              | S.E_Input(ty, name, optDefault) => let              | S.E_Input(ty, name, optDefault) => let
166                  val optDefault = Option.map (evalVar env) optDefault                  val optDefault = Option.map (evalVar env) optDefault
# Line 198  Line 200 
200              List.foldl evalStm env stms              List.foldl evalStm env stms
201            end            end
202    
203      fun evalStatics (S.Program{staticInit, ...}) =      fun evalStatics staticInit = evalBlock (VMap.empty, staticInit)
           evalBlock (VMap.empty, staticInit)  
204    
205    end    end

Legend:
Removed from v.236  
changed lines
  Added in v.240

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