Split type_visitor into decl_type_visitor and locl_type_visitor
commitea72964619a346a73232ce02477a5f827e88c3fd
authorDwayne Reeves <dreeves@fb.com>
Fri, 13 Sep 2019 04:57:46 +0000 (12 21:57 -0700)
committerHhvm Bot <hhvm-bot@users.noreply.github.com>
Fri, 13 Sep 2019 05:00:17 +0000 (12 22:00 -0700)
treeb9a5f3657179f19fc4bb413f6c92ccd7326b2566
parent679563bb5703ceaec975436e49a03558acb0b969
Split type_visitor into decl_type_visitor and locl_type_visitor

Summary:
The Type_visitor operates on types on either the decl or locl phase. For the majority of visitors they only ever operated on a single phase. I made decl_type_visitor and locl_type_visitor and switched users of the visitor to use either one or the other. All but two visitors were trivially migrated. I will clean those up in a follow up diff.

As a result of this there are some instances where code was written to handle cases that will never occur. I've removed those functions instead of trying to make them work preserve existing behavior.

Reviewed By: vassilmladenov

Differential Revision: D17348551

fbshipit-source-id: 77c9fe10f7e4b328e0eecf43a80dcb9ab7114c73
hphp/hack/src/server/serverExtractStandalone.ml
hphp/hack/src/server/serverRewriteLambdaParameters.ml
hphp/hack/src/server/serverRewriteParameterTypes.ml
hphp/hack/src/server/serverRewriteReturnType.ml
hphp/hack/src/typing/type_visitor.ml
hphp/hack/src/typing/typing_disposable.ml
hphp/hack/src/typing/typing_solver.ml
hphp/hack/src/typing/typing_utils.ml