This repository was archived by the owner on May 4, 2024. It is now read-only.
Commit 0ce8e4b
authored
[loader] Cache CompiledModule separately from Module (#970)
Separates verification, which blesses `CompiledModule`s from loading
which caches `Module`s:
- Renames the existing cache as `loaded_modules`.
- Moves `CompiledModule` out of `Module` and into its own cache
-- `compiled_modules` -- populated during verification (which
now no longer populates `loaded_modules`).
- `ModuleCache::insert` now recursively adds `Module`s, `Function`s,
and `Struct`s (ensuring dependency modules are loaded first),
assuming the all dependencies have been verified (failing
otherwise).
- Public APIs into the loader that previously returned `Arc<Module>`
now also return a `Arc<CompiledModule>`.
This change is motivated by the fact that in the presence of package
upgrades, a single `CompiledModule` can end up being stamped out as
multiple `Module`s
Test Plan:
```
move$ rm -rf ~/.move && cargo nextest
```1 parent 8729cf2 commit 0ce8e4b
File tree
5 files changed
+371
-328
lines changed- language/move-vm
- integration-tests/src/tests
- runtime/src
5 files changed
+371
-328
lines changedLines changed: 7 additions & 7 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
88 | 88 | | |
89 | 89 | | |
90 | 90 | | |
91 | | - | |
92 | | - | |
93 | | - | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
94 | 94 | | |
95 | 95 | | |
96 | | - | |
| 96 | + | |
97 | 97 | | |
98 | 98 | | |
99 | 99 | | |
| |||
106 | 106 | | |
107 | 107 | | |
108 | 108 | | |
109 | | - | |
110 | | - | |
111 | | - | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
112 | 112 | | |
113 | 113 | | |
114 | 114 | | |
| |||
0 commit comments