Move to upstream wasmtime, refactor globals snapshot (#6759)

* refactor globals snapshot

* ignore test

* update pwasm-utils ref

* line width

* add doc comment for internal struct

* add explanation for iteration

* Demote rustdoc to a comment

* use 0.14

Co-authored-by: Sergei Shulepov <sergei@parity.io>
This commit is contained in:
Nikolay Volf
2020-08-11 18:05:31 +03:00
committed by GitHub
parent 58ebf50839
commit c347300e3e
6 changed files with 82 additions and 139 deletions
@@ -294,7 +294,7 @@ fn into_wasmtime_val_type(val_ty: ValueType) -> wasmtime::ValType {
/// Converts a `Val` into a substrate runtime interface `Value`.
///
/// Panics if the given value doesn't have a corresponding variant in `Value`.
fn into_value(val: Val) -> Value {
pub fn into_value(val: Val) -> Value {
match val {
Val::I32(v) => Value::I32(v),
Val::I64(v) => Value::I64(v),
@@ -304,7 +304,7 @@ fn into_value(val: Val) -> Value {
}
}
fn into_wasmtime_val(value: Value) -> wasmtime::Val {
pub fn into_wasmtime_val(value: Value) -> wasmtime::Val {
match value {
Value::I32(v) => Val::I32(v),
Value::I64(v) => Val::I64(v),