Better instanceof optimization
commit1d6b5ef0f6fd38c5b40aec8830a3f0d66b8adf4f
authorMark Williams <mwilliams@fb.com>
Tue, 3 Oct 2017 21:16:03 +0000 (3 14:16 -0700)
committerHhvm Bot <hhvm-bot@users.noreply.github.com>
Tue, 3 Oct 2017 21:44:44 +0000 (3 14:44 -0700)
tree440286b2decf0dcdde12255a81641818ec170c58
parent192419ea0c959b640997b677481558bd3af1faf3
Better instanceof optimization

Summary:
If we know the type under test is either Null or an instance of
specified class, we can replace the expensive InstanceOf check with a
cheap IsNull check.

Reviewed By: ricklavoie

Differential Revision: D5966947

fbshipit-source-id: f320c113ee42b85b303ee12fe73e079689bce6b1
hphp/hhbbc/interp.cpp