-
Notifications
You must be signed in to change notification settings - Fork 11.6k
[move][move-vm][rewrite][cleanup 4/n] Replace AST Identifiers with IdentifierKey #21275
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
2 Skipped Deployments
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
external-crates/move/crates/move-vm-runtime/src/execution/dispatch_tables.rs
Outdated
Show resolved
Hide resolved
3418245
to
5e0a343
Compare
fd94480
to
43a3541
Compare
43a3541
to
bdac164
Compare
bdac164
to
5bddab4
Compare
5bddab4
to
b400c71
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Changes look good to me
/// modules. It exposes an intentionally spartan interface to prevent any unexpected behavior | ||
/// (e.g., unstable iteration ordering) that Rust's standard collections run afoul of. | ||
#[derive(Debug)] | ||
pub struct DefinitionMap<Value>(HashMap<IntraPackageKey, Value>); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🎉
self.name.to_string().unwrap() | ||
} | ||
|
||
#[cfg(any(debug_assertions, feature = "tracing"))] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just a note (nothing for you to do): I'm going to be removing this cfg in another PR here soon -- runs afoul of building in release mode without tracing enabled since this function is used in the Debug
implementation for bytecode.
Description
This replaces
Identifier
s in the execution AST withIdentifierKey
, because identifiers (and the strings they hold) led to memory leaks -- the string bytes were heap-allocated, so leaked when the Identifiers were dropped.This also refactors the interner to be more self-contained.
Test plan
Tests all pass, plus this command reported no leaks:
This now reports no leaks.
Release notes
Check each box that your changes affect. If none of the boxes relate to your changes, release notes aren't required.
For each box you select, include information after the relevant heading that describes the impact of your changes that a user might notice and any actions they must take to implement updates.