Skip to content

Commit

Permalink
[move-cm][closures] Refactor: Move type conversions out of Loader i…
Browse files Browse the repository at this point in the history
…nto a trait

Type conversions from runtime types to `MoveTypeLayout` and `TypeTag` currently are associated with the `Loader` type. However, they are needed for the `FunctionValueExtension` trait which needs to be constructed in contexts where no loader but only `ModuleStorage` exists.

This PR moves the conversion functions into a new trait `TypeConverter`. The trait is then implemented two times based on `ModuleStorage` only and based on the existing `Loader`, for downwards compatibility.
  • Loading branch information
wrwg committed Jan 13, 2025
1 parent a79fde9 commit bfc6f4c
Show file tree
Hide file tree
Showing 5 changed files with 613 additions and 503 deletions.
30 changes: 28 additions & 2 deletions third_party/move/move-core/types/src/value.rs
1 change: 1 addition & 0 deletions third_party/move/move-vm/runtime/src/lib.rs
522 changes: 21 additions & 501 deletions third_party/move/move-vm/runtime/src/loader/mod.rs
1 change: 1 addition & 0 deletions third_party/move/move-vm/runtime/src/storage/mod.rs
562 changes: 562 additions & 0 deletions third_party/move/move-vm/runtime/src/storage/type_converter.rs

0 comments on commit bfc6f4c

Please sign in to comment.