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 3930, Sun Jun 5 14:13:06 2016 UTC revision 3931, Sun Jun 5 14:13:21 2016 UTC
# Line 78  Line 78 
78                end                end
79              else []              else []
80    
81        fun genInitGlobals (env, globalInit) =
82              CL.D_Func(["static"], CL.boolTy, "init_globals",
83                [CL.PARAM(["const"], RN.worldPtrTy, RN.worldVar)],
84    (* FIXME: need to generate code from globalInit *)
85                CL.mkReturn(SOME(CL.mkVar "false")))
86    
87      fun runFrag (spec, subs) = if TargetSpec.noBSP spec      fun runFrag (spec, subs) = if TargetSpec.noBSP spec
88              then verbFrag (spec, Fragments.parallelRunNoBSP, Fragments.sequentialRunNoBSP, subs)              then verbFrag (spec, Fragments.parallelRunNoBSP, Fragments.sequentialRunNoBSP, subs)
89              else verbFrag (spec, Fragments.parallelRun, Fragments.sequentialRun, subs)              else verbFrag (spec, Fragments.parallelRun, Fragments.sequentialRun, subs)
# Line 106  Line 112 
112    
113    (* generate source code that is common to both libraries and standalone executables *)    (* generate source code that is common to both libraries and standalone executables *)
114      fun outputSrc (outS, env, spec, prog, strand, substitutions, genInputCode) = let      fun outputSrc (outS, env, spec, prog, strand, substitutions, genInputCode) = let
115            val IR.Program{consts, inputs, globals, create as IR.Create{dim, ...}, ...} = prog            val IR.Program{
116                      consts, inputs, globals, globalInit, create as IR.Create{dim, ...}, ...
117                    } = prog
118            val IR.Strand{name=strandName, ...} = strand            val IR.Strand{name=strandName, ...} = strand
119            val ppDecl = Out.decl outS            val ppDecl = Out.decl outS
120            val {structDef, methods} = GenStrand.gen (env, strand)            val {structDef, methods} = GenStrand.gen (env, strand)
# Line 128  Line 136 
136              ppDecl structDef;              ppDecl structDef;
137              ppDecl (GenWorld.genStruct(spec, strandName, Option.getOpt(dim, 1)));              ppDecl (GenWorld.genStruct(spec, strandName, Option.getOpt(dim, 1)));
138              List.app ppDecl (genInputCode());              List.app ppDecl (genInputCode());
139  (* FIXME: need to gather/generate topDecls              ppDecl (genInitGlobals (env, globalInit));
             List.app ppDecl (!topDecls);  
 *)  
140              List.app ppDecl methods;              List.app ppDecl methods;
141              List.app ppDecl (GenOutputs.gen (env, dim, outputs));              List.app ppDecl (GenOutputs.gen (env, dim, outputs));
142              ppDecl (CL.verbatimDcl [Fragments.worldMethods] substitutions);              ppDecl (CL.verbatimDcl [Fragments.worldMethods] substitutions);

Legend:
Removed from v.3930  
changed lines
  Added in v.3931

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