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

SCM Repository

[diderot] Diff of /trunk/src/compiler/c-util/tree-to-c-fn.sml
ViewVC logotype

Diff of /trunk/src/compiler/c-util/tree-to-c-fn.sml

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

revision 1922, Sat Jun 23 11:25:39 2012 UTC revision 1923, Sat Jun 23 12:02:18 2012 UTC
# Line 55  Line 55 
55    (* integer literal expression *)    (* integer literal expression *)
56      fun intExp (i : int) = CL.mkInt(IntInf.fromInt i)      fun intExp (i : int) = CL.mkInt(IntInf.fromInt i)
57    
58        fun addrOf e = CL.mkUnOp(CL.%&, e)
59    
60    (* translate TreeIL types to CLang types *)    (* translate TreeIL types to CLang types *)
61      fun trType ty = (case ty      fun trType ty = (case ty
62             of Ty.BoolTy => CLang.T_Named "bool"             of Ty.BoolTy => CLang.T_Named "bool"
# Line 87  Line 89 
89    (* translate IL basis functions *)    (* translate IL basis functions *)
90      local      local
91        fun mkLookup suffix = let        fun mkLookup suffix = let
92              val tbl = ILBasis.Tbl.mkTable (16, Fail "basis table")              val tbl = MathFuns.Tbl.mkTable (16, Fail "basis table")
93              fun ins f = ILBasis.Tbl.insert tbl (f, ILBasis.toString f ^ suffix)              fun ins f = MathFuns.Tbl.insert tbl (f, MathFuns.toString f ^ suffix)
94              in              in
95                List.app ins ILBasis.allFuns;                List.app ins MathFuns.allFuns;
96                ILBasis.Tbl.lookup tbl                MathFuns.Tbl.lookup tbl
97              end              end
98        val fLookup = mkLookup "f"        val fLookup = mkLookup "f"
99        val dLookup = mkLookup ""        val dLookup = mkLookup ""

Legend:
Removed from v.1922  
changed lines
  Added in v.1923

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