You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In order to implement procedure inlining and other optimizations it would be nice to know what parts of the code will read/write to what locations; which of them do input or output to which ports; which of them do use dynamic-wind, call/cc etc.
So maybe each compile-... procedure, and the compile procedure itself in STklos could return an object with that information. And each procedure (or closure) would have this information in its plist. That would be a structure like
For example, compiling this code
(define (f a x)
(let ((b 1)
(c 2))
(display a)
(display b)))
would create the closure f whose plist would include a pair (:compile-info . X) where X is something like:
Slots are:
reads = ()
writes = (a)
binds = (b c)
outputs = ( (a . #[output-port '*stdout*' (1)]) ) ; writes a to stdout
inputs = ()
dynamic-wind = #f
call/cc = #f
unknown = ()
Not sure about the plists only. Is there a way to include this in epairs Because it would also be nice to know about the code in a LET for example.
In order to implement procedure inlining and other optimizations it would be nice to know what parts of the code will read/write to what locations; which of them do input or output to which ports; which of them do use
dynamic-wind
,call/cc
etc.So maybe each
compile-...
procedure, and thecompile
procedure itself in STklos could return an object with that information. And each procedure (or closure) would have this information in its plist. That would be a structure likeFor example, compiling this code
would create the closure
f
whose plist would include a pair(:compile-info . X)
whereX
is something like:Not sure about the plists only. Is there a way to include this in epairs Because it would also be nice to know about the code in a LET for example.
What do you think @egallesio ?
The text was updated successfully, but these errors were encountered: