Commit 0fee38e
Optimize __init__ in JIT: resolve init function and eliminate redundant type guards
- _CHECK_AND_ALLOCATE_OBJECT: resolve __init__ from type's _spec_cache
so the optimizer can follow into __init__ bodies
- _GUARD_TYPE_VERSION_LOCKED: add optimizer handler to track type version
and NOP redundant guards on the same object
- Add test_guard_type_version_locked_removed
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>1 parent 80d0a85 commit 0fee38e
File tree
3 files changed
+88
-4
lines changed- Lib/test/test_capi
- Python
3 files changed
+88
-4
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1518 | 1518 | | |
1519 | 1519 | | |
1520 | 1520 | | |
| 1521 | + | |
| 1522 | + | |
| 1523 | + | |
| 1524 | + | |
| 1525 | + | |
| 1526 | + | |
| 1527 | + | |
| 1528 | + | |
| 1529 | + | |
| 1530 | + | |
| 1531 | + | |
| 1532 | + | |
| 1533 | + | |
| 1534 | + | |
| 1535 | + | |
| 1536 | + | |
| 1537 | + | |
| 1538 | + | |
| 1539 | + | |
| 1540 | + | |
| 1541 | + | |
| 1542 | + | |
| 1543 | + | |
1521 | 1544 | | |
1522 | 1545 | | |
1523 | 1546 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
134 | 134 | | |
135 | 135 | | |
136 | 136 | | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
137 | 152 | | |
138 | 153 | | |
139 | 154 | | |
| |||
1027 | 1042 | | |
1028 | 1043 | | |
1029 | 1044 | | |
1030 | | - | |
1031 | 1045 | | |
1032 | | - | |
| 1046 | + | |
| 1047 | + | |
| 1048 | + | |
| 1049 | + | |
| 1050 | + | |
| 1051 | + | |
| 1052 | + | |
| 1053 | + | |
| 1054 | + | |
| 1055 | + | |
| 1056 | + | |
| 1057 | + | |
| 1058 | + | |
| 1059 | + | |
| 1060 | + | |
| 1061 | + | |
| 1062 | + | |
| 1063 | + | |
1033 | 1064 | | |
1034 | 1065 | | |
1035 | 1066 | | |
| |||
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
0 commit comments