Skip to content

Commit 8e84e6a

Browse files
committed
[docs] Update RequestEvaluator.md
The request evaluator is no longer new, and we've since implemented per-request caching.
1 parent 8ea97f3 commit 8e84e6a

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

docs/RequestEvaluator.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -66,9 +66,8 @@ To define a request as a dependency source, it must implement an accessor for th
6666

6767
## Open Projects
6868

69-
The request-evaluator is relatively new to the Swift compiler, having been introduced in mid-2018. There are a number of improvements that can be made to the evaluator itself and how it is used in the compiler:
69+
There are a number of improvements that can be made to the evaluator itself and how it is used in the compiler:
7070

71-
* The evaluator uses a `DenseMap<AnyRequest, AnyValue>` as its cache: we can almost certainly do better with per-request-kind caches that don't depend on so much type erasure.
7271
* Explore how best to cache data structures in the evaluator. For example, caching `std::vector<T>` or `std::string` implies that we'll make copies of the underlying data structure each time we access the data. Could we automatically intern the data into an allocation arena owned by the evaluator, and vend `ArrayRef<T>` and `StringRef` to clients instead?
7372
* Cycle diagnostics are far too complicated and produce very poor results. Consider replacing the current `diagnoseCycle`/`noteCycleStep` scheme with a single method that produces summary information (e.g., a short summary string + source location information) and provides richer diagnostics from that string.
7473
* The `isCached()` check to determine whether a specific instance of a request is worth caching may be at the wrong level, because one generally has to duplicate effort (or worse, code!) to make the decision in `isCached()`. Consider whether the `evaluator()` function could return something special to say "produce this value without caching" vs. the normal "produce this value with caching".

0 commit comments

Comments
 (0)