Pathetic try to get macros to work with the non recursive version
This commit is contained in:
+13
-2
@@ -687,6 +687,7 @@ namespace Slime {
|
||||
case Action::Pop: return "Pop";
|
||||
case Action::If: return "If";
|
||||
}
|
||||
return "??";
|
||||
}());
|
||||
}
|
||||
printf("\nams:\n ");
|
||||
@@ -696,6 +697,13 @@ namespace Slime {
|
||||
pause();
|
||||
};
|
||||
|
||||
proc push_pc_on_cs = [&] {
|
||||
for_lisp_list (pcs.data[pcs.next_index-1]) {
|
||||
cs.append(it);
|
||||
}
|
||||
pcs.data[pcs.next_index-1] = Memory::nil;
|
||||
};
|
||||
|
||||
proc handle_if = [&] {
|
||||
/* | | | <test> |
|
||||
| | -> | <then> |
|
||||
@@ -831,7 +839,8 @@ namespace Slime {
|
||||
else if (pc == Memory::_begin) try handle_begin();
|
||||
else if (pc == Memory::_define) try handle_define();
|
||||
else {
|
||||
// push_pc_on_cs();
|
||||
push_pc_on_cs();
|
||||
nas.append(Action::Step);
|
||||
}
|
||||
} else {
|
||||
nas.append(Action::Step);
|
||||
@@ -839,7 +848,9 @@ namespace Slime {
|
||||
} break;
|
||||
case Lisp_Object_Type::Function: {
|
||||
if (pc->value.function->type == Function_Type::Macro) {
|
||||
// push_pc_on_cs();
|
||||
push_pc_on_cs();
|
||||
nas.append(Action::Eval);
|
||||
nas.append(Action::Step);
|
||||
} else {
|
||||
nas.append(Action::Step);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user