Commit Graph

3 Commits

Author SHA1 Message Date
Xi Ge
dd5f21b1d2 IDE: refactor USR generation to request evaluator model.
We refactor the existing USR generation code to use the request evaluator
model. Most part of this patch is NFC, however a slight difference is
using this model allows us to cache the calculated USRs in the evaluator.
2018-08-28 11:03:25 -07:00
Doug Gregor
81bee08369 [AST] Make ValueDecls displayable via their DeclRefs. 2018-06-21 06:39:03 -07:00
Doug Gregor
d687446e06 [Evaluator] Simplify the definition of new requests and make them printable.
Introduce a CRTP base class, SimpleRequest, which simplifies the task of
defining a new request kind by handling the storage of the values (in a
std::tuple), their hashing, equality, printing, etc. The values are passed
along to the subclass’s operator() so they’re mostly treated as (const)
parameters, making mutation of the request state impossible.

Extend AnyValue and AnyRequest with printing logic, so we can print any
request for debugging purposes, and
2018-06-01 08:56:18 -07:00