[gclist] Compiler improvments to help garbage collection.
Charles Fiterman
cef@geodesic.com
Thu, 07 Aug 1997 08:14:55 -0500
>On the other hand, tail-recursion elimination can be viewed as a kind of
>compile-time (stack space) garbage collection, but I am quite comfortable
>with tail-recursion elimination. When I code a program, I can tell myself
>"This recursive call is a tail recursion, and the compiler will optimize
>it out, so it's ok".
There is an interesting article in a May 97 SIGPLAN PLDI "Automatic
Inline Allocation of Objects". What this means is if class A has a
reference to class B and never exports the reference there doesn't have
to be a separate allocation for B its storage can be put in with the
storage for A. Not having a separate notation for storage inlining
makes languages much cleaner. Doing it as an optimization seems about
as efficient as having the programmer declare it, about a three to one
improvement.
Anyway if execution frames are objects a call who's execution frame
never gets exported, the most common kind, can have the allocation
of its execution frame inlined. In terms of efficiency this is better
than a stack. Further if function A calls B then C not only can it
inline the storage used by B and C it can reuse that storage. Instead
of inlining the function and its execution frame we have the alternative
of only inlining the execution frame
The other thing that struck me about the article is that instead of
trying to maximize inlining of storage it might make sense to divide
leaf objects, objects without pointers, from all pointer objects. This
would mean a conservative collector was suddenly absolute and pages
with leaf objects still don't get touched during collection. It looks
like a good experiment.
The address on this article is
Julian Dolbey
dolbey@cs.uiuc.edu
Also of note in the same issue is "Simple Translation of Goal-Directed
evaluation. The most common reason for call_cc() use is goal directed
evaluation. The Icon language does this with a cleaner syntax. This
article shows a very clean translation of goal directed evaluation
to what looks like optimal code. And it avoids building execution
a lot of execution frames.
The address on this article is
Todd A Proebsting todd@cs.arizona.edu
http://www.cs.arizona.edu/people/todd
-
Charles Fiterman Geodesic Systems
414 North Orleans Suite 410 Phone 312 832 1221 x223
Chicago IL 60610-4418 FAX 312 832 1230
http://www.geodesic.com
A young man saw a product advertised in a magazine that said
"Guaranteed 100% effective against bugs when properly used."
He sent away and got two blocks of wood with the instructions
"Place bug on block A, strike sharply with block B." Debuggers
are like that, and you can get stung while using them. Great
Circle tries to be something better than that.