Add static method support to FCallBuiltin
Summary:
This diff modifies hhbbc to emit FCallBuiltin for static functions if the class and function name are both statically known and both match the native function's name. The literal string for FCallBuiltin is a new one, formed as cls::fn (so, for example, "HH\Shapes::idx"). On the HHVM side, I index all native functions in a unit using keys computed the same way in IRUnit.
The purpose of this diff is to support adding a "fast path" for some static native functions, like we do for things like "get_class", "is_array", and others (see "optimizedFCallBuiltin" in irgen-builtin.cpp). Specifically, we want to add a fast path for Shapes::idx.
Reviewed By: mxw
Differential Revision:
D15314597
fbshipit-source-id:
d2b1da4ecda4cdf340fe6a171ca50dc428992b65