[M3devel] init_offset?

Tony Hosking hosking at cs.purdue.edu
Sun Nov 7 14:24:09 CET 2010


This is used for exception handling.

Sent from my iPad

On 07/11/2010, at 7:35 AM, Jay K <jay.krell at cornell.edu> wrote:

> 
> m3cg.i3:
> 
> init_offset (o: ByteOffset;  var: Var);
> (* initializes the static variable at 'ADR(v)+o' with the integer
>    frame offset of the local variable 'var' relative to the frame
>    pointers returned at runtime in RTStack.Frames *)
> 
> 
> The implications of this make me nervous.
>   Must locals be at the indicated location when the garbage collector runs?
> Should we maybe make all traced pointers volatile?
>  Or at least stores to them?
>   I know we have a compacting garbage collector.
>   If it moves a pointer.. it updates any instance of that value seen on the stack?
>   (and I know, we endeavor to "flush" registers when paused for gc, so that
>   stack suffices and no need to worry further about registers, except on NT386
>   where it is a little different, we can get/set the registers of the paused thread)
> 
> If the stack is scanned and updated beyond this information, what is this information for?
> Maybe an optimization?
> 
> Granted, I haven't looked at what the frontend does here.
> There's lots of stuff I could figure out by reading the code..
> 
>  - Jay
>  		 	   		  



More information about the M3devel mailing list