Add semantics about GC finaliser to spec
The proposal is from general-issue-tracker#27 by Kunshan Wang.
The proposal suggests two common instructions, @uvm.gc.prevent_death_once
and @uvm.gc.next_object_to_finalise
.
-
@uvm.gc.prevent_death_once
marks an object as finalisable. When GC finds the object dead, it put the object to a finalisable object queue. -
@uvm.gc.next_object_to_finalise
will pop an object reference from the queue.
These instructions allow client to create a finaliser thread (running Mu code). e5848b32 captures the idea and put them into the spec.