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 3954, Sat Jun 11 17:59:55 2016 UTC revision 3955, Sun Jun 12 15:55:01 2016 UTC
# Line 64  Line 64 
64    (* generate a function definition for a strand method *)    (* generate a function definition for a strand method *)
65      fun genMethodDef (env, strandName, strandTy, methTy, methName, usesGlobals, needsWorld, body) = let      fun genMethodDef (env, strandName, strandTy, methTy, methName, usesGlobals, needsWorld, body) = let
66            val fName = concat[strandName, "_", methName]            val fName = concat[strandName, "_", methName]
67            val stateParams = if TargetSpec.dualState(Env.target env)            val params = if TargetSpec.dualState(Env.target env)
68                  then [                  then [
69                      CL.PARAM(["const"], strandTy, RN.selfVar),                      CL.PARAM(["const"], strandTy, RN.selfVar),
70                      CL.PARAM([], strandTy, RN.selfOutVar)                      CL.PARAM([], strandTy, RN.selfOutVar)
71                    ]                    ]
72                  else [CL.PARAM([], strandTy, RN.selfVar)]                  else [CL.PARAM([], strandTy, RN.selfVar)]
73            val params = if usesGlobals            val params = if usesGlobals
74                  then RN.globalsParam :: stateParams                  then RN.globalsParam :: params
75                  else stateParams                  else params
76            val params = if needsWorld            val params = if needsWorld
77                  then RN.worldParam :: stateParams                  then RN.worldParam :: params
78                  else stateParams                  else params
79            in            in
80              CL.D_Func(["static"], methTy, fName, params, body)              CL.D_Func(["static"], methTy, fName, params, body)
81            end            end

Legend:
Removed from v.3954  
changed lines
  Added in v.3955

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