3 eval_when([translate,batch,demo],
4 if not(member('macro,properties(load_package))) then load(packg))$
9 /* These are basic macros, nothing in here should call anything
10 complicated. PUSH and POP here are the simple version
11 which do not hack once-only evaluation.
12 I might say that these macros are around mostly so
13 that the code for implementing the more complicated
14 macros, including the once-only stuff, can be simpler.
17 prog1(statement1,[statements])::=
18 buildq([statement1,statements,local:gensym()],
19 lambda([local],splice(statements),local)(statement1))$
22 if symbolp(x) then x else error("arg must be a symbol",x)$
24 /* The functions push and pop are now defined in src/comm.lisp.
25 push(c,l)::=(symbolcheck(l),buildq([c,l],l:cons(c,l)))$
27 pop(l)::=(symbolcheck(l),buildq([l],prog1(first(l),l:rest(l))))$
30 /* TR_EV is a pretty sorry way to get optimization
31 by Translation-time evaluation. User directed constant-folding
32 you might call it. TR_EV has other uses. */
34 tr_ev(x)::=buildq([x],?meval(x))$