mirror of
https://github.com/fluencelabs/wasmer
synced 2025-06-28 16:11:32 +00:00
Get caching working again
This commit is contained in:
@ -220,13 +220,13 @@ impl EmscriptenGlobals {
|
||||
namespace_index,
|
||||
name_index,
|
||||
},
|
||||
) in &module.0.info.imported_functions
|
||||
) in &module.info().imported_functions
|
||||
{
|
||||
let namespace = module.0.info.namespace_table.get(*namespace_index);
|
||||
let name = module.0.info.name_table.get(*name_index);
|
||||
let namespace = module.info().namespace_table.get(*namespace_index);
|
||||
let name = module.info().name_table.get(*name_index);
|
||||
if name == "abortOnCannotGrowMemory" && namespace == "env" {
|
||||
let sig_index = module.0.info.func_assoc[index.convert_up(&module.0)];
|
||||
let expected_sig = &module.0.info.signatures[sig_index];
|
||||
let sig_index = module.info().func_assoc[index.convert_up(module.info())];
|
||||
let expected_sig = &module.info().signatures[sig_index];
|
||||
if **expected_sig == *OLD_ABORT_ON_CANNOT_GROW_MEMORY_SIG {
|
||||
use_old_abort_on_cannot_grow_memory = true;
|
||||
}
|
||||
|
@ -16,13 +16,12 @@ use wasmer_runtime_core::{
|
||||
|
||||
/// We check if a provided module is an Emscripten generated one
|
||||
pub fn is_emscripten_module(module: &Module) -> bool {
|
||||
for (_, import_name) in &module.0.info.imported_functions {
|
||||
for (_, import_name) in &module.info().imported_functions {
|
||||
let namespace = module
|
||||
.0
|
||||
.info
|
||||
.info()
|
||||
.namespace_table
|
||||
.get(import_name.namespace_index);
|
||||
let field = module.0.info.name_table.get(import_name.name_index);
|
||||
let field = module.info().name_table.get(import_name.name_index);
|
||||
if field == "_emscripten_memcpy_big" && namespace == "env" {
|
||||
return true;
|
||||
}
|
||||
@ -31,12 +30,12 @@ pub fn is_emscripten_module(module: &Module) -> bool {
|
||||
}
|
||||
|
||||
pub fn get_emscripten_table_size(module: &Module) -> (u32, Option<u32>) {
|
||||
let (_, table) = &module.0.info.imported_tables[ImportedTableIndex::new(0)];
|
||||
let (_, table) = &module.info().imported_tables[ImportedTableIndex::new(0)];
|
||||
(table.minimum, table.maximum)
|
||||
}
|
||||
|
||||
pub fn get_emscripten_memory_size(module: &Module) -> (Pages, Option<Pages>) {
|
||||
let (_, memory) = &module.0.info.imported_memories[ImportedMemoryIndex::new(0)];
|
||||
let (_, memory) = &module.info().imported_memories[ImportedMemoryIndex::new(0)];
|
||||
(memory.minimum, memory.maximum)
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user