[MLton-commit] r6300
Vesa Karvonen
vesak at mlton.org
Fri Jan 4 00:55:07 PST 2008
Minor optimization. A ref type whose size is known statically can't be
cyclic.
----------------------------------------------------------------------
U mltonlib/trunk/com/ssh/generic/unstable/detail/value/size.sml
----------------------------------------------------------------------
Modified: mltonlib/trunk/com/ssh/generic/unstable/detail/value/size.sml
===================================================================
--- mltonlib/trunk/com/ssh/generic/unstable/detail/value/size.sml 2008-01-04 08:43:50 UTC (rev 6299)
+++ mltonlib/trunk/com/ssh/generic/unstable/detail/value/size.sml 2008-01-04 08:55:06 UTC (rev 6300)
@@ -145,10 +145,10 @@
(sequ ArrayOps.ops (getT xT))
fun refc xT =
- cyclic (Arg.Open.refc ignore xT)
- (case getT xT
- of STATIC s => const (s + wordSize)
- | DYNAMIC f => fn (e, x) => wordSize + f (e, !x))
+ case getT xT
+ of STATIC s => STATIC (s + wordSize)
+ | DYNAMIC f => cyclic (Arg.Open.refc ignore xT)
+ (fn (e, x) => wordSize + f (e, !x))
val fixedInt = mkInt FixedIntOps.ops
val largeInt = mkInt LargeIntOps.ops
More information about the MLton-commit
mailing list