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

SCM Repository

[diderot] Diff of /branches/vis15/src/compiler/simplify/util.sml
ViewVC logotype

Diff of /branches/vis15/src/compiler/simplify/util.sml

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

revision 4440, Sun Aug 21 15:11:58 2016 UTC revision 4441, Sun Aug 21 15:55:21 2016 UTC
# Line 26  Line 26 
26    (* convert a block into a function by closing over its free variables *)    (* convert a block into a function by closing over its free variables *)
27      val makeFunction : string * Simple.block * SimpleTypes.ty -> Simple.func_def * Simple.var list      val makeFunction : string * Simple.block * SimpleTypes.ty -> Simple.func_def * Simple.var list
28    
29      (* return true if an AST constant expression is "small" *)
30        val isSmallExp : AST.expr -> bool
31    
32    end = struct    end = struct
33    
34      structure S = Simple      structure S = Simple
# Line 246  Line 249 
249            end            end
250      end (* local *)      end (* local *)
251    
252        fun isSmallExp (AST.E_Lit _) = true
253          | isSmallExp (AST.E_Tensor(exps, _)) = (List.length exps <= 4)
254          | isSmallExp _ = false
255    
256    end    end

Legend:
Removed from v.4440  
changed lines
  Added in v.4441

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