Skip to content

Conversation

@tekknolagi
Copy link
Contributor

No sense calling a C function.

@launchable-app

This comment has been minimized.

@tekknolagi tekknolagi marked this pull request as ready for review November 19, 2025 23:43
@matzbot matzbot requested a review from a team November 19, 2025 23:43
@tekknolagi
Copy link
Contributor Author

Sigh. Shopify#876

@tekknolagi tekknolagi marked this pull request as draft November 20, 2025 03:17
@tekknolagi tekknolagi marked this pull request as ready for review November 20, 2025 14:30
@k0kubun k0kubun linked an issue Nov 21, 2025 that may be closed by this pull request
No sense calling a C function.
@tekknolagi tekknolagi enabled auto-merge (rebase) November 21, 2025 18:48
@tekknolagi tekknolagi merged commit 6e2906f into ruby:master Nov 21, 2025
87 of 88 checks passed
@tekknolagi tekknolagi deleted the mb-guard-not-frozen branch November 21, 2025 19:16
self.assert_subtype(insn_id, val, types::BasicObject)
}
Insn::GuardNotFrozen { recv, .. } => {
self.assert_subtype(insn_id, recv, types::HeapBasicObject)
Copy link
Member

Choose a reason for hiding this comment

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

Neat way to capture the precondition :)
Didn't know about HeapBasicObject, we could use that as the return type of GuardNotFrozen (even before this PR) but now that's automatic thanks to Insn::GuardNotFrozen { recv, .. } => self.type_of(*recv),

Copy link
Contributor Author

Choose a reason for hiding this comment

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

That's true, didn't even think about that refinement beforehand!

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.

ZJIT: Optimize GuardNotFrozen

3 participants