julia
e9054e90 - compiler: don't fold relocated pointer fields of constant objects

Commit
44 days ago
compiler: don't fold relocated pointer fields of constant objects `_getfield_tfunc_const` folded any `const` field of a constant object to a `Const`, and SROA lifted fields of constant immutable objects into the IR. `Memory.ptr` and `MemoryRef.ptr_or_offset` never change, but staticdata.c relocates them when a package image is loaded, so a read folded during precompilation returned the address from the precompiling process. Skip both folds for the fields that `is_relocatable_ptr_field` reports, so that these reads load the value at runtime. Fixes #63938 Assisted-by: Claude Code (Claude Opus 5.5)
Author
Committer
Parents
Loading