aboutsummaryrefslogtreecommitdiff
path: root/eval.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'eval.cpp')
-rw-r--r--eval.cpp16
1 files changed, 15 insertions, 1 deletions
diff --git a/eval.cpp b/eval.cpp
index 6376ba9..7b11600 100644
--- a/eval.cpp
+++ b/eval.cpp
@@ -89,7 +89,21 @@ Evaluator::Evaluator() {
add_builtin_routines();
}
-void push(Pair * &pc, FrameObj ** &top_ptr, Environment *envt) {
+inline bool make_exec(Pair *ptr) {
+ if (ptr == empty_list) return true;
+ EvalObj *nptr;
+ for (;;)
+ if ((nptr = ptr->cdr)->is_pair_obj())
+ {
+ ptr->next = TO_PAIR(nptr);
+ ptr = ptr->next;
+ }
+ else break;
+ ptr->next = NULL;
+ return ptr->cdr == empty_list;
+}
+
+inline void push(Pair * &pc, FrameObj ** &top_ptr, Environment *envt) {
if (pc->car->is_simple_obj()) // Not an opt invocation
{
*top_ptr = envt->get_obj(pc->car); // Objectify the symbol