[MLton] refs in ssa
Lukasz S Ziarek
lziarek@cs.purdue.edu
Tue, 9 Mar 2004 17:29:27 -0500 (EST)
As a sanity check, I checked out the latest version of mlton from cvs. I
add the following change and only the following change. I still get vector
lenghts of 0,1,2,3,4.. etc. I included the entire function to show the
entire scope for the variable args. My test cases are just the benchmark
programs.
before change:
fun doitStatement (stmt as Statement.T {var, ty, exp}) =
case exp of
ConApp {con, args} =>
Statement.T {var = var,
ty = ty,
exp = ConApp {con = con,
args = flattens (args, conArgs
con)}}
| _ => stmt
--------------------------------------------------------------------------
after change:
fun doitStatement (stmt as Statement.T {var, ty, exp}) =
case exp of
ConApp {con, args} =>
Statement.T {var = var,
ty = ty,
exp = ConApp {con = con,
args = flattens (args, conArgs
con)}}
| PrimApp{prim, targs, args} =>
(case Prim.name prim
of Ref_ref =>
let val i = Vector.length(args)
val _ = print(Int.toString i)
val _ = print("\n")
in stmt
end
| _ => stmt)
| _ => stmt