]> git.lizzy.rs Git - nothing.git/commitdiff
(#580) inline eval_funcall
authorrexim <reximkut@gmail.com>
Sat, 22 Dec 2018 21:49:20 +0000 (04:49 +0700)
committerrexim <reximkut@gmail.com>
Sat, 22 Dec 2018 21:49:20 +0000 (04:49 +0700)
src/ebisp/interpreter.c

index 6a0feea0a16ec0b5faf8d9418c5f518f887b5c27..6239359a6b68f3c6d57443efefc7c68640849ed9 100644 (file)
@@ -207,14 +207,6 @@ struct EvalResult eval_block(Gc *gc, struct Scope *scope, struct Expr block)
     return eval_result;
 }
 
-static struct EvalResult eval_funcall(Gc *gc, struct Scope *scope, struct Cons *cons)
-{
-    assert(cons);
-    (void) scope;
-
-    return call_callable(gc, scope, cons->car, cons->cdr);
-}
-
 struct EvalResult eval(Gc *gc, struct Scope *scope, struct Expr expr)
 {
     switch(expr.type) {
@@ -222,7 +214,7 @@ struct EvalResult eval(Gc *gc, struct Scope *scope, struct Expr expr)
         return eval_atom(gc, scope, expr.atom);
 
     case EXPR_CONS:
-        return eval_funcall(gc, scope, expr.cons);
+        return call_callable(gc, scope, expr.cons->car, expr.cons->cdr);
 
     default: {}
     }