Bill Welliver <
[hidden email]> wrote:
> One problem that I've noticed is that the compilation handler doesn't
> seem to concern itself with program loading (as opposed to loading
> from modules). Specifically, cast_to_program() consults the program
> path defined in the master and not the one that's used in the
> CompatResolver. Is that an oversight, or is that by design?
Seems like an oversight to me.
> Secondly, I'm not sure if there's a way to completely override
> compile() and the like, as it seems as though the system prefers to
> use the originally defined efun even after I've added compile using
> add_constant. It does get used in the rare cases where my code calls
> compile() explicitly, but otherwise it seems as though that's not the
> case (and I've made sure that there aren't any cached copies of
> programs in the programs mapping in master().
>
> Any thoughts?
When you use add_constant, you only override calls in code being
compiled later, so compile() calls in the original master object will
not be affected, for instance.
But otoh, why do you need to override them? If it's to pass your own
handler then the calls in the master shouldn't be a problem since the
incoming handler always is propagated there.