Commit 6751652
committed
simplify: add IsTruthy known-object path (PyObject_IsTrue fold)
Constant-folds PyObject_IsTrue for trusted immutable types: Bool,
Float, Long, FrozenSet, Slice, Tuple, Unicode, NoneType. If the
object is a known constant of these types, replaces IsTruthy with
CBool LoadConst.1 parent 3b23771 commit 6751652
1 file changed
Lines changed: 16 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
218 | 218 | | |
219 | 219 | | |
220 | 220 | | |
| 221 | + | |
| 222 | + | |
| 223 | + | |
| 224 | + | |
| 225 | + | |
| 226 | + | |
| 227 | + | |
| 228 | + | |
| 229 | + | |
| 230 | + | |
| 231 | + | |
| 232 | + | |
| 233 | + | |
| 234 | + | |
| 235 | + | |
| 236 | + | |
221 | 237 | | |
222 | 238 | | |
223 | 239 | | |
| |||
0 commit comments