Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

YJIT: Make iseq_get_location consistent with iseq.c #7074

Merged
merged 2 commits into from
Jan 6, 2023

Conversation

k0kubun
Copy link
Member

@k0kubun k0kubun commented Jan 6, 2023

I've felt YJIT's disasm sometimes shows None where --dump=insns would show the location just fine. It seems that YJIT uses #{iseq_path}:#{base_label} while the rest of the CRuby code uses #{label}@#{iseq_path}:#{lineno} for describing an iseq location. It seems more useful to use the common format, at least because label generally doesn't return nil unlike base_label.

Before

  # Block: /Users/k0kubun/tmp/a.rb:None (ISEQ offset: 0)
  ..
  # YJIT entry: /Users/k0kubun/tmp/a.rb:bar

After

  # Block: <main>@/Users/k0kubun/tmp/a.rb:1 (ISEQ offset: 0)
  ..
  # YJIT entry: bar@/Users/k0kubun/tmp/a.rb:5

@k0kubun k0kubun requested a review from a team January 6, 2023 17:41
yjit/src/codegen.rs Outdated Show resolved Hide resolved
Co-authored-by: Maxime Chevalier-Boisvert <maximechevalierb@gmail.com>
@k0kubun k0kubun merged commit 00d58af into ruby:master Jan 6, 2023
@k0kubun k0kubun deleted the yjit-iseq-location branch January 6, 2023 19:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants