... | ... | @@ -98,14 +98,14 @@ This means that everywhere that enters either a case continuation or a non-top-l |
|
|
GC. In this case, our re-entry arranges to enter the constructor, so we get the correct tag by
|
|
|
virtue of going through the constructor entry code.
|
|
|
|
|
|
### Strict fields and strict workers
|
|
|
### Strict fields, strict workers, and tag inference
|
|
|
|
|
|
GHC now implemented #16970. Which adds additional invariants in pointer tags:
|
|
|
Since 2022, GHC implements #16970, which adds additional invariants for pointer tags:
|
|
|
|
|
|
- For strict constructor fields, the values in them are assumed tagged.
|
|
|
- For strict worker ids, the arguments marked as cbv(call by value) are assumed tagged.
|
|
|
|
|
|
See the Note [Strict Field Invariant] and Note [Strict Worker Ids] for in depth details.
|
|
|
To maintain these invariants, GHC performs an STG-level *tag inference* analysis; see `Note [Tag Inference]`, `Note [Strict Field Invariant]`, and `Note [Strict Worker Ids]` in `GHC.Stg.InferTags` for in depth details.
|
|
|
|
|
|
The gist of it is that we put the responsibility to tag these pointers on the construction/call site. Why?
|
|
|
A constructor might be constructed once, but used many times.
|
... | ... | |