EVMJIT build fixes.

This commit is contained in:
Gav Wood 2016-01-11 17:49:49 +01:00
parent 0004ed8960
commit 1d81b4f930
2 changed files with 7 additions and 17 deletions

View File

@ -313,7 +313,7 @@ impl<'a> evmjit::Ext for ExtAdapter<'a> {
pub struct JitEvm; pub struct JitEvm;
impl evm::Evm for JitEvm { impl evm::Evm for JitEvm {
fn exec(&self, params: &evm::ActionParams, ext: &mut evm::Ext) -> evm::Result { fn exec(&self, params: &ActionParams, ext: &mut evm::Ext) -> evm::Result {
let mut optional_err = None; let mut optional_err = None;
// Dirty hack. This is unsafe, but we interact with ffi, so it's justified. // Dirty hack. This is unsafe, but we interact with ffi, so it's justified.
let ext_adapter: ExtAdapter<'static> = unsafe { ::std::mem::transmute(ExtAdapter::new(ext, &mut optional_err)) }; let ext_adapter: ExtAdapter<'static> = unsafe { ::std::mem::transmute(ExtAdapter::new(ext, &mut optional_err)) };
@ -359,17 +359,13 @@ impl evm::Evm for JitEvm {
#[cfg(test)] #[cfg(test)]
mod tests { mod tests {
use rustc_serialize::hex::FromHex;
use std::str::FromStr;
use util::hash::*;
use util::uint::*;
use evm::*;
use evm::jit::{FromJit, IntoJit};
use super::*; use super::*;
use common::*;
use evm::jit::{FromJit, IntoJit};
use evm::{Evm,Schedule};
use executive::*;
use state::*; use state::*;
use env_info::*;
use engine::*; use engine::*;
use schedule::*;
use spec::*; use spec::*;
struct TestEngine; struct TestEngine;

View File

@ -447,17 +447,11 @@ impl<'a> Ext for Externalities<'a> {
#[cfg(test)] #[cfg(test)]
mod tests { mod tests {
use rustc_serialize::hex::FromHex; use super::*;
use std::str::FromStr; use common::*;
use util::hash::*;
use util::uint::*;
use evm::*;
use env_info::*;
use state::*; use state::*;
use super::contract_address;
use ethereum; use ethereum;
use null_engine::*; use null_engine::*;
use std::ops::*;
#[test] #[test]
fn test_contract_address() { fn test_contract_address() {