peval: more strict accounting
* module/language/tree-il/optimize.scm (transfer!, make-nested-counter):
(make-recursive-counter, peval): Limit the algorithm's time to be
strictly O(N) by transferring effort and size counters of recursive
inlining attempts from containing counters.
* test-suite/tests/tree-il.test ("partial evaluation"): Update
expectations for the ((lambda (x) (x x)) (lambda (x) (x x))) case, as
the new accounting policy will cause the entire inlining attempt to
abort.
This commit is contained in:
parent
05c9389e3f
commit
153ca1d239
2 changed files with 67 additions and 34 deletions
|
|
@ -793,12 +793,14 @@
|
|||
(pass-if-peval
|
||||
;; Infinite recursion
|
||||
((lambda (x) (x x)) (lambda (x) (x x)))
|
||||
(let (x) (_)
|
||||
((lambda _
|
||||
(apply (lambda _
|
||||
(lambda-case
|
||||
(((x) _ _ _ _ _)
|
||||
(apply (lexical x _) (lexical x _))))))
|
||||
(apply (lexical x _) (lexical x _))))
|
||||
(apply (lexical x _) (lexical x _)))))
|
||||
(lambda _
|
||||
(lambda-case
|
||||
(((x) _ _ _ _ _)
|
||||
(apply (lexical x _) (lexical x _)))))))
|
||||
|
||||
(pass-if-peval
|
||||
;; First order, aliased primitive.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue