mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-06-27 21:40:34 +02:00
Merge remote-tracking branch 'origin/stable-2.0'
Conflicts: test-suite/tests/cse.test
This commit is contained in:
commit
9d8a10a94c
9 changed files with 321 additions and 215 deletions
|
@ -998,4 +998,18 @@
|
|||
|
||||
(pass-if-peval
|
||||
(car '(1 2))
|
||||
(const 1)))
|
||||
(const 1))
|
||||
|
||||
;; If we bail out when inlining an identifier because it's too big,
|
||||
;; but the identifier simply aliases some other identifier, then avoid
|
||||
;; residualizing a reference to the leaf identifier. The bailout is
|
||||
;; driven by the recursive-effort-limit, which is currently 100. We
|
||||
;; make sure to trip it with this recursive sum thing.
|
||||
(pass-if-peval resolve-primitives
|
||||
(let ((x (let sum ((n 0) (out 0))
|
||||
(if (< n 10000)
|
||||
(sum (1+ n) (+ out n))
|
||||
out))))
|
||||
((lambda (y) (list y)) x))
|
||||
(let (x) (_) (_)
|
||||
(apply (primitive list) (lexical x _)))))
|
||||
|
|
|
@ -148,7 +148,7 @@
|
|||
(lexical #t #f ref 0) (call return 1)
|
||||
(unbind)))
|
||||
|
||||
(assert-tree-il->glil without-partial-evaluation
|
||||
(assert-tree-il->glil with-options (#:partial-eval? #f #:cse? #f)
|
||||
(let (x) (y) ((const 1)) (begin (lexical x y) (const #f)))
|
||||
(program () (std-prelude 0 1 #f) (label _)
|
||||
(const 1) (bind (x #f 0)) (lexical #t #f set 0)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue