diff options
| author | jsmall-nvidia <jsmall@nvidia.com> | 2023-04-25 10:43:29 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-04-25 10:43:29 -0400 |
| commit | 7b7c095b37e85ca3a8f55eff1c3d9643d467b8e0 (patch) | |
| tree | 9c71955dbc956b0058b19818ca127c8132cda512 /source/slang/slang-ir-generics-lowering-context.cpp | |
| parent | 284cee1f246c072f190c87c8fb60c1d2181e458f (diff) | |
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.
Diffstat (limited to 'source/slang/slang-ir-generics-lowering-context.cpp')
| -rw-r--r-- | source/slang/slang-ir-generics-lowering-context.cpp | 14 |
1 files changed, 7 insertions, 7 deletions
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<IRInst*, IRInst*>()); - auto dict = mapInterfaceRequirementKeyValue.TryGetValue(interfaceType); + auto dict = mapInterfaceRequirementKeyValue.tryGetValue(interfaceType); for (UInt i = 0; i < interfaceType->getOperandCount(); i++) { auto entry = cast<IRInterfaceRequirementEntry>(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()); |
