summaryrefslogtreecommitdiffstats
path: root/source/slang/slang.cpp
diff options
context:
space:
mode:
authorJay Kwak <82421531+jkwak-work@users.noreply.github.com>2024-10-25 10:14:22 -0700
committerGitHub <noreply@github.com>2024-10-25 10:14:22 -0700
commit4bad669bbc5ec3ff77321f083c59cde87eb10229 (patch)
treebf0abc916692cf34e804469bba400f2b04172472 /source/slang/slang.cpp
parentef40d3044cf75ec3d7b24a43257fa744b45274f9 (diff)
Replace stdlib on Slang API with CoreModule (#5405)
This is a breaking change in a way that the Slang API function names are changed. All of them are commented as "experimental" and we wouldn't provide a back-ward compatibility for them. Following functions are renamed: compileStdLib() -> compileCoreModule() loadStdLib() -> loadCoreModule() saveStdLib() -> saveCoreModule() slang_createGlobalSessionWithoutStdLib() -> slang_createGlobalSessionWithoutCoreModule() slang_getEmbeddedStdLib() -> slang_getEmbeddedCoreModule() hasDeferredStdLib() -> hasDeferredCoreModule() Following command-line arguments are renamed: "-load-stdlib" -> "-load-core-module" "-save-stdlib" -> "-save-core-module" "-save-stdlib-bin-source" -> "-save-core-module-bin-source" "-compile-stdlib" -> "-compile-core-module"
Diffstat (limited to 'source/slang/slang.cpp')
-rw-r--r--source/slang/slang.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/source/slang/slang.cpp b/source/slang/slang.cpp
index 93fb2c203..b77a3efc8 100644
--- a/source/slang/slang.cpp
+++ b/source/slang/slang.cpp
@@ -342,7 +342,7 @@ void Session::writeStdlibDoc(String config)
}
}
-SlangResult Session::compileStdLib(slang::CompileStdLibFlags compileFlags)
+SlangResult Session::compileCoreModule(slang::CompileCoreModuleFlags compileFlags)
{
SLANG_AST_BUILDER_RAII(m_builtinLinkage->getASTBuilder());
@@ -369,7 +369,7 @@ SlangResult Session::compileStdLib(slang::CompileStdLibFlags compileFlags)
auto stdLibSrcBlob = StringBlob::moveCreate(stdLibSrcBuilder.produceString());
addBuiltinSource(coreLanguageScope, "core", stdLibSrcBlob);
- if (compileFlags & slang::CompileStdLibFlag::WriteDocumentation)
+ if (compileFlags & slang::CompileCoreModuleFlag::WriteDocumentation)
{
// Load config file first.
String configText;
@@ -393,7 +393,7 @@ SlangResult Session::compileStdLib(slang::CompileStdLibFlags compileFlags)
return SLANG_OK;
}
-SlangResult Session::loadStdLib(const void* stdLib, size_t stdLibSizeInBytes)
+SlangResult Session::loadCoreModule(const void* coreModule, size_t coreModuleSizeInBytes)
{
SLANG_PROFILE;
@@ -407,7 +407,7 @@ SlangResult Session::loadStdLib(const void* stdLib, size_t stdLibSizeInBytes)
// Make a file system to read it from
ComPtr<ISlangFileSystemExt> fileSystem;
- SLANG_RETURN_ON_FAIL(loadArchiveFileSystem(stdLib, stdLibSizeInBytes, fileSystem));
+ SLANG_RETURN_ON_FAIL(loadArchiveFileSystem(coreModule, coreModuleSizeInBytes, fileSystem));
// Let's try loading serialized modules and adding them
SLANG_RETURN_ON_FAIL(_readBuiltinModule(fileSystem, coreLanguageScope, "core"));
@@ -416,7 +416,7 @@ SlangResult Session::loadStdLib(const void* stdLib, size_t stdLibSizeInBytes)
return SLANG_OK;
}
-SlangResult Session::saveStdLib(SlangArchiveType archiveType, ISlangBlob** outBlob)
+SlangResult Session::saveCoreModule(SlangArchiveType archiveType, ISlangBlob** outBlob)
{
if (m_builtinLinkage->mapNameToLoadedModules.getCount() == 0)
{