Eliminate vanilla checks when flag is off
Summary:
In
D20195212, I added an assertion that we never do a runtime vanilla check if the AllowBespokeArrayLikes flag is off. This assertion can actually fire, and is almost certainly the cause of the 0.2-0.5% branch miss regression - in fact, we may do fully Θ(n) vanilla checks for a specialized iterator over a Hack array of size n. The problem arises because the "base type" for a specialized array is used in both checks and assertions, so if we don't have sufficient type information, we can emit a CheckType<Vec=Vanilla> even with the flag off.
To fix this problem, I opted to go back to the behavior before
D19819685 where jit/check.cpp doesn't require vanilla types with the AllowBespokeArrayLikes flag unset. This behavior allows us to completely short-circuit any vanilla-related logic for opt builds with the flag unset.
Reviewed By: ricklavoie
Differential Revision:
D20205671
fbshipit-source-id:
ee63d85f31bd78b11de7ab2a80ef396fa1ecdee4