summaryrefslogtreecommitdiff
path: root/source/slang
diff options
context:
space:
mode:
authorjsmall-nvidia <jsmall@nvidia.com>2023-04-25 12:25:52 -0400
committerGitHub <noreply@github.com>2023-04-25 09:25:52 -0700
commit5abee6a0a30c7c965138ec7286b7f1b21b201731 (patch)
tree0469f6f85bac0fcf502a95f2a60c49179349dd17 /source/slang
parente5d5e3c215f3300bf447e6ab46cdf8d5c12f58a6 (diff)
StringBuilder to lowerCamel (#2840)
* #include an absolute path didn't work - because paths were taken to always be relative. * WIP lowerCamel Dictionary. * WIP more lowerCamel fixes for Dictionary. * Add/Remove/Clear * GetValue/Contains * Fix tabs in dictionary. Count -> getCount * Fix fields with caps. * Key -> key Value -> value Use m_ for members where appropriate. Use lowerCamel in linked list. * Some small fixes/improvements to Dictionary. * Kick CI. * Small tidy on String. * Append -> append * ToString -> toString ProduceString -> produceString * Small fixes. * StringToXXX -> stringToXXX * Fix typo introduced by Append -> append. * Made intToAscii do reversal at the end. --------- Co-authored-by: Yong He <yonghe@outlook.com>
Diffstat (limited to 'source/slang')
-rw-r--r--source/slang/slang-ast-dump.cpp2
-rw-r--r--source/slang/slang-ast-print.h2
-rw-r--r--source/slang/slang-check-modifier.cpp2
-rw-r--r--source/slang/slang-check-overload.cpp2
-rw-r--r--source/slang/slang-compiler.cpp4
-rw-r--r--source/slang/slang-doc-markdown-writer.cpp4
-rw-r--r--source/slang/slang-emit-c-like.cpp6
-rw-r--r--source/slang/slang-emit-cpp.cpp2
-rw-r--r--source/slang/slang-emit-source-writer.cpp2
-rw-r--r--source/slang/slang-emit-source-writer.h2
-rw-r--r--source/slang/slang-ir-autodiff.cpp2
-rw-r--r--source/slang/slang-ir-spirv-snippet.cpp2
-rw-r--r--source/slang/slang-ir-util.cpp2
-rw-r--r--source/slang/slang-ir.cpp6
-rw-r--r--source/slang/slang-language-server-auto-format.cpp2
-rw-r--r--source/slang/slang-language-server-completion.cpp12
-rw-r--r--source/slang/slang-language-server-inlay-hints.cpp4
-rw-r--r--source/slang/slang-language-server.cpp22
-rw-r--r--source/slang/slang-lower-to-ir.cpp2
-rw-r--r--source/slang/slang-mangle.cpp12
-rw-r--r--source/slang/slang-mangled-lexer.cpp2
-rw-r--r--source/slang/slang-options.cpp2
-rw-r--r--source/slang/slang-parser.cpp30
-rw-r--r--source/slang/slang-preprocessor.cpp8
-rw-r--r--source/slang/slang-repro.cpp2
-rw-r--r--source/slang/slang-serialize-container.cpp2
-rw-r--r--source/slang/slang-stdlib.cpp6
-rw-r--r--source/slang/slang-workspace-version.cpp2
-rw-r--r--source/slang/slang.cpp10
29 files changed, 79 insertions, 79 deletions
diff --git a/source/slang/slang-ast-dump.cpp b/source/slang/slang-ast-dump.cpp
index 242d67017..2c98af65c 100644
--- a/source/slang/slang-ast-dump.cpp
+++ b/source/slang/slang-ast-dump.cpp
@@ -434,7 +434,7 @@ struct ASTDumpContext
{
StringBuilder sb;
sb << declRef;
- m_writer->emit(sb.ToString());
+ m_writer->emit(sb.toString());
}
void dump(const DeclCheckStateExt& extState)
diff --git a/source/slang/slang-ast-print.h b/source/slang/slang-ast-print.h
index b7c9df3ba..1b61a8904 100644
--- a/source/slang/slang-ast-print.h
+++ b/source/slang/slang-ast-print.h
@@ -103,7 +103,7 @@ public:
void reset() { m_builder.clear(); }
/// Get the current string
- String getString() { return m_builder.ProduceString(); }
+ String getString() { return m_builder.produceString(); }
/// Get contents as a slice
UnownedStringSlice getSlice() const { return m_builder.getUnownedSlice(); }
diff --git a/source/slang/slang-check-modifier.cpp b/source/slang/slang-check-modifier.cpp
index e5627850b..e9c78e155 100644
--- a/source/slang/slang-check-modifier.cpp
+++ b/source/slang/slang-check-modifier.cpp
@@ -697,7 +697,7 @@ namespace Slang
return false;
}
}
- comInterfaceAttr->guid = resultGUID.ToString();
+ comInterfaceAttr->guid = resultGUID.toString();
if (comInterfaceAttr->guid.getLength() != 32)
{
getSink()->diagnose(attr, Diagnostics::invalidGUID, guid);
diff --git a/source/slang/slang-check-overload.cpp b/source/slang/slang-check-overload.cpp
index 1914e84c2..eaa89c008 100644
--- a/source/slang/slang-check-overload.cpp
+++ b/source/slang/slang-check-overload.cpp
@@ -1644,7 +1644,7 @@ namespace Slang
context.getArgType(aa)->toText(argsListBuilder);
}
argsListBuilder << ")";
- return argsListBuilder.ProduceString();
+ return argsListBuilder.produceString();
}
Expr* SemanticsVisitor::ResolveInvoke(InvokeExpr * expr)
diff --git a/source/slang/slang-compiler.cpp b/source/slang/slang-compiler.cpp
index 28ffee152..ff7228854 100644
--- a/source/slang/slang-compiler.cpp
+++ b/source/slang/slang-compiler.cpp
@@ -792,10 +792,10 @@ namespace Slang
if (diagnostic.getLength() > 0)
{
- builder.Append(diagnostic);
+ builder.append(diagnostic);
if (!diagnostic.endsWith("\n"))
{
- builder.Append("\n");
+ builder.append("\n");
}
}
diff --git a/source/slang/slang-doc-markdown-writer.cpp b/source/slang/slang-doc-markdown-writer.cpp
index fb3087d50..9993dc53e 100644
--- a/source/slang/slang-doc-markdown-writer.cpp
+++ b/source/slang/slang-doc-markdown-writer.cpp
@@ -117,7 +117,7 @@ String DocMarkdownWriter::_getName(Decl* decl)
{
StringBuilder buf;
ASTPrinter::appendDeclName(decl, buf);
- return buf.ProduceString();
+ return buf.produceString();
}
String DocMarkdownWriter::_getName(InheritanceDecl* decl)
@@ -125,7 +125,7 @@ String DocMarkdownWriter::_getName(InheritanceDecl* decl)
StringBuilder buf;
buf.clear();
buf << decl->base;
- return buf.ProduceString();
+ return buf.produceString();
}
DocMarkdownWriter::NameAndText DocMarkdownWriter::_getNameAndText(ASTMarkup::Entry* entry, Decl* decl)
diff --git a/source/slang/slang-emit-c-like.cpp b/source/slang/slang-emit-c-like.cpp
index 9dacaa4d4..c122c13f2 100644
--- a/source/slang/slang-emit-c-like.cpp
+++ b/source/slang/slang-emit-c-like.cpp
@@ -853,14 +853,14 @@ String CLikeSourceEmitter::_generateUniqueName(const UnownedStringSlice& name)
sb.append("_");
}
- String key = sb.ProduceString();
+ String key = sb.produceString();
UInt& countRef = m_uniqueNameCounters.getOrAddValue(key, 0);
const UInt count = countRef;
countRef = count + 1;
sb.append(Int32(count));
- return sb.ProduceString();
+ return sb.produceString();
}
String CLikeSourceEmitter::generateName(IRInst* inst)
@@ -931,7 +931,7 @@ String CLikeSourceEmitter::generateName(IRInst* inst)
sb << "_S";
sb << Int32(getID(inst));
- return sb.ProduceString();
+ return sb.produceString();
}
String CLikeSourceEmitter::getName(IRInst* inst)
diff --git a/source/slang/slang-emit-cpp.cpp b/source/slang/slang-emit-cpp.cpp
index 38855ae44..83f487cb9 100644
--- a/source/slang/slang-emit-cpp.cpp
+++ b/source/slang/slang-emit-cpp.cpp
@@ -1024,7 +1024,7 @@ void CPPSourceEmitter::_emitType(IRType* type, DeclaratorInfo* declarator)
{
StringBuilder sb;
calcTypeName(type, m_target, sb);
- m_writer->emit(sb.ProduceString());
+ m_writer->emit(sb.produceString());
m_writer->emit(" ");
emitDeclarator(declarator);
break;
diff --git a/source/slang/slang-emit-source-writer.cpp b/source/slang/slang-emit-source-writer.cpp
index fc1b48f8c..72696c94a 100644
--- a/source/slang/slang-emit-source-writer.cpp
+++ b/source/slang/slang-emit-source-writer.cpp
@@ -36,7 +36,7 @@ void SourceWriter::emitRawTextSpan(char const* textBegin, char const* textEnd)
{
// TODO(tfoley): Need to make "corelib" not use `int` for pointer-sized things...
auto len = textEnd - textBegin;
- m_builder.Append(textBegin, len);
+ m_builder.append(textBegin, len);
}
void SourceWriter::emitRawText(char const* text)
diff --git a/source/slang/slang-emit-source-writer.h b/source/slang/slang-emit-source-writer.h
index 955d3359c..9a931bb98 100644
--- a/source/slang/slang-emit-source-writer.h
+++ b/source/slang/slang-emit-source-writer.h
@@ -63,7 +63,7 @@ public:
void advanceToSourceLocationIfValid(const SourceLoc& sourceLocation);
/// Get the content as a string
- String getContent() { return m_builder.ProduceString(); }
+ String getContent() { return m_builder.produceString(); }
/// Clear the content
void clearContent() { m_builder.clear(); }
/// Get the content as a string and clear the internal representation
diff --git a/source/slang/slang-ir-autodiff.cpp b/source/slang/slang-ir-autodiff.cpp
index 4dac6b347..4188d2ec8 100644
--- a/source/slang/slang-ir-autodiff.cpp
+++ b/source/slang/slang-ir-autodiff.cpp
@@ -271,7 +271,7 @@ IRInst* DifferentialPairTypeBuilder::_createDiffPairType(IRType* origBaseType, I
StringBuilder nameBuilder;
nameBuilder << "DiffPair_";
getTypeNameHint(nameBuilder, origBaseType);
- builder.addNameHintDecoration(pairStructType, nameBuilder.ToString().getUnownedSlice());
+ builder.addNameHintDecoration(pairStructType, nameBuilder.toString().getUnownedSlice());
builder.createStructField(pairStructType, _getOrCreatePrimalStructKey(), origBaseType);
builder.createStructField(pairStructType, _getOrCreateDiffStructKey(), (IRType*)diffType);
diff --git a/source/slang/slang-ir-spirv-snippet.cpp b/source/slang/slang-ir-spirv-snippet.cpp
index ee40456a7..3d416a7e3 100644
--- a/source/slang/slang-ir-spirv-snippet.cpp
+++ b/source/slang/slang-ir-spirv-snippet.cpp
@@ -202,7 +202,7 @@ RefPtr<SpvSnippet> SpvSnippet::parse(UnownedStringSlice definition)
else if (identifier.startsWith("_"))
{
operand.type = SpvSnippet::ASMOperandType::ObjectReference;
- operand.content = (SpvWord)StringToInt(
+ operand.content = (SpvWord)stringToInt(
identifier.subString(1, identifier.getLength() - 1));
inst.operands.add(operand);
}
diff --git a/source/slang/slang-ir-util.cpp b/source/slang/slang-ir-util.cpp
index 07da03744..05d3157a7 100644
--- a/source/slang/slang-ir-util.cpp
+++ b/source/slang/slang-ir-util.cpp
@@ -266,7 +266,7 @@ String dumpIRToString(IRInst* root)
options.flags = IRDumpOptions::Flag::DumpDebugIds;
#endif
dumpIR(root, options, nullptr, &writer);
- return sb.ToString();
+ return sb.toString();
}
void copyNameHintDecoration(IRInst* dest, IRInst* src)
diff --git a/source/slang/slang-ir.cpp b/source/slang/slang-ir.cpp
index ae830ca4f..9225faf6b 100644
--- a/source/slang/slang-ir.cpp
+++ b/source/slang/slang-ir.cpp
@@ -5881,7 +5881,7 @@ namespace Slang
StringBuilder sb;
scrubName(nameHint, sb);
- String key = sb.ProduceString();
+ String key = sb.produceString();
UInt count = 0;
context->uniqueNameCounters.tryGetValue(key, count);
@@ -5891,14 +5891,14 @@ namespace Slang
{
sb.append(count);
}
- return sb.ProduceString();
+ return sb.produceString();
}
else
{
StringBuilder sb;
auto id = context->uniqueIDCounter++;
sb.append(id);
- return sb.ProduceString();
+ return sb.produceString();
}
}
diff --git a/source/slang/slang-language-server-auto-format.cpp b/source/slang/slang-language-server-auto-format.cpp
index 9e41401b2..5b94712a0 100644
--- a/source/slang/slang-language-server-auto-format.cpp
+++ b/source/slang/slang-language-server-auto-format.cpp
@@ -113,7 +113,7 @@ String parseXmlText(UnownedStringSlice text)
pos++;
}
}
- return sb.ProduceString();
+ return sb.produceString();
}
bool shouldUseFallbackStyle(const FormatOptions& options)
diff --git a/source/slang/slang-language-server-completion.cpp b/source/slang/slang-language-server-completion.cpp
index 9736bd889..337c77cc2 100644
--- a/source/slang/slang-language-server-completion.cpp
+++ b/source/slang/slang-language-server-completion.cpp
@@ -196,7 +196,7 @@ List<LanguageServerProtocol::TextEditCompletionItem> CompletionContext::gatherFi
nameSB.appendChar(ch);
}
}
- item.label = nameSB.ProduceString();
+ item.label = nameSB.produceString();
item.kind = LanguageServerProtocol::kCompletionItemKindFile;
}
if (item.label.getLength())
@@ -335,7 +335,7 @@ SlangResult CompletionContext::tryCompleteImport()
else
prefixSB.appendChar(ch);
}
- auto prefix = prefixSB.ProduceString();
+ auto prefix = prefixSB.produceString();
auto items = gatherFileAndModuleCompletionItems(
prefix, true, false, line - 1, fileNameEnd, lastPos + 1, sectionEnd, 0);
server->m_connection->sendResult(&items, responseId);
@@ -382,7 +382,7 @@ SlangResult CompletionContext::tryCompleteRawFileName(UnownedStringSlice lineCon
else
prefixSB.appendChar(ch);
}
- auto prefix = prefixSB.ProduceString();
+ auto prefix = prefixSB.produceString();
auto items = gatherFileAndModuleCompletionItems(
prefix,
false,
@@ -631,11 +631,11 @@ List<LanguageServerProtocol::CompletionItem> CompletionContext::createSwizzleCan
item.kind = LanguageServerProtocol::kCompletionItemKindVariable;
nameSB.clear();
nameSB << "_m" << i << j;
- item.label = nameSB.ToString();
+ item.label = nameSB.toString();
result.add(item);
nameSB.clear();
nameSB << "_" << i + 1 << j + 1;
- item.label = nameSB.ToString();
+ item.label = nameSB.toString();
result.add(item);
}
}
@@ -675,7 +675,7 @@ LanguageServerProtocol::CompletionItem CompletionContext::generateGUIDCompletion
sb << "\")";
LanguageServerProtocol::CompletionItem resultItem;
resultItem.kind = LanguageServerProtocol::kCompletionItemKindKeyword;
- resultItem.label = sb.ProduceString();
+ resultItem.label = sb.produceString();
return resultItem;
}
diff --git a/source/slang/slang-language-server-inlay-hints.cpp b/source/slang/slang-language-server-inlay-hints.cpp
index 22c9ce21e..801e28445 100644
--- a/source/slang/slang-language-server-inlay-hints.cpp
+++ b/source/slang/slang-language-server-inlay-hints.cpp
@@ -65,7 +65,7 @@ List<LanguageServerProtocol::InlayHint> getInlayHints(
else if (param->hasModifier<RefModifier>()) lblSb << "ref ";
lblSb << name->text;
lblSb << ":";
- hint.label = lblSb.ProduceString();
+ hint.label = lblSb.produceString();
result.add(hint);
}
i++;
@@ -104,7 +104,7 @@ List<LanguageServerProtocol::InlayHint> getInlayHints(
hint.kind = LanguageServerProtocol::kInlayHintKindType;
StringBuilder lblSb;
lblSb << ": " << varDecl->type.type->toString();
- hint.label = lblSb.ProduceString();
+ hint.label = lblSb.produceString();
LanguageServerProtocol::TextEdit edit;
edit.range.start = hint.position;
diff --git a/source/slang/slang-language-server.cpp b/source/slang/slang-language-server.cpp
index 715ecfc5d..8b71d5bd3 100644
--- a/source/slang/slang-language-server.cpp
+++ b/source/slang/slang-language-server.cpp
@@ -347,12 +347,12 @@ static String _formatDocumentation(String doc)
if (parameterDocSB.getLength())
{
result << "**Parameters** \n";
- result << parameterDocSB.ProduceString() << "\n\n";
+ result << parameterDocSB.produceString() << "\n\n";
}
if (returnDocSB.getLength())
{
result << "**Returns** \n";
- result << returnDocSB.ProduceString();
+ result << returnDocSB.produceString();
}
if (!hasDoxygen)
@@ -364,7 +364,7 @@ static String _formatDocumentation(String doc)
result << lines[i] << " \n";
}
}
- return result.ProduceString();
+ return result.produceString();
}
static void _tryGetDocumentation(StringBuilder& sb, WorkspaceVersion* workspace, Decl* decl)
@@ -597,7 +597,7 @@ SlangResult LanguageServer::hover(
else
{
hover.contents.kind = "markdown";
- hover.contents.value = sb.ProduceString();
+ hover.contents.value = sb.produceString();
m_connection->sendResult(&hover, responseId);
return SLANG_OK;
}
@@ -819,7 +819,7 @@ SlangResult LanguageServer::completion(
StringBuilder newText;
newText << originalText.getUnownedSlice().head(cursorOffset + 1) << "#?"
<< originalText.getUnownedSlice().tail(cursorOffset + 1);
- doc->setText(newText.ProduceString());
+ doc->setText(newText.produceString());
auto restoreDocText = makeDeferred([&]() { doc->setText(originalText); });
Module* parsedModule = version->getOrLoadModule(canonicalPath);
@@ -871,7 +871,7 @@ SlangResult LanguageServer::completionResolve(
}
LanguageServerProtocol::CompletionItem resolvedItem = args;
- int itemId = StringToInt(args.data);
+ int itemId = stringToInt(args.data);
auto version = m_workspace->getCurrentCompletionVersion();
if (!version || !version->linkage)
{
@@ -885,7 +885,7 @@ SlangResult LanguageServer::completionResolve(
resolvedItem.detail = getDeclSignatureString(declRef, version);
StringBuilder docSB;
_tryGetDocumentation(docSB, version, declRef.getDecl());
- resolvedItem.documentation.value = docSB.ProduceString();
+ resolvedItem.documentation.value = docSB.produceString();
resolvedItem.documentation.kind = "markdown";
}
m_connection->sendResult(&resolvedItem, responseId);
@@ -1001,7 +1001,7 @@ String LanguageServer::getExprDeclSignature(Expr* expr, String* outDocumentation
auto humaneLoc = version->linkage->getSourceManager()->getHumaneLoc(declRefExpr->declRef.getLoc(), SourceLocType::Actual);
_tryGetDocumentation(docSB, version, declRefExpr->declRef.getDecl());
appendDefinitionLocation(docSB, m_workspace, humaneLoc);
- *outDocumentation = docSB.ProduceString();
+ *outDocumentation = docSB.produceString();
}
return printer.getString();
@@ -1026,7 +1026,7 @@ String LanguageServer::getDeclRefSignature(DeclRef<Decl> declRef, String* outDoc
auto humaneLoc = version->linkage->getSourceManager()->getHumaneLoc(declRef.getLoc(), SourceLocType::Actual);
_tryGetDocumentation(docSB, version, declRef.getDecl());
appendDefinitionLocation(docSB, m_workspace, humaneLoc);
- *outDocumentation = docSB.ProduceString();
+ *outDocumentation = docSB.produceString();
}
return printer.getString();
}
@@ -1658,7 +1658,7 @@ SlangResult LanguageServer::tryGetMacroHoverInfo(
version->linkage->getSourceManager()->getHumaneLoc(def->loc, SourceLocType::Actual);
appendDefinitionLocation(sb, m_workspace, humaneLoc);
hover.contents.kind = "markdown";
- hover.contents.value = sb.ProduceString();
+ hover.contents.value = sb.produceString();
m_connection->sendResult(&hover, responseId);
return SLANG_OK;
}
@@ -1985,7 +1985,7 @@ SlangResult LanguageServer::execute()
StringBuilder msgBuilder;
msgBuilder << "Server processed " << commands.getCount() << " commands, executed in "
<< String(int(workTime * 1000)) << "ms";
- logMessage(3, msgBuilder.ProduceString());
+ logMessage(3, msgBuilder.produceString());
}
m_connection->getUnderlyingConnection()->waitForResult(1000);
diff --git a/source/slang/slang-lower-to-ir.cpp b/source/slang/slang-lower-to-ir.cpp
index f156bafa1..1ec508bfa 100644
--- a/source/slang/slang-lower-to-ir.cpp
+++ b/source/slang/slang-lower-to-ir.cpp
@@ -2436,7 +2436,7 @@ static String getNameForNameHint(
sb.append(".");
sb.append(leafName->text);
- return sb.ProduceString();
+ return sb.produceString();
}
/// Try to add an appropriate name hint to the instruction,
diff --git a/source/slang/slang-mangle.cpp b/source/slang/slang-mangle.cpp
index dea808a8e..77e6586ff 100644
--- a/source/slang/slang-mangle.cpp
+++ b/source/slang/slang-mangle.cpp
@@ -552,7 +552,7 @@ namespace Slang
{
ManglingContext context(astBuilder);
mangleName(&context, declRef);
- return context.sb.ProduceString();
+ return context.sb.produceString();
}
String getMangledName(ASTBuilder* astBuilder, DeclRefBase const & declRef)
@@ -575,7 +575,7 @@ namespace Slang
emitRaw(&context, "_SW");
emitQualifiedName(&context, sub);
emitQualifiedName(&context, sup);
- return context.sb.ProduceString();
+ return context.sb.produceString();
}
String getMangledNameForConformanceWitness(
@@ -592,7 +592,7 @@ namespace Slang
emitRaw(&context, "_SW");
emitQualifiedName(&context, sub);
emitType(&context, sup);
- return context.sb.ProduceString();
+ return context.sb.produceString();
}
String getMangledNameForConformanceWitness(
@@ -609,21 +609,21 @@ namespace Slang
emitRaw(&context, "_SW");
emitType(&context, sub);
emitType(&context, sup);
- return context.sb.ProduceString();
+ return context.sb.produceString();
}
String getMangledTypeName(ASTBuilder* astBuilder, Type* type)
{
ManglingContext context(astBuilder);
emitType(&context, type);
- return context.sb.ProduceString();
+ return context.sb.produceString();
}
String getMangledNameFromNameString(const UnownedStringSlice& name)
{
ManglingContext context(nullptr);
emitNameImpl(&context, name);
- return context.sb.ProduceString();
+ return context.sb.produceString();
}
String getHashedName(const UnownedStringSlice& mangledName)
diff --git a/source/slang/slang-mangled-lexer.cpp b/source/slang/slang-mangled-lexer.cpp
index 4920cfce3..ee019e482 100644
--- a/source/slang/slang-mangled-lexer.cpp
+++ b/source/slang/slang-mangled-lexer.cpp
@@ -219,7 +219,7 @@ String MangledLexer::unescapeString(UnownedStringSlice str)
cursor++;
}
}
- return sb.ProduceString();
+ return sb.produceString();
}
UInt MangledLexer::readParamCount()
diff --git a/source/slang/slang-options.cpp b/source/slang/slang-options.cpp
index 34ef0763f..0860ef4f2 100644
--- a/source/slang/slang-options.cpp
+++ b/source/slang/slang-options.cpp
@@ -2390,7 +2390,7 @@ SlangResult parseOptions(
if (sink->getErrorCount() > 0)
{
// Put the errors in the diagnostic
- compileRequest->m_diagnosticOutput = sink->outputBuffer.ProduceString();
+ compileRequest->m_diagnosticOutput = sink->outputBuffer.produceString();
}
return res;
diff --git a/source/slang/slang-parser.cpp b/source/slang/slang-parser.cpp
index b3c9f9942..256d7aae1 100644
--- a/source/slang/slang-parser.cpp
+++ b/source/slang/slang-parser.cpp
@@ -891,17 +891,17 @@ namespace Slang
StringBuilder scopedIdentifierBuilder;
if (initialTokenType == TokenType::Scope)
{
- scopedIdentifierBuilder.Append('_');
+ scopedIdentifierBuilder.append('_');
}
- scopedIdentifierBuilder.Append(firstIdentifier.getContent());
+ scopedIdentifierBuilder.append(firstIdentifier.getContent());
while (parser->tokenReader.peekTokenType() == TokenType::Scope)
{
parser->ReadToken(TokenType::Scope);
- scopedIdentifierBuilder.Append('_');
+ scopedIdentifierBuilder.append('_');
const Token nextIdentifier(parser->ReadToken(TokenType::Identifier));
- scopedIdentifierBuilder.Append(nextIdentifier.getContent());
+ scopedIdentifierBuilder.append(nextIdentifier.getContent());
}
// Make a 'token'
@@ -1195,7 +1195,7 @@ namespace Slang
sb << parser->ReadToken(TokenType::Identifier).getContent();
}
- moduleNameAndLoc.name = getName(parser, sb.ProduceString());
+ moduleNameAndLoc.name = getName(parser, sb.produceString());
}
decl->moduleNameAndLoc = moduleNameAndLoc;
@@ -5819,7 +5819,7 @@ namespace Slang
token = parser->tokenReader.advanceToken();
sb << getStringLiteralTokenValue(token);
}
- constExpr->value = sb.ProduceString();
+ constExpr->value = sb.produceString();
}
return constExpr;
@@ -6244,11 +6244,11 @@ namespace Slang
{
if (AdvanceIf(parser, TokenType::OpSub))
{
- modifier->op = IROp(-StringToInt(parser->ReadToken().getContent()));
+ modifier->op = IROp(-stringToInt(parser->ReadToken().getContent()));
}
else if (parser->LookAheadToken(TokenType::IntegerLiteral))
{
- modifier->op = IROp(StringToInt(parser->ReadToken().getContent()));
+ modifier->op = IROp(stringToInt(parser->ReadToken().getContent()));
}
else
{
@@ -6513,7 +6513,7 @@ namespace Slang
{
BuiltinTypeModifier* modifier = parser->astBuilder->create<BuiltinTypeModifier>();
parser->ReadToken(TokenType::LParent);
- modifier->tag = BaseType(StringToInt(parser->ReadToken(TokenType::IntegerLiteral).getContent()));
+ modifier->tag = BaseType(stringToInt(parser->ReadToken(TokenType::IntegerLiteral).getContent()));
parser->ReadToken(TokenType::RParent);
return modifier;
@@ -6523,7 +6523,7 @@ namespace Slang
{
BuiltinRequirementModifier* modifier = parser->astBuilder->create<BuiltinRequirementModifier>();
parser->ReadToken(TokenType::LParent);
- modifier->kind = BuiltinRequirementKind(StringToInt(parser->ReadToken(TokenType::IntegerLiteral).getContent()));
+ modifier->kind = BuiltinRequirementKind(stringToInt(parser->ReadToken(TokenType::IntegerLiteral).getContent()));
parser->ReadToken(TokenType::RParent);
return modifier;
@@ -6536,7 +6536,7 @@ namespace Slang
modifier->magicName = parser->ReadToken(TokenType::Identifier).getContent();
if (AdvanceIf(parser, TokenType::Comma))
{
- modifier->tag = uint32_t(StringToInt(parser->ReadToken(TokenType::IntegerLiteral).getContent()));
+ modifier->tag = uint32_t(stringToInt(parser->ReadToken(TokenType::IntegerLiteral).getContent()));
}
parser->ReadToken(TokenType::RParent);
@@ -6547,10 +6547,10 @@ namespace Slang
{
IntrinsicTypeModifier* modifier = parser->astBuilder->create<IntrinsicTypeModifier>();
parser->ReadToken(TokenType::LParent);
- modifier->irOp = uint32_t(StringToInt(parser->ReadToken(TokenType::IntegerLiteral).getContent()));
+ modifier->irOp = uint32_t(stringToInt(parser->ReadToken(TokenType::IntegerLiteral).getContent()));
while( AdvanceIf(parser, TokenType::Comma) )
{
- auto operand = uint32_t(StringToInt(parser->ReadToken(TokenType::IntegerLiteral).getContent()));
+ auto operand = uint32_t(stringToInt(parser->ReadToken(TokenType::IntegerLiteral).getContent()));
modifier->irOperands.add(operand);
}
parser->ReadToken(TokenType::RParent);
@@ -6564,10 +6564,10 @@ namespace Slang
ConversionCost cost = kConversionCost_Default;
if( AdvanceIf(parser, TokenType::LParent) )
{
- cost = ConversionCost(StringToInt(parser->ReadToken(TokenType::IntegerLiteral).getContent()));
+ cost = ConversionCost(stringToInt(parser->ReadToken(TokenType::IntegerLiteral).getContent()));
if (AdvanceIf(parser, TokenType::Comma))
{
- builtinKind = BuiltinConversionKind(StringToInt(parser->ReadToken(TokenType::IntegerLiteral).getContent()));
+ builtinKind = BuiltinConversionKind(stringToInt(parser->ReadToken(TokenType::IntegerLiteral).getContent()));
}
parser->ReadToken(TokenType::RParent);
}
diff --git a/source/slang/slang-preprocessor.cpp b/source/slang/slang-preprocessor.cpp
index ba96ac887..28abaaf76 100644
--- a/source/slang/slang-preprocessor.cpp
+++ b/source/slang/slang-preprocessor.cpp
@@ -1833,7 +1833,7 @@ Token MacroInvocation::_readTokenImpl()
//
PathInfo pathInfo = PathInfo::makeTokenPaste();
SourceManager* sourceManager = m_preprocessor->getSourceManager();
- SourceFile* sourceFile = sourceManager->createSourceFileWithString(pathInfo, pastedContent.ProduceString());
+ SourceFile* sourceFile = sourceManager->createSourceFileWithString(pathInfo, pastedContent.produceString());
SourceView* sourceView = sourceManager->createSourceView(sourceFile, nullptr, tokenPasteLoc);
Lexer lexer;
@@ -2532,7 +2532,7 @@ static PreprocessorExpressionValue ParseAndEvaluateUnaryExpression(PreprocessorD
}
case TokenType::IntegerLiteral:
- return StringToInt(token.getContent());
+ return stringToInt(token.getContent());
case TokenType::Identifier:
{
@@ -3484,7 +3484,7 @@ static void HandleLineDirective(PreprocessorDirectiveContext* context)
switch(PeekTokenType(context))
{
case TokenType::IntegerLiteral:
- line = StringToInt(AdvanceToken(context).getContent());
+ line = stringToInt(AdvanceToken(context).getContent());
break;
case TokenType::EndOfFile:
@@ -4098,7 +4098,7 @@ TokenList preprocessSource(
sb << t.Content;
}
- String s = sb.ProduceString();
+ String s = sb.produceString();
#endif
return tokens;
diff --git a/source/slang/slang-repro.cpp b/source/slang/slang-repro.cpp
index c978ab47c..7ddf2f304 100644
--- a/source/slang/slang-repro.cpp
+++ b/source/slang/slang-repro.cpp
@@ -351,7 +351,7 @@ static String _scrubName(const String& in)
builder.appendChar(c);
}
- return builder.ProduceString();
+ return builder.produceString();
}
/* static */SlangResult ReproUtil::store(EndToEndCompileRequest* request, OffsetContainer& inOutContainer, Offset32Ptr<RequestState>& outRequest)
diff --git a/source/slang/slang-serialize-container.cpp b/source/slang/slang-serialize-container.cpp
index 3eea5caf7..8d10235f0 100644
--- a/source/slang/slang-serialize-container.cpp
+++ b/source/slang/slang-serialize-container.cpp
@@ -387,7 +387,7 @@ static List<ExtensionDecl*>& _getCandidateExtensionList(
buf << "tu" << out.modules.getCount();
if (!astBuilder)
{
- astBuilder = new ASTBuilder(options.sharedASTBuilder, buf.ProduceString());
+ astBuilder = new ASTBuilder(options.sharedASTBuilder, buf.produceString());
}
DefaultSerialObjectFactory objectFactory(astBuilder);
diff --git a/source/slang/slang-stdlib.cpp b/source/slang/slang-stdlib.cpp
index 9d4a079c8..f80254ba6 100644
--- a/source/slang/slang-stdlib.cpp
+++ b/source/slang/slang-stdlib.cpp
@@ -266,7 +266,7 @@ namespace Slang
#include "core.meta.slang.h"
- coreLibraryCode = sb.ProduceString();
+ coreLibraryCode = sb.produceString();
#endif
return coreLibraryCode;
@@ -284,7 +284,7 @@ namespace Slang
#include "hlsl.meta.slang.h"
- hlslLibraryCode = sb.ProduceString();
+ hlslLibraryCode = sb.produceString();
#endif
return hlslLibraryCode;
}
@@ -301,7 +301,7 @@ namespace Slang
#include "diff.meta.slang.h"
- autodiffLibraryCode = sb.ProduceString();
+ autodiffLibraryCode = sb.produceString();
#endif
return autodiffLibraryCode;
}
diff --git a/source/slang/slang-workspace-version.cpp b/source/slang/slang-workspace-version.cpp
index 4d33b34c0..dde5b9325 100644
--- a/source/slang/slang-workspace-version.cpp
+++ b/source/slang/slang-workspace-version.cpp
@@ -56,7 +56,7 @@ void Workspace::changeDoc(const String& path, LanguageServerProtocol::Range rang
newText << text;
if (endOffset != -1)
newText << originalText.tail(endOffset);
- changeDoc(doc.Ptr(), newText.ProduceString());
+ changeDoc(doc.Ptr(), newText.produceString());
}
}
diff --git a/source/slang/slang.cpp b/source/slang/slang.cpp
index b5a8585ff..ac8e0269d 100644
--- a/source/slang/slang.cpp
+++ b/source/slang/slang.cpp
@@ -2726,7 +2726,7 @@ SlangResult EndToEndCompileRequest::executeActions()
{
SlangResult res = executeActionsInner();
- m_diagnosticOutput = getSink()->outputBuffer.ProduceString();
+ m_diagnosticOutput = getSink()->outputBuffer.produceString();
return res;
}
@@ -3117,10 +3117,10 @@ RefPtr<Module> Linkage::findOrImportModule(
if (c == '_')
c = '-';
- sb.Append(c);
+ sb.append(c);
}
- sb.Append(".slang");
- fileName = sb.ProduceString();
+ sb.append(".slang");
+ fileName = sb.produceString();
}
else
{
@@ -5108,7 +5108,7 @@ SlangResult EndToEndCompileRequest::EndToEndCompileRequest::compile()
// and not some other component in their system.
getSink()->diagnose(SourceLoc(), Diagnostics::compilationAborted);
}
- m_diagnosticOutput = getSink()->outputBuffer.ProduceString();
+ m_diagnosticOutput = getSink()->outputBuffer.produceString();
#else
// When debugging, we probably don't want to filter out any errors, since