Skip to content

Commit

Permalink
update build dependencies. update data-flow bencher
Browse files Browse the repository at this point in the history
  • Loading branch information
m4b committed Oct 17, 2017
1 parent 1de60f0 commit f2d92e1
Show file tree
Hide file tree
Showing 6 changed files with 22 additions and 32 deletions.
33 changes: 12 additions & 21 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion amd64/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ panopticon-core = { path = "../core" }
log = "0.3.6"
byteorder = "1"
env_logger = "0.3"
quickcheck = "0.3"
quickcheck = "0.4"

[dev-dependencies]
regex = "0.1"
Expand Down
4 changes: 2 additions & 2 deletions benchmark/benches/core.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ fn static_amd64_elf_new(b: &mut Bencher) {
use panopticon_graph_algos::{VertexListGraphTrait,GraphTrait};
use std::path::Path;

let (proj,_) = loader::load(Path::new("../test-data/static")).unwrap();
let (proj,_) = loader::load::<neo::Function>(Path::new("../test-data/static")).unwrap();
let entries = proj.code[0].call_graph.vertices().filter_map(|vx| if let Some(&CallTarget::Todo(Rvalue::Constant{ value,.. },_,_)) = proj.code[0].call_graph.vertex_label(vx) { Some(value) } else { None }).collect::<Vec<_>>();
let reg = proj.data.dependencies.vertex_label(proj.data.root).unwrap();

Expand All @@ -24,7 +24,7 @@ fn static_amd64_elf_old(b: &mut Bencher) {
use panopticon_graph_algos::{VertexListGraphTrait,GraphTrait};
use std::path::Path;

let (proj,_) = loader::load(Path::new("../test-data/static")).unwrap();
let (proj,_) = loader::load::<Function>(Path::new("../test-data/static")).unwrap();
let entries = proj.code[0].call_graph.vertices().filter_map(|vx| if let Some(&CallTarget::Todo(Rvalue::Constant{ value,.. },_,_)) = proj.code[0].call_graph.vertex_label(vx) { Some(value) } else { None }).collect::<Vec<_>>();
let reg = proj.data.dependencies.vertex_label(proj.data.root).unwrap();

Expand Down
9 changes: 4 additions & 5 deletions benchmark/benches/data_flow.rs
Original file line number Diff line number Diff line change
@@ -1,15 +1,14 @@
use bencher::Bencher;
use panopticon_amd64 as amd64;
use panopticon_core::neo;
use panopticon_data_flow::DataFlow;
use panopticon_data_flow::neo::rewrite_to_ssa;
use panopticon_data_flow::ssa_convertion;

fn ssa_convertion_new(b: &mut Bencher) {
use panopticon_core::{loader,neo,CallTarget,Rvalue};
use panopticon_graph_algos::{VertexListGraphTrait,GraphTrait};
use std::path::Path;

let (proj,_) = loader::load(Path::new("../test-data/static")).unwrap();
let (proj,_) = loader::load::<neo::Function>(Path::new("../test-data/static")).unwrap();
let entries = proj.code[0].call_graph.vertices().filter_map(|vx| if let Some(&CallTarget::Todo(Rvalue::Constant{ value,.. },_,_)) = proj.code[0].call_graph.vertex_label(vx) { Some(value) } else { None }).collect::<Vec<_>>();
let reg = proj.data.dependencies.vertex_label(proj.data.root).unwrap();
let mut funcs = vec![];
Expand All @@ -31,7 +30,7 @@ fn ssa_convertion_old(b: &mut Bencher) {
use panopticon_graph_algos::{VertexListGraphTrait,GraphTrait};
use std::path::Path;

let (proj,_) = loader::load(Path::new("../test-data/static")).unwrap();
let (proj,_) = loader::load::<Function>(Path::new("../test-data/static")).unwrap();
let entries = proj.code[0].call_graph.vertices().filter_map(|vx| if let Some(&CallTarget::Todo(Rvalue::Constant{ value,.. },_,_)) = proj.code[0].call_graph.vertex_label(vx) { Some(value) } else { None }).collect::<Vec<_>>();
let reg = proj.data.dependencies.vertex_label(proj.data.root).unwrap();
let mut funcs = vec![];
Expand All @@ -43,7 +42,7 @@ fn ssa_convertion_old(b: &mut Bencher) {

b.bench_n(1,|b| {
b.iter(|| {
for f in funcs.iter_mut() { ssa_convertion(f).unwrap(); }
for f in funcs.iter_mut() { f.ssa_conversion().unwrap(); }
});
});
}
Expand Down
4 changes: 2 additions & 2 deletions core/src/disassembler.rs
Original file line number Diff line number Diff line change
Expand Up @@ -788,7 +788,7 @@ impl Architecture for TestArch {
Ok(Rvalue::Constant{ value: (b - b'0') as u64, size: len })
}
_ => Err(format!("'{}' is nor a variable name neither a constant",b).into())
}
},
Some(None) => Err(format!("Undefined cell at {}",*entry - 1).into()),
None => Err(format!("Premature end while decoding rvalue at {}",*entry).into())
}
Expand All @@ -803,7 +803,7 @@ impl Architecture for TestArch {
Ok(Lvalue::Variable{ name: format!("{}",char::from(b)).into(), size: len, subscript: None })
}
_ => Err(format!("'{}' is not a variable name",b).into())
}
},
Some(None) => Err(format!("Undefined cell at {}",*entry - 1).into()),
None => Err(format!("Premature end while decoding lvalue at {}",*entry).into())
}
Expand Down
2 changes: 1 addition & 1 deletion qt/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ num = "0.1"

[dev-dependencies]
regex = "0.1"
quickcheck = "0.3"
quickcheck = "0.4"

[target.i686-unknown-linux-gnu.dependencies]
xdg = "^2.0"
Expand Down

0 comments on commit f2d92e1

Please sign in to comment.