10.07.2015 Views

LISP I Programmer's Manual - Software Preservation Group

LISP I Programmer's Manual - Software Preservation Group

LISP I Programmer's Manual - Software Preservation Group

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

The value of comdef is a list of the names of the functions itwas able to compile.The compiler proceeds in three stages1) Generation of <strong>LISP</strong>-SAP2) Generation of binary program3) SUBR put an association list<strong>LISP</strong>-SAP is SAP in list form, for exampleIn this example, the objects beginning with G are atomic symbolsgenerated for use within the compiler. The BSS,O in thelast element above is used as it is in SAP to tag symbolswhich need to have a memory location assigned to them, but noactual space reserved for them, i.e. the usual location-fieldSAP symbol.The <strong>LISP</strong>-SAP program for each function compiled is printedout, on-line or off-line depending on 'the sense-switch settings.After the compiler has created the <strong>LISP</strong>-SAP program for afunction, the binary program is generated from <strong>LISP</strong>-SAP in twopasses. In the first pass all symbols associated with BSS,Oare assigned locations in memory. In the second pass each instructionis assembled into memory. Then any unassigned symbolsfound during the second pass are assigned locations inmemory following the generated instructions.When the binary program has been generated, the compilerputs the functioLs association list the indicator SUBR pointingto a TXL to the binary program.After a function has been compiled, it can be used as ifit had been defined, but of course it will run much faster thanit would have as an interpreted expression.If a function listed in comdef has SUBR on its associationList already, the compiler ignores the request for compilation

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

Saved successfully!

Ooh no, something went wrong!