mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-01-31 11:37:35 +00:00
fa20edc44d
- Remove most __ASSEMBLER__ __LINKER__ ifdefs - Rename libc/intrin/bits.h to libc/serialize.h - Block pthread cancelation in fchmodat() polyfill - Remove `clang-format off` statements in third_party
38 lines
1.1 KiB
C
38 lines
1.1 KiB
C
#ifndef COSMOPOLITAN_TOOL_PLINKO_LIB_TRACE_H_
|
|
#define COSMOPOLITAN_TOOL_PLINKO_LIB_TRACE_H_
|
|
#include "libc/str/str.h"
|
|
COSMOPOLITAN_C_START_
|
|
|
|
#define START_TRACE \
|
|
bool t; \
|
|
PairFn *pf; \
|
|
BindFn *bf; \
|
|
EvlisFn *ef; \
|
|
RecurseFn *rf; \
|
|
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 /* COSMOPOLITAN_TOOL_PLINKO_LIB_TRACE_H_ */
|