Changes between Initial Version and Version 1 of Ticket #1173, comment 9


Ignore:
Timestamp:
08/21/16 16:37:21 (8 years ago)
Author:
sjamaan
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #1173, comment 9

    initial v1  
    11The reason the original version doesn't work seems to be because the weak table's displacement code might run out of space, and simply not insert the symbol in the table.
    22
    3 The fixed version dispenses with the weak table, and instead changes buckets to weakly refer to their symbol. After a GC, it scans the symbol table, and updates the weak references if their targets are forwarded. If the result isn't in the new heap or permanent, it can be discarded.
     3The fixed version dispenses with the weak table, and instead changes buckets to weakly refer to their symbol (by using `C_SPECIALBLOCK_BIT`). After a GC, it scans the symbol table, and updates the weak references if their targets are forwarded. If the result isn't in the new heap or permanent, it can be discarded.
    44
    55This implementation is rather slow, because I had to move the scanning of the symbol table to be done even for minor GCs, because symbols can be purely stack-allocated and unreferenced by anything except the symbol table, yet still need to be preserved: this happens when the symbol gets a global definition or a property list.