Memoize TAST during a computation
commit71569301c6be9608f64b550e203ec54b25eef4bf
authorTed Spence <tspence@fb.com>
Tue, 5 Nov 2019 23:42:24 +0000 (5 15:42 -0800)
committerFacebook Github Bot <facebook-github-bot@users.noreply.github.com>
Tue, 5 Nov 2019 23:47:31 +0000 (5 15:47 -0800)
tree127a31fd9c9bcc64a985407efd70692e6ed3f171
parent6ea775f60b6908aa5688ce3bbc065a0b03966a10
Memoize TAST during a computation

Summary:
Serverless IDE does not currently keep around typed ASTs once they are produced.

This leads to an awkward situation where some LSP messages may cause the typed AST to be produced multiple times.

Let's avoid doing this and instead keep the typed AST around as long as the entry object is valid.

Reviewed By: arxanas

Differential Revision: D18305009

fbshipit-source-id: db13f9f99357c9c172928d8f4d13c71aba924787
hphp/hack/src/providers/provider_context.ml
hphp/hack/src/providers/provider_context.mli
hphp/hack/src/providers/provider_utils.ml