facebookarchive/prepack
Voir sur GitHubEnhance serializer tests with automated heap traversals
Open
#1 852 ouverte le 3 mai 2018
enhancementhelp wantedserializertest needed
Métriques du dépôt
- Stars
- (14 268 stars)
- Métriques de merge PR
- (Aucune PR mergée en 30 j)
Description
Currently, the serializer tests only checks a heap projection: whatever the inspect function computes.
This is great for debugging issues, as each serializer test tends to be minimal and test a separate feature.
However, we are ignoring additional potential. What could be done is effectively synthesizing an alternative inspect function implementation that returns the result of a systematic, deterministic heap traversal.
Challenges:
- Ideally, we'd like to detect any changes to built-ins as well as changes rooted in the
globalobject. - Prepack does not preserve everything, e.g. function names and function source code change. So this should be abstracted by the traversal.
- Functions are interesting in general: How can we detect that their behavior didn't change? To start with, we can just ignore that and focus on the immediately accessible heap. Maybe some annotations are needed on how to invoke functions to get interesting outputs, which in turn can be traversed.