341 |
SCM_API void scm_remember_upto_here_1 (SCM obj); |
SCM_API void scm_remember_upto_here_1 (SCM obj); |
342 |
SCM_API void scm_remember_upto_here_2 (SCM obj1, SCM obj2); |
SCM_API void scm_remember_upto_here_2 (SCM obj1, SCM obj2); |
343 |
SCM_API void scm_remember_upto_here (SCM obj1, ...); |
SCM_API void scm_remember_upto_here (SCM obj1, ...); |
344 |
|
|
345 |
|
/* In GCC we can force a reference to an SCM with a little do-nothing asm, |
346 |
|
avoiding the code size and slowdown of an actual function call. |
347 |
|
__volatile__ ensures nothing will be moved across the reference, and that |
348 |
|
it won't be optimized away (or rather only if proved unreachable). |
349 |
|
Unfortunately there doesn't seem to be any way to do the varargs |
350 |
|
scm_remember_upto_here similarly. */ |
351 |
|
|
352 |
|
#ifdef __GNUC__ |
353 |
|
#define scm_remember_upto_here_1(x) \ |
354 |
|
do { \ |
355 |
|
__asm__ __volatile__ ("" : : "g" (x)); \ |
356 |
|
} while (0) |
357 |
|
#define scm_remember_upto_here_2(x, y) \ |
358 |
|
do { \ |
359 |
|
scm_remember_upto_here_1 (x); \ |
360 |
|
scm_remember_upto_here_1 (y); \ |
361 |
|
} while (0) |
362 |
|
#endif |
363 |
|
|
364 |
SCM_API SCM scm_return_first (SCM elt, ...); |
SCM_API SCM scm_return_first (SCM elt, ...); |
365 |
SCM_API int scm_return_first_int (int x, ...); |
SCM_API int scm_return_first_int (int x, ...); |
366 |
SCM_API SCM scm_permanent_object (SCM obj); |
SCM_API SCM scm_permanent_object (SCM obj); |