RJIT: Fix unwanted shadowing in set_local_type

local_idx should not be overwritten.
This commit is contained in:
Takashi Kokubun 2023-12-21 15:45:10 -08:00
parent ffa5f16273
commit 68bcca4c2b
2 changed files with 17 additions and 3 deletions

View file

@ -264,9 +264,9 @@ module RubyVM::RJIT
# noop
in MapToSelf
# noop
in MapToLocal[local_idx]
if stack_idx == local_idx
self.temp_types[stack_idx] = self.local_types[local_idx];
in MapToLocal[temp_local_idx]
if stack_idx == temp_local_idx
self.temp_types[stack_idx] = self.local_types[temp_local_idx]
self.temp_mapping[stack_idx] = MapToStack
else
# noop