[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Basic Design Questions: function cells
I believe these arguments were comparing storing function definitions in
dedicated cells to storing them in property lists. As far as I know no
one has argued that having functions and variables in separate name spaces
leads to a more or less efficient implementation than having them in the
same name space.
My impression was that having a separate function cell can be more efficient
because it allows function invocation to be compiled into a direct jsr (or
jump) through the function cell, with no explicit check that the function is
defined (undefined functions are represented by a special undefined-function
function). Using the same cell for functions and other variables would
require checking that the cell contains a function before calling it
(otherwise you might transfer control to a random location).
The function cell can also hold the lambda expression for an interpreted
function, so you can't do a blind JSR anyway.