Skip to content

ZJIT: Remove more Option from codegen #14265

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

Merged
merged 1 commit into from
Aug 19, 2025

Conversation

tekknolagi
Copy link
Contributor

No description provided.

@tekknolagi
Copy link
Contributor Author

tekknolagi commented Aug 18, 2025

segfault in not-ZJIT :(

@tekknolagi tekknolagi marked this pull request as ready for review August 18, 2025 19:46
@tekknolagi tekknolagi requested a review from a team August 18, 2025 19:46
@@ -1184,7 +1180,7 @@ fn gen_guard_type(jit: &mut JITState, asm: &mut Assembler, val: lir::Opnd, guard
// Static symbols have (val & 0xff) == RUBY_SYMBOL_FLAG
// Use 8-bit comparison like YJIT does
debug_assert!(val.try_num_bits(8).is_some(), "GuardType should not be used for a known constant, but val was: {val:?}");
asm.cmp(val.try_num_bits(8)?, Opnd::UImm(RUBY_SYMBOL_FLAG as u64));
asm.cmp(val.try_num_bits(8).unwrap(), Opnd::UImm(RUBY_SYMBOL_FLAG as u64));
Copy link
Member

Choose a reason for hiding this comment

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

If we have an HIR validator for GuardType not using known operands and we're going to unwrap this, let's remove the try_num_bits function from Opnd and use with_num_bits(8) instead.

Copy link
Member

@k0kubun k0kubun Aug 19, 2025

Choose a reason for hiding this comment

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

let's remove the try_num_bits function from Opnd

#14272

@tekknolagi tekknolagi force-pushed the mb-remove-more-option branch from 1fc4f81 to eb81d8c Compare August 19, 2025 13:57
@tekknolagi tekknolagi enabled auto-merge (squash) August 19, 2025 13:57
@tekknolagi tekknolagi merged commit 6fe4ed5 into ruby:master Aug 19, 2025
85 checks passed
@tekknolagi tekknolagi deleted the mb-remove-more-option branch August 19, 2025 14:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants