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

SCM Repository

[diderot] Diff of /trunk/src/compiler/c-target/c-target.sml
ViewVC logotype

Diff of /trunk/src/compiler/c-target/c-target.sml

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

revision 1443, Mon Jul 11 10:36:10 2011 UTC revision 1444, Mon Jul 11 12:11:53 2011 UTC
# Line 409  Line 409 
409    
410        (* register a strand method *)        (* register a strand method *)
411          fun method (Strand{name, tyName, code, ...}, methName, body) = let          fun method (Strand{name, tyName, code, ...}, methName, body) = let
412                val fName = concat[name, "_", methName]                val fName = concat[name, "_", MethodName.toString methName]
413                val params = [                val params = [
414                        CL.PARAM([], CL.T_Ptr(CL.T_Named tyName), "selfIn"),                        CL.PARAM([], CL.T_Ptr(CL.T_Named tyName), "selfIn"),
415                        CL.PARAM([], CL.T_Ptr(CL.T_Named tyName), "selfOut")                        CL.PARAM([], CL.T_Ptr(CL.T_Named tyName), "selfOut")
416                      ]                      ]
417                val methFn = CL.D_Func(["static"], CL.int32, fName, params, body)                val resTy = (case methName
418                         of MethodName.Update => CL.T_Named "StrandStatus_t"
419                          | MethodName.Stabilize => CL.voidTy
420                        (* end case *))
421                  val methFn = CL.D_Func(["static"], resTy, fName, params, body)
422                in                in
423                  code := methFn :: !code                  code := methFn :: !code
424                end                end

Legend:
Removed from v.1443  
changed lines
  Added in v.1444

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