Type#GetLoadDependencies(): group operations by type

This commit is contained in:
Alexander A. Klimov 2024-09-20 14:30:40 +02:00
parent c24713ac10
commit 4b20121dcf
1 changed files with 3 additions and 8 deletions

View File

@ -384,15 +384,10 @@ void ClassCompiler::HandleClass(const Klass& klass, const ClassDebugInfo&)
<< "\tstatic const auto deps ([] {" << std::endl;
for (auto& dep : klass.LoadDependencies)
m_Impl << "\t\tauto type" << dep << " (GetByName(\"" << dep << "\").get());" << std::endl;
m_Impl << "\t\tauto type" << dep << " (GetByName(\"" << dep << "\").get());" << std::endl
<< "\t\tVERIFY(type" << dep << ");" << std::endl << std::endl;
m_Impl << std::endl;
for (auto& dep : klass.LoadDependencies)
m_Impl << "\t\tVERIFY(type" << dep << ");" << std::endl;
m_Impl << std::endl
<< "\t\treturn std::unordered_set<Type*>{";
m_Impl << "\t\treturn std::unordered_set<Type*>{";
for (const std::string& dep : klass.LoadDependencies)
m_Impl << " type" << dep << ",";