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-strand.sml
ViewVC logotype

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

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

revision 3924, Fri Jun 3 17:30:27 2016 UTC revision 3927, Sat Jun 4 21:20:01 2016 UTC
# Line 37  Line 37 
37     *)     *)
38      fun genStateInit (env, strandName, strandTy, params, body) = let      fun genStateInit (env, strandName, strandTy, params, body) = let
39            val fName = strandName ^ "_init"            val fName = strandName ^ "_init"
40              val (env, params) = List.foldr
41                    (fn (x, (env, ps)) => let
42                        val (env, p) = TreeToCxx.trParam(env, x)
43                        in
44                          (env, p::ps)
45                        end)
46                      (env, []) params
47            val selfParam = if TargetSpec.dualState(Env.target env)            val selfParam = if TargetSpec.dualState(Env.target env)
48                  then RN.selfOutVar                  then RN.selfOutVar
49                  else RN.selfVar                  else RN.selfVar
# Line 88  Line 95 
95            val IR.Strand{name, params, state, stateInit, initM, updateM, stabilizeM} = strand            val IR.Strand{name, params, state, stateInit, initM, updateM, stabilizeM} = strand
96            val name = Atom.toString name            val name = Atom.toString name
97            val strandTy = CL.T_Ptr(CL.T_Named(name ^ "_strand"))            val strandTy = CL.T_Ptr(CL.T_Named(name ^ "_strand"))
           val params = List.map (TreeToCxx.trParam env) params  
98            in {            in {
99              structDef = genStrandStruct (env, name, state),              structDef = genStrandStruct (env, name, state),
100              methods = genStateInit (env, name, strandTy, params, stateInit) ::              methods = genStateInit (env, name, strandTy, params, stateInit) ::

Legend:
Removed from v.3924  
changed lines
  Added in v.3927

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