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

SCM Repository

[diderot] Diff of /branches/vis15/src/compiler/target-cpu/gen.sml
ViewVC logotype

Diff of /branches/vis15/src/compiler/target-cpu/gen.sml

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

revision 3906, Mon May 23 22:09:41 2016 UTC revision 3908, Tue May 24 14:33:23 2016 UTC
# Line 22  Line 22 
22    
23      val openCxxOut = Out.openOut {ext = "cxx", ppDecl = PrintAsCxx.output}      val openCxxOut = Out.openOut {ext = "cxx", ppDecl = PrintAsCxx.output}
24    
25        fun mkEnv spec = if TargetSpec.dualState spec
26              then Env.new {
27                  global = RN.globalsVar,
28                  selfIn = RN.selfInVar,
29                  selfOut = RN.selfOutVar,
30                  spec = spec
31                }
32              else Env.new {
33                  global = RN.globalsVar,
34                  selfIn = RN.selfVar,
35                  selfOut = RN.selfVar,
36                  spec = spec
37                }
38    
39    (* create the target-specific substitution list *)    (* create the target-specific substitution list *)
40      fun mkSubs (spec, IR.Strand{name, ...}) = [      fun mkSubs (spec, IR.Strand{name, ...}) = [
41              ("CFILE",                   OS.Path.joinBaseExt{base= #outBase spec, ext= SOME "c"}),              ("CFILE",                   OS.Path.joinBaseExt{base= #outBase spec, ext= SOME "c"}),
# Line 152  Line 166 
166                    globals, globalInit, strand, create, update                    globals, globalInit, strand, create, update
167                  } = prog                  } = prog
168            val {outDir, outBase, exec, double, debug, ...} = spec            val {outDir, outBase, exec, double, debug, ...} = spec
169            val env = Env.new {            val env = mkEnv spec
                   global = RN.globalsVar,  
                   selfIn = RN.selfInVar,  
                   selfOut = if TargetSpec.dualState spec then RN.selfOutVar else RN.selfInVar,  
                   spec = spec  
                 }  
170            val baseName = OS.Path.joinDirFile{dir = #outDir spec, file = #outBase spec}            val baseName = OS.Path.joinDirFile{dir = #outDir spec, file = #outBase spec}
171            val substitutions = mkSubs (spec, strand)            val substitutions = mkSubs (spec, strand)
172          (* output to C++ file *)          (* output to C++ file *)
# Line 184  Line 193 
193                    globals, globalInit, strand, create, update                    globals, globalInit, strand, create, update
194                  } = prog                  } = prog
195            val {outDir, outBase, exec, double, debug, ...} = spec            val {outDir, outBase, exec, double, debug, ...} = spec
196              val env = mkEnv spec
197            in            in
198              raise Fail "FIXME"              raise Fail "FIXME"
199            end            end

Legend:
Removed from v.3906  
changed lines
  Added in v.3908

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