-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(opcode/Ifacmp): compare objects by data pointer only
We store class instances as Rc<dyn ClassInstanc> values. The pointers to the inner values consist of 1. a pointer to the vtable of the trait 2. a pointer to the data itself Due to rust internals, the vtable pointer can be different for Rc<dyn ClassInstance> values that point to the same *data*, effectively making any comparison involing the vtable pointer moot. This uses a function rust just introduced to compare such pointers. (cf. rust-lang/rust#106447, rust-lang/rust#117717, rust-lang/rust#116325)
- Loading branch information
1 parent
fa5d323
commit 37a43ea
Showing
4 changed files
with
25 additions
and
3 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
Binary file not shown.
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