[WIP] PR for CI: Regions and other fun - #60
Conversation
* Adding region.c * IDK something something regions and docs * Docs and progress * This is ugly but cleanup is tomorrow * Nicer union-find code 🎉 * More and more progress * parent -> owner rename * More clenaup * More fun! * Something compiles I guess * Why is there no formatter!!! * Progres progress progresss
|
Status Update: The current branch provides a new There is also a mechanism to mark all open regions as dirty, however, currently it is not being called, which makes regions remain clean. Here is a working example: from regions import Region, is_local
class A:
pass
r1 = Region()
r2 = Region()
# Check ownership
r1.owns(r1) == True
r2.owns(r1) == False
is_local(r1) == False
# Dictionary assignments have some write barriers
a = A()
r1.a = a
is_local(a) == False
r1.owns(a) == TrueThe invariant can upper bound the LRC and OSC values and catches incorrect references. These are the high level TODOs:
Current approach: Try to break the implementation in the REPL. On failure, add write barriers or do other fixes. Turn passing code into tests. Bug 1: The OSC of "duck" is not updated when "two" closes. Maybe because it doesn't close? o.O Bug 2 This increases the RC but doesn't inform LRC Bug 3 The rc is never decremented |
5cee740 to
0beb0be
Compare
0beb0be to
13364e7
Compare
Volatile branch, most likely not worth reviewing yet