-
-
Notifications
You must be signed in to change notification settings - Fork 121
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix descriptor bug in AttributeCache
Summary: When the attribute is a descriptor, we have to pay more attention to the descriptor's type in case it stops being a data descriptor, either through an attribute assignment on its type (handled by watching the type in `AttributeCache::fill()`) or an assignment to `__class__`. The latter case is handled by moving the call of `jit::notifyICsTypeChanged()` from `_PyJIT_TypeModified()` to `Runtime::notifyTypeModified()`, so it triggers in more cases (type modification, `__class__` assignment, and type destruction). I also changed `AttributeCache::typeChanged()` to be more conservative and always clear everything, rather than adding the bookkeeping or other logic necessary to detect this case and only clear what's strictly necessary. Hopefully nobody's mutating types in a hot path anywhere. Reviewed By: mpage Differential Revision: D31979189 fbshipit-source-id: 484cb0f596720e7322358df95cf5bf419db647c9
- Loading branch information
1 parent
2836e18
commit 5492d0e
Showing
4 changed files
with
101 additions
and
5 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