Closed samiam95124 closed 1 year ago
The code was analyzed, and decided there is no immediate advantage. So this is closed for now.
I decided that framing is to ugly to implement as is. I have been going through the test suite and (re)applying it to P6. The idea is that major surgery like changing the framing will go better using TDD, so the test series must be as complete as possible.
Implemented. Passes ISO 7185 PAT, implementation in pmach and cmach still needed, but the system works.
Reopened pending completion of cmach implementation and subsequent regression (hey, I'm improving my professionalisim).
Implemented in cmach, needs testing.
Note this is being held for #14.
Done, closing.
Proposed is we move to what I call "pulldown" marks for displays. The current mark/display system used in P5 matches no real machine, is inefficient, and is difficult/impossible to use with a real machine. Proposed is we go to "pull down" marks. This system is used in the I80386 processors, and works well with other machine types as well. The idea is that each time a block is entered, some number of display pointers are coped onto the stack from the old mark/display position. This is according to static depth. Ie, for a procedure nested within a procedure, which is itself nested in the program block, a total of 2 display pointers are "pulled down" with the newly executed procedure. Then, the location of locals/parameters in any given procedure/function/program can be accessed by simply fetching the display pointer copy from the stack (this scheme is outlined in the I80386 machine language manual). This system has more overhead on block invocation, but far less to access non-local variables. It is implemented in the I80386 "enter/leave" instructions but is easy to implement in other machine types (in fact it is not instruction implemented in amd64 mode).