mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-06-16 16:50:21 +02:00
use anonymous mv-bind in compile-glil.scm; fix abort compilation bug
* module/language/tree-il/compile-glil.scm (flatten): Change to use the anonymous <glil-mv-bind> form when truncating to 0 or 1 values. In those cases, remove the <glil-unbind> statements. As a side effect, fixes compilation of abort in a "values" context. Thanks to Tristan Colgate for the bug report. * test-suite/tests/tree-il.test: Update to expect anonymous mv-bind.
This commit is contained in:
parent
a5c96cb99d
commit
05c51bcff5
2 changed files with 6 additions and 8 deletions
|
@ -496,8 +496,7 @@
|
|||
(emit-code #f (make-glil-call 'drop 1))
|
||||
(emit-branch #f 'br (or RA POST))
|
||||
(emit-label MV)
|
||||
(emit-code #f (make-glil-mv-bind '() #f))
|
||||
(emit-code #f (make-glil-unbind))
|
||||
(emit-code #f (make-glil-mv-bind 0 #f))
|
||||
(if RA
|
||||
(emit-branch #f 'br RA)
|
||||
(emit-label POST)))))))))
|
||||
|
@ -1124,12 +1123,11 @@
|
|||
(emit-code #f (make-glil-call 'return/nvalues 1)))
|
||||
((drop)
|
||||
;; Drop all values and goto RA, or otherwise fall through.
|
||||
(emit-code #f (make-glil-mv-bind '() #f))
|
||||
(emit-code #f (make-glil-unbind))
|
||||
(emit-code #f (make-glil-mv-bind 0 #f))
|
||||
(if RA (emit-branch #f 'br RA)))
|
||||
((push)
|
||||
;; Truncate to one value.
|
||||
(emit-code #f (make-glil-mv-bind '(val) #f)))
|
||||
(emit-code #f (make-glil-mv-bind 1 #f)))
|
||||
((vals)
|
||||
;; Go to MVRA.
|
||||
(emit-branch #f 'br MVRA)))))))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue