summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/mjit/compiler.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/mjit/compiler.rb b/lib/mjit/compiler.rb
index 3ed97645c6..cf77bcddee 100644
--- a/lib/mjit/compiler.rb
+++ b/lib/mjit/compiler.rb
@@ -544,12 +544,12 @@ class RubyVM::MJIT::Compiler
when /\A\s+JUMP\((?<dest>[^)]+)\);\s+\z/
dest = Regexp.last_match[:dest]
if insn.name == :opt_case_dispatch # special case... TODO: use another macro to avoid checking name
+ hash_offsets = C.rb_hash_values(operands[0])
else_offset = cast_offset(operands[1])
- cdhash = C.cdhash_to_hash(operands[0])
base_pos = pos + insn_len
src << " switch (#{dest}) {\n"
- cdhash.each do |_key, offset|
+ hash_offsets.each do |offset|
src << " case #{offset}:\n"
src << " goto label_#{base_pos + offset};\n"
end