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

SCM Repository

[diderot] Diff of /branches/pure-cfg/src/compiler/c-target/c-target.sml
ViewVC logotype

Diff of /branches/pure-cfg/src/compiler/c-target/c-target.sml

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

revision 1277, Mon Jun 6 15:20:18 2011 UTC revision 1278, Mon Jun 6 16:27:28 2011 UTC
# Line 27  Line 27 
27        }        }
28    
29      datatype program = Prog of {      datatype program = Prog of {
30            name : string,                  (* stem of source file *)
31          double : bool,                  (* true for double-precision support *)          double : bool,                  (* true for double-precision support *)
32          parallel : bool,                (* true for multithreaded (or multi-GPU) target *)          parallel : bool,                (* true for multithreaded (or multi-GPU) target *)
33          debug : bool,                   (* true for debug support in executable *)          debug : bool,                   (* true for debug support in executable *)
# Line 135  Line 136 
136    (* programs *)    (* programs *)
137      structure Program =      structure Program =
138        struct        struct
139          fun new {double, parallel, debug} = (          fun new {name, double, parallel, debug} = (
140                N.initTargetSpec double;                N.initTargetSpec double;
141                Prog{                Prog{
142                      name = name,
143                    double = double, parallel = parallel, debug = debug,                    double = double, parallel = parallel, debug = debug,
144                    globals = ref [                    globals = ref [
145                      CL.D_Verbatim[                      CL.D_Verbatim[
# Line 328  Line 330 
330        (* output the code to a file.  The string is the basename of the file, the extension        (* output the code to a file.  The string is the basename of the file, the extension
331         * is provided by the target.         * is provided by the target.
332         *)         *)
333          fun generate (basename, prog as Prog{double, parallel, debug, ...}) = let          fun generate (basename, prog as Prog{name, double, parallel, debug, ...}) = let
334                fun condCons (true, x, xs) = x::xs                fun condCons (true, x, xs) = x::xs
335                  | condCons (false, _, xs) = xs                  | condCons (false, _, xs) = xs
336              (* generate the C compiler flags *)              (* generate the C compiler flags *)

Legend:
Removed from v.1277  
changed lines
  Added in v.1278

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