-
Notifications
You must be signed in to change notification settings - Fork 605
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This was a well-intentioned idea but not practical or useful. The idea was to have the compiler help check where in call paths a garbage-collection cycle could run. Unfortnately, adding this in as an after-thought resulted in all the places where GCTokens are created from thin air deep in some call path. It didn't change the fact that GC could happen pretty much anywhere. In a managed runtime, either GC can happen everywhere or it should only happen at a very small number of extremely well-defined points. The middle ground of "it can happen at all these places" is an invitation for a low budge horror movie, dismembered objects strewn throughout the code. Along with the rework of the stop-the-world mechanism, the removal of GCToken and restricting the invocation of a GC cycle to a single well-defined method call in a few well-defined locations, and finally, making all allocation paths GC-safe (ie GC will NOT run when allocating an object), Rubinius will have much better defined GC behavior. The GC safe allocation path is important for cases like the string_dup instruction, where a young GC cycle could run when allocating the dup and the original String (eg a literal String in a method) is in the young generation and moved. Since the original String is on the C stack and not in a GC root object, the dup fails when copying the contents of the original String. It's better to make allocation GC-safe than to accept the performance cost of the GC root in these sorts of cases. Also, that case is only one well-defined instance of the issue. There are more complicated ones.
Showing
50 changed files
with
261 additions
and
353 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
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
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.