mirror of
https://github.com/fluencelabs/interface-types
synced 2024-12-04 07:10:21 +00:00
rename it-lilo-utils to it-lilo
This commit is contained in:
parent
cc44e387f7
commit
e75a108998
4
Cargo.lock
generated
4
Cargo.lock
generated
@ -37,7 +37,7 @@ dependencies = [
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "it-lilo-utils"
|
||||
name = "it-lilo"
|
||||
version = "0.1.0"
|
||||
dependencies = [
|
||||
"fluence-it-types",
|
||||
@ -264,7 +264,7 @@ name = "wasmer-interface-types-fl"
|
||||
version = "0.20.0"
|
||||
dependencies = [
|
||||
"fluence-it-types",
|
||||
"it-lilo-utils",
|
||||
"it-lilo",
|
||||
"it-to-bytes",
|
||||
"itertools",
|
||||
"log",
|
||||
|
@ -1,6 +1,6 @@
|
||||
[workspace]
|
||||
members = [
|
||||
"crates/it-lilo-utils",
|
||||
"crates/it-lilo",
|
||||
"crates/to-bytes",
|
||||
"crates/it-types",
|
||||
"wasmer-it",
|
||||
|
@ -1,5 +1,5 @@
|
||||
[package]
|
||||
name = "it-lilo-utils"
|
||||
name = "it-lilo"
|
||||
version = "0.1.0"
|
||||
authors = ["Fluence Labs"]
|
||||
description = "Defines some helper utils for lifting/lowering IT"
|
||||
@ -7,7 +7,7 @@ edition = "2018"
|
||||
license = "Apache-2.0"
|
||||
|
||||
[lib]
|
||||
name = "it_lilo_utils"
|
||||
name = "it_lilo"
|
||||
path = "src/lib.rs"
|
||||
|
||||
[dependencies]
|
@ -37,7 +37,7 @@ pub enum IValue {
|
||||
|
||||
/// A 64-bits float.
|
||||
F64(f64),
|
||||
|
||||
|
||||
/// A string.
|
||||
String(String),
|
||||
|
||||
|
@ -10,7 +10,7 @@ edition = "2018"
|
||||
[dependencies]
|
||||
fluence-it-types = { path = "../crates/it-types", version = "0.2.0", features = ["impls"] }
|
||||
it-to-bytes = { path = "../crates/to-bytes", version = "0.1.0" }
|
||||
it-lilo-utils = { path = "../crates/it-lilo-utils", version = "0.1.0" }
|
||||
it-lilo = { path = "../crates/it-lilo", version = "0.1.0" }
|
||||
|
||||
nom = "5.1"
|
||||
wast = "8.0"
|
||||
|
@ -12,8 +12,8 @@ use std::{
|
||||
string::{self, ToString},
|
||||
};
|
||||
|
||||
use it_lilo_utils::lifter::LiError;
|
||||
use it_lilo_utils::lowerer::LoError;
|
||||
use it_lilo::lifter::LiError;
|
||||
use it_lilo::lowerer::LoError;
|
||||
use thiserror::Error as ThisError;
|
||||
|
||||
pub use fluence_it_types::WasmValueNativeCastError;
|
||||
|
@ -7,9 +7,9 @@ use crate::{
|
||||
interpreter::Instruction,
|
||||
IType, IValue,
|
||||
};
|
||||
use it_lilo_utils::lifter::ILifter;
|
||||
use it_lilo_utils::lowerer::ILowerer;
|
||||
use it_lilo_utils::lowerer::LoweredArray;
|
||||
use it_lilo::lifter::ILifter;
|
||||
use it_lilo::lowerer::ILowerer;
|
||||
use it_lilo::lowerer::LoweredArray;
|
||||
|
||||
use std::convert::TryInto;
|
||||
|
||||
@ -69,13 +69,9 @@ where
|
||||
|
||||
let li_helper = lilo::LiHelper::new(&**instance);
|
||||
let lifter = ILifter::new(memory, &li_helper);
|
||||
let array = it_lilo_utils::lifter::array_lift_memory(
|
||||
&lifter,
|
||||
&value_type,
|
||||
offset as _,
|
||||
size as _,
|
||||
)
|
||||
.map_err(|e| InstructionError::from_li(instruction.clone(), e))?;
|
||||
let array =
|
||||
it_lilo::lifter::array_lift_memory(&lifter, &value_type, offset as _, size as _)
|
||||
.map_err(|e| InstructionError::from_li(instruction.clone(), e))?;
|
||||
|
||||
log::trace!("array.lift_memory: pushing {:?} on the stack", array);
|
||||
runtime.stack.push(array);
|
||||
@ -125,7 +121,7 @@ where
|
||||
.map_err(|e| InstructionError::from_lo(instruction.clone(), e))?;
|
||||
|
||||
let LoweredArray { offset, size } =
|
||||
it_lilo_utils::lowerer::array_lower_memory(&lowerer, values)
|
||||
it_lilo::lowerer::array_lower_memory(&lowerer, values)
|
||||
.map_err(|e| InstructionError::from_lo(instruction.clone(), e))?;
|
||||
|
||||
log::trace!(
|
||||
|
@ -1,8 +1,8 @@
|
||||
use crate::interpreter::wasm;
|
||||
use crate::IRecordType;
|
||||
|
||||
use it_lilo_utils::traits::RecordResolvable;
|
||||
use it_lilo_utils::traits::RecordResolvableError;
|
||||
use it_lilo::traits::RecordResolvable;
|
||||
use it_lilo::traits::RecordResolvableError;
|
||||
|
||||
use std::marker::PhantomData;
|
||||
|
||||
|
@ -2,9 +2,9 @@ use crate::interpreter::wasm;
|
||||
use crate::interpreter::wasm::structures::FunctionIndex;
|
||||
use crate::IValue;
|
||||
|
||||
use it_lilo_utils::traits::Allocatable;
|
||||
use it_lilo_utils::traits::AllocatableError;
|
||||
use it_lilo_utils::traits::MemSlice;
|
||||
use it_lilo::traits::Allocatable;
|
||||
use it_lilo::traits::AllocatableError;
|
||||
use it_lilo::traits::MemSlice;
|
||||
|
||||
use std::marker::PhantomData;
|
||||
|
||||
|
@ -5,8 +5,8 @@ use crate::IType;
|
||||
use crate::IValue;
|
||||
use crate::{errors::InstructionError, errors::InstructionErrorKind, interpreter::Instruction};
|
||||
|
||||
use it_lilo_utils::lifter::ILifter;
|
||||
use it_lilo_utils::lowerer::ILowerer;
|
||||
use it_lilo::lifter::ILifter;
|
||||
use it_lilo::lowerer::ILowerer;
|
||||
|
||||
use std::convert::TryInto;
|
||||
|
||||
@ -67,7 +67,7 @@ where
|
||||
|
||||
let li_helper = lilo::LiHelper::new(&**instance);
|
||||
let lifter = ILifter::new(memory, &li_helper);
|
||||
let record = it_lilo_utils::lifter::record_lift_memory(&lifter, record_type, offset)
|
||||
let record = it_lilo::lifter::record_lift_memory(&lifter, record_type, offset)
|
||||
.map_err(|e| InstructionError::from_li(instruction.clone(), e))?;
|
||||
|
||||
log::debug!("record.lift_memory: pushing {:?} on the stack", record);
|
||||
@ -111,7 +111,7 @@ where
|
||||
let memory_writer = ILowerer::new(&lo_helper)
|
||||
.map_err(|e| InstructionError::from_lo(instruction.clone(), e))?;
|
||||
let offset =
|
||||
it_lilo_utils::lowerer::record_lower_memory(&memory_writer, record_fields)
|
||||
it_lilo::lowerer::record_lower_memory(&memory_writer, record_fields)
|
||||
.map_err(|e| InstructionError::from_lo(instruction.clone(), e))?;
|
||||
|
||||
log::debug!("record.lower_memory: pushing {} on the stack", offset);
|
||||
|
Loading…
Reference in New Issue
Block a user