vm_insnhelper.c: never cache getinstancevariable twice
We have several options to ensure there's no race condition between main thread and MJIT thead about IC reference:
Give up caching ivar for multiple classes (or multiple versions of the same class) in the same getinstancevariable (This commit's approach)
Allocate new inline cache every time
Other ideas we could think of couldn't eliminate possibilities of race condition. In 2, it's memory allocation would be slow and it may trigger JIT cancellation frequently. So 1 would be fast for both VM and JIT situations.
vm_insnhelper.c: never cache getinstancevariable twice
We have several options to ensure there's no race condition between main
thread and MJIT thead about IC reference:
same class) in the same getinstancevariable (This commit's approach)
Other ideas we could think of couldn't eliminate possibilities of race
condition.
In 2, it's memory allocation would be slow and it may trigger JIT
cancellation frequently. So 1 would be fast for both VM and JIT
situations.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65213 b2dd03c8-39d4-4d8f-98ff-823fe69b080e