[Inform 6] Static array feature

I have a test branch of the I6 compiler, if anybody wants a look:

To use the new feature, write an array declaration like this:

Array arrayname static --> 1 3 5 7 9 11 13 15;

In Z-code, this places the array at the end of readable memory (after the dictionary, before the beginning of code storage). In Glulx, it places the array at the end of ROM (after string storage).

Any array format can be made static (->, -->, table, string, buffer).

This patch should be purely additive. That is, if you compile an I6 program which doesn’t use static arrays, you should get exactly the same compiled game file as before.

A test program which tests static arrays (as well as regular arrays) is here:

5 Likes