file: job.t package: muf status: alpha
The assembleCall
prim is the workhorse
assembler call used to assemble all vanilla instructions
-- those which don't have an associated label or
other similar peculiarity.
Note in particular that the assembleCall
prim is used to deposit calls to both functions
coded in-db, and also primitive functions coded
in-server in C: The Muq compiler writer has in
general no need to distinguish between these two
cases, and Muq compilers have in general no need
to contain a list of all primitives supported by
the Muq virtual machine. (This both simplifies
the Muq compilers, and means that they do not need
to be recoded if a given function changes from
being a C-coded prim to being coded in-db.)
The function
argument may be either a
compiledFunction, or else a symbol containing
a compiledFunction in its symbolFunction
slot (symbol$s.function
).
For example, here's a hand-assembly of the
function : x * ;
makeAssembler --> *asm* stack: *asm* reset stack: #'* *asm* assembleCall stack: nil -1 makeFunction *asm* finishAssembly --> #'x ( Compile fn 'x' ) stack: 2.3 3.4 x ( Invoke function ) stack: 7.81982
Go to the first, previous, next, last section, table of contents.