forked from Orchid/orchid
Fixing some showstoppers
- inertness now tracked separately from gas - atomic_impl now correctly rolls over when the argument is inert - syntax fixes - tree shaking
This commit is contained in:
@@ -23,17 +23,16 @@ macro_rules! externfn_impl {
|
||||
fn name(&self) -> &str {stringify!($typ)}
|
||||
fn apply(&self,
|
||||
arg: $crate::foreign::RcExpr,
|
||||
ctx: $crate::interpreter::Context
|
||||
_ctx: $crate::interpreter::Context
|
||||
) -> $crate::foreign::XfnResult {
|
||||
match ($next_atomic)(self, arg) { // ? casts the result but we want to strictly forward it
|
||||
Ok(r) => Ok((
|
||||
Ok(r) => Ok(
|
||||
$crate::representations::interpreted::Clause::P(
|
||||
$crate::representations::Primitive::Atom(
|
||||
$crate::foreign::Atom::new(r)
|
||||
)
|
||||
),
|
||||
ctx.gas.map(|g| g - 1)
|
||||
)),
|
||||
)
|
||||
),
|
||||
Err(e) => Err(e)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user