Consume decls from Tast and decl_provider for functions
Summary:
This diff makes IFC consume the declarations directly from the decl heap and TAST instead of our special declaration step. In the diff, I change the IFC special declaration step to use the decl heap anyway, in order to make sure the new declaration test I added passes. I will then delete de_fun from the decl_env in the diff above it.
This also allows IFC to find the policies for methods and functions not directly declared in the file. See exceptions.php for an example of this with New.
We use the TAST for the policy information as much as possible to save decl heap accesses; `new` expressions don't have the function type of the constructor saved on the TAST, so those require a declaration heap access.
Reviewed By: zilberstein
Differential Revision:
D24400904
fbshipit-source-id:
f0e4ef6624f3d81db0286484ea33b8cdeb710799