Commit 1a03f53
ZJIT: Eliminate GuardType on frozen objects
When GuardType operates on a value that is a known frozen object (from a
constant), we can check at compile time if the object's type matches the
guard. Since frozen objects cannot change their class, the runtime guard
becomes unnecessary.
This optimization eliminates redundant type guards when accessing methods
on frozen constant objects, complementing the LoadField folding for ivar
reads.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>1 parent b208f46 commit 1a03f53
1 file changed
+17
-4
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3677 | 3677 | | |
3678 | 3678 | | |
3679 | 3679 | | |
3680 | | - | |
3681 | | - | |
3682 | | - | |
3683 | | - | |
| 3680 | + | |
| 3681 | + | |
| 3682 | + | |
| 3683 | + | |
| 3684 | + | |
| 3685 | + | |
| 3686 | + | |
| 3687 | + | |
| 3688 | + | |
| 3689 | + | |
| 3690 | + | |
| 3691 | + | |
| 3692 | + | |
| 3693 | + | |
| 3694 | + | |
| 3695 | + | |
3684 | 3696 | | |
| 3697 | + | |
3685 | 3698 | | |
3686 | 3699 | | |
3687 | 3700 | | |
| |||
0 commit comments