diff options
| author | Jay Kwak <82421531+jkwak-work@users.noreply.github.com> | 2024-10-25 10:14:22 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-10-25 10:14:22 -0700 |
| commit | 4bad669bbc5ec3ff77321f083c59cde87eb10229 (patch) | |
| tree | bf0abc916692cf34e804469bba400f2b04172472 /source/slang-record-replay/replay/slang-decoder.cpp | |
| parent | ef40d3044cf75ec3d7b24a43257fa744b45274f9 (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-record-replay/replay/slang-decoder.cpp')
| -rw-r--r-- | source/slang-record-replay/replay/slang-decoder.cpp | 30 |
1 files changed, 15 insertions, 15 deletions
diff --git a/source/slang-record-replay/replay/slang-decoder.cpp b/source/slang-record-replay/replay/slang-decoder.cpp index 30d182729..6eb4ac8f5 100644 --- a/source/slang-record-replay/replay/slang-decoder.cpp +++ b/source/slang-record-replay/replay/slang-decoder.cpp @@ -91,14 +91,14 @@ namespace SlangRecord case ApiCallId::IGlobalSession_checkPassThroughSupport: IGlobalSession_checkPassThroughSupport(objectId, parameterBlock); break; - case ApiCallId::IGlobalSession_compileStdLib: - IGlobalSession_compileStdLib(objectId, parameterBlock); + case ApiCallId::IGlobalSession_compileCoreModule: + IGlobalSession_compileCoreModule(objectId, parameterBlock); break; - case ApiCallId::IGlobalSession_loadStdLib: - IGlobalSession_loadStdLib(objectId, parameterBlock); + case ApiCallId::IGlobalSession_loadCoreModule: + IGlobalSession_loadCoreModule(objectId, parameterBlock); break; - case ApiCallId::IGlobalSession_saveStdLib: - IGlobalSession_saveStdLib(objectId, parameterBlock); + case ApiCallId::IGlobalSession_saveCoreModule: + IGlobalSession_saveCoreModule(objectId, parameterBlock); break; case ApiCallId::IGlobalSession_findCapability: IGlobalSession_findCapability(objectId, parameterBlock); @@ -619,29 +619,29 @@ namespace SlangRecord slangRecordLog(LogLevel::Debug, "%s should not be called, it'a not recordd\n", __PRETTY_FUNCTION__); } - void SlangDecoder::IGlobalSession_compileStdLib(ObjectID objectId, ParameterBlock const& parameterBlock) + void SlangDecoder::IGlobalSession_compileCoreModule(ObjectID objectId, ParameterBlock const& parameterBlock) { - slang::CompileStdLibFlags flags {}; + slang::CompileCoreModuleFlags flags {}; ParameterDecoder::decodeEnumValue(parameterBlock.parameterBuffer, parameterBlock.parameterBufferSize, flags); for (auto consumer: m_consumers) { - consumer->IGlobalSession_compileStdLib(objectId, flags); + consumer->IGlobalSession_compileCoreModule(objectId, flags); } } - void SlangDecoder::IGlobalSession_loadStdLib(ObjectID objectId, ParameterBlock const& parameterBlock) + void SlangDecoder::IGlobalSession_loadCoreModule(ObjectID objectId, ParameterBlock const& parameterBlock) { - PointerDecoder<void*> stdLib; - ParameterDecoder::decodePointer(parameterBlock.parameterBuffer, parameterBlock.parameterBufferSize, stdLib); + PointerDecoder<void*> coreModule; + ParameterDecoder::decodePointer(parameterBlock.parameterBuffer, parameterBlock.parameterBufferSize, coreModule); for (auto consumer: m_consumers) { - consumer->IGlobalSession_loadStdLib(objectId, stdLib.getPointer(), stdLib.getDataSize()); + consumer->IGlobalSession_loadCoreModule(objectId, coreModule.getPointer(), coreModule.getDataSize()); } } - void SlangDecoder::IGlobalSession_saveStdLib(ObjectID objectId, ParameterBlock const& parameterBlock) + void SlangDecoder::IGlobalSession_saveCoreModule(ObjectID objectId, ParameterBlock const& parameterBlock) { SlangArchiveType archiveType {}; ObjectID outBlobId = 0; @@ -650,7 +650,7 @@ namespace SlangRecord for (auto consumer: m_consumers) { - consumer->IGlobalSession_saveStdLib(objectId, archiveType, outBlobId); + consumer->IGlobalSession_saveCoreModule(objectId, archiveType, outBlobId); } } |
