forked from rubinius/rubinius
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Support weakly-referencing to all kinds of objects
Current WeakRef implementation doesn't support to reference to nil and false. The reason for nil is that it can't know whether referenced object is nil or it is garbage-collected and set to nil. The reason for false is that there is an incorrect assumption that referenced objects can't be evaluated to false. By adding a new field to C++ WeakRef class to record whether referenced object is immediate or reference, WeakRef truly supports all kinds of objects.
- Loading branch information
Showing
4 changed files
with
24 additions
and
9 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