mirror of
https://github.com/fluencelabs/wasmer
synced 2024-12-13 06:15:33 +00:00
Add a debug messages for mocked missing globals and tables
This commit is contained in:
parent
ff45aea0ea
commit
4b33b101ed
@ -394,6 +394,10 @@ impl Instance {
|
|||||||
Some(ImportValue::Global(value)) => *value,
|
Some(ImportValue::Global(value)) => *value,
|
||||||
None => {
|
None => {
|
||||||
if options.mock_missing_globals {
|
if options.mock_missing_globals {
|
||||||
|
debug!(
|
||||||
|
"The Imported global {}.{} is not provided, therefore will be mocked.",
|
||||||
|
module_name, field_name
|
||||||
|
);
|
||||||
0
|
0
|
||||||
} else {
|
} else {
|
||||||
panic!(
|
panic!(
|
||||||
@ -430,6 +434,10 @@ impl Instance {
|
|||||||
Some(ImportValue::Table(t)) => t.to_vec(),
|
Some(ImportValue::Table(t)) => t.to_vec(),
|
||||||
None => {
|
None => {
|
||||||
if options.mock_missing_tables {
|
if options.mock_missing_tables {
|
||||||
|
debug!(
|
||||||
|
"The Imported table {}.{} is not provided, therefore will be mocked.",
|
||||||
|
module_name, field_name
|
||||||
|
);
|
||||||
let len = table.entity.size;
|
let len = table.entity.size;
|
||||||
let mut v = Vec::with_capacity(len);
|
let mut v = Vec::with_capacity(len);
|
||||||
v.resize(len, 0);
|
v.resize(len, 0);
|
||||||
|
Loading…
Reference in New Issue
Block a user