Skip to content

[vm] Interning via pointers#18564

Open
georgemitenkov wants to merge 1 commit intogeorge/monomove-2from
george/monomove-3
Open

[vm] Interning via pointers#18564
georgemitenkov wants to merge 1 commit intogeorge/monomove-2from
george/monomove-3

Conversation

@georgemitenkov
Copy link
Contributor

@georgemitenkov georgemitenkov commented Jan 30, 2026

Description

Changes interning strategy from integer based IDs to scoped reference to internally allocated data for module IDs, names, types. The benefit of this approach is that keys are only marginally larger (8 bytes) but we can get structural information context-free and we also have &'ctx explicit lifetime to prevent use-after-free for interned data.

How Has This Been Tested?

Key Areas to Review

Type of Change

  • New feature
  • Bug fix
  • Breaking change
  • Performance improvement
  • Refactoring
  • Dependency update
  • Documentation update
  • Tests

Which Components or Systems Does This Change Impact?

  • Validator Node
  • Full Node (API, Indexer, etc.)
  • Move/Aptos Virtual Machine
  • Aptos Framework
  • Aptos CLI/SDK
  • Developer Infrastructure
  • Move Compiler
  • Other (specify)

Checklist

  • I have read and followed the CONTRIBUTING doc
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I identified and added all stakeholders and component owners affected by this change as reviewers
  • I tested both happy and unhappy path of the functionality
  • I have made corresponding changes to the documentation

Note

Low Risk
Documentation-only changes; no runtime behavior is modified, though it describes a substantial future shift in identifier/type representation.

Overview
Documents a redesign of global interning from compact integer IDs to pointer-backed, ExecutionGuard-scoped references, using Rust lifetimes to prevent interned data from leaking across block boundaries and to allow context-free structural inspection.

Updates the identifier/type sketches accordingly: introduces ExecutableId/string interning via NonNull<str>, pointer-based Type/TypeList interning (including refs), and pointer-based function/struct IDs; also revises executable/generic-type examples to use Type/TypeList references instead of TypeId slices.

Written by Cursor Bugbot for commit 2a9447d. This will update automatically on new commits. Configure here.

@georgemitenkov georgemitenkov mentioned this pull request Jan 30, 2026
22 tasks
Copy link
Contributor Author

Warning

This pull request is not mergeable via GitHub because a downstack PR is open. Once all requirements are satisfied, merge this PR as a stack on Graphite.
Learn more

This stack of pull requests is managed by Graphite. Learn more about stacking.

@georgemitenkov
Copy link
Contributor Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant