[gclist] Stack scanning & callee-save registers
Simon Peyton-Jones
simonpj@microsoft.com
Tue, 5 Sep 2000 23:58:23 -0700
The same algorithm is sketched in
"C--: a portable assembly language that supports garbage collection"
PPDP'99 (http://research.microsoft.com/~simonpj)
to which Fermin was implicitly referring (he's a co author).
David, I didn't know about your implementation, and I feel bad that
we did not cite it. Is it published anywhere?
Simon
| -----Original Message-----
| From: David Chase [mailto:chase@naturalbridge.com]
| Sent: 06 September 2000 05:01
| To: gclist@iecc.com
| Subject: Re: [gclist] Stack scanning & callee-save registers
|
|
| At 11:55 PM 9/5/00 +0000, reig@dcs.gla.ac.uk wrote:
| >I think it should be possible to do the scanning in one pass even if
| >we have callee-save registers. Does anyone know if this has been
| >described/implemented elsewhere?
|
| Yes, this is possible. At the youngest frame, spill the
| registers, and initialize an array of pointers to register spill
| memory to point to that. As you unwind the stack, update the elements
| of that array to refer to the (callee's) spill locations for the
| spilled registers. References to "register X" in a given frame
| look up the address into which X was spilled and use that to locate,
| and potentially update, register X.
|
| Yes, we've also implemented this.
|
| David Chase
| chase@naturalbridge.com
|
|