mirror of
https://gitlab.com/embeddable-common-lisp/ecl.git
synced 2026-01-23 04:52:42 -08:00
ecl-inl: add looping over stack frames
This commit is contained in:
parent
71763174ef
commit
8fcac4bd9f
1 changed files with 18 additions and 0 deletions
|
|
@ -102,6 +102,24 @@
|
|||
|
||||
#define end_loop_across_stack() }}
|
||||
|
||||
/*
|
||||
* Loops over a stack frame.
|
||||
*/
|
||||
|
||||
#define loop_across_frame_fifo(var, obj) { \
|
||||
cl_object *__ecl_ptr = ECL_STACK_FRAME_PTR(obj); \
|
||||
cl_object *__ecl_top = ECL_STACK_FRAME_TOP(obj); \
|
||||
while(__ecl_ptr++ < __ecl_top) { \
|
||||
cl_object var = *(__ecl_ptr-1); \
|
||||
|
||||
#define loop_across_frame_filo(var, obj) { \
|
||||
cl_object *__ecl_ptr = ECL_STACK_FRAME_PTR(obj); \
|
||||
cl_object *__ecl_top = ECL_STACK_FRAME_TOP(obj); \
|
||||
while(__ecl_ptr < __ecl_top--) { \
|
||||
cl_object var = *__ecl_top;
|
||||
|
||||
#define end_loop_across_frame() }}
|
||||
|
||||
/*
|
||||
* Static constant definition.
|
||||
*/
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue