mirror of
https://github.com/fluencelabs/wasmer
synced 2025-06-18 19:31:22 +00:00
Removing some unused imports, cleanup
This commit is contained in:
@ -198,12 +198,12 @@ pub extern "C" fn ___build_environment(environ: c_int, instance: &mut Instance)
|
||||
const TOTAL_ENV_SIZE: u32 = 1024;
|
||||
let mut environment = instance.memory_offset_addr(0, environ as _) as *mut c_int;
|
||||
unsafe {
|
||||
let (pool_offset, pool_slice): (u32, &mut [u8]) =
|
||||
let (pool_offset, _pool_slice): (u32, &mut [u8]) =
|
||||
allocate_on_stack(TOTAL_ENV_SIZE as u32, instance);
|
||||
let (env_offset, env_slice): (u32, &mut [u8]) =
|
||||
let (env_offset, _env_slice): (u32, &mut [u8]) =
|
||||
allocate_on_stack((MAX_ENV_VALUES * 4) as u32, instance);
|
||||
let mut env_ptr = instance.memory_offset_addr(0, env_offset as _) as *mut c_int;
|
||||
let mut pool_ptr = instance.memory_offset_addr(0, pool_offset as _) as *mut c_int;
|
||||
let mut _pool_ptr = instance.memory_offset_addr(0, pool_offset as _) as *mut c_int;
|
||||
*env_ptr = pool_offset as i32;
|
||||
*environment = env_offset as i32;
|
||||
|
||||
|
@ -10,7 +10,7 @@ pub extern "C" fn ___cxa_allocate_exception(size: u32, instance: &mut Instance)
|
||||
|
||||
/// emscripten: ___cxa_throw
|
||||
/// TODO: We don't have support for exceptions yet
|
||||
pub extern "C" fn ___cxa_throw(ptr: u32, ty: u32, destructor: u32, instance: &mut Instance) {
|
||||
pub extern "C" fn ___cxa_throw(_ptr: u32, ty: u32, destructor: u32, instance: &mut Instance) {
|
||||
debug!("emscripten::___cxa_throw");
|
||||
_abort();
|
||||
}
|
||||
|
@ -1,5 +1,4 @@
|
||||
use libc::{c_int, c_void};
|
||||
use std::cell::UnsafeCell;
|
||||
use wasmer_runtime::Instance;
|
||||
|
||||
/// setjmp
|
||||
|
@ -1,13 +1,8 @@
|
||||
#[macro_use]
|
||||
extern crate wasmer_runtime;
|
||||
|
||||
#[macro_use]
|
||||
use wasmer_runtime::macros;
|
||||
|
||||
use byteorder::{ByteOrder, LittleEndian};
|
||||
use hashbrown::{hash_map::Entry, HashMap};
|
||||
use libc::c_int;
|
||||
use std::cell::UnsafeCell;
|
||||
use hashbrown::HashMap;
|
||||
use std::mem;
|
||||
use wasmer_runtime::{
|
||||
export::{Context, Export, FuncPointer, GlobalPointer},
|
||||
@ -16,9 +11,8 @@ use wasmer_runtime::{
|
||||
types::{
|
||||
FuncSig, GlobalDesc,
|
||||
Type::{self, *},
|
||||
Value,
|
||||
},
|
||||
vm::{self, Func, LocalGlobal},
|
||||
vm::LocalGlobal,
|
||||
};
|
||||
|
||||
//#[cfg(test)]
|
||||
|
@ -3,10 +3,8 @@ use wasmer_runtime::{module::Module, Instance};
|
||||
use super::env;
|
||||
use libc::stat;
|
||||
use std::ffi::CStr;
|
||||
use std::mem::size_of;
|
||||
use std::os::raw::c_char;
|
||||
use std::slice;
|
||||
use std::sync::Arc;
|
||||
/// 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.imported_functions {
|
||||
|
Reference in New Issue
Block a user