[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Compiler optimizations and Guile's module system

From: No Itisnt
Subject: Compiler optimizations and Guile's module system
Date: Fri, 4 Jun 2010 02:25:03 -0500

I was thinking about inlining, contant propagation, and that class of
optimizations recently. Wouldn't Guile's module system (specifically,
module-set!) interfere with doing these optimizations on module-level
bindings? If a binding is inlined, propagated, etcetera, and the
binding was set! by another module, then behavior could vary based on
whether the binding was optimized or not. (Bonus whine: Guile
currently does this with primitives like +) Off the top of my head,
R6RS makes all imported bindings immutable. How often are cross-module
set!s used in Guile? Maybe exported bindings could be made immutable
by default, and the module definition would explicitly name variables
that should be mutable by external code, so the compiler knows not to
optimize them. Correct me if I'm wrong here, I've never dealt with
this in practice so I'm just musing out loud.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]