mirror of
https://github.com/justinethier/cyclone.git
synced 2025-05-21 14:49:17 +02:00
Issue #257 - Prevent possible infinite loop
This commit is contained in:
parent
09b6472ce0
commit
c1cdad0065
2 changed files with 3 additions and 1 deletions
|
@ -16,6 +16,7 @@ Bug Fixes
|
||||||
- Fixed an off-by-one error in `read-line` where the function erroneously reported an extra character was read from `stdin`. Thanks to wasamasa for the bug report.
|
- Fixed an off-by-one error in `read-line` where the function erroneously reported an extra character was read from `stdin`. Thanks to wasamasa for the bug report.
|
||||||
- Fixed a CPS optimization issue where multiple copies of the same lambda are introduced during beta expansion, which causes the optimizer to potentially pick up the wrong value when optimizing-out function calls later on. Thanks to @Chant on Github for providing the report and a test program demonstrating the issue.
|
- Fixed a CPS optimization issue where multiple copies of the same lambda are introduced during beta expansion, which causes the optimizer to potentially pick up the wrong value when optimizing-out function calls later on. Thanks to @Chant on Github for providing the report and a test program demonstrating the issue.
|
||||||
- Updated the parser to recognize mnemonic escapes (EG: `\n`, `\a`, etc) and inline hex escapes as part of a symbol.
|
- Updated the parser to recognize mnemonic escapes (EG: `\n`, `\a`, etc) and inline hex escapes as part of a symbol.
|
||||||
|
- Prevent a possible infinite loop during beta expansion optimization.
|
||||||
|
|
||||||
## 0.7.2 - February 15, 2018
|
## 0.7.2 - February 15, 2018
|
||||||
|
|
||||||
|
|
|
@ -1377,7 +1377,8 @@
|
||||||
(map cons (ast:lambda-args fnc) (cdr exp)))
|
(map cons (ast:lambda-args fnc) (cdr exp)))
|
||||||
(define (replace ref renamed)
|
(define (replace ref renamed)
|
||||||
(let ((r (assoc ref formals/actuals)))
|
(let ((r (assoc ref formals/actuals)))
|
||||||
(if r
|
(if (and r
|
||||||
|
(not (eq? (car r) (cdr r)))) ;; Prevent an inf loop
|
||||||
(scan (cdr r) renamed)
|
(scan (cdr r) renamed)
|
||||||
;ref
|
;ref
|
||||||
(let ((rn (assoc ref renamed)))
|
(let ((rn (assoc ref renamed)))
|
||||||
|
|
Loading…
Add table
Reference in a new issue