From 7b7c095b37e85ca3a8f55eff1c3d9643d467b8e0 Mon Sep 17 00:00:00 2001 From: jsmall-nvidia Date: Tue, 25 Apr 2023 10:43:29 -0400 Subject: Dictionary using lowerCamel (#2835) * #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. --- source/slang/slang-ir-generics-lowering-context.cpp | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'source/slang/slang-ir-generics-lowering-context.cpp') diff --git a/source/slang/slang-ir-generics-lowering-context.cpp b/source/slang/slang-ir-generics-lowering-context.cpp index 0dbc84e51..609a9e298 100644 --- a/source/slang/slang-ir-generics-lowering-context.cpp +++ b/source/slang/slang-ir-generics-lowering-context.cpp @@ -56,7 +56,7 @@ namespace Slang IRInst* SharedGenericsLoweringContext::maybeEmitRTTIObject(IRInst* typeInst) { IRInst* result = nullptr; - if (mapTypeToRTTIObject.TryGetValue(typeInst, result)) + if (mapTypeToRTTIObject.tryGetValue(typeInst, result)) return result; IRBuilder builderStorage(module); auto builder = &builderStorage; @@ -87,17 +87,17 @@ namespace Slang IRInst* SharedGenericsLoweringContext::findInterfaceRequirementVal(IRInterfaceType* interfaceType, IRInst* requirementKey) { - if (auto dict = mapInterfaceRequirementKeyValue.TryGetValue(interfaceType)) - return (*dict)[requirementKey].GetValue(); + if (auto dict = mapInterfaceRequirementKeyValue.tryGetValue(interfaceType)) + return (*dict)[requirementKey].getValue(); _builldInterfaceRequirementMap(interfaceType); return findInterfaceRequirementVal(interfaceType, requirementKey); } void SharedGenericsLoweringContext::_builldInterfaceRequirementMap(IRInterfaceType* interfaceType) { - mapInterfaceRequirementKeyValue.Add(interfaceType, + mapInterfaceRequirementKeyValue.add(interfaceType, Dictionary()); - auto dict = mapInterfaceRequirementKeyValue.TryGetValue(interfaceType); + auto dict = mapInterfaceRequirementKeyValue.tryGetValue(interfaceType); for (UInt i = 0; i < interfaceType->getOperandCount(); i++) { auto entry = cast(interfaceType->getOperand(i)); @@ -136,7 +136,7 @@ namespace Slang return nullptr; IRInst* resultType; - if (typeMapping.TryGetValue(paramType, resultType)) + if (typeMapping.tryGetValue(paramType, resultType)) return (IRType*)resultType; if (isTypeValue(paramType)) @@ -302,7 +302,7 @@ namespace Slang // Only in the original interface type will an associated type entry have an IRAssociatedType value. // We need to extract AnyValueSize from this IRAssociatedType. // In lowered interface type, that entry is lowered into an Ptr(RTTIType) and this info is lost. - mapLoweredInterfaceToOriginal.TryGetValue(interfaceType, interfaceType); + mapLoweredInterfaceToOriginal.tryGetValue(interfaceType, interfaceType); auto reqVal = findInterfaceRequirementVal( interfaceType, lookupInterface->getRequirementKey()); -- cgit v1.2.3