Skip to content

Fix AST walking#4471

Merged
turbolent merged 3 commits intomasterfrom
bastian/fix-ast-waslking
Apr 16, 2026
Merged

Fix AST walking#4471
turbolent merged 3 commits intomasterfrom
bastian/fix-ast-waslking

Conversation

@turbolent
Copy link
Copy Markdown
Member

Work towards #4470

Description

Port the fixes to the AST walking from @holyfuchs in onflow/cadence-tools#628 and fix remaining gaps.


  • Targeted PR against master branch
  • Linked to Github issue with discussion and accepted design OR link to spec that describes this work
  • Code follows the standards mentioned here
  • Updated relevant documentation
  • Re-reviewed Files changed in the Github PR explorer
  • Added appropriate labels

@turbolent turbolent self-assigned this Apr 16, 2026
@turbolent turbolent requested a review from SupunS as a code owner April 16, 2026 16:58
@github-actions
Copy link
Copy Markdown

github-actions Bot commented Apr 16, 2026

Dependency Review

✅ No vulnerabilities or license issues or OpenSSF Scorecard issues found.

Scanned Files

None

@github-actions
Copy link
Copy Markdown

github-actions Bot commented Apr 16, 2026

Benchstat comparison

  • Base branch: onflow:master
  • Base commit: c5052d7
Results

old.txtnew.txt
time/opdelta
pkg:github.com/onflow/cadence/interpreter goos:linux goarch:amd64
ByteArrayTransfer-41.32µs ± 0%1.31µs ± 0%~(p=1.000 n=1+1)
ByteArrayValueToByteSlice-471.7ns ± 0%72.6ns ± 0%~(p=1.000 n=1+1)
ByteSliceToByteArrayValue-41.07µs ± 0%1.00µs ± 0%~(p=1.000 n=1+1)
pkg:github.com/onflow/cadence/runtime goos:linux goarch:amd64
ContractFunctionInvocation-4343µs ± 0%333µs ± 0%~(p=1.000 n=1+1)
pkg:github.com/onflow/cadence/interpreter goos:linux goarch:amd64
EMVAddressTransfer-43.53µs ± 0%3.60µs ± 0%~(p=1.000 n=1+1)
Emit-44.56ms ± 0%4.74ms ± 0%~(p=1.000 n=1+1)
EnumTransfer-41.38µs ± 0%1.50µs ± 0%~(p=1.000 n=1+1)
pkg:github.com/onflow/cadence/runtime goos:linux goarch:amd64
ExportType/composite_type-4304ns ± 0%304ns ± 0%~(p=1.000 n=1+1)
ExportType/simple_type-467.7ns ± 0%66.8ns ± 0%~(p=1.000 n=1+1)
pkg:github.com/onflow/cadence/interpreter goos:linux goarch:amd64
ImperativeFib-422.2µs ± 0%23.5µs ± 0%~(p=1.000 n=1+1)
InterpretRecursionFib-42.19ms ± 0%2.28ms ± 0%~(p=1.000 n=1+1)
NewInterpreter/new_interpreter-4867ns ± 0%893ns ± 0%~(p=1.000 n=1+1)
NewInterpreter/new_sub-interpreter-4333ns ± 0%344ns ± 0%~(p=1.000 n=1+1)
pkg:github.com/onflow/cadence/runtime goos:linux goarch:amd64
RuntimeFungibleTokenTransferInterpreter-4589µs ± 0%593µs ± 0%~(p=1.000 n=1+1)
RuntimeFungibleTokenTransferVM-4662µs ± 0%687µs ± 0%~(p=1.000 n=1+1)
RuntimeResourceDictionaryValues-42.60ms ± 0%2.61ms ± 0%~(p=1.000 n=1+1)
RuntimeResourceTracking-49.10ms ± 0%9.18ms ± 0%~(p=1.000 n=1+1)
RuntimeScriptNoop-414.6µs ± 0%14.6µs ± 0%~(p=1.000 n=1+1)
RuntimeVMInvokeContractImperativeFib-437.8µs ± 0%37.8µs ± 0%~(p=1.000 n=1+1)
pkg:github.com/onflow/cadence/interpreter goos:linux goarch:amd64
ValueIsSubtypeOfSemaType-454.2ns ± 0%56.3ns ± 0%~(p=1.000 n=1+1)
 
alloc/opdelta
pkg:github.com/onflow/cadence/interpreter goos:linux goarch:amd64
ByteArrayTransfer-41.02kB ± 0%1.08kB ± 0%~(p=1.000 n=1+1)
ByteArrayValueToByteSlice-432.0B ± 0%32.0B ± 0%~(all equal)
ByteSliceToByteArrayValue-4871B ± 0%853B ± 0%~(p=1.000 n=1+1)
pkg:github.com/onflow/cadence/runtime goos:linux goarch:amd64
ContractFunctionInvocation-4144kB ± 0%144kB ± 0%~(p=1.000 n=1+1)
pkg:github.com/onflow/cadence/interpreter goos:linux goarch:amd64
EMVAddressTransfer-42.45kB ± 0%2.46kB ± 0%~(p=1.000 n=1+1)
Emit-41.49MB ± 0%1.50MB ± 0%~(p=1.000 n=1+1)
EnumTransfer-4827B ± 0%832B ± 0%~(p=1.000 n=1+1)
pkg:github.com/onflow/cadence/runtime goos:linux goarch:amd64
ExportType/composite_type-4120B ± 0%120B ± 0%~(all equal)
ExportType/simple_type-40.00B 0.00B ~(all equal)
pkg:github.com/onflow/cadence/interpreter goos:linux goarch:amd64
ImperativeFib-48.30kB ± 0%8.30kB ± 0%~(all equal)
InterpretRecursionFib-41.19MB ± 0%1.19MB ± 0%~(p=1.000 n=1+1)
NewInterpreter/new_interpreter-4976B ± 0%976B ± 0%~(all equal)
NewInterpreter/new_sub-interpreter-4232B ± 0%232B ± 0%~(all equal)
pkg:github.com/onflow/cadence/runtime goos:linux goarch:amd64
RuntimeFungibleTokenTransferInterpreter-4165kB ± 0%165kB ± 0%~(p=1.000 n=1+1)
RuntimeFungibleTokenTransferVM-4188kB ± 0%188kB ± 0%~(p=1.000 n=1+1)
RuntimeResourceDictionaryValues-41.76MB ± 0%1.76MB ± 0%~(p=1.000 n=1+1)
RuntimeResourceTracking-46.97MB ± 0%6.97MB ± 0%~(p=1.000 n=1+1)
RuntimeScriptNoop-48.09kB ± 0%8.08kB ± 0%~(p=1.000 n=1+1)
RuntimeVMInvokeContractImperativeFib-413.4kB ± 0%13.4kB ± 0%~(all equal)
pkg:github.com/onflow/cadence/interpreter goos:linux goarch:amd64
ValueIsSubtypeOfSemaType-432.0B ± 0%32.0B ± 0%~(all equal)
 
allocs/opdelta
pkg:github.com/onflow/cadence/interpreter goos:linux goarch:amd64
ByteArrayTransfer-47.00 ± 0%7.00 ± 0%~(all equal)
ByteArrayValueToByteSlice-41.00 ± 0%1.00 ± 0%~(all equal)
ByteSliceToByteArrayValue-45.00 ± 0%5.00 ± 0%~(all equal)
pkg:github.com/onflow/cadence/runtime goos:linux goarch:amd64
ContractFunctionInvocation-42.25k ± 0%2.25k ± 0%~(all equal)
pkg:github.com/onflow/cadence/interpreter goos:linux goarch:amd64
EMVAddressTransfer-429.0 ± 0%29.0 ± 0%~(all equal)
Emit-440.0k ± 0%40.0k ± 0%~(all equal)
EnumTransfer-413.0 ± 0%13.0 ± 0%~(all equal)
pkg:github.com/onflow/cadence/runtime goos:linux goarch:amd64
ExportType/composite_type-43.00 ± 0%3.00 ± 0%~(all equal)
ExportType/simple_type-40.00 0.00 ~(all equal)
pkg:github.com/onflow/cadence/interpreter goos:linux goarch:amd64
ImperativeFib-4176 ± 0%176 ± 0%~(all equal)
InterpretRecursionFib-417.7k ± 0%17.7k ± 0%~(all equal)
NewInterpreter/new_interpreter-415.0 ± 0%15.0 ± 0%~(all equal)
NewInterpreter/new_sub-interpreter-44.00 ± 0%4.00 ± 0%~(all equal)
pkg:github.com/onflow/cadence/runtime goos:linux goarch:amd64
RuntimeFungibleTokenTransferInterpreter-43.08k ± 0%3.08k ± 0%~(all equal)
RuntimeFungibleTokenTransferVM-43.61k ± 0%3.61k ± 0%~(all equal)
RuntimeResourceDictionaryValues-436.7k ± 0%36.7k ± 0%~(all equal)
RuntimeResourceTracking-4129k ± 0%129k ± 0%~(all equal)
RuntimeScriptNoop-4114 ± 0%114 ± 0%~(all equal)
RuntimeVMInvokeContractImperativeFib-4426 ± 0%426 ± 0%~(all equal)
pkg:github.com/onflow/cadence/interpreter goos:linux goarch:amd64
ValueIsSubtypeOfSemaType-41.00 ± 0%1.00 ± 0%~(all equal)
 

Comment thread ast/entitlement_declaration.go
@turbolent turbolent enabled auto-merge April 16, 2026 17:37
@turbolent turbolent disabled auto-merge April 16, 2026 17:45
@turbolent turbolent merged commit e8fe69b into master Apr 16, 2026
17 checks passed
@turbolent turbolent deleted the bastian/fix-ast-waslking branch April 16, 2026 18:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants