As a follow-up to this thread, I’ve been prodding at the internals of the Inform compiler pipeline, in hopes of being able to resucitate Dynamic Objects.
So far I’ve found that generally, Inform 7 gets translated into Inform 6, which gets compiled to Glulx/the Z-Machine.
What I’ve also discovered:
- Both Glulx and Inform 6 have notions of dynamic allocation (malloc/mfree and FlexAllocate/FlexFree, respectively); however, these just allocate ‘raw bytes’ without any sort of memory management.
- Glulx itself only has a notion of dyntyped pointers in a very weak sense-- all notions like the objectloop, kinds, and in particular the structure of objects are implemented on top, by Inform 6.
So far so good… but frustratingly I’ve been unable to find any docs on how, exactly, Inform 6 emits Glulx code or lays out data in memory! I can inspect the structure of a compiled Inform 7 object from I6 source just fine-- kind-based objectloops and all-- but the output of the Inform 6 code-gen is beyond me.
(Frustratingly, the code-generator is not a literate web, instead written in sparsely-commented decade-old C! The data structures being tossed around are, frankly, a bit beyond me.)
Would anyone happen to have any sort of documentation on how exactly Inform 6 likes to lay out objects in memory, and/or how these objects are traversed at runtime? I’m frankly somewhat at my wits’ end.
Thanks for your time!