1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-06-11 22:31:12 +02:00
guile/module/language
Andy Wingo 2d026f04cc abort always dispatches to VM bytecode, to detect same-invocation aborts
* libguile/control.h:
* libguile/control.c (scm_c_make_prompt): Take an extra arg, a cookie.
  Continuations will be rewindable only if the abort has the same cookie
  as the prompt.
  (scm_at_abort): Redefine from scm_abort, and instead of taking rest
  args, take the abort values as a list directly. Also, don't allow
  rewinding, because we won't support rewinding the C stack with
  delimited continuations.

* libguile/eval.c (eval): Adapt to scm_c_make_prompt change.

* libguile/vm-engine.c (vm_engine): Use vp->cookie to get a unique value
  corresponding to this VM invocation.
* libguile/vm-i-system.c (prompt): Pass the cookie to scm_c_make_prompt.
  (abort): Take an additional tail arg.
* libguile/vm.c (vm_abort): Parse out the abort tail arg. This is for
  the @abort case, or the (apply abort ...) case.
  (make_vm): Initialize the cookie to 0.
* libguile/vm.h (struct scm_vm): Add cookie.

* module/ice-9/boot-9.scm (abort): Define here as a trampoline to
  @abort. Needed to make sure that a call to abort dispatches to a VM
  opcode, so the cookie will be the same.

* module/language/tree-il.scm (<tree-il>): Add a "tail" field to
  <abort>, for the (apply abort ...) case, or (@abort tag args). Should
  be #<const ()> in the normal case. Add support throughout.
* module/language/tree-il/analyze.scm (analyze-lexicals): Add abort-tail
  support here too.

* module/language/tree-il/compile-glil.scm (flatten): Compile the tail
  argument appropriately.
* module/language/tree-il/primitives.scm (*primitive-expand-table*): Fix
  @abort and abort cases to pass the tail arg to make-abort.
2010-02-22 21:54:06 +01:00
..
assembly fix prompt disassembly bug 2010-02-19 22:35:00 +01:00
brainfuck Revert "implement #:predicate" and remove predicate from <lambda-case> 2009-11-15 21:02:26 +01:00
bytecode language-readers receive environment as an arg 2009-10-16 13:39:24 +02:00
ecmascript Revert "implement #:predicate" and remove predicate from <lambda-case> 2009-11-15 21:02:26 +01:00
elisp Change the Elisp compiler from GPLv2+ to LGPLv3+. 2009-12-15 19:10:48 +01:00
glil prompt handlers are always inline 2010-02-19 15:30:34 +01:00
objcode allocate free variables inline to closures 2010-01-09 16:43:26 +01:00
scheme compilation enviroments are always modules; simplifications & refactorings 2009-10-16 15:33:32 +02:00
tree-il abort always dispatches to VM bytecode, to detect same-invocation aborts 2010-02-22 21:54:06 +01:00
value Change Guile license to LGPLv3+ 2009-06-17 00:22:09 +01:00
assembly.scm object->assembly shouldn't presume existence of %nil 2010-01-17 13:41:14 -08:00
glil.scm prompt handlers are always inline 2010-02-19 15:30:34 +01:00
objcode.scm Change Guile license to LGPLv3+ 2009-06-17 00:22:09 +01:00
tree-il.scm abort always dispatches to VM bytecode, to detect same-invocation aborts 2010-02-22 21:54:06 +01:00