Idorobots / spartan

A small Lisp dialect that serves me as a test bed for programming language features.
MIT License
13 stars 3 forks source link

Tight loops in bootstrap fail to inline. #194

Closed Idorobots closed 1 week ago

Idorobots commented 2 months ago
 (define (monitor timeout)
   (task-info)
   (sleep timeout)
   (monitor timeout))

Currently, lambdas are first collected for inlining and then the inlining is applied until execution finishes. In this case, the lambda is OK to inline as it is short, but replacing the body results in and endless loop of inlining for whatever reason (it works in the REPL, and there are more examples of recursive functions that work as expected).

Idorobots commented 1 week ago

Can't reproduce after #190. These now are inlined properly after CPS.