Add ArrLike type operand to IsType[C,L]
Summary:
Add a new type operand to the IsType[C,L] bytecode, called ArrLike. As the name
suggests, it checks if the value is "ArrLike" (array, vec, dict, or
keyset). This operand does not correspond to any is_* function in Hack, but is
meant to be used internally inside array_map, array_filter, and
array_reduce. This lets Hack arrays pass the array fast-path check, just like
normal arrays. It also suppresses extraneous Hack array compat notices from
those functions (because those are only triggered when testing for an array).
The JIT already had support for testing array-like types. It only required
modifying typeOpToDataType to return a Type instead of a DataType (which was
always cast into a Type anyways).
Reviewed By: paulbiss
Differential Revision:
D6869739
fbshipit-source-id:
393cbdf891eab14e80f01e54b97e2e80f01c0bf2