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

SCM Repository

[diderot] Diff of /trunk/src/compiler/codegen/codegen-fn.sml
ViewVC logotype

Diff of /trunk/src/compiler/codegen/codegen-fn.sml

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

revision 1988, Tue Jul 31 21:50:46 2012 UTC revision 1989, Fri Aug 3 01:54:21 2012 UTC
# Line 51  Line 51 
51            val strand = T.Strand.define(prog, name, state)            val strand = T.Strand.define(prog, name, state)
52            val env = T.Env.scopeStrand env            val env = T.Env.scopeStrand env
53          (* define the parameters and add them to the environment *)          (* define the parameters and add them to the environment *)
54            val params' = List.map T.Var.param params            val params' = List.map T.Var.param (List.map (fn(x) => (env,x)) params)
55            val env = ListPair.foldlEq (fn (x, y, env) => T.Env.bind(env, x, y)) env (params, params')            val env = ListPair.foldlEq (fn (x, y, env) => T.Env.bind(env, x, y)) env (params, params')
56            in            in
57              T.Strand.init (strand, params', T.Tr.block (env, stateInit));              T.Strand.init (strand, params', T.Tr.block (env, stateInit));
# Line 62  Line 62 
62            val env = T.Env.scopeInitially env            val env = T.Env.scopeInitially env
63            val (env, iterPrefix) = T.Tr.fragment (env, iterPrefix)            val (env, iterPrefix) = T.Tr.fragment (env, iterPrefix)
64            fun trIter ((param, lo, hi), (env, iters)) = let            fun trIter ((param, lo, hi), (env, iters)) = let
65                  val param' = T.Var.param param                  val param' = T.Var.param (env,param)
66                  val env = T.Env.bind (env, param, param')                  val env = T.Env.bind (env, param, param')
67                  val iter = (param', T.Tr.exp (env, lo), T.Tr.exp (env, hi))                  val iter = (param', T.Tr.exp (env, lo), T.Tr.exp (env, hi))
68                  in                  in

Legend:
Removed from v.1988  
changed lines
  Added in v.1989

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