[M3devel] init_offset?

Jay K jay.krell at cornell.edu
Sun Nov 7 13:35:22 CET 2010


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