Minor cleanup for script analyzer
This commit is contained in:
parent
a8ecf00e35
commit
853d644649
|
@ -1061,15 +1061,14 @@ impl AbstractStack {
|
||||||
|
|
||||||
fn push_initial(&mut self, elem: AbstractStackElem) {
|
fn push_initial(&mut self, elem: AbstractStackElem) {
|
||||||
let idx = self.allocate(elem);
|
let idx = self.allocate(elem);
|
||||||
self.initial_stack.push(idx);
|
self.initial_stack.insert(0, idx);
|
||||||
self.stack.insert(0, idx);
|
self.stack.insert(0, idx);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Construct the initial stack in the end
|
/// Construct the initial stack in the end
|
||||||
pub fn build_initial_stack(&self) -> Vec<AbstractStackElem> {
|
pub fn build_initial_stack(&self) -> Vec<AbstractStackElem> {
|
||||||
let mut res: Vec<AbstractStackElem> =
|
let res: Vec<AbstractStackElem> =
|
||||||
self.initial_stack.iter().map(|&i| self.alloc[i].clone()).collect();
|
self.initial_stack.iter().map(|&i| self.alloc[i].clone()).collect();
|
||||||
res.reverse();
|
|
||||||
res
|
res
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2030,10 +2029,7 @@ impl Script {
|
||||||
match self.satisfy() {
|
match self.satisfy() {
|
||||||
Ok(_) => false,
|
Ok(_) => false,
|
||||||
Err(Unanalyzable) => false,
|
Err(Unanalyzable) => false,
|
||||||
Err(x) => {
|
Err(_) => true
|
||||||
//println!("ispu ret {}", x);
|
|
||||||
true
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue