more inlines
This commit is contained in:
parent
1af7b204bc
commit
ec6512d49c
@ -26,6 +26,8 @@ impl<I> Executor<I> for InMemoryExecutor<I>
|
|||||||
where
|
where
|
||||||
I: Input + HasTargetBytes,
|
I: Input + HasTargetBytes,
|
||||||
{
|
{
|
||||||
|
|
||||||
|
#[inline]
|
||||||
fn run_target(&mut self, input: &I) -> Result<ExitKind, AflError> {
|
fn run_target(&mut self, input: &I) -> Result<ExitKind, AflError> {
|
||||||
let bytes = input.target_bytes();
|
let bytes = input.target_bytes();
|
||||||
unsafe {
|
unsafe {
|
||||||
@ -38,10 +40,12 @@ where
|
|||||||
Ok(ret)
|
Ok(ret)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[inline]
|
||||||
fn observers(&self) -> &NamedSerdeAnyMap {
|
fn observers(&self) -> &NamedSerdeAnyMap {
|
||||||
&self.observers
|
&self.observers
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[inline]
|
||||||
fn observers_mut(&mut self) -> &mut NamedSerdeAnyMap {
|
fn observers_mut(&mut self) -> &mut NamedSerdeAnyMap {
|
||||||
&mut self.observers
|
&mut self.observers
|
||||||
}
|
}
|
||||||
|
@ -36,12 +36,14 @@ where
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// Reset the state of all the observes linked to this executor
|
/// Reset the state of all the observes linked to this executor
|
||||||
|
#[inline]
|
||||||
fn reset_observers(&mut self) -> Result<(), AflError> {
|
fn reset_observers(&mut self) -> Result<(), AflError> {
|
||||||
self.observers_mut().for_each_mut(|_, x| Ok(x.reset()?))?;
|
self.observers_mut().for_each_mut(|_, x| Ok(x.reset()?))?;
|
||||||
Ok(())
|
Ok(())
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Run the post exec hook for all the observes linked to this executor
|
/// Run the post exec hook for all the observes linked to this executor
|
||||||
|
#[inline]
|
||||||
fn post_exec_observers(&mut self) -> Result<(), AflError> {
|
fn post_exec_observers(&mut self) -> Result<(), AflError> {
|
||||||
self.observers_mut()
|
self.observers_mut()
|
||||||
.for_each_mut(|_, x| Ok(x.post_exec()?))?;
|
.for_each_mut(|_, x| Ok(x.post_exec()?))?;
|
||||||
|
@ -59,6 +59,8 @@ impl<T> Reducer<T> for MaxReducer<T>
|
|||||||
where
|
where
|
||||||
T: Integer + Copy + 'static,
|
T: Integer + Copy + 'static,
|
||||||
{
|
{
|
||||||
|
|
||||||
|
#[inline]
|
||||||
fn reduce(first: T, second: T) -> T {
|
fn reduce(first: T, second: T) -> T {
|
||||||
if first > second {
|
if first > second {
|
||||||
first
|
first
|
||||||
@ -79,6 +81,8 @@ impl<T> Reducer<T> for MinReducer<T>
|
|||||||
where
|
where
|
||||||
T: Integer + Copy + 'static,
|
T: Integer + Copy + 'static,
|
||||||
{
|
{
|
||||||
|
|
||||||
|
#[inline]
|
||||||
fn reduce(first: T, second: T) -> T {
|
fn reduce(first: T, second: T) -> T {
|
||||||
if first < second {
|
if first < second {
|
||||||
first
|
first
|
||||||
@ -132,6 +136,7 @@ where
|
|||||||
Ok(interesting)
|
Ok(interesting)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[inline]
|
||||||
fn name(&self) -> &String {
|
fn name(&self) -> &String {
|
||||||
&self.name
|
&self.name
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user