Fix bug in HHBBC ProvTag usage
commit8f60d2180cc8ec18519dbb96d8bf88800fe0cffd
authorShaunak Kishore <kshaunak@fb.com>
Wed, 27 May 2020 19:10:45 +0000 (27 12:10 -0700)
committerFacebook GitHub Bot <facebook-github-bot@users.noreply.github.com>
Wed, 27 May 2020 19:27:21 +0000 (27 12:27 -0700)
treeecd47187c8b80e24d5016c138b5b2911fd1e39fe
parent9d46d60ac02d52d0a781492de3ebcd3307ba5dbd
Fix bug in HHBBC ProvTag usage

Summary:
Prior to specialization, the main way we got a union of multiple empty arrays is due to them having different provenance tags. Post specialization, we also hit this case for a union of varray[] and darray[]. That reveals a bug here - we need to check if EvalArrayProvenance is on prior to looking up the tag.

We already have to do so in a few other places, so pull the logic into a helper.

Reviewed By: ricklavoie

Differential Revision: D21732988

fbshipit-source-id: 0da858efd7c2c13adc56f0b024ab1afd9fd9d235
hphp/hhbbc/type-system.cpp
hphp/hhbbc/type-system.h