<smarr>
ok, making `array_layout` quasi immutable, instead of immutable prevents the issue. Though, I don't understand why it used to work for the `array_class` field before, which isn't quasi immutable either.
<smarr>
```
<smarr>
and the assignments aren't very different, there's just a "field read" in between:
<arigato>
smarr: we'd need to see a complete example to be sure
<arigato>
smarr: in theory, _immutable_fields_ means that the field is completely immutable from the first time a read occurs
<arigato>
but it's not impossible that, say, in some situation some optimization moves the read earlier, before the write---it shouldn't occur but it's not impossible
<arigato>
an example I can think of: 'universe' refers to a prebuilt instance (one created before translation) but where the field has no value, and you only assign a value at runtime
<arigato>
in that case, translation itself will think it's fine to constant-fold the reads of the field, and it will read NULL if the field is not initialized yet
[Arfrever] has joined #pypy
* arigato
looks at issue 3515, re.sub
<smarr>
arigato: I think I figured it out. what confused me was that in the other, very similar case, the folding didn't happen. Though there the method with the access was called with different parameters. in the new case, the method in question was called always with the same global and then the read folded to `NULL`. Marking things quasi immutable, which seems more correct, fixed it.