mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-06-14 15:40:19 +02:00
Bailouts can continue directly to tail
* module/language/cps/compile-bytecode.scm (compile-function): Allow a 'throw primcall in tail position. * module/language/cps/prune-bailouts.scm (prune-bailouts): Continue directly to the nearest tail continuation, so we don't cause unreachable handle-interrupts / return 0 instructions to be emitted. * module/language/cps/reify-primitives.scm (reify-clause): Residualized 'throw primcall continues directly to tail. * module/language/cps/verify.scm (check-arities): Relax check for 'throw.
This commit is contained in:
parent
64acf24b40
commit
9db628ee29
4 changed files with 23 additions and 24 deletions
|
@ -125,7 +125,9 @@
|
|||
(for-each (match-lambda
|
||||
((src . dst) (emit-mov asm (from-sp dst) (from-sp src))))
|
||||
(lookup-parallel-moves label allocation))
|
||||
(emit-return-values asm (1+ (length args))))))
|
||||
(emit-return-values asm (1+ (length args))))
|
||||
(($ $primcall (or 'throw 'throw/value 'throw/value+data))
|
||||
(compile-effect label exp #f))))
|
||||
|
||||
(define (compile-value label exp dst)
|
||||
(match exp
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue