Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions common/types/type_pool.cc
Original file line number Diff line number Diff line change
Expand Up @@ -37,15 +37,15 @@ StructType TypePool::MakeStructType(absl::string_view name) {

FunctionType TypePool::MakeFunctionType(const Type& result,
absl::Span<const Type> args) {
absl::MutexLock lock(&functions_mutex_);
absl::MutexLock lock(functions_mutex_);
return functions_.InternFunctionType(result, args);
}

ListType TypePool::MakeListType(const Type& element) {
if (element.IsDyn()) {
return ListType();
}
absl::MutexLock lock(&lists_mutex_);
absl::MutexLock lock(lists_mutex_);
return lists_.InternListType(element);
}

Expand All @@ -56,7 +56,7 @@ MapType TypePool::MakeMapType(const Type& key, const Type& value) {
if (key.IsString() && value.IsDyn()) {
return JsonMapType();
}
absl::MutexLock lock(&maps_mutex_);
absl::MutexLock lock(maps_mutex_);
return maps_.InternMapType(key, value);
}

Expand All @@ -70,7 +70,7 @@ OpaqueType TypePool::MakeOpaqueType(absl::string_view name,
} else {
name = InternString(name);
}
absl::MutexLock lock(&opaques_mutex_);
absl::MutexLock lock(opaques_mutex_);
return opaques_.InternOpaqueType(name, parameters);
}

Expand All @@ -84,12 +84,12 @@ TypeParamType TypePool::MakeTypeParamType(absl::string_view name) {
}

TypeType TypePool::MakeTypeType(const Type& type) {
absl::MutexLock lock(&types_mutex_);
absl::MutexLock lock(types_mutex_);
return types_.InternTypeType(type);
}

absl::string_view TypePool::InternString(absl::string_view string) {
absl::MutexLock lock(&strings_mutex_);
absl::MutexLock lock(strings_mutex_);
return strings_.InternString(string);
}

Expand Down