[MLton-commit] r6738
Matthew Fluet
fluet at mlton.org
Tue Aug 19 15:12:44 PDT 2008
Unify the treatment of Ref_ primitives with Array_, Vector_, and Weak_ primitives for Prim.extractTargs.
----------------------------------------------------------------------
U mlton/trunk/mlton/atoms/prim.fun
U mlton/trunk/mlton/atoms/prim.sig
U mlton/trunk/mlton/closure-convert/closure-convert.fun
U mlton/trunk/mlton/elaborate/elaborate-core.fun
U mlton/trunk/mlton/ssa/useless.fun
----------------------------------------------------------------------
Modified: mlton/trunk/mlton/atoms/prim.fun
===================================================================
--- mlton/trunk/mlton/atoms/prim.fun 2008-08-19 22:12:37 UTC (rev 6737)
+++ mlton/trunk/mlton/atoms/prim.fun 2008-08-19 22:12:43 UTC (rev 6738)
@@ -1401,6 +1401,7 @@
{args: 'a vector,
deArray: 'a -> 'a,
deArrow: 'a -> 'a * 'a,
+ deRef: 'a -> 'a,
deVector: 'a -> 'a,
deWeak: 'a -> 'a,
result: 'a}) =
@@ -1430,9 +1431,9 @@
| MLton_share => one (arg 0)
| MLton_size => one (arg 0)
| MLton_touch => one (arg 0)
- | Ref_assign => one (arg 1)
- | Ref_deref => one result
- | Ref_ref => one (arg 0)
+ | Ref_assign => one (deRef (arg 0))
+ | Ref_deref => one (deRef (arg 0))
+ | Ref_ref => one (deRef result)
| Vector_length => one (deVector (arg 0))
| Vector_sub => one (deVector (arg 0))
| Weak_canGet => one (deWeak (arg 0))
Modified: mlton/trunk/mlton/atoms/prim.sig
===================================================================
--- mlton/trunk/mlton/atoms/prim.sig 2008-08-19 22:12:37 UTC (rev 6737)
+++ mlton/trunk/mlton/atoms/prim.sig 2008-08-19 22:12:43 UTC (rev 6738)
@@ -251,6 +251,7 @@
val extractTargs: 'a t * {args: 'b vector,
deArray: 'b -> 'b,
deArrow: 'b -> 'b * 'b,
+ deRef: 'b -> 'b,
deVector: 'b -> 'b,
deWeak: 'b -> 'b,
result: 'b} -> 'b vector
Modified: mlton/trunk/mlton/closure-convert/closure-convert.fun
===================================================================
--- mlton/trunk/mlton/closure-convert/closure-convert.fun 2008-08-19 22:12:37 UTC (rev 6737)
+++ mlton/trunk/mlton/closure-convert/closure-convert.fun 2008-08-19 22:12:43 UTC (rev 6738)
@@ -1054,6 +1054,7 @@
result = ty,
deArray = Type.deArray,
deArrow = fn _ => Error.bug "ClosureConvert.convertPrimExp: deArrow",
+ deRef = Type.deRef,
deVector = Type.deVector,
deWeak = Type.deWeak}),
Vector.map (args, convertVarInfo))
Modified: mlton/trunk/mlton/elaborate/elaborate-core.fun
===================================================================
--- mlton/trunk/mlton/elaborate/elaborate-core.fun 2008-08-19 22:12:37 UTC (rev 6737)
+++ mlton/trunk/mlton/elaborate/elaborate-core.fun 2008-08-19 22:12:43 UTC (rev 6738)
@@ -976,6 +976,7 @@
{args = Vector.map (args, Cexp.ty),
deArray = Type.deArray,
deArrow = Type.deArrow,
+ deRef = Type.deRef,
deVector = Type.deVector,
deWeak = Type.deWeak,
result = result})
Modified: mlton/trunk/mlton/ssa/useless.fun
===================================================================
--- mlton/trunk/mlton/ssa/useless.fun 2008-08-19 22:12:37 UTC (rev 6737)
+++ mlton/trunk/mlton/ssa/useless.fun 2008-08-19 22:12:43 UTC (rev 6738)
@@ -765,6 +765,7 @@
result = resultType,
deArray = Type.deArray,
deArrow = fn _ => Error.bug "Useless.doitExp: deArrow",
+ deRef = Type.deRef,
deVector = Type.deVector,
deWeak = Type.deWeak}))}
end
More information about the MLton-commit
mailing list