mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-06-18 01:30:27 +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
|
@ -100,12 +100,11 @@
|
|||
|
||||
(define (reify-clause cps ktail)
|
||||
(with-cps cps
|
||||
(letk knil ($kargs () () ($continue ktail #f ($values ()))))
|
||||
(let$ body
|
||||
(with-cps-constants ((wna 'wrong-number-of-args)
|
||||
(args '(#f "Wrong number of arguments" () #f)))
|
||||
(build-term
|
||||
($continue knil #f
|
||||
($continue ktail #f
|
||||
($primcall 'throw #f (wna args))))))
|
||||
(letk kbody ($kargs () () ,body))
|
||||
(letk kclause ($kclause ('() '() #f '() #f) kbody #f))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue