23.03.2013 Views

Performance and Evaluation of Lisp Systems - Dreamsongs

Performance and Evaluation of Lisp Systems - Dreamsongs

Performance and Evaluation of Lisp Systems - Dreamsongs

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

50<br />

2.5.4 Systemic Quantities Vector<br />

To speed up various operations, a vector <strong>of</strong> commonly referred to constants<br />

<strong>and</strong> procedures is pointed to by a register dedicated to the purpose. This vector<br />

contains the quantities T, (), the locks mentioned above, constants defining the<br />

sizes <strong>of</strong> some objects, the addresses <strong>of</strong> the CONSers, <strong>and</strong> addresses <strong>of</strong> routines<br />

that allocate, de-allocate, <strong>and</strong> search special lookup blocks on the stack. Calling<br />

these routines is inexpensive compared to the cost <strong>of</strong> a normal procedure call.<br />

2.5.5 Function Calls<br />

All arguments are passed on the stack. Temporary storage for each function<br />

is also on the stack. Six stack slots are allocated for the basic function call: a slot<br />

for one returned value (multiple values are h<strong>and</strong>led separately), a spare PC slot,<br />

the return PC, an old temporaries pointer slot, an old closure pointer slot, <strong>and</strong><br />

an old frame pointer slot. The arguments, pointer temporaries, <strong>and</strong> nonpointer<br />

temporaries are above these slots.<br />

Self-recursive calls go to a distinguished label at the front <strong>of</strong> the compiled<br />

code. This saves an indirect memory reference through the function cell. The<br />

pipeline hardware can value-predict the new PC; this allows the pipeline to proceed<br />

more smoothly than it does in the indirect memory-reference case. However,<br />

tracing such calls is not possible.<br />

2.5.6 Remarks<br />

Mac<strong>Lisp</strong>.<br />

The S-1 supports PDL-allocated numbers in much the same fashion as

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!