Commit 1737473
Adds cache option to remap and use in research
There is a mismatch between the caching of transformed objects in the
`remap` function and the need for `research` to traverse all sub
trees. For most values this is inconsequential (like atomic ints,
etc.) but for small tuples (e.g. `("hello",)`) these get compiled as
the same value and return the same `id(...)`. In `remap` these get
cached and never get `enter` called on them and thus the hooks for
`research` to return the values never gets called.
In this fix an option to disable/enable the cache is introduced to the
`remap` function which simply disables using transformed values from
the cache. Then in the `research` function caching is turned off.
The existing `remap` behavior is maintained as caching by default is
turned on.
fixes: #3931 parent ce7c7d2 commit 1737473
2 files changed
Lines changed: 32 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1055 | 1055 | | |
1056 | 1056 | | |
1057 | 1057 | | |
1058 | | - | |
1059 | | - | |
| 1058 | + | |
| 1059 | + | |
| 1060 | + | |
| 1061 | + | |
| 1062 | + | |
| 1063 | + | |
| 1064 | + | |
| 1065 | + | |
1060 | 1066 | | |
1061 | 1067 | | |
1062 | 1068 | | |
| |||
1130 | 1136 | | |
1131 | 1137 | | |
1132 | 1138 | | |
| 1139 | + | |
| 1140 | + | |
| 1141 | + | |
| 1142 | + | |
1133 | 1143 | | |
1134 | 1144 | | |
1135 | 1145 | | |
| |||
1195 | 1205 | | |
1196 | 1206 | | |
1197 | 1207 | | |
1198 | | - | |
| 1208 | + | |
1199 | 1209 | | |
1200 | 1210 | | |
1201 | 1211 | | |
| |||
1388 | 1398 | | |
1389 | 1399 | | |
1390 | 1400 | | |
1391 | | - | |
| 1401 | + | |
1392 | 1402 | | |
1393 | 1403 | | |
1394 | 1404 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
395 | 395 | | |
396 | 396 | | |
397 | 397 | | |
| 398 | + | |
| 399 | + | |
| 400 | + | |
| 401 | + | |
| 402 | + | |
| 403 | + | |
| 404 | + | |
| 405 | + | |
| 406 | + | |
| 407 | + | |
| 408 | + | |
| 409 | + | |
| 410 | + | |
| 411 | + | |
| 412 | + | |
| 413 | + | |
| 414 | + | |
| 415 | + | |
398 | 416 | | |
399 | 417 | | |
400 | 418 | | |
| |||
0 commit comments