From fc11fd8a0768642de4505bebc683c065cf80fd7d Mon Sep 17 00:00:00 2001 From: Supun Setunga Date: Wed, 19 Jul 2023 16:19:03 -0700 Subject: [PATCH] Fix entitlement memory metering --- runtime/ast/entitlement_declaration.go | 2 +- runtime/common/memorykind.go | 1 - runtime/common/memorykind_string.go | 323 ++++++++++++------------- 3 files changed, 162 insertions(+), 164 deletions(-) diff --git a/runtime/ast/entitlement_declaration.go b/runtime/ast/entitlement_declaration.go index 2ddca3c097..3ca90de2cb 100644 --- a/runtime/ast/entitlement_declaration.go +++ b/runtime/ast/entitlement_declaration.go @@ -177,7 +177,7 @@ func NewEntitlementMappingDeclaration( docString string, declRange Range, ) *EntitlementMappingDeclaration { - common.UseMemory(gauge, common.EntitlementDeclarationMemoryUsage) + common.UseMemory(gauge, common.EntitlementMappingDeclarationMemoryUsage) return &EntitlementMappingDeclaration{ Access: access, diff --git a/runtime/common/memorykind.go b/runtime/common/memorykind.go index 0357596f1b..ef1eebaf45 100644 --- a/runtime/common/memorykind.go +++ b/runtime/common/memorykind.go @@ -74,7 +74,6 @@ const ( MemoryKindDictionaryStaticType MemoryKindOptionalStaticType MemoryKindIntersectionStaticType - MemoryKindUnauthorizedStaticAccess MemoryKindEntitlementSetStaticAccess MemoryKindEntitlementMapStaticAccess MemoryKindReferenceStaticType diff --git a/runtime/common/memorykind_string.go b/runtime/common/memorykind_string.go index 62f4d35974..c8d9dac990 100644 --- a/runtime/common/memorykind_string.go +++ b/runtime/common/memorykind_string.go @@ -51,171 +51,170 @@ func _() { _ = x[MemoryKindDictionaryStaticType-40] _ = x[MemoryKindOptionalStaticType-41] _ = x[MemoryKindIntersectionStaticType-42] - _ = x[MemoryKindUnauthorizedStaticAccess-43] - _ = x[MemoryKindEntitlementSetStaticAccess-44] - _ = x[MemoryKindEntitlementMapStaticAccess-45] - _ = x[MemoryKindReferenceStaticType-46] - _ = x[MemoryKindCapabilityStaticType-47] - _ = x[MemoryKindFunctionStaticType-48] - _ = x[MemoryKindCadenceVoidValue-49] - _ = x[MemoryKindCadenceOptionalValue-50] - _ = x[MemoryKindCadenceBoolValue-51] - _ = x[MemoryKindCadenceStringValue-52] - _ = x[MemoryKindCadenceCharacterValue-53] - _ = x[MemoryKindCadenceAddressValue-54] - _ = x[MemoryKindCadenceIntValue-55] - _ = x[MemoryKindCadenceNumberValue-56] - _ = x[MemoryKindCadenceArrayValueBase-57] - _ = x[MemoryKindCadenceArrayValueLength-58] - _ = x[MemoryKindCadenceDictionaryValue-59] - _ = x[MemoryKindCadenceKeyValuePair-60] - _ = x[MemoryKindCadenceStructValueBase-61] - _ = x[MemoryKindCadenceStructValueSize-62] - _ = x[MemoryKindCadenceResourceValueBase-63] - _ = x[MemoryKindCadenceAttachmentValueBase-64] - _ = x[MemoryKindCadenceResourceValueSize-65] - _ = x[MemoryKindCadenceAttachmentValueSize-66] - _ = x[MemoryKindCadenceEventValueBase-67] - _ = x[MemoryKindCadenceEventValueSize-68] - _ = x[MemoryKindCadenceContractValueBase-69] - _ = x[MemoryKindCadenceContractValueSize-70] - _ = x[MemoryKindCadenceEnumValueBase-71] - _ = x[MemoryKindCadenceEnumValueSize-72] - _ = x[MemoryKindCadencePathLinkValue-73] - _ = x[MemoryKindCadenceAccountLinkValue-74] - _ = x[MemoryKindCadencePathValue-75] - _ = x[MemoryKindCadenceTypeValue-76] - _ = x[MemoryKindCadenceIDCapabilityValue-77] - _ = x[MemoryKindCadencePathCapabilityValue-78] - _ = x[MemoryKindCadenceFunctionValue-79] - _ = x[MemoryKindCadenceOptionalType-80] - _ = x[MemoryKindCadenceVariableSizedArrayType-81] - _ = x[MemoryKindCadenceConstantSizedArrayType-82] - _ = x[MemoryKindCadenceDictionaryType-83] - _ = x[MemoryKindCadenceField-84] - _ = x[MemoryKindCadenceParameter-85] - _ = x[MemoryKindCadenceTypeParameter-86] - _ = x[MemoryKindCadenceStructType-87] - _ = x[MemoryKindCadenceResourceType-88] - _ = x[MemoryKindCadenceAttachmentType-89] - _ = x[MemoryKindCadenceEventType-90] - _ = x[MemoryKindCadenceContractType-91] - _ = x[MemoryKindCadenceStructInterfaceType-92] - _ = x[MemoryKindCadenceResourceInterfaceType-93] - _ = x[MemoryKindCadenceContractInterfaceType-94] - _ = x[MemoryKindCadenceFunctionType-95] - _ = x[MemoryKindCadenceEntitlementSetAccess-96] - _ = x[MemoryKindCadenceEntitlementMapAccess-97] - _ = x[MemoryKindCadenceReferenceType-98] - _ = x[MemoryKindCadenceIntersectionType-99] - _ = x[MemoryKindCadenceCapabilityType-100] - _ = x[MemoryKindCadenceEnumType-101] - _ = x[MemoryKindRawString-102] - _ = x[MemoryKindAddressLocation-103] - _ = x[MemoryKindBytes-104] - _ = x[MemoryKindVariable-105] - _ = x[MemoryKindCompositeTypeInfo-106] - _ = x[MemoryKindCompositeField-107] - _ = x[MemoryKindInvocation-108] - _ = x[MemoryKindStorageMap-109] - _ = x[MemoryKindStorageKey-110] - _ = x[MemoryKindTypeToken-111] - _ = x[MemoryKindErrorToken-112] - _ = x[MemoryKindSpaceToken-113] - _ = x[MemoryKindProgram-114] - _ = x[MemoryKindIdentifier-115] - _ = x[MemoryKindArgument-116] - _ = x[MemoryKindBlock-117] - _ = x[MemoryKindFunctionBlock-118] - _ = x[MemoryKindParameter-119] - _ = x[MemoryKindParameterList-120] - _ = x[MemoryKindTypeParameter-121] - _ = x[MemoryKindTypeParameterList-122] - _ = x[MemoryKindTransfer-123] - _ = x[MemoryKindMembers-124] - _ = x[MemoryKindTypeAnnotation-125] - _ = x[MemoryKindDictionaryEntry-126] - _ = x[MemoryKindFunctionDeclaration-127] - _ = x[MemoryKindCompositeDeclaration-128] - _ = x[MemoryKindAttachmentDeclaration-129] - _ = x[MemoryKindInterfaceDeclaration-130] - _ = x[MemoryKindEntitlementDeclaration-131] - _ = x[MemoryKindEntitlementMappingElement-132] - _ = x[MemoryKindEntitlementMappingDeclaration-133] - _ = x[MemoryKindEnumCaseDeclaration-134] - _ = x[MemoryKindFieldDeclaration-135] - _ = x[MemoryKindTransactionDeclaration-136] - _ = x[MemoryKindImportDeclaration-137] - _ = x[MemoryKindVariableDeclaration-138] - _ = x[MemoryKindSpecialFunctionDeclaration-139] - _ = x[MemoryKindPragmaDeclaration-140] - _ = x[MemoryKindAssignmentStatement-141] - _ = x[MemoryKindBreakStatement-142] - _ = x[MemoryKindContinueStatement-143] - _ = x[MemoryKindEmitStatement-144] - _ = x[MemoryKindExpressionStatement-145] - _ = x[MemoryKindForStatement-146] - _ = x[MemoryKindIfStatement-147] - _ = x[MemoryKindReturnStatement-148] - _ = x[MemoryKindSwapStatement-149] - _ = x[MemoryKindSwitchStatement-150] - _ = x[MemoryKindWhileStatement-151] - _ = x[MemoryKindRemoveStatement-152] - _ = x[MemoryKindBooleanExpression-153] - _ = x[MemoryKindVoidExpression-154] - _ = x[MemoryKindNilExpression-155] - _ = x[MemoryKindStringExpression-156] - _ = x[MemoryKindIntegerExpression-157] - _ = x[MemoryKindFixedPointExpression-158] - _ = x[MemoryKindArrayExpression-159] - _ = x[MemoryKindDictionaryExpression-160] - _ = x[MemoryKindIdentifierExpression-161] - _ = x[MemoryKindInvocationExpression-162] - _ = x[MemoryKindMemberExpression-163] - _ = x[MemoryKindIndexExpression-164] - _ = x[MemoryKindConditionalExpression-165] - _ = x[MemoryKindUnaryExpression-166] - _ = x[MemoryKindBinaryExpression-167] - _ = x[MemoryKindFunctionExpression-168] - _ = x[MemoryKindCastingExpression-169] - _ = x[MemoryKindCreateExpression-170] - _ = x[MemoryKindDestroyExpression-171] - _ = x[MemoryKindReferenceExpression-172] - _ = x[MemoryKindForceExpression-173] - _ = x[MemoryKindPathExpression-174] - _ = x[MemoryKindAttachExpression-175] - _ = x[MemoryKindConstantSizedType-176] - _ = x[MemoryKindDictionaryType-177] - _ = x[MemoryKindFunctionType-178] - _ = x[MemoryKindInstantiationType-179] - _ = x[MemoryKindNominalType-180] - _ = x[MemoryKindOptionalType-181] - _ = x[MemoryKindReferenceType-182] - _ = x[MemoryKindIntersectionType-183] - _ = x[MemoryKindVariableSizedType-184] - _ = x[MemoryKindPosition-185] - _ = x[MemoryKindRange-186] - _ = x[MemoryKindElaboration-187] - _ = x[MemoryKindActivation-188] - _ = x[MemoryKindActivationEntries-189] - _ = x[MemoryKindVariableSizedSemaType-190] - _ = x[MemoryKindConstantSizedSemaType-191] - _ = x[MemoryKindDictionarySemaType-192] - _ = x[MemoryKindOptionalSemaType-193] - _ = x[MemoryKindIntersectionSemaType-194] - _ = x[MemoryKindReferenceSemaType-195] - _ = x[MemoryKindEntitlementSemaType-196] - _ = x[MemoryKindEntitlementMapSemaType-197] - _ = x[MemoryKindCapabilitySemaType-198] - _ = x[MemoryKindOrderedMap-199] - _ = x[MemoryKindOrderedMapEntryList-200] - _ = x[MemoryKindOrderedMapEntry-201] - _ = x[MemoryKindLast-202] + _ = x[MemoryKindEntitlementSetStaticAccess-43] + _ = x[MemoryKindEntitlementMapStaticAccess-44] + _ = x[MemoryKindReferenceStaticType-45] + _ = x[MemoryKindCapabilityStaticType-46] + _ = x[MemoryKindFunctionStaticType-47] + _ = x[MemoryKindCadenceVoidValue-48] + _ = x[MemoryKindCadenceOptionalValue-49] + _ = x[MemoryKindCadenceBoolValue-50] + _ = x[MemoryKindCadenceStringValue-51] + _ = x[MemoryKindCadenceCharacterValue-52] + _ = x[MemoryKindCadenceAddressValue-53] + _ = x[MemoryKindCadenceIntValue-54] + _ = x[MemoryKindCadenceNumberValue-55] + _ = x[MemoryKindCadenceArrayValueBase-56] + _ = x[MemoryKindCadenceArrayValueLength-57] + _ = x[MemoryKindCadenceDictionaryValue-58] + _ = x[MemoryKindCadenceKeyValuePair-59] + _ = x[MemoryKindCadenceStructValueBase-60] + _ = x[MemoryKindCadenceStructValueSize-61] + _ = x[MemoryKindCadenceResourceValueBase-62] + _ = x[MemoryKindCadenceAttachmentValueBase-63] + _ = x[MemoryKindCadenceResourceValueSize-64] + _ = x[MemoryKindCadenceAttachmentValueSize-65] + _ = x[MemoryKindCadenceEventValueBase-66] + _ = x[MemoryKindCadenceEventValueSize-67] + _ = x[MemoryKindCadenceContractValueBase-68] + _ = x[MemoryKindCadenceContractValueSize-69] + _ = x[MemoryKindCadenceEnumValueBase-70] + _ = x[MemoryKindCadenceEnumValueSize-71] + _ = x[MemoryKindCadencePathLinkValue-72] + _ = x[MemoryKindCadenceAccountLinkValue-73] + _ = x[MemoryKindCadencePathValue-74] + _ = x[MemoryKindCadenceTypeValue-75] + _ = x[MemoryKindCadenceIDCapabilityValue-76] + _ = x[MemoryKindCadencePathCapabilityValue-77] + _ = x[MemoryKindCadenceFunctionValue-78] + _ = x[MemoryKindCadenceOptionalType-79] + _ = x[MemoryKindCadenceVariableSizedArrayType-80] + _ = x[MemoryKindCadenceConstantSizedArrayType-81] + _ = x[MemoryKindCadenceDictionaryType-82] + _ = x[MemoryKindCadenceField-83] + _ = x[MemoryKindCadenceParameter-84] + _ = x[MemoryKindCadenceTypeParameter-85] + _ = x[MemoryKindCadenceStructType-86] + _ = x[MemoryKindCadenceResourceType-87] + _ = x[MemoryKindCadenceAttachmentType-88] + _ = x[MemoryKindCadenceEventType-89] + _ = x[MemoryKindCadenceContractType-90] + _ = x[MemoryKindCadenceStructInterfaceType-91] + _ = x[MemoryKindCadenceResourceInterfaceType-92] + _ = x[MemoryKindCadenceContractInterfaceType-93] + _ = x[MemoryKindCadenceFunctionType-94] + _ = x[MemoryKindCadenceEntitlementSetAccess-95] + _ = x[MemoryKindCadenceEntitlementMapAccess-96] + _ = x[MemoryKindCadenceReferenceType-97] + _ = x[MemoryKindCadenceIntersectionType-98] + _ = x[MemoryKindCadenceCapabilityType-99] + _ = x[MemoryKindCadenceEnumType-100] + _ = x[MemoryKindRawString-101] + _ = x[MemoryKindAddressLocation-102] + _ = x[MemoryKindBytes-103] + _ = x[MemoryKindVariable-104] + _ = x[MemoryKindCompositeTypeInfo-105] + _ = x[MemoryKindCompositeField-106] + _ = x[MemoryKindInvocation-107] + _ = x[MemoryKindStorageMap-108] + _ = x[MemoryKindStorageKey-109] + _ = x[MemoryKindTypeToken-110] + _ = x[MemoryKindErrorToken-111] + _ = x[MemoryKindSpaceToken-112] + _ = x[MemoryKindProgram-113] + _ = x[MemoryKindIdentifier-114] + _ = x[MemoryKindArgument-115] + _ = x[MemoryKindBlock-116] + _ = x[MemoryKindFunctionBlock-117] + _ = x[MemoryKindParameter-118] + _ = x[MemoryKindParameterList-119] + _ = x[MemoryKindTypeParameter-120] + _ = x[MemoryKindTypeParameterList-121] + _ = x[MemoryKindTransfer-122] + _ = x[MemoryKindMembers-123] + _ = x[MemoryKindTypeAnnotation-124] + _ = x[MemoryKindDictionaryEntry-125] + _ = x[MemoryKindFunctionDeclaration-126] + _ = x[MemoryKindCompositeDeclaration-127] + _ = x[MemoryKindAttachmentDeclaration-128] + _ = x[MemoryKindInterfaceDeclaration-129] + _ = x[MemoryKindEntitlementDeclaration-130] + _ = x[MemoryKindEntitlementMappingElement-131] + _ = x[MemoryKindEntitlementMappingDeclaration-132] + _ = x[MemoryKindEnumCaseDeclaration-133] + _ = x[MemoryKindFieldDeclaration-134] + _ = x[MemoryKindTransactionDeclaration-135] + _ = x[MemoryKindImportDeclaration-136] + _ = x[MemoryKindVariableDeclaration-137] + _ = x[MemoryKindSpecialFunctionDeclaration-138] + _ = x[MemoryKindPragmaDeclaration-139] + _ = x[MemoryKindAssignmentStatement-140] + _ = x[MemoryKindBreakStatement-141] + _ = x[MemoryKindContinueStatement-142] + _ = x[MemoryKindEmitStatement-143] + _ = x[MemoryKindExpressionStatement-144] + _ = x[MemoryKindForStatement-145] + _ = x[MemoryKindIfStatement-146] + _ = x[MemoryKindReturnStatement-147] + _ = x[MemoryKindSwapStatement-148] + _ = x[MemoryKindSwitchStatement-149] + _ = x[MemoryKindWhileStatement-150] + _ = x[MemoryKindRemoveStatement-151] + _ = x[MemoryKindBooleanExpression-152] + _ = x[MemoryKindVoidExpression-153] + _ = x[MemoryKindNilExpression-154] + _ = x[MemoryKindStringExpression-155] + _ = x[MemoryKindIntegerExpression-156] + _ = x[MemoryKindFixedPointExpression-157] + _ = x[MemoryKindArrayExpression-158] + _ = x[MemoryKindDictionaryExpression-159] + _ = x[MemoryKindIdentifierExpression-160] + _ = x[MemoryKindInvocationExpression-161] + _ = x[MemoryKindMemberExpression-162] + _ = x[MemoryKindIndexExpression-163] + _ = x[MemoryKindConditionalExpression-164] + _ = x[MemoryKindUnaryExpression-165] + _ = x[MemoryKindBinaryExpression-166] + _ = x[MemoryKindFunctionExpression-167] + _ = x[MemoryKindCastingExpression-168] + _ = x[MemoryKindCreateExpression-169] + _ = x[MemoryKindDestroyExpression-170] + _ = x[MemoryKindReferenceExpression-171] + _ = x[MemoryKindForceExpression-172] + _ = x[MemoryKindPathExpression-173] + _ = x[MemoryKindAttachExpression-174] + _ = x[MemoryKindConstantSizedType-175] + _ = x[MemoryKindDictionaryType-176] + _ = x[MemoryKindFunctionType-177] + _ = x[MemoryKindInstantiationType-178] + _ = x[MemoryKindNominalType-179] + _ = x[MemoryKindOptionalType-180] + _ = x[MemoryKindReferenceType-181] + _ = x[MemoryKindIntersectionType-182] + _ = x[MemoryKindVariableSizedType-183] + _ = x[MemoryKindPosition-184] + _ = x[MemoryKindRange-185] + _ = x[MemoryKindElaboration-186] + _ = x[MemoryKindActivation-187] + _ = x[MemoryKindActivationEntries-188] + _ = x[MemoryKindVariableSizedSemaType-189] + _ = x[MemoryKindConstantSizedSemaType-190] + _ = x[MemoryKindDictionarySemaType-191] + _ = x[MemoryKindOptionalSemaType-192] + _ = x[MemoryKindIntersectionSemaType-193] + _ = x[MemoryKindReferenceSemaType-194] + _ = x[MemoryKindEntitlementSemaType-195] + _ = x[MemoryKindEntitlementMapSemaType-196] + _ = x[MemoryKindCapabilitySemaType-197] + _ = x[MemoryKindOrderedMap-198] + _ = x[MemoryKindOrderedMapEntryList-199] + _ = x[MemoryKindOrderedMapEntry-200] + _ = x[MemoryKindLast-201] } -const _MemoryKind_name = "UnknownAddressValueStringValueCharacterValueNumberValueArrayValueBaseDictionaryValueBaseCompositeValueBaseSimpleCompositeValueBaseOptionalValueTypeValuePathValueIDCapabilityValuePathCapabilityValuePathLinkValueAccountLinkValueStorageReferenceValueAccountReferenceValueEphemeralReferenceValueInterpretedFunctionValueHostFunctionValueBoundFunctionValueBigIntSimpleCompositeValuePublishedValueStorageCapabilityControllerValueAccountCapabilityControllerValueAtreeArrayDataSlabAtreeArrayMetaDataSlabAtreeArrayElementOverheadAtreeMapDataSlabAtreeMapMetaDataSlabAtreeMapElementOverheadAtreeMapPreAllocatedElementAtreeEncodedSlabPrimitiveStaticTypeCompositeStaticTypeInterfaceStaticTypeVariableSizedStaticTypeConstantSizedStaticTypeDictionaryStaticTypeOptionalStaticTypeIntersectionStaticTypeUnauthorizedStaticAccessEntitlementSetStaticAccessEntitlementMapStaticAccessReferenceStaticTypeCapabilityStaticTypeFunctionStaticTypeCadenceVoidValueCadenceOptionalValueCadenceBoolValueCadenceStringValueCadenceCharacterValueCadenceAddressValueCadenceIntValueCadenceNumberValueCadenceArrayValueBaseCadenceArrayValueLengthCadenceDictionaryValueCadenceKeyValuePairCadenceStructValueBaseCadenceStructValueSizeCadenceResourceValueBaseCadenceAttachmentValueBaseCadenceResourceValueSizeCadenceAttachmentValueSizeCadenceEventValueBaseCadenceEventValueSizeCadenceContractValueBaseCadenceContractValueSizeCadenceEnumValueBaseCadenceEnumValueSizeCadencePathLinkValueCadenceAccountLinkValueCadencePathValueCadenceTypeValueCadenceIDCapabilityValueCadencePathCapabilityValueCadenceFunctionValueCadenceOptionalTypeCadenceVariableSizedArrayTypeCadenceConstantSizedArrayTypeCadenceDictionaryTypeCadenceFieldCadenceParameterCadenceTypeParameterCadenceStructTypeCadenceResourceTypeCadenceAttachmentTypeCadenceEventTypeCadenceContractTypeCadenceStructInterfaceTypeCadenceResourceInterfaceTypeCadenceContractInterfaceTypeCadenceFunctionTypeCadenceEntitlementSetAccessCadenceEntitlementMapAccessCadenceReferenceTypeCadenceIntersectionTypeCadenceCapabilityTypeCadenceEnumTypeRawStringAddressLocationBytesVariableCompositeTypeInfoCompositeFieldInvocationStorageMapStorageKeyTypeTokenErrorTokenSpaceTokenProgramIdentifierArgumentBlockFunctionBlockParameterParameterListTypeParameterTypeParameterListTransferMembersTypeAnnotationDictionaryEntryFunctionDeclarationCompositeDeclarationAttachmentDeclarationInterfaceDeclarationEntitlementDeclarationEntitlementMappingElementEntitlementMappingDeclarationEnumCaseDeclarationFieldDeclarationTransactionDeclarationImportDeclarationVariableDeclarationSpecialFunctionDeclarationPragmaDeclarationAssignmentStatementBreakStatementContinueStatementEmitStatementExpressionStatementForStatementIfStatementReturnStatementSwapStatementSwitchStatementWhileStatementRemoveStatementBooleanExpressionVoidExpressionNilExpressionStringExpressionIntegerExpressionFixedPointExpressionArrayExpressionDictionaryExpressionIdentifierExpressionInvocationExpressionMemberExpressionIndexExpressionConditionalExpressionUnaryExpressionBinaryExpressionFunctionExpressionCastingExpressionCreateExpressionDestroyExpressionReferenceExpressionForceExpressionPathExpressionAttachExpressionConstantSizedTypeDictionaryTypeFunctionTypeInstantiationTypeNominalTypeOptionalTypeReferenceTypeIntersectionTypeVariableSizedTypePositionRangeElaborationActivationActivationEntriesVariableSizedSemaTypeConstantSizedSemaTypeDictionarySemaTypeOptionalSemaTypeIntersectionSemaTypeReferenceSemaTypeEntitlementSemaTypeEntitlementMapSemaTypeCapabilitySemaTypeOrderedMapOrderedMapEntryListOrderedMapEntryLast" +const _MemoryKind_name = "UnknownAddressValueStringValueCharacterValueNumberValueArrayValueBaseDictionaryValueBaseCompositeValueBaseSimpleCompositeValueBaseOptionalValueTypeValuePathValueIDCapabilityValuePathCapabilityValuePathLinkValueAccountLinkValueStorageReferenceValueAccountReferenceValueEphemeralReferenceValueInterpretedFunctionValueHostFunctionValueBoundFunctionValueBigIntSimpleCompositeValuePublishedValueStorageCapabilityControllerValueAccountCapabilityControllerValueAtreeArrayDataSlabAtreeArrayMetaDataSlabAtreeArrayElementOverheadAtreeMapDataSlabAtreeMapMetaDataSlabAtreeMapElementOverheadAtreeMapPreAllocatedElementAtreeEncodedSlabPrimitiveStaticTypeCompositeStaticTypeInterfaceStaticTypeVariableSizedStaticTypeConstantSizedStaticTypeDictionaryStaticTypeOptionalStaticTypeIntersectionStaticTypeEntitlementSetStaticAccessEntitlementMapStaticAccessReferenceStaticTypeCapabilityStaticTypeFunctionStaticTypeCadenceVoidValueCadenceOptionalValueCadenceBoolValueCadenceStringValueCadenceCharacterValueCadenceAddressValueCadenceIntValueCadenceNumberValueCadenceArrayValueBaseCadenceArrayValueLengthCadenceDictionaryValueCadenceKeyValuePairCadenceStructValueBaseCadenceStructValueSizeCadenceResourceValueBaseCadenceAttachmentValueBaseCadenceResourceValueSizeCadenceAttachmentValueSizeCadenceEventValueBaseCadenceEventValueSizeCadenceContractValueBaseCadenceContractValueSizeCadenceEnumValueBaseCadenceEnumValueSizeCadencePathLinkValueCadenceAccountLinkValueCadencePathValueCadenceTypeValueCadenceIDCapabilityValueCadencePathCapabilityValueCadenceFunctionValueCadenceOptionalTypeCadenceVariableSizedArrayTypeCadenceConstantSizedArrayTypeCadenceDictionaryTypeCadenceFieldCadenceParameterCadenceTypeParameterCadenceStructTypeCadenceResourceTypeCadenceAttachmentTypeCadenceEventTypeCadenceContractTypeCadenceStructInterfaceTypeCadenceResourceInterfaceTypeCadenceContractInterfaceTypeCadenceFunctionTypeCadenceEntitlementSetAccessCadenceEntitlementMapAccessCadenceReferenceTypeCadenceIntersectionTypeCadenceCapabilityTypeCadenceEnumTypeRawStringAddressLocationBytesVariableCompositeTypeInfoCompositeFieldInvocationStorageMapStorageKeyTypeTokenErrorTokenSpaceTokenProgramIdentifierArgumentBlockFunctionBlockParameterParameterListTypeParameterTypeParameterListTransferMembersTypeAnnotationDictionaryEntryFunctionDeclarationCompositeDeclarationAttachmentDeclarationInterfaceDeclarationEntitlementDeclarationEntitlementMappingElementEntitlementMappingDeclarationEnumCaseDeclarationFieldDeclarationTransactionDeclarationImportDeclarationVariableDeclarationSpecialFunctionDeclarationPragmaDeclarationAssignmentStatementBreakStatementContinueStatementEmitStatementExpressionStatementForStatementIfStatementReturnStatementSwapStatementSwitchStatementWhileStatementRemoveStatementBooleanExpressionVoidExpressionNilExpressionStringExpressionIntegerExpressionFixedPointExpressionArrayExpressionDictionaryExpressionIdentifierExpressionInvocationExpressionMemberExpressionIndexExpressionConditionalExpressionUnaryExpressionBinaryExpressionFunctionExpressionCastingExpressionCreateExpressionDestroyExpressionReferenceExpressionForceExpressionPathExpressionAttachExpressionConstantSizedTypeDictionaryTypeFunctionTypeInstantiationTypeNominalTypeOptionalTypeReferenceTypeIntersectionTypeVariableSizedTypePositionRangeElaborationActivationActivationEntriesVariableSizedSemaTypeConstantSizedSemaTypeDictionarySemaTypeOptionalSemaTypeIntersectionSemaTypeReferenceSemaTypeEntitlementSemaTypeEntitlementMapSemaTypeCapabilitySemaTypeOrderedMapOrderedMapEntryListOrderedMapEntryLast" -var _MemoryKind_index = [...]uint16{0, 7, 19, 30, 44, 55, 69, 88, 106, 130, 143, 152, 161, 178, 197, 210, 226, 247, 268, 291, 315, 332, 350, 356, 376, 390, 422, 454, 472, 494, 519, 535, 555, 578, 605, 621, 640, 659, 678, 701, 724, 744, 762, 784, 808, 834, 860, 879, 899, 917, 933, 953, 969, 987, 1008, 1027, 1042, 1060, 1081, 1104, 1126, 1145, 1167, 1189, 1213, 1239, 1263, 1289, 1310, 1331, 1355, 1379, 1399, 1419, 1439, 1462, 1478, 1494, 1518, 1544, 1564, 1583, 1612, 1641, 1662, 1674, 1690, 1710, 1727, 1746, 1767, 1783, 1802, 1828, 1856, 1884, 1903, 1930, 1957, 1977, 2000, 2021, 2036, 2045, 2060, 2065, 2073, 2090, 2104, 2114, 2124, 2134, 2143, 2153, 2163, 2170, 2180, 2188, 2193, 2206, 2215, 2228, 2241, 2258, 2266, 2273, 2287, 2302, 2321, 2341, 2362, 2382, 2404, 2429, 2458, 2477, 2493, 2515, 2532, 2551, 2577, 2594, 2613, 2627, 2644, 2657, 2676, 2688, 2699, 2714, 2727, 2742, 2756, 2771, 2788, 2802, 2815, 2831, 2848, 2868, 2883, 2903, 2923, 2943, 2959, 2974, 2995, 3010, 3026, 3044, 3061, 3077, 3094, 3113, 3128, 3142, 3158, 3175, 3189, 3201, 3218, 3229, 3241, 3254, 3270, 3287, 3295, 3300, 3311, 3321, 3338, 3359, 3380, 3398, 3414, 3434, 3451, 3470, 3492, 3510, 3520, 3539, 3554, 3558} +var _MemoryKind_index = [...]uint16{0, 7, 19, 30, 44, 55, 69, 88, 106, 130, 143, 152, 161, 178, 197, 210, 226, 247, 268, 291, 315, 332, 350, 356, 376, 390, 422, 454, 472, 494, 519, 535, 555, 578, 605, 621, 640, 659, 678, 701, 724, 744, 762, 784, 810, 836, 855, 875, 893, 909, 929, 945, 963, 984, 1003, 1018, 1036, 1057, 1080, 1102, 1121, 1143, 1165, 1189, 1215, 1239, 1265, 1286, 1307, 1331, 1355, 1375, 1395, 1415, 1438, 1454, 1470, 1494, 1520, 1540, 1559, 1588, 1617, 1638, 1650, 1666, 1686, 1703, 1722, 1743, 1759, 1778, 1804, 1832, 1860, 1879, 1906, 1933, 1953, 1976, 1997, 2012, 2021, 2036, 2041, 2049, 2066, 2080, 2090, 2100, 2110, 2119, 2129, 2139, 2146, 2156, 2164, 2169, 2182, 2191, 2204, 2217, 2234, 2242, 2249, 2263, 2278, 2297, 2317, 2338, 2358, 2380, 2405, 2434, 2453, 2469, 2491, 2508, 2527, 2553, 2570, 2589, 2603, 2620, 2633, 2652, 2664, 2675, 2690, 2703, 2718, 2732, 2747, 2764, 2778, 2791, 2807, 2824, 2844, 2859, 2879, 2899, 2919, 2935, 2950, 2971, 2986, 3002, 3020, 3037, 3053, 3070, 3089, 3104, 3118, 3134, 3151, 3165, 3177, 3194, 3205, 3217, 3230, 3246, 3263, 3271, 3276, 3287, 3297, 3314, 3335, 3356, 3374, 3390, 3410, 3427, 3446, 3468, 3486, 3496, 3515, 3530, 3534} func (i MemoryKind) String() string { if i >= MemoryKind(len(_MemoryKind_index)-1) {