No more Decl_store.get_class when folding decls
Summary:
While folding a class under eviction, we can't rely on the invariant that shared memory contains the folded decls of the parents.
Luckily, CatherineGasnier already did most of the plumbing in
D24565546 (https://github.com/facebook/hhvm/commit/
90fd38cfe65406aa582ebf35dea14ab8823fc98d), carrying around a `class_cache` that contains entries for (almost; you'll see I had to add `Stringish`) parent decls.
This diff removes calls to `Decl_store.get_class` while folding a class.
It does so by:
1. In `decl_folded_class`: Invoke the new `Decl_env.get_class_and_add_dep ~shmem_fallback:false` which
1. no longer falls back to `Decl_store.get`
2. doesn't try to refold a decl when a parent one is missing
2. In `decl_init_check`: Invoke `Decl_env.get_class_and_add_dep ~shmem_fallback:true ~fallback:...` which
1. will query the shmem heap
2. if not on zoncolan, try to refold the decl (in zoncolan, refolding craches because shallow decls are unavailable)
We have to manually specify the `~fallback` function to avoid a circular dependency between `Decl_env <-> Decl_folded_class`
Reviewed By: CatherineGasnier
Differential Revision:
D32759800
fbshipit-source-id:
9b9fffa8477f9de3389df1fd92570240a66fa0d5