Enable inlining for define-inline calls as arguments.

A seemingly-unintentional choice made the following not behave
as expected:

    (define-inline (f x) (+ x 1))
    (f (f 2))

because the `(f 2)` was not inlined.

Reported by @mflatt and Liwei Chou.
This commit is contained in:
Sam Tobin-Hochstadt 2020-12-17 09:50:50 -05:00
parent 627c45e8d4
commit 0e4f57f44c

View File

@ -99,9 +99,9 @@
[(_ arg*:actual ...)
;; let*-bind the actuals, to ensure that they're evaluated
;; only once, and in order
#`(syntax-parameterize
#`(let* ([arg*.tmp arg*.arg] ...)
(syntax-parameterize
([name (make-rename-transformer #'internal-name)])
(let* ([arg*.tmp arg*.arg] ...)
#,(let* ([arg-entries (attribute arg*.for-aux)]
[keyword-entries (filter car arg-entries)]
[positional-entries