diff options
| author | Jay Kwak <82421531+jkwak-work@users.noreply.github.com> | 2024-10-28 16:40:53 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-10-28 16:40:53 -0700 |
| commit | b7a619b45b0745f166d2dcc5985b994fb1d85d13 (patch) | |
| tree | a1fbae9702899bf574624641f31bf17d9dd54999 /source/slang/slang-lower-to-ir.cpp | |
| parent | 80471601720e107f0914479f6097281d0840cf18 (diff) | |
Replace the word stdlib or standard-library with core-module for source code (#5415)
This commit changes the word "stdlib" or "standard library" to "core module" in the source code.
Diffstat (limited to 'source/slang/slang-lower-to-ir.cpp')
| -rw-r--r-- | source/slang/slang-lower-to-ir.cpp | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/source/slang/slang-lower-to-ir.cpp b/source/slang/slang-lower-to-ir.cpp index ce7ab9ac6..31a352926 100644 --- a/source/slang/slang-lower-to-ir.cpp +++ b/source/slang/slang-lower-to-ir.cpp @@ -655,11 +655,11 @@ ModuleDecl* findModuleDecl(Decl* decl) return nullptr; } -bool isFromStdLib(Decl* decl) +bool isFromCoreModule(Decl* decl) { for (auto dd = decl; dd; dd = dd->parentDecl) { - if (dd->hasModifier<FromStdLibModifier>()) + if (dd->hasModifier<FromCoreModuleModifier>()) return true; } return false; @@ -707,7 +707,7 @@ bool isEffectivelyStatic( Decl* decl, ContainerDecl* parentDecl); -bool isStdLibMemberFuncDecl( +bool isCoreModuleMemberFuncDecl( Decl* decl); // Ensure that a version of the given declaration has been emitted to the IR @@ -1442,10 +1442,10 @@ static void addLinkageDecoration( // Obfuscate the mangled names if necessary. // - // Care is needed around stdlib as it is only compiled once and *without* obfuscation, - // so any linkage name to stdlib *shouldn't* have obfuscation applied to it. + // Care is needed around the core module as it is only compiled once and *without* obfuscation, + // so any linkage name to the core module *shouldn't* have obfuscation applied to it. if (context->shared->m_obfuscateCode && - !isFromStdLib(decl)) + !isFromCoreModule(decl)) { const auto obfuscatedName = getHashedName(mangledName.getUnownedSlice()); @@ -9549,7 +9549,7 @@ struct DeclLoweringVisitor : DeclVisitor<DeclLoweringVisitor, LoweredValInfo> } else { - if( isStdLibMemberFuncDecl(decl) ) + if( isCoreModuleMemberFuncDecl(decl) ) { // We will mark member functions by appending a `.` to the // start of their name. @@ -9623,8 +9623,8 @@ struct DeclLoweringVisitor : DeclVisitor<DeclLoweringVisitor, LoweredValInfo> } } - /// Is `decl` a member function (or effectively a member function) when considered as a stdlib declaration? - bool isStdLibMemberFuncDecl( + /// Is `decl` a member function (or effectively a member function) when considered as a core module declaration? + bool isCoreModuleMemberFuncDecl( Decl* inDecl) { auto decl = as<CallableDecl>(inDecl); @@ -9670,7 +9670,7 @@ struct DeclLoweringVisitor : DeclVisitor<DeclLoweringVisitor, LoweredValInfo> return false; } - /// Add a "catch-all" decoration for a stdlib function if it would be needed + /// Add a "catch-all" decoration for a core module function if it would be needed void addCatchAllIntrinsicDecorationIfNeeded( IRInst* irInst, FunctionDeclBase* decl) @@ -9681,12 +9681,12 @@ struct DeclLoweringVisitor : DeclVisitor<DeclLoweringVisitor, LoweredValInfo> if(decl->body) return; - // Only standard library declarations should get any kind of catch-all + // Only core module declarations should get any kind of catch-all // treatment by default. Declarations in user case are responsible // for marking things as target intrinsics if they want to go down // that (unsupported) route. // - if(!isFromStdLib(decl)) + if(!isFromCoreModule(decl)) return; // No need to worry about functions that lower to intrinsic IR opcodes @@ -9719,7 +9719,7 @@ struct DeclLoweringVisitor : DeclVisitor<DeclLoweringVisitor, LoweredValInfo> // (the assumption is that a catch-all definition of a member function // is itself implemented as a member function). // - if( isStdLibMemberFuncDecl(decl) ) + if( isCoreModuleMemberFuncDecl(decl) ) { // We will mark member functions by appending a `.` to the // start of their name. |
