Previous: compiler topics locbind, Up: compiler topics [Index]
clambda
bindignsIf a binding is assigned, it is defined by a bind
struct:
(bind ((?lhs ?init)) (seq (assign ?lhs ?rhs) ?rest))
and so it is transformed by introducing a vector to hold the read–write machine word:
(bind ((?tmp ?init)) (bind ((?lhs (funcall (primref vector) ?tmp))) (seq (funcall (primref $vector-set!) ?lhs (constant 0) ?rhs) ?rest)))
if its ?init expression is a clambda
struct, it is
further transformed as follows:
(fix ((?tmp ?clambda)) (bind ((?lhs (funcall (primref vector) ?tmp))) (seq (funcall (primref $vector-set!) ?lhs (constant 0) ?rhs) ?rest)))
so, in the end, clambda
expressions originally bound to
assigned bindings end up defined by fix
forms.