mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-07-04 10:18:31 +00:00
Add LISP interpreter
This commit is contained in:
parent
4f98ad1054
commit
d31bebdd2d
84 changed files with 9081 additions and 0 deletions
41
tool/plinko/lib/trace.h
Normal file
41
tool/plinko/lib/trace.h
Normal file
|
@ -0,0 +1,41 @@
|
|||
#ifndef COSMOPOLITAN_TOOL_PLINKO_LIB_TRACE_H_
|
||||
#define COSMOPOLITAN_TOOL_PLINKO_LIB_TRACE_H_
|
||||
#include "libc/str/str.h"
|
||||
#if !(__ASSEMBLER__ + __LINKER__ + 0)
|
||||
COSMOPOLITAN_C_START_
|
||||
|
||||
#define START_TRACE \
|
||||
bool t; \
|
||||
PairFn *pf; \
|
||||
BindFn *bf; \
|
||||
EvlisFn *ef; \
|
||||
RecurseFn *rf; \
|
||||
unsigned char mo; \
|
||||
TailFn *tails[8]; \
|
||||
EvalFn *ev, *ex; \
|
||||
memcpy(tails, kTail, sizeof(kTail)); \
|
||||
ev = eval; \
|
||||
bf = bind_; \
|
||||
ef = evlis; \
|
||||
ex = expand; \
|
||||
pf = pairlis; \
|
||||
rf = recurse; \
|
||||
EnableTracing(); \
|
||||
t = trace; \
|
||||
trace = true
|
||||
|
||||
#define END_TRACE \
|
||||
trace = t; \
|
||||
eval = ev; \
|
||||
bind_ = bf; \
|
||||
evlis = ef; \
|
||||
expand = ex; \
|
||||
pairlis = pf; \
|
||||
recurse = rf; \
|
||||
memcpy(kTail, tails, sizeof(kTail))
|
||||
|
||||
void EnableTracing(void);
|
||||
|
||||
COSMOPOLITAN_C_END_
|
||||
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */
|
||||
#endif /* COSMOPOLITAN_TOOL_PLINKO_LIB_TRACE_H_ */
|
Loading…
Add table
Add a link
Reference in a new issue