-
Notifications
You must be signed in to change notification settings - Fork 69
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Ensure reference objects are either traced or cleared (#1126)
After retaining soft references, we postpone the scanning of soft references until the transitive closure from retained soft references is fully expanded. While tracing and scanning new objects reached from the referents of soft references, new soft references may be discovered, and they will be added to the reference processor. By postponing the scanning, we ensure the newly discovered soft references are scanned, too. To ensure we do not accidentally enqueue more objects than we should, we no longer call `trace_object` when *scanning* soft, weak and phantom references. Instead, we call `ObjectReference::get_forwarded_object` to get the forwarded references and referents. We still call `trace_object` when *retaining* soft references, and when forwarding references in MarkCompact during the second transitive closure. Fixes: #1125
- Loading branch information
Showing
5 changed files
with
137 additions
and
75 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.