Explorer: add trace for InstantiateType (#3041)

Adds trace output for `Interpreter::InstantiateType` method.
This commit is contained in:
Prabhat Sachdeva
2023-08-11 18:05:30 +00:00
committed by GitHub
parent 28f563f1ad
commit c5667c0e10
2 changed files with 162 additions and 29 deletions
+5
View File
@@ -502,6 +502,11 @@ auto Interpreter::EvalAssociatedConstant(
auto Interpreter::InstantiateType(Nonnull<const Value*> type,
SourceLocation source_loc)
-> ErrorOr<Nonnull<const Value*>> {
if (trace_stream_->is_enabled()) {
trace_stream_->Start() << "instantiating type `" << *type << "` ("
<< source_loc << ")\n";
}
switch (type->kind()) {
case Value::Kind::VariableType: {
CARBON_ASSIGN_OR_RETURN(