StructDictGetWithColor should handle not having a type register
commitd216432d21d32836b18c5c39d7f0217735b989f8
authorRick Lavoie <rlavoie@fb.com>
Thu, 18 Nov 2021 22:23:11 +0000 (18 14:23 -0800)
committerFacebook GitHub Bot <facebook-github-bot@users.noreply.github.com>
Thu, 18 Nov 2021 22:29:21 +0000 (18 14:29 -0800)
tree2e0afea8e8815fa832361f728b479ffc12eaa27c
parentaed61f8a0101227b049d943db83588f430137d85
StructDictGetWithColor should handle not having a type register

Summary:
The implementation of StructDictGetWithColor assumes there's always a
type register. This isn't necessarily the case. If we know the lookup
will always succeed, we won't union in TUninit, and the remaining type
might have a known datatype. This generates invalid code right now.

Deal with this properly. While we're at it, we can generate more
efficient code in the case where we know the lookup will always
succeed. Namely, we don't need to actually check the string hash.

Differential Revision: D31061268

fbshipit-source-id: 0d0b37a65b4acc369cffd743f32dd74f54e07f9e
hphp/runtime/vm/jit/code-gen-helpers.cpp
hphp/runtime/vm/jit/code-gen-helpers.h
hphp/runtime/vm/jit/irlower-bespoke.cpp