Introduce another form of debugging dump for the evaluator, rendering the
complete dependency graph using GraphViz, including all dependencies and
values cached within the 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.
The implementation is small and would need to be replicated into the
default implementation. Move the definition into the common TaskQueue
implementation. This repairs the Windows build of the compiler.
When providing the -parseable-output flag to the swift compiler, it will provide json formatted messages about tasks that run.
I added some optional usage information in form of user time, system time and maxrss to the output. This can be used by other tools using the compiler to get some insights about time and memory usage.
Since the output does not longer match processes run (in batch mode), I also added a real_pid field so the client could reason about jobs that belong together if needed.
rdar://39798231
When linking on Linux, we would fail with unresolved symbol references
to swift::FrontendStatsTracer::getTraceFormatter<T>. The use of the
types, which are defined in swiftSIL occur in swiftBasic. Provide
inline definitions of the constructors which cause the dependency on
some environments (e.g. Linux).
The `redirects` parameter is of type `ArrayRef` which is default constructed
through the special `None` type. Use `None` rather than `nullptr` which would
attempt to create a 0-sized array with a `nullptr`. This fixes the build on
Windows.
This may help us reproduce a failing build when all we have is a build
log, and will become much more important in batch mode when we
/really/ need to know what ended up in what batch.
For now, this doesn't include /output/ filelists, because David's
about to mess with that code anyway to make things better around
supplementary outputs in batch mode. There is one weirdness there,
though, which is that ArgsToFrontendInputsConverter peeks at the
outputs to see whether we're doing single-threaded or multi-threaded
WMO.
Restore the use of `UuidFromStringA`. This avoids the unnecessary
round-tripping through mbtowcs and the dynamic allocation. It also
fixes the UUID parsing, enabling tests to work on Windows.
This reverts commit 9414f46731.