Add/remove #[inline] attributes.

This commit is contained in:
Stephen Chung
2020-10-08 22:25:50 +08:00
parent e34a370f33
commit 1272eeb81a
31 changed files with 328 additions and 114 deletions

View File

@@ -96,6 +96,7 @@ macro_rules! def_anonymous_fn {
#[cfg(not(feature = "sync"))]
type Output = Box<dyn Fn($($par),*) -> Result<RET, Box<EvalAltResult>>>;
#[inline(always)]
fn create_from_ast(self, ast: AST, entry_point: &str) -> Self::Output {
let fn_name = entry_point.to_string();
@@ -104,6 +105,7 @@ macro_rules! def_anonymous_fn {
})
}
#[inline(always)]
fn create_from_script(self, script: &str, entry_point: &str) -> Result<Self::Output, ParseError> {
let ast = self.compile(script)?;
Ok(Func::<($($par,)*), RET>::create_from_ast(self, ast, entry_point))