continuations.c 18 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610
  1. /* Copyright (C) 1995,1996,1998,2000,2001,2004, 2006, 2008, 2009, 2010, 2011 Free Software Foundation, Inc.
  2. *
  3. * This library is free software; you can redistribute it and/or
  4. * modify it under the terms of the GNU Lesser General Public License
  5. * as published by the Free Software Foundation; either version 3 of
  6. * the License, or (at your option) any later version.
  7. *
  8. * This library is distributed in the hope that it will be useful, but
  9. * WITHOUT ANY WARRANTY; without even the implied warranty of
  10. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  11. * Lesser General Public License for more details.
  12. *
  13. * You should have received a copy of the GNU Lesser General Public
  14. * License along with this library; if not, write to the Free Software
  15. * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
  16. * 02110-1301 USA
  17. */
  18. #ifdef HAVE_CONFIG_H
  19. # include <config.h>
  20. #endif
  21. #include "libguile/_scm.h"
  22. #include <string.h>
  23. #include <stdio.h>
  24. #include "libguile/async.h"
  25. #include "libguile/debug.h"
  26. #include "libguile/root.h"
  27. #include "libguile/stackchk.h"
  28. #include "libguile/smob.h"
  29. #include "libguile/ports.h"
  30. #include "libguile/dynwind.h"
  31. #include "libguile/eval.h"
  32. #include "libguile/vm.h"
  33. #include "libguile/instructions.h"
  34. #include "libguile/validate.h"
  35. #include "libguile/continuations.h"
  36. static scm_t_bits tc16_continuation;
  37. #define SCM_CONTREGSP(x) SCM_TYP16_PREDICATE (tc16_continuation, x)
  38. #define SCM_CONTREGS(x) ((scm_t_contregs *) SCM_SMOB_DATA_1 (x))
  39. #define SCM_CONTINUATION_LENGTH(x) (SCM_CONTREGS (x)->num_stack_items)
  40. #define SCM_SET_CONTINUATION_LENGTH(x, n)\
  41. (SCM_CONTREGS (x)->num_stack_items = (n))
  42. #define SCM_JMPBUF(x) ((SCM_CONTREGS (x))->jmpbuf)
  43. #define SCM_DYNENV(x) ((SCM_CONTREGS (x))->dynenv)
  44. #define SCM_CONTINUATION_ROOT(x) ((SCM_CONTREGS (x))->root)
  45. #define SCM_DFRAME(x) ((SCM_CONTREGS (x))->dframe)
  46. /* scm_i_make_continuation will return a procedure whose objcode contains an
  47. instruction to reinstate the continuation. Here, as in gsubr.c and smob.c, we
  48. define the form of that trampoline function.
  49. */
  50. #ifdef WORDS_BIGENDIAN
  51. #define OBJCODE_HEADER(main,meta) 0, 0, 0, main, 0, 0, 0, meta+8
  52. #define META_HEADER(meta) 0, 0, 0, meta, 0, 0, 0, 0
  53. #else
  54. #define OBJCODE_HEADER(main,meta) main, 0, 0, 0, meta+8, 0, 0, 0
  55. #define META_HEADER(meta) meta, 0, 0, 0, 0, 0, 0, 0
  56. #endif
  57. #define ALIGN_PTR(type,p,align) (type*)(ROUND_UP (((scm_t_bits)p), align))
  58. #ifdef SCM_ALIGNED
  59. #define SCM_DECLARE_STATIC_ALIGNED_ARRAY(type, sym) \
  60. static const type sym[]
  61. #define SCM_STATIC_ALIGNED_ARRAY(alignment, type, sym) \
  62. static SCM_ALIGNED (alignment) const type sym[]
  63. #else
  64. #define SCM_DECLARE_STATIC_ALIGNED_ARRAY(type, sym) \
  65. static type *sym
  66. #define SCM_STATIC_ALIGNED_ARRAY(alignment, type, sym) \
  67. SCM_SNARF_INIT(sym = scm_malloc_pointerless (sizeof(sym##__unaligned)); \
  68. memcpy (sym, sym##__unaligned, sizeof(sym##__unaligned));) \
  69. static type *sym = NULL; \
  70. static const type sym##__unaligned[]
  71. #endif
  72. #define STATIC_OBJCODE_TAG \
  73. SCM_PACK (SCM_MAKE_OBJCODE_TAG (SCM_OBJCODE_TYPE_STATIC, 0))
  74. #define SCM_STATIC_OBJCODE(sym) \
  75. SCM_DECLARE_STATIC_ALIGNED_ARRAY (scm_t_uint8, sym##__bytecode); \
  76. SCM_STATIC_ALIGNED_ARRAY (8, scm_t_cell, sym##__cells) = { \
  77. { STATIC_OBJCODE_TAG, SCM_PACK (sym##__bytecode) }, \
  78. { SCM_BOOL_F, SCM_PACK (0) } \
  79. }; \
  80. static const SCM sym = SCM_PACK (sym##__cells); \
  81. SCM_STATIC_ALIGNED_ARRAY (8, scm_t_uint8, sym##__bytecode)
  82. SCM_STATIC_OBJCODE (cont_objcode) = {
  83. /* This code is the same as in gsubr.c, except we use continuation_call
  84. instead of subr_call. */
  85. OBJCODE_HEADER (8, 19),
  86. /* leave args on the stack */
  87. /* 0 */ scm_op_object_ref, 0, /* push scm_t_contregs smob */
  88. /* 2 */ scm_op_continuation_call, /* and longjmp (whee) */
  89. /* 3 */ scm_op_nop, /* pad to 8 bytes */
  90. /* 4 */ scm_op_nop, scm_op_nop, scm_op_nop, scm_op_nop,
  91. /* 8 */
  92. /* We could put some meta-info to say that this proc is a continuation. Not sure
  93. how to do that, though. */
  94. META_HEADER (19),
  95. /* 0 */ scm_op_make_eol, /* bindings */
  96. /* 1 */ scm_op_make_eol, /* sources */
  97. /* 2 */ scm_op_make_int8, 0, scm_op_make_int8, 3, /* arity: from ip 0 to ip 3 */
  98. /* 6 */ scm_op_make_int8_0, /* the arity is 0 required args */
  99. /* 7 */ scm_op_make_int8_0, /* 0 optionals */
  100. /* 8 */ scm_op_make_true, /* and a rest arg */
  101. /* 9 */ scm_op_list, 0, 5, /* make a list of those 5 vals */
  102. /* 12 */ scm_op_list, 0, 1, /* and the arities will be a list of that one list */
  103. /* 15 */ scm_op_list, 0, 3, /* pack bindings, sources, and arities into list */
  104. /* 18 */ scm_op_return /* and return */
  105. /* 19 */
  106. };
  107. SCM_STATIC_OBJCODE (call_cc_objcode) = {
  108. /* Before Scheme's call/cc is compiled, eval.c will use this hand-coded
  109. call/cc. */
  110. OBJCODE_HEADER (8, 17),
  111. /* 0 */ scm_op_assert_nargs_ee, 0, 1, /* assert that nargs==1 */
  112. /* 3 */ scm_op_local_ref, 0, /* push the proc */
  113. /* 5 */ scm_op_tail_call_cc, /* and call/cc */
  114. /* 6 */ scm_op_nop, scm_op_nop, /* pad to 8 bytes */
  115. /* 8 */
  116. META_HEADER (17),
  117. /* 0 */ scm_op_make_eol, /* bindings */
  118. /* 1 */ scm_op_make_eol, /* sources */
  119. /* 2 */ scm_op_make_int8, 3, scm_op_make_int8, 6, /* arity: from ip 0 to ip 6 */
  120. /* 6 */ scm_op_make_int8_1, /* the arity is 0 required args */
  121. /* 7 */ scm_op_list, 0, 3, /* make a list of those 5 vals */
  122. /* 10 */ scm_op_list, 0, 1, /* and the arities will be a list of that one list */
  123. /* 13 */ scm_op_list, 0, 3, /* pack bindings, sources, and arities into list */
  124. /* 16 */ scm_op_return /* and return */
  125. /* 17 */
  126. };
  127. static SCM
  128. make_continuation_trampoline (SCM contregs)
  129. {
  130. SCM ret = scm_make_program (cont_objcode,
  131. scm_c_make_vector (1, contregs),
  132. SCM_BOOL_F);
  133. SCM_SET_CELL_WORD_0 (ret,
  134. SCM_CELL_WORD_0 (ret) | SCM_F_PROGRAM_IS_CONTINUATION);
  135. return ret;
  136. }
  137. /* {Continuations}
  138. */
  139. static int
  140. continuation_print (SCM obj, SCM port, scm_print_state *state SCM_UNUSED)
  141. {
  142. scm_t_contregs *continuation = SCM_CONTREGS (obj);
  143. scm_puts ("#<continuation ", port);
  144. scm_intprint (continuation->num_stack_items, 10, port);
  145. scm_puts (" @ ", port);
  146. scm_uintprint (SCM_SMOB_DATA_1 (obj), 16, port);
  147. scm_putc ('>', port);
  148. return 1;
  149. }
  150. /* this may return more than once: the first time with the escape
  151. procedure, then subsequently with SCM_UNDEFINED (the vals already having been
  152. placed on the VM stack). */
  153. #define FUNC_NAME "scm_i_make_continuation"
  154. SCM
  155. scm_i_make_continuation (int *first, SCM vm, SCM vm_cont)
  156. {
  157. scm_i_thread *thread = SCM_I_CURRENT_THREAD;
  158. SCM cont;
  159. scm_t_contregs *continuation;
  160. long stack_size;
  161. SCM_STACKITEM * src;
  162. SCM_FLUSH_REGISTER_WINDOWS;
  163. stack_size = scm_stack_size (thread->continuation_base);
  164. continuation = scm_gc_malloc (sizeof (scm_t_contregs)
  165. + (stack_size - 1) * sizeof (SCM_STACKITEM),
  166. "continuation");
  167. continuation->num_stack_items = stack_size;
  168. continuation->dynenv = scm_i_dynwinds ();
  169. continuation->root = thread->continuation_root;
  170. src = thread->continuation_base;
  171. #if ! SCM_STACK_GROWS_UP
  172. src -= stack_size;
  173. #endif
  174. continuation->offset = continuation->stack - src;
  175. memcpy (continuation->stack, src, sizeof (SCM_STACKITEM) * stack_size);
  176. continuation->vm = vm;
  177. continuation->vm_cont = vm_cont;
  178. SCM_NEWSMOB (cont, tc16_continuation, continuation);
  179. *first = !SCM_I_SETJMP (continuation->jmpbuf);
  180. if (*first)
  181. {
  182. #ifdef __ia64__
  183. continuation->backing_store_size =
  184. (char *) scm_ia64_ar_bsp(&continuation->jmpbuf.ctx)
  185. -
  186. (char *) thread->register_backing_store_base;
  187. continuation->backing_store = NULL;
  188. continuation->backing_store =
  189. scm_gc_malloc (continuation->backing_store_size,
  190. "continuation backing store");
  191. memcpy (continuation->backing_store,
  192. (void *) thread->register_backing_store_base,
  193. continuation->backing_store_size);
  194. #endif /* __ia64__ */
  195. return make_continuation_trampoline (cont);
  196. }
  197. else
  198. return SCM_UNDEFINED;
  199. }
  200. #undef FUNC_NAME
  201. SCM
  202. scm_i_call_with_current_continuation (SCM proc)
  203. {
  204. static SCM call_cc = SCM_BOOL_F;
  205. if (scm_is_false (call_cc))
  206. call_cc = scm_make_program (call_cc_objcode, SCM_BOOL_F, SCM_BOOL_F);
  207. return scm_call_1 (call_cc, proc);
  208. }
  209. SCM
  210. scm_i_continuation_to_frame (SCM continuation)
  211. {
  212. SCM contregs;
  213. scm_t_contregs *cont;
  214. contregs = scm_c_vector_ref (scm_program_objects (continuation), 0);
  215. cont = SCM_CONTREGS (contregs);
  216. if (scm_is_true (cont->vm_cont))
  217. {
  218. struct scm_vm_cont *data = SCM_VM_CONT_DATA (cont->vm_cont);
  219. return scm_c_make_frame (cont->vm_cont,
  220. data->fp + data->reloc,
  221. data->sp + data->reloc,
  222. data->ra,
  223. data->reloc);
  224. }
  225. else
  226. return SCM_BOOL_F;
  227. }
  228. SCM
  229. scm_i_contregs_vm (SCM contregs)
  230. {
  231. return SCM_CONTREGS (contregs)->vm;
  232. }
  233. SCM
  234. scm_i_contregs_vm_cont (SCM contregs)
  235. {
  236. return SCM_CONTREGS (contregs)->vm_cont;
  237. }
  238. /* {Apply}
  239. */
  240. /* Invoking a continuation proceeds as follows:
  241. *
  242. * - the stack is made large enough for the called continuation
  243. * - the old windchain is unwound down to the branching point
  244. * - the continuation stack is copied into place
  245. * - the windchain is rewound up to the continuation's context
  246. * - the continuation is invoked via longjmp (or setcontext)
  247. *
  248. * This order is important so that unwind and rewind handlers are run
  249. * with their correct stack.
  250. */
  251. static void scm_dynthrow (SCM);
  252. /* Grow the stack by a fixed amount to provide space to copy in the
  253. * continuation. Possibly this function has to be called several times
  254. * recursively before enough space is available. Make sure the compiler does
  255. * not optimize the growth array away by storing it's address into a global
  256. * variable.
  257. */
  258. static scm_t_bits scm_i_dummy;
  259. static void
  260. grow_stack (SCM cont)
  261. {
  262. scm_t_bits growth[100];
  263. scm_i_dummy = (scm_t_bits) growth;
  264. scm_dynthrow (cont);
  265. }
  266. /* Copy the continuation stack into the current stack. Calling functions from
  267. * within this function is safe, since only stack frames below this function's
  268. * own frame are overwritten. Thus, memcpy can be used for best performance.
  269. */
  270. typedef struct {
  271. scm_t_contregs *continuation;
  272. SCM_STACKITEM *dst;
  273. } copy_stack_data;
  274. static void
  275. copy_stack (void *data)
  276. {
  277. copy_stack_data *d = (copy_stack_data *)data;
  278. memcpy (d->dst, d->continuation->stack,
  279. sizeof (SCM_STACKITEM) * d->continuation->num_stack_items);
  280. #ifdef __ia64__
  281. SCM_I_CURRENT_THREAD->pending_rbs_continuation = d->continuation;
  282. #endif
  283. }
  284. static void
  285. copy_stack_and_call (scm_t_contregs *continuation,
  286. SCM_STACKITEM * dst)
  287. {
  288. long delta;
  289. copy_stack_data data;
  290. delta = scm_ilength (scm_i_dynwinds ()) - scm_ilength (continuation->dynenv);
  291. data.continuation = continuation;
  292. data.dst = dst;
  293. scm_i_dowinds (continuation->dynenv, delta, copy_stack, &data);
  294. SCM_I_LONGJMP (continuation->jmpbuf, 1);
  295. }
  296. #ifdef __ia64__
  297. void
  298. scm_ia64_longjmp (scm_i_jmp_buf *JB, int VAL)
  299. {
  300. scm_i_thread *t = SCM_I_CURRENT_THREAD;
  301. if (t->pending_rbs_continuation)
  302. {
  303. memcpy (t->register_backing_store_base,
  304. t->pending_rbs_continuation->backing_store,
  305. t->pending_rbs_continuation->backing_store_size);
  306. t->pending_rbs_continuation = NULL;
  307. }
  308. setcontext (&JB->ctx);
  309. }
  310. #endif
  311. /* Call grow_stack until the stack space is large enough, then, as the current
  312. * stack frame might get overwritten, let copy_stack_and_call perform the
  313. * actual copying and continuation calling.
  314. */
  315. static void
  316. scm_dynthrow (SCM cont)
  317. {
  318. scm_i_thread *thread = SCM_I_CURRENT_THREAD;
  319. scm_t_contregs *continuation = SCM_CONTREGS (cont);
  320. SCM_STACKITEM *dst = thread->continuation_base;
  321. SCM_STACKITEM stack_top_element;
  322. if (thread->critical_section_level)
  323. {
  324. fprintf (stderr, "continuation invoked from within critical section.\n");
  325. abort ();
  326. }
  327. #if SCM_STACK_GROWS_UP
  328. if (dst + continuation->num_stack_items >= &stack_top_element)
  329. grow_stack (cont);
  330. #else
  331. dst -= continuation->num_stack_items;
  332. if (dst <= &stack_top_element)
  333. grow_stack (cont);
  334. #endif /* def SCM_STACK_GROWS_UP */
  335. SCM_FLUSH_REGISTER_WINDOWS;
  336. copy_stack_and_call (continuation, dst);
  337. }
  338. void
  339. scm_i_check_continuation (SCM cont)
  340. {
  341. scm_i_thread *thread = SCM_I_CURRENT_THREAD;
  342. scm_t_contregs *continuation = SCM_CONTREGS (cont);
  343. if (!scm_is_eq (continuation->root, thread->continuation_root))
  344. scm_misc_error
  345. ("%continuation-call",
  346. "invoking continuation would cross continuation barrier: ~A",
  347. scm_list_1 (cont));
  348. }
  349. void
  350. scm_i_reinstate_continuation (SCM cont)
  351. {
  352. scm_dynthrow (cont);
  353. }
  354. SCM
  355. scm_i_with_continuation_barrier (scm_t_catch_body body,
  356. void *body_data,
  357. scm_t_catch_handler handler,
  358. void *handler_data,
  359. scm_t_catch_handler pre_unwind_handler,
  360. void *pre_unwind_handler_data)
  361. {
  362. SCM_STACKITEM stack_item;
  363. scm_i_thread *thread = SCM_I_CURRENT_THREAD;
  364. SCM old_controot;
  365. SCM_STACKITEM *old_contbase;
  366. SCM result;
  367. /* Establish a fresh continuation root.
  368. */
  369. old_controot = thread->continuation_root;
  370. old_contbase = thread->continuation_base;
  371. thread->continuation_root = scm_cons (thread->handle, old_controot);
  372. thread->continuation_base = &stack_item;
  373. /* Call FUNC inside a catch all. This is now guaranteed to return
  374. directly and exactly once.
  375. */
  376. result = scm_c_catch (SCM_BOOL_T,
  377. body, body_data,
  378. handler, handler_data,
  379. pre_unwind_handler, pre_unwind_handler_data);
  380. /* Return to old continuation root.
  381. */
  382. thread->continuation_base = old_contbase;
  383. thread->continuation_root = old_controot;
  384. return result;
  385. }
  386. static int
  387. should_print_backtrace (SCM tag, SCM stack)
  388. {
  389. return SCM_BACKTRACE_P
  390. && scm_is_true (stack)
  391. && scm_initialized_p
  392. /* It's generally not useful to print backtraces for errors reading
  393. or expanding code in these fallback catch statements. */
  394. && !scm_is_eq (tag, scm_from_latin1_symbol ("read-error"))
  395. && !scm_is_eq (tag, scm_from_latin1_symbol ("syntax-error"));
  396. }
  397. static void
  398. print_exception_and_backtrace (SCM port, SCM tag, SCM args)
  399. {
  400. SCM stack, frame;
  401. /* We get here via a throw to a catch-all. In that case there is the
  402. throw frame active, and this catch closure, so narrow by two
  403. frames. */
  404. stack = scm_make_stack (SCM_BOOL_T, scm_list_1 (scm_from_int (2)));
  405. frame = scm_is_true (stack) ? scm_stack_ref (stack, SCM_INUM0) : SCM_BOOL_F;
  406. if (should_print_backtrace (tag, stack))
  407. {
  408. scm_puts ("Backtrace:\n", port);
  409. scm_display_backtrace_with_highlights (stack, port,
  410. SCM_BOOL_F, SCM_BOOL_F,
  411. SCM_EOL);
  412. scm_newline (port);
  413. }
  414. scm_print_exception (port, frame, tag, args);
  415. }
  416. struct c_data {
  417. void *(*func) (void *);
  418. void *data;
  419. void *result;
  420. };
  421. static SCM
  422. c_body (void *d)
  423. {
  424. struct c_data *data = (struct c_data *)d;
  425. data->result = data->func (data->data);
  426. return SCM_UNSPECIFIED;
  427. }
  428. static SCM
  429. c_handler (void *d, SCM tag, SCM args)
  430. {
  431. struct c_data *data;
  432. /* If TAG is `quit', exit() the process. */
  433. if (scm_is_eq (tag, scm_from_latin1_symbol ("quit")))
  434. exit (scm_exit_status (args));
  435. data = (struct c_data *)d;
  436. data->result = NULL;
  437. return SCM_UNSPECIFIED;
  438. }
  439. static SCM
  440. pre_unwind_handler (void *error_port, SCM tag, SCM args)
  441. {
  442. /* Print the exception unless TAG is `quit'. */
  443. if (!scm_is_eq (tag, scm_from_latin1_symbol ("quit")))
  444. print_exception_and_backtrace (PTR2SCM (error_port), tag, args);
  445. return SCM_UNSPECIFIED;
  446. }
  447. void *
  448. scm_c_with_continuation_barrier (void *(*func) (void *), void *data)
  449. {
  450. struct c_data c_data;
  451. c_data.func = func;
  452. c_data.data = data;
  453. scm_i_with_continuation_barrier (c_body, &c_data,
  454. c_handler, &c_data,
  455. pre_unwind_handler,
  456. SCM2PTR (scm_current_error_port ()));
  457. return c_data.result;
  458. }
  459. struct scm_data {
  460. SCM proc;
  461. };
  462. static SCM
  463. scm_body (void *d)
  464. {
  465. struct scm_data *data = (struct scm_data *)d;
  466. return scm_call_0 (data->proc);
  467. }
  468. static SCM
  469. scm_handler (void *d, SCM tag, SCM args)
  470. {
  471. /* Print a message. Note that if TAG is `quit', this will exit() the
  472. process. */
  473. scm_handle_by_message_noexit (NULL, tag, args);
  474. return SCM_BOOL_F;
  475. }
  476. SCM_DEFINE (scm_with_continuation_barrier, "with-continuation-barrier", 1,0,0,
  477. (SCM proc),
  478. "Call @var{proc} and return its result. Do not allow the invocation of\n"
  479. "continuations that would leave or enter the dynamic extent of the call\n"
  480. "to @code{with-continuation-barrier}. Such an attempt causes an error\n"
  481. "to be signaled.\n"
  482. "\n"
  483. "Throws (such as errors) that are not caught from within @var{proc} are\n"
  484. "caught by @code{with-continuation-barrier}. In that case, a short\n"
  485. "message is printed to the current error port and @code{#f} is returned.\n"
  486. "\n"
  487. "Thus, @code{with-continuation-barrier} returns exactly once.\n")
  488. #define FUNC_NAME s_scm_with_continuation_barrier
  489. {
  490. struct scm_data scm_data;
  491. scm_data.proc = proc;
  492. return scm_i_with_continuation_barrier (scm_body, &scm_data,
  493. scm_handler, &scm_data,
  494. pre_unwind_handler,
  495. SCM2PTR (scm_current_error_port ()));
  496. }
  497. #undef FUNC_NAME
  498. void
  499. scm_init_continuations ()
  500. {
  501. tc16_continuation = scm_make_smob_type ("continuation", 0);
  502. scm_set_smob_print (tc16_continuation, continuation_print);
  503. #include "libguile/continuations.x"
  504. }
  505. /*
  506. Local Variables:
  507. c-file-style: "gnu"
  508. End:
  509. */