Commit Graph

53 Commits

Author SHA1 Message Date
Doug Gregor
8822b2edbc [Evaluator] Track dependencies of each request.
Perform online tracking of the (direct) dependencies of each request made
to the evaluator, and introduce debugging code to print these dependencies
as a tree (from a particular request).
2018-06-01 08:56:18 -07:00
Doug Gregor
4b9e3ea84b [Evaluator] Detect cycles via the active-requests stack rather than the cache.
Turn the `activeRequests` stack into a `SetVector` and use it to detect
cycles. This approach works for uncached requests, and lets us simplify
the external-caching protocol quite a bit because we no longer record
“in-flight” states. Simplify the cache as well.

Thanks to Graydon for the suggestion.
2018-06-01 08:56:18 -07:00
Doug Gregor
4ac125f41f [Evaluator] Introduce a simple request evaluator.
Meant as a replacement for the barely-started iterative type checker,
introduce a simpler "evaluator" that can evaluate individual requests
(essentially, function objects with some additional API), caching
results as appropriate and detecting cycles.
2018-06-01 08:56:18 -07:00