Skip to content

Commit

Permalink
add new weight for string template expressions
Browse files Browse the repository at this point in the history
  • Loading branch information
turbolent committed Dec 3, 2024
1 parent 06420d1 commit 0a393ef
Showing 1 changed file with 23 additions and 22 deletions.
45 changes: 23 additions & 22 deletions fvm/meter/memory_meter.go
Original file line number Diff line number Diff line change
Expand Up @@ -184,28 +184,29 @@ var (
common.MemoryKindWhileStatement: 25,
common.MemoryKindRemoveStatement: 33,

common.MemoryKindBooleanExpression: 9,
common.MemoryKindNilExpression: 1,
common.MemoryKindStringExpression: 17,
common.MemoryKindIntegerExpression: 33,
common.MemoryKindFixedPointExpression: 49,
common.MemoryKindArrayExpression: 25,
common.MemoryKindDictionaryExpression: 25,
common.MemoryKindIdentifierExpression: 1,
common.MemoryKindInvocationExpression: 49,
common.MemoryKindMemberExpression: 25,
common.MemoryKindIndexExpression: 33,
common.MemoryKindConditionalExpression: 49,
common.MemoryKindUnaryExpression: 25,
common.MemoryKindBinaryExpression: 41,
common.MemoryKindFunctionExpression: 25,
common.MemoryKindCastingExpression: 41,
common.MemoryKindCreateExpression: 9,
common.MemoryKindDestroyExpression: 17,
common.MemoryKindReferenceExpression: 33,
common.MemoryKindForceExpression: 17,
common.MemoryKindPathExpression: 1,
common.MemoryKindAttachExpression: 33,
common.MemoryKindBooleanExpression: 9,
common.MemoryKindNilExpression: 1,
common.MemoryKindStringExpression: 17,
common.MemoryKindStringTemplateExpression: 49,
common.MemoryKindIntegerExpression: 33,
common.MemoryKindFixedPointExpression: 49,
common.MemoryKindArrayExpression: 25,
common.MemoryKindDictionaryExpression: 25,
common.MemoryKindIdentifierExpression: 1,
common.MemoryKindInvocationExpression: 49,
common.MemoryKindMemberExpression: 25,
common.MemoryKindIndexExpression: 33,
common.MemoryKindConditionalExpression: 49,
common.MemoryKindUnaryExpression: 25,
common.MemoryKindBinaryExpression: 41,
common.MemoryKindFunctionExpression: 25,
common.MemoryKindCastingExpression: 41,
common.MemoryKindCreateExpression: 9,
common.MemoryKindDestroyExpression: 17,
common.MemoryKindReferenceExpression: 33,
common.MemoryKindForceExpression: 17,
common.MemoryKindPathExpression: 1,
common.MemoryKindAttachExpression: 33,

common.MemoryKindConstantSizedType: 25,
common.MemoryKindDictionaryType: 33,
Expand Down

0 comments on commit 0a393ef

Please sign in to comment.