Mill Computing, Inc. Forums The Mill Architecture Living without a Stack Reply To: Living without a Stack

Ivan Godard
Keymaster
Post count: 689

Yes, we expect that for static languages (C, COBOL etc) only excess and overlarge arguments, and locals with address taken, will reside on the data stack.

In general we expect that a GC language will treat the belt as it does registers in a general-register machine: the residence of temporaries, including pointer temporaries. A GC event must identify these as roots. As with registers, one can map each instruction to table entries that identify roots, in the registers or on the belt. However, mapping every instruction gives a lot of table. Some GC systems instead have arrangements by which a GC event can only be triggered at specific points in execution, and maintain maps only for those points; that would also work on a Mill.

Another possibility is for the GC to assume that anything that looks like a pointer is a pointer, and to treat all such as roots, accepting the occasional false positive. This approach works better on a Mill than a conventional, because pointer-sized data can be distinguished from other data by the width tag on every Mill operand. In addition, if only some combinations of the GC-control bits in a pointer are valid then the root finder can rule out candidates with invalid control fields.

Note that the root-finder must also examine the scratchpad, and also the saved belts and scratchpad of frames further down the stack.