mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-06-09 13:30:26 +02:00
Constant folding for (list) and (vector) in peval
* module/language/tree-il/peval.scm (peval): Add cases for (list) -> '() and (vector) -> #().
This commit is contained in:
parent
fab18c02e8
commit
803a1ee7c7
1 changed files with 4 additions and 0 deletions
|
@ -1249,6 +1249,10 @@ top-level bindings from ENV and return the resulting expression."
|
|||
(make-primcall src 'list (list x)))
|
||||
(('cons x ($ <primcall> _ 'list elts))
|
||||
(make-primcall src 'list (cons x elts)))
|
||||
(('list)
|
||||
(make-const src '()))
|
||||
(('vector)
|
||||
(make-const src '#()))
|
||||
((name . args)
|
||||
(make-primcall src name args))))))
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue