[ Home ]
SBCL Internals

The pages on this CLiki-driven site can be edited by anybody at any time. No warranty of any kind can therefore be made; any implied warranties of merchantability or fitness for a particular purpose are expressly disclaimed
[ Home ] [ Recent Changes ] [ About CLiki ] [ Text Formatting ]

FOP stands for "FASL OPeration."

Definition of FOPs

A FOP is defined with the DEFINE-FOP macro which takes a name, information about the effects of the FOP on the "FOP stack," a FOP code, and a function body. Out comes a function named NAME that takes no arguments that is to be called when loading a binary FASL file.

FOPs in the normal context LOAD

To load a FASL file, LOAD-AS-FASL sets up the appropriate special variables in a let and calls LOAD-FASL-GROUP on the stream. LOAD-FASL-GROUP reads a single byte from the stream and looks up the FOP (a function) with that code. The FOP then gets called and does LOADy things with the FASL stream. The FOP will either finish normally, in which case LOAD-FASL-GROUP reads another FOP code and repeats, or the FOP can THROW 'FASL-GROUP-END to signal the terminus of the FASL.

All FOPs are indexed by a 1-byte code that is written into a FASL file.

FOPs in the context of GENESIS

The usual FOPs are shadowed (via let) during genesis to dump the FASL to the core image instead of executing/storing code like during normal LOADing.


See src/code/fop.lisp for the machinery underlay FOPs and also genesis.lisp to see how they are used in the context of cold-init.

build genesis load? fasl?


This page is linked from: Abbreviations   make-target-2  

CLiki pages can be edited by anyone at any time. Imagine a fearsomely comprehensive disclaimer of liability. Now fear, comprehensively