Thu, 17 Aug 2000 07:05:44 +0200 (MET DST), Axel Simon 
<[EMAIL PROTECTED]> pisze:

> touchGC (GC fObj) = seq fObj (return ())

It should work only if marked as NOINLINE. Because otherwise the
call could be "optimized": since the value has been already evaluated
before, the compiler can assume that there is no point in doing seq
again (although it's not right for this usage of seq).

Hm, I didn't realize that noinlined seq should be good.

> Wasn't there some talk about a primitive? Why?

It can be even more efficient than noinlined seq. It will be inlined
and kept in place through all optimization process, treated as a
side-effecting operation that cannot be moved or removed. Finally in
the code generation it needs not generate any code. It can even be
not strict, as long as the object address is still available somewhere
so GC won't kill it.

-- 
 __("<  Marcin Kowalczyk * [EMAIL PROTECTED] http://qrczak.ids.net.pl/
 \__/
  ^^                      SYGNATURA ZASTĘPCZA
QRCZAK


Reply via email to