Skip to content

Conversation

tzakian
Copy link
Contributor

@tzakian tzakian commented Feb 3, 2025

This adds various "query" functions that the Sui adapter will need to the VM (e.g., resolving a typetag to a loaded type, getting type layouts, abilities, etc). As part of this it adds a LoadedFunctionInformation struct that allows VM runtime Types to flow out of the VM. The adapter and object runtime will need to (and does) take care to not allow these VM runtime types to flow across VM instance boundaries.

The code in the PR may not be working as future PRs will build on top of this.

@tzakian tzakian requested a review from cgswords February 3, 2025 20:48
Copy link

vercel bot commented Feb 3, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
sui-docs ✅ Ready (Inspect) Visit Preview 💬 Add feedback Feb 19, 2025 8:10pm
2 Skipped Deployments
Name Status Preview Comments Updated (UTC)
multisig-toolkit ⬜️ Ignored (Inspect) Visit Preview Feb 19, 2025 8:10pm
sui-kiosk ⬜️ Ignored (Inspect) Visit Preview Feb 19, 2025 8:10pm

pub mod tracing;
pub mod values;
pub mod vm;
pub use crate::jit::execution::ast::Type;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sensible, I suppose -- where is this used?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is used in parts of the adapter since we need to look at the Types in the LoadedFunctionInformation to determine whether arguments to a function are references or not.

If we add something like TypeTagWithRefs, we could probably remove this exposure.

Copy link
Contributor

@cgswords cgswords left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A few small nits, but LGTM.

…ions on vm instances needed for the adapter.

This adds various "query" functions that the Sui adapter will need to
the VM (e.g., resolving a typetag to a loaded type, getting type
layouts, abilities, etc). As part of this it adds a
`LoadedFunctionInformation` struct that allows VM runtime `Type`s to
flow out of the VM.  The adapter and object runtime will need to (and
does) take care to not allow these VM runtime types to flow across VM
instance boundaries.

The code in the PR may not be working as future PRs will build on top of
this.
…y functions on vm instances needed for the adapter.
…nd query functions on vm instances needed for the adapter.
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.

2 participants