summaryrefslogtreecommitdiffstats
path: root/source/slang/slang.cpp
diff options
context:
space:
mode:
authorCopilot <198982749+Copilot@users.noreply.github.com>2025-07-17 07:57:42 +0000
committerGitHub <noreply@github.com>2025-07-17 07:57:42 +0000
commit3485710e93d833a1c7b691af707cfd8962af7d17 (patch)
tree5a45f60da92aed422a923b4f62ad3ffa3a10db65 /source/slang/slang.cpp
parent28758e0e427ceca196937dc90efe3ab1cb35bd70 (diff)
Merge NamePool and RootNamePool into a single type (#7797)
* Initial plan * Merge NamePool and RootNamePool into single NamePool class Co-authored-by: csyonghe <2652293+csyonghe@users.noreply.github.com> * Remove unnecessary comment from slang-fiddle-scrape.cpp Co-authored-by: Theresa Foley <tangent-vector@users.noreply.github.com> * Address review feedback: initialize namePool to nullptr and remove unnecessary comments Co-authored-by: Theresa Foley <tangent-vector@users.noreply.github.com> --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: csyonghe <2652293+csyonghe@users.noreply.github.com> Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: Theresa Foley <tangent-vector@users.noreply.github.com> Co-authored-by: Yong He <yonghe@outlook.com>
Diffstat (limited to 'source/slang/slang.cpp')
-rw-r--r--source/slang/slang.cpp6
1 files changed, 2 insertions, 4 deletions
diff --git a/source/slang/slang.cpp b/source/slang/slang.cpp
index 090e34e9a..f65681e4b 100644
--- a/source/slang/slang.cpp
+++ b/source/slang/slang.cpp
@@ -167,8 +167,6 @@ void Session::init()
DownstreamCompilerUtil::setDefaultLocators(m_downstreamCompilerLocators);
m_downstreamCompilerSet = new DownstreamCompilerSet;
- // Initialize name pool
- getNamePool()->setRootNamePool(getRootNamePool());
m_completionTokenName = getNamePool()->getName("#?");
m_sharedLibraryLoader = DefaultSharedLibraryLoader::getSingleton();
@@ -1370,7 +1368,7 @@ Linkage::Linkage(Session* session, ASTBuilder* astBuilder, Linkage* builtinLinka
, m_cmdLineContext(new CommandLineContext())
, m_stringSlicePool(StringSlicePool::Style::Default)
{
- getNamePool()->setRootNamePool(session->getRootNamePool());
+ namePool = session->getNamePool();
m_defaultSourceManager.initialize(session->getBuiltinSourceManager(), nullptr);
@@ -3601,7 +3599,7 @@ void FrontEndCompileRequest::parseTranslationUnit(TranslationUnitRequest* transl
#if 0
// Test serialization
{
- ASTSerialTestUtil::testSerialize(translationUnit->getModuleDecl(), getSession()->getRootNamePool(), getLinkage()->getASTBuilder()->getSharedASTBuilder(), getSourceManager());
+ ASTSerialTestUtil::testSerialize(translationUnit->getModuleDecl(), getSession()->getNamePool(), getLinkage()->getASTBuilder()->getSharedASTBuilder(), getSourceManager());
}
#endif
}