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: Colorize outlined code differently on --yjit-dump-disasm #7073

Merged
merged 2 commits into from Jan 6, 2023

Conversation

k0kubun
Copy link
Member

@k0kubun k0kubun commented Jan 6, 2023

On --yjit-dump-disasm, I'd like to make it easy to distinguish inline code and outlined code, which I feel makes it more readable. I made outlined code blue because it's a "cold" path, but I'm open to other ways of visualization.

Before

Screenshot 2023-01-05 at 17 18 16

After

Screenshot 2023-01-05 at 17 18 08

@matzbot matzbot requested a review from a team January 6, 2023 01:20
@noahgibbs
Copy link
Contributor

I like this change. I don't think this output will ever get piped to a file. If it did, we might want to figure out how to disable it if not printing to terminal.

@k0kubun
Copy link
Member Author

k0kubun commented Jan 6, 2023

We already used \x1b[1m for comments, so not a new issue 🙂 Actually, I think it's more helpful to leave it in files too since you can see the colors in them with less -R. It's probably not too difficult to remove them from existing files, say, if you use Ruby, but you can't re-add what's removed.

yjit/src/disasm.rs Outdated Show resolved Hide resolved
Copy link
Member

@XrXr XrXr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks nice!

@k0kubun k0kubun merged commit 311ce91 into ruby:master Jan 6, 2023
@k0kubun k0kubun deleted the yjit-blue branch January 6, 2023 19:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
4 participants