On Wed, Jan 7, 2015 at 5:22 PM, Jonathan S. Shapiro <[email protected]> wrote:
> With sufficient indirection, I think you can preserve static compilation.
> Among the things you will need to do indirectly are things like structure
> field offset computations....
>
> In some very formally absurd way you can compile this stuff separately. The
> result isn't machine code in any pragmatically useful sense.

I think that's a different issue.  If you admit dependent types and
have striation between compile time and runtime, things like structure
field offsets turn runtime even within the same file.  If we enforce a
striation between runtime and compile time, so that field offset
access at runtime must be known, the same enforcement works equally
well across modules.

You're right that not *all* field offsets can be known at compile time
if we treat modules as large structs, but that's essentially identical
to symbol offsets not being known until runtime link time.  It might
require treating "structs that are modules" slightly specially in
terms of who is enforced to be known at compile time when, but it
doesn't seem technically difficult.  An "object file" just becomes a
special variety of big struct.

Geoffrey
_______________________________________________
bitc-dev mailing list
[email protected]
http://www.coyotos.org/mailman/listinfo/bitc-dev

Reply via email to