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

SCM Repository

[diderot] Annotation of /branches/charisee/src/compiler/c-target/c-target.sml
ViewVC logotype

Annotation of /branches/charisee/src/compiler/c-target/c-target.sml

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1766 - (view) (download)
Original Path: trunk/src/compiler/c-target/c-target.sml

1 : jhr 1115 (* c-target.sml
2 :     *
3 :     * COPYRIGHT (c) 2011 The Diderot Project (http://diderot-language.cs.uchicago.edu)
4 :     * All rights reserved.
5 :     *)
6 :    
7 :     structure CTarget : TARGET =
8 :     struct
9 :    
10 :     structure IL = TreeIL
11 :     structure V = IL.Var
12 :     structure Ty = IL.Ty
13 :     structure CL = CLang
14 : jhr 1376 structure N = CNames
15 : jhr 1115
16 : jhr 1640 (* variable translation *)
17 :     structure TrVar =
18 :     struct
19 :     type env = CL.typed_var TreeIL.Var.Map.map
20 :     fun lookup (env, x) = (case V.Map.find (env, x)
21 :     of SOME(CL.V(_, x')) => x'
22 :     | NONE => raise Fail(concat["lookup(_, ", V.name x, ")"])
23 :     (* end case *))
24 :     (* translate a variable that occurs in an l-value context (i.e., as the target of an assignment) *)
25 :     fun lvalueVar (env, x) = (case V.kind x
26 :     of IL.VK_Global => CL.mkVar(lookup(env, x))
27 :     | IL.VK_Local => CL.mkVar(lookup(env, x))
28 :     (* end case *))
29 :     (* translate a variable that occurs in an r-value context *)
30 :     fun rvalueVar (env, x) = (case V.kind x
31 :     of IL.VK_Global => CL.mkVar(lookup(env, x))
32 :     | IL.VK_Local => CL.mkVar(lookup(env, x))
33 :     (* end case *))
34 :     (* translate a strand state variable that occurs in an l-value context *)
35 :     fun lvalueStateVar x = CL.mkIndirect(CL.mkVar "selfOut", IL.StateVar.name x)
36 :     (* translate a strand state variable that occurs in an r-value context *)
37 :     fun rvalueStateVar x = CL.mkIndirect(CL.mkVar "selfIn", IL.StateVar.name x)
38 :     end
39 :    
40 :     structure ToC = TreeToCFn (TrVar)
41 :    
42 :     type var = CL.typed_var
43 : jhr 1115 type exp = CL.exp
44 :     type stm = CL.stm
45 :    
46 :     datatype strand = Strand of {
47 : jhr 1375 name : string,
48 :     tyName : string,
49 : jhr 1640 state : var list,
50 :     output : (Ty.ty * CL.var), (* the strand's output variable (only one for now) *)
51 : jhr 1375 code : CL.decl list ref
52 : jhr 1115 }
53 :    
54 :     datatype program = Prog of {
55 : jhr 1375 name : string, (* stem of source file *)
56 :     double : bool, (* true for double-precision support *)
57 :     parallel : bool, (* true for multithreaded (or multi-GPU) target *)
58 :     debug : bool, (* true for debug support in executable *)
59 :     globals : CL.decl list ref,
60 :     topDecls : CL.decl list ref,
61 :     strands : strand AtomTable.hash_table,
62 :     initially : CL.decl ref
63 : jhr 1115 }
64 :    
65 :     datatype env = ENV of {
66 : jhr 1375 info : env_info,
67 :     vMap : var V.Map.map,
68 :     scope : scope
69 : jhr 1115 }
70 :    
71 :     and env_info = INFO of {
72 : jhr 1375 prog : program
73 : jhr 1115 }
74 :    
75 :     and scope
76 :     = NoScope
77 :     | GlobalScope
78 :     | InitiallyScope
79 : jhr 1640 | StrandScope (* strand initialization *)
80 :     | MethodScope of StrandUtil.method_name (* method body; vars are state variables *)
81 : jhr 1115
82 :     (* the supprted widths of vectors of reals on the target. For the GNU vector extensions,
83 :     * the supported sizes are powers of two, but float2 is broken.
84 :     * NOTE: we should also consider the AVX vector hardware, which has 256-bit registers.
85 :     *)
86 : jhr 1376 fun vectorWidths () = if !N.doublePrecision
87 : jhr 1375 then [2, 4, 8]
88 :     else [4, 8]
89 : jhr 1115
90 : jhr 1640 (* we support printing in the sequential C target *)
91 :     val supportsPrinting = true
92 :    
93 : jhr 1115 (* tests for whether various expression forms can appear inline *)
94 : jhr 1375 fun inlineCons n = (n < 2) (* vectors are inline, but not matrices *)
95 :     val inlineMatrixExp = false (* can matrix-valued expressions appear inline? *)
96 : jhr 1115
97 :     (* TreeIL to target translations *)
98 :     structure Tr =
99 :     struct
100 : jhr 1375 fun fragment (ENV{info, vMap, scope}, blk) = let
101 :     val (vMap, stms) = ToC.trFragment (vMap, blk)
102 :     in
103 :     (ENV{info=info, vMap=vMap, scope=scope}, stms)
104 :     end
105 : jhr 1640 (* NOTE: we may be able to simplify the interface to ToC.trBlock! *)
106 :     fun block (ENV{vMap, ...}, blk) = ToC.trBlock (vMap, blk)
107 : jhr 1375 fun exp (ENV{vMap, ...}, e) = ToC.trExp(vMap, e)
108 : jhr 1115 end
109 :    
110 :     (* variables *)
111 :     structure Var =
112 :     struct
113 : jhr 1640 fun name (CL.V(_, name)) = name
114 : jhr 1375 fun global (Prog{globals, ...}, name, ty) = let
115 :     val ty' = ToC.trType ty
116 :     in
117 :     globals := CL.D_Var([], ty', name, NONE) :: !globals;
118 : jhr 1640 CL.V(ty', name)
119 : jhr 1375 end
120 : jhr 1640 fun param x = CL.V(ToC.trType(V.ty x), V.name x)
121 : jhr 1115 end
122 :    
123 :     (* environments *)
124 :     structure Env =
125 :     struct
126 :     (* create a new environment *)
127 : jhr 1375 fun new prog = ENV{
128 :     info=INFO{prog = prog},
129 :     vMap = V.Map.empty,
130 :     scope = NoScope
131 :     }
132 : jhr 1115 (* define the current translation context *)
133 : jhr 1375 fun setScope scope (ENV{info, vMap, ...}) = ENV{info=info, vMap=vMap, scope=scope}
134 :     val scopeGlobal = setScope GlobalScope
135 :     val scopeInitially = setScope InitiallyScope
136 : jhr 1640 fun scopeStrand env = setScope StrandScope env
137 :     fun scopeMethod (env, name) = setScope (MethodScope name) env
138 : jhr 1115 (* bind a TreeIL varaiable to a target variable *)
139 : jhr 1375 fun bind (ENV{info, vMap, scope}, x, x') = ENV{
140 :     info = info,
141 :     vMap = V.Map.insert(vMap, x, x'),
142 :     scope = scope
143 :     }
144 : jhr 1115 end
145 :    
146 :     (* programs *)
147 :     structure Program =
148 :     struct
149 : jhr 1375 fun new {name, double, parallel, debug} = (
150 : jhr 1640 N.initTargetSpec {double=double, long=false};
151 : jhr 1375 Prog{
152 :     name = name,
153 :     double = double, parallel = parallel, debug = debug,
154 :     globals = ref [ (* NOTE: in reverse order! *)
155 : jhr 1301 CL.D_Var(["static"], CL.charPtr, "ProgramName",
156 :     SOME(CL.I_Exp(CL.mkStr name))),
157 :     CL.D_Verbatim[
158 :     if double
159 : jhr 1640 then "#define DIDEROT_DOUBLE_PRECISION\n"
160 :     else "#define DIDEROT_SINGLE_PRECISION\n",
161 :     "#define DIDEROT_INT\n",
162 : jhr 1375 if parallel
163 : jhr 1640 then "#define DIDEROT_TARGET_PARALLEL\n"
164 :     else "#define DIDEROT_TARGET_C\n",
165 :     "#include \"Diderot/diderot.h\"\n"
166 : jhr 1301 ]
167 : jhr 1375 ],
168 :     topDecls = ref [],
169 :     strands = AtomTable.mkTable (16, Fail "strand table"),
170 :     initially = ref(CL.D_Comment["missing initially"])
171 :     })
172 : jhr 1301 (* register the code that is used to register command-line options for input variables *)
173 : jhr 1375 fun inputs (Prog{topDecls, ...}, stm) = let
174 :     val inputsFn = CL.D_Func(
175 : jhr 1376 [], CL.voidTy, N.registerOpts,
176 :     [CL.PARAM([], CL.T_Ptr(CL.T_Named N.optionsTy), "opts")],
177 : jhr 1375 stm)
178 :     in
179 :     topDecls := inputsFn :: !topDecls
180 :     end
181 : jhr 1115 (* register the global initialization part of a program *)
182 : jhr 1375 fun init (Prog{topDecls, ...}, init) = let
183 : jhr 1376 val initFn = CL.D_Func([], CL.voidTy, N.initGlobals, [], init)
184 : jhr 1375 val shutdownFn = CL.D_Func(
185 : jhr 1376 [], CL.voidTy, N.shutdown,
186 :     [CL.PARAM([], CL.T_Ptr(CL.T_Named N.worldTy), "wrld")],
187 : jhr 1375 CL.S_Block[])
188 :     in
189 :     topDecls := shutdownFn :: initFn :: !topDecls
190 :     end
191 : jhr 1115 (* create and register the initially function for a program *)
192 : jhr 1375 fun initially {
193 :     prog = Prog{name=progName, strands, initially, ...},
194 :     isArray : bool,
195 :     iterPrefix : stm list,
196 :     iters : (var * exp * exp) list,
197 :     createPrefix : stm list,
198 :     strand : Atom.atom,
199 :     args : exp list
200 :     } = let
201 :     val name = Atom.toString strand
202 :     val nDims = List.length iters
203 : jhr 1376 val worldTy = CL.T_Ptr(CL.T_Named N.worldTy)
204 : jhr 1375 fun mapi f xs = let
205 :     fun mapf (_, []) = []
206 :     | mapf (i, x::xs) = f(i, x) :: mapf(i+1, xs)
207 :     in
208 :     mapf (0, xs)
209 :     end
210 :     val baseInit = mapi (fn (i, (_, e, _)) => (i, CL.I_Exp e)) iters
211 :     val sizeInit = mapi
212 : jhr 1640 (fn (i, (CL.V(ty, _), lo, hi)) =>
213 : jhr 1375 (i, CL.I_Exp(CL.mkBinOp(CL.mkBinOp(hi, CL.#-, lo), CL.#+, CL.E_Int(1, ty))))
214 :     ) iters
215 :     (* code to allocate the world and initial strands *)
216 :     val wrld = "wrld"
217 :     val allocCode = [
218 :     CL.mkComment["allocate initial block of strands"],
219 :     CL.mkDecl(CL.T_Array(CL.int32, SOME nDims), "base", SOME(CL.I_Array baseInit)),
220 :     CL.mkDecl(CL.T_Array(CL.uint32, SOME nDims), "size", SOME(CL.I_Array sizeInit)),
221 :     CL.mkDecl(worldTy, wrld,
222 : jhr 1376 SOME(CL.I_Exp(CL.E_Apply(N.allocInitially, [
223 : jhr 1375 CL.mkVar "ProgramName",
224 : jhr 1376 CL.mkUnOp(CL.%&, CL.E_Var(N.strandDesc name)),
225 : jhr 1375 CL.E_Bool isArray,
226 :     CL.E_Int(IntInf.fromInt nDims, CL.int32),
227 :     CL.E_Var "base",
228 :     CL.E_Var "size"
229 :     ]))))
230 :     ]
231 :     (* create the loop nest for the initially iterations *)
232 :     val indexVar = "ix"
233 : jhr 1376 val strandTy = CL.T_Ptr(CL.T_Named(N.strandTy name))
234 : jhr 1375 fun mkLoopNest [] = CL.mkBlock(createPrefix @ [
235 :     CL.mkDecl(strandTy, "sp",
236 :     SOME(CL.I_Exp(
237 :     CL.E_Cast(strandTy,
238 : jhr 1376 CL.E_Apply(N.inState, [CL.E_Var "wrld", CL.E_Var indexVar]))))),
239 :     CL.mkCall(N.strandInit name, CL.E_Var "sp" :: args),
240 : jhr 1375 CL.mkAssign(CL.E_Var indexVar, CL.mkBinOp(CL.E_Var indexVar, CL.#+, CL.E_Int(1, CL.uint32)))
241 :     ])
242 : jhr 1640 | mkLoopNest ((CL.V(ty, param), lo, hi)::iters) = let
243 : jhr 1375 val body = mkLoopNest iters
244 :     in
245 :     CL.mkFor(
246 :     [(ty, param, lo)],
247 :     CL.mkBinOp(CL.E_Var param, CL.#<=, hi),
248 :     [CL.mkPostOp(CL.E_Var param, CL.^++)],
249 :     body)
250 :     end
251 :     val iterCode = [
252 :     CL.mkComment["initially"],
253 :     CL.mkDecl(CL.uint32, indexVar, SOME(CL.I_Exp(CL.E_Int(0, CL.uint32)))),
254 :     mkLoopNest iters
255 :     ]
256 :     val body = CL.mkBlock(
257 : jhr 1301 iterPrefix @
258 :     allocCode @
259 :     iterCode @
260 :     [CL.mkReturn(SOME(CL.E_Var "wrld"))])
261 : jhr 1376 val initFn = CL.D_Func([], worldTy, N.initially, [], body)
262 : jhr 1375 in
263 :     initially := initFn
264 :     end
265 : jhr 1115
266 :     (***** OUTPUT *****)
267 : jhr 1375 fun genStrand (Strand{name, tyName, state, output, code}) = let
268 :     (* the type declaration for the strand's state struct *)
269 :     val selfTyDef = CL.D_StructDef(
270 : jhr 1766 NONE,
271 :     List.rev (List.map (fn CL.V(ty, x) => (ty, x)) state),
272 :     SOME tyName)
273 : jhr 1640 (* the type and access expression for the strand's output variable *)
274 :     val (outTy, outState) = (#1 output, CL.mkIndirect(CL.mkVar "self", #2 output))
275 : jhr 1375 (* the print function *)
276 : jhr 1640 val prFnName = concat[name, "_Print"]
277 : jhr 1375 val prFn = let
278 :     val params = [
279 :     CL.PARAM([], CL.T_Ptr(CL.T_Named "FILE"), "outS"),
280 :     CL.PARAM([], CL.T_Ptr(CL.T_Named tyName), "self")
281 :     ]
282 : jhr 1640 val prArgs = (case outTy
283 :     of Ty.IntTy => [CL.E_Str(!N.gIntFormat ^ "\n"), outState]
284 :     | Ty.TensorTy[] => [CL.E_Str "%f\n", outState]
285 :     | Ty.TensorTy[d] => let
286 : jhr 1375 val fmt = CL.E_Str(
287 : jhr 1640 String.concatWith " " (List.tabulate(d, fn _ => "%f"))
288 : jhr 1375 ^ "\n")
289 : jhr 1640 val args = List.tabulate (d, fn i => ToC.vecIndex(outState, d, i))
290 : jhr 1375 in
291 :     fmt :: args
292 :     end
293 : jhr 1640 | Ty.SeqTy(Ty.IntTy, d) => let
294 : jhr 1375 val fmt = CL.E_Str(
295 : jhr 1640 String.concatWith " " (List.tabulate(d, fn _ => !N.gIntFormat))
296 : jhr 1375 ^ "\n")
297 : jhr 1640 val args = List.tabulate (d, fn i => ToC.ivecIndex(outState, d, i))
298 : jhr 1375 in
299 :     fmt :: args
300 :     end
301 : jhr 1640 | _ => raise Fail("genStrand: unsupported output type " ^ Ty.toString outTy)
302 : jhr 1375 (* end case *))
303 :     in
304 :     CL.D_Func(["static"], CL.voidTy, prFnName, params,
305 :     CL.mkCall("fprintf", CL.mkVar "outS" :: prArgs))
306 :     end
307 : jhr 1640 (* the output function *)
308 :     val outFnName = concat[name, "_Output"]
309 :     val outFn = let
310 :     val params = [
311 :     CL.PARAM([], CL.T_Ptr CL.voidTy, "outS"),
312 :     CL.PARAM([], CL.T_Ptr(CL.T_Named tyName), "self")
313 :     ]
314 :     (* get address of output variable *)
315 :     val outState = CL.mkUnOp(CL.%&, outState)
316 :     in
317 :     CL.D_Func(["static"], CL.voidTy, outFnName, params,
318 :     CL.mkCall("memcpy", [CL.mkVar "outS", outState, CL.mkSizeof(ToC.trType outTy)] ))
319 :     end
320 : jhr 1375 (* the strand's descriptor object *)
321 :     val descI = let
322 :     fun fnPtr (ty, f) = CL.I_Exp(CL.mkCast(CL.T_Named ty, CL.mkVar f))
323 : jhr 1640 val nrrdTy = NrrdTypes.toNrrdType outTy
324 :     val nrrdSize = NrrdTypes.toNrrdSize outTy
325 :     in
326 :     CL.I_Struct[
327 :     ("name", CL.I_Exp(CL.mkStr name)),
328 :     ("stateSzb", CL.I_Exp(CL.mkSizeof(CL.T_Named(N.strandTy name)))),
329 :     ("outputSzb", CL.I_Exp(CL.mkInt nrrdSize)),
330 :     ("nrrdSzb", CL.I_Exp(CL.mkInt nrrdSize)),
331 :     ("nrrdType", CL.I_Exp(CL.mkInt nrrdTy)),
332 :     (* FIXME: should use StrandUtil.nameToString here *)
333 :     ("update", fnPtr("update_method_t", name ^ "_Update")),
334 :     ("stabilize", fnPtr("stabilize_method_t", name ^ "_Stabilize")),
335 :     ("print", fnPtr("print_method_t", prFnName)),
336 :     ("output", fnPtr("output_method_t", outFnName))
337 :     ]
338 :     end
339 : jhr 1376 val desc = CL.D_Var([], CL.T_Named N.strandDescTy, N.strandDesc name, SOME descI)
340 : jhr 1375 in
341 : jhr 1640 selfTyDef :: List.rev (desc :: prFn :: outFn :: !code)
342 : jhr 1375 end
343 : jhr 1115
344 :     (* generate the table of strand descriptors *)
345 : jhr 1375 fun genStrandTable (ppStrm, strands) = let
346 :     val nStrands = length strands
347 : jhr 1376 fun genInit (Strand{name, ...}) = CL.I_Exp(CL.mkUnOp(CL.%&, CL.E_Var(N.strandDesc name)))
348 : jhr 1375 fun genInits (_, []) = []
349 :     | genInits (i, s::ss) = (i, genInit s) :: genInits(i+1, ss)
350 :     fun ppDecl dcl = PrintAsC.output(ppStrm, dcl)
351 :     in
352 : jhr 1376 ppDecl (CL.D_Var([], CL.int32, N.numStrands,
353 : jhr 1375 SOME(CL.I_Exp(CL.E_Int(IntInf.fromInt nStrands, CL.int32)))));
354 :     ppDecl (CL.D_Var([],
355 : jhr 1376 CL.T_Array(CL.T_Ptr(CL.T_Named N.strandDescTy), SOME nStrands),
356 :     N.strands,
357 : jhr 1375 SOME(CL.I_Array(genInits (0, strands)))))
358 :     end
359 : jhr 1115
360 : jhr 1375 fun genSrc (baseName, prog) = let
361 :     val Prog{name, globals, topDecls, strands, initially, ...} = prog
362 :     val fileName = OS.Path.joinBaseExt{base=baseName, ext=SOME "c"}
363 :     val outS = TextIO.openOut fileName
364 :     val ppStrm = PrintAsC.new outS
365 :     fun ppDecl dcl = PrintAsC.output(ppStrm, dcl)
366 :     val strands = AtomTable.listItems strands
367 :     in
368 :     List.app ppDecl (List.rev (!globals));
369 :     List.app ppDecl (List.rev (!topDecls));
370 :     List.app (fn strand => List.app ppDecl (genStrand strand)) strands;
371 :     genStrandTable (ppStrm, strands);
372 :     ppDecl (!initially);
373 :     PrintAsC.close ppStrm;
374 :     TextIO.closeOut outS
375 :     end
376 : jhr 1115
377 :     (* output the code to a file. The string is the basename of the file, the extension
378 :     * is provided by the target.
379 :     *)
380 : jhr 1375 fun generate (basename, prog as Prog{name, double, parallel, debug, ...}) = let
381 :     fun condCons (true, x, xs) = x::xs
382 :     | condCons (false, _, xs) = xs
383 :     (* generate the C compiler flags *)
384 :     val cflags = ["-I" ^ Paths.diderotInclude, "-I" ^ Paths.teemInclude]
385 :     val cflags = condCons (parallel, #pthread Paths.cflags, cflags)
386 :     val cflags = if debug
387 :     then #debug Paths.cflags :: cflags
388 :     else #ndebug Paths.cflags :: cflags
389 :     val cflags = #base Paths.cflags :: cflags
390 :     (* generate the loader flags *)
391 :     val extraLibs = condCons (parallel, #pthread Paths.extraLibs, [])
392 :     val extraLibs = Paths.teemLinkFlags @ #base Paths.extraLibs :: extraLibs
393 :     val rtLib = TargetUtil.runtimeName {
394 :     target = TargetUtil.TARGET_C,
395 :     parallel = parallel, double = double, debug = debug
396 :     }
397 :     val ldOpts = rtLib :: extraLibs
398 :     in
399 :     genSrc (basename, prog);
400 :     RunCC.compile (basename, cflags);
401 :     RunCC.link (basename, ldOpts)
402 :     end
403 : jhr 1115
404 :     end
405 :    
406 :     (* strands *)
407 :     structure Strand =
408 :     struct
409 : jhr 1640 fun define (Prog{strands, ...}, strandId, state) = let
410 : jhr 1375 val name = Atom.toString strandId
411 : jhr 1640 (* the output state variable *)
412 :     val outputVar = (case List.filter IL.StateVar.isOutput state
413 :     of [] => raise Fail("no output specified for strand " ^ name)
414 :     | [x] => (IL.StateVar.ty x, IL.StateVar.name x)
415 :     | _ => raise Fail("multiple outputs in " ^ name)
416 :     (* end case *))
417 :     (* the state variables *)
418 :     val state = let
419 :     fun cvt x = CL.V(ToC.trType(IL.StateVar.ty x), IL.StateVar.name x)
420 :     in
421 :     List.map cvt state
422 :     end
423 : jhr 1375 val strand = Strand{
424 :     name = name,
425 : jhr 1376 tyName = N.strandTy name,
426 : jhr 1640 state = state,
427 :     output = outputVar,
428 : jhr 1375 code = ref []
429 :     }
430 :     in
431 :     AtomTable.insert strands (strandId, strand);
432 :     strand
433 :     end
434 : jhr 1115
435 :     (* return the strand with the given name *)
436 : jhr 1375 fun lookup (Prog{strands, ...}, strandId) = AtomTable.lookup strands strandId
437 : jhr 1115
438 :     (* register the strand-state initialization code. The variables are the strand
439 :     * parameters.
440 :     *)
441 : jhr 1375 fun init (Strand{name, tyName, code, ...}, params, init) = let
442 : jhr 1376 val fName = N.strandInit name
443 : jhr 1375 val params =
444 :     CL.PARAM([], CL.T_Ptr(CL.T_Named tyName), "selfOut") ::
445 : jhr 1640 List.map (fn (CL.V(ty, x)) => CL.PARAM([], ty, x)) params
446 : jhr 1375 val initFn = CL.D_Func([], CL.voidTy, fName, params, init)
447 :     in
448 :     code := initFn :: !code
449 :     end
450 : jhr 1115
451 :     (* register a strand method *)
452 : jhr 1375 fun method (Strand{name, tyName, code, ...}, methName, body) = let
453 : jhr 1640 val fName = concat[name, "_", StrandUtil.nameToString methName]
454 : jhr 1375 val params = [
455 :     CL.PARAM([], CL.T_Ptr(CL.T_Named tyName), "selfIn"),
456 :     CL.PARAM([], CL.T_Ptr(CL.T_Named tyName), "selfOut")
457 :     ]
458 : jhr 1444 val resTy = (case methName
459 : jhr 1640 of StrandUtil.Update => CL.T_Named "StrandStatus_t"
460 :     | StrandUtil.Stabilize => CL.voidTy
461 : jhr 1444 (* end case *))
462 :     val methFn = CL.D_Func(["static"], resTy, fName, params, body)
463 : jhr 1375 in
464 :     code := methFn :: !code
465 :     end
466 : jhr 1115
467 :     end
468 :    
469 :     end
470 :    
471 :     structure CBackEnd = CodeGenFn(CTarget)

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