Executor: Remove LegacyInstanceReuse strategy (#1486)

It seems the old strategy have been depracted more than one year. 
So maybe it's time to clean up old strategy for wasm executor.


---
polkadot address: 15ouFh2SHpGbHtDPsJ6cXQfes9Cx1gEFnJJsJVqPGzBSTudr

---------

Co-authored-by: Bastian Köcher <git@kchr.de>
Co-authored-by: Koute <koute@users.noreply.github.com>
This commit is contained in:
yjh
2023-09-18 13:53:06 +08:00
committed by GitHub
parent cf5c195237
commit e38998801e
16 changed files with 20 additions and 710 deletions
@@ -30,7 +30,7 @@ type HostFunctions = sp_io::SubstrateHostFunctions;
#[macro_export]
macro_rules! test_wasm_execution {
(@no_legacy_instance_reuse $method_name:ident) => {
($method_name:ident) => {
paste::item! {
#[test]
fn [<$method_name _recreate_instance_cow>]() {
@@ -61,19 +61,6 @@ macro_rules! test_wasm_execution {
}
}
};
($method_name:ident) => {
test_wasm_execution!(@no_legacy_instance_reuse $method_name);
paste::item! {
#[test]
fn [<$method_name _legacy_instance_reuse>]() {
$method_name(
InstantiationStrategy::LegacyInstanceReuse
);
}
}
};
}
struct RuntimeBuilder {
@@ -330,14 +317,14 @@ fn test_max_memory_pages_exported_memory_without_precompilation(
test_max_memory_pages(instantiation_strategy, false, false);
}
test_wasm_execution!(@no_legacy_instance_reuse test_max_memory_pages_imported_memory_with_precompilation);
test_wasm_execution!(test_max_memory_pages_imported_memory_with_precompilation);
fn test_max_memory_pages_imported_memory_with_precompilation(
instantiation_strategy: InstantiationStrategy,
) {
test_max_memory_pages(instantiation_strategy, true, true);
}
test_wasm_execution!(@no_legacy_instance_reuse test_max_memory_pages_exported_memory_with_precompilation);
test_wasm_execution!(test_max_memory_pages_exported_memory_with_precompilation);
fn test_max_memory_pages_exported_memory_with_precompilation(
instantiation_strategy: InstantiationStrategy,
) {