Please sign in to comment.
Fix stack GC invariant
When a context is activated, if it's mature, it's remembered. This keeps us from having to run the write barrier when the stack of the context is accessed.
- Loading branch information...
Showing with 67 additions and 5 deletions.
|@@ -0,0 +1,17 @@|
|+=== Stack Management ===|
|+A stack, rather than being a seperate Tuple object, is simply a variable|
|+size array located inside a MethodContext (meaning MethodContext objects|
|+are variable size).|
|+When running code, the stack of the current MethodContext is stored into|
|+directly, without running any write barrier. This means though, that if a|
|+MethodContext is old, and a new object is stored into it's stack, the|
|+MethodContext must be check at young GC collect time.|
|+A simple solution is to check if the MethodContext is old before it's|
|+activated. If it is, add it to the remember set if it's not already.|
|+Any Task method that touches the stack of a context not active needs|
|+to also check and run the write barrier.|