40 frame->
arg[reg] = value;
43 if ( reg == frame->
args ) {
61 L
"get_stack_frame: all good, returning %p\n", result );
82 if ( !
nilp( result ) ) {
122 if (
nilp( result ) ) {
158 if (
consp( args ) ) {
190 if (
nilp( result ) ) {
209 if (
consp( args ) ) {
247 if ( frame != NULL ) {
248 url_fwprintf( output, L
"Stack frame with %d arguments:\n",
253 url_fwprintf( output, L
"Arg %d:\t%c%c%c%c\tcount: %10u\tvalue: ",
254 arg, cell.
tag.bytes[0], cell.
tag.bytes[1],
255 cell.
tag.bytes[2], cell.
tag.bytes[3], cell.
count );
290 result = frame->arg[index];
struct cons_pointer inc_ref(struct cons_pointer pointer)
increment the reference count of the object at this cons pointer.
struct cons_pointer dec_ref(struct cons_pointer pointer)
Decrement the reference count of the object at this cons pointer.
#define exceptionp(conspoint)
true if conspoint points to an exception, else false
struct cons_pointer more
list of any further argument bindings.
int args
the number of arguments provided.
union cons_space_object::@2 tag
union cons_space_object::@3 payload
#define NIL
a cons pointer which points to the special NIL cell
struct cons_pointer make_exception(struct cons_pointer message, struct cons_pointer frame_pointer)
Construct an exception cell.
#define consp(conspoint)
true if conspoint points to a cons cell, else false
#define nilp(conspoint)
true if conspoint points to the special cell NIL, else false (there should only be one of these so it...
struct cons_pointer previous
the previous frame.
uint32_t count
the count of the number of references to this cell
struct cons_pointer c_string_to_lisp_string(wchar_t *string)
Return a lisp string representation of this wide character string.
struct cons_pointer inc_ref(struct cons_pointer pointer)
increment the reference count of the object at this cons pointer.
struct cons_pointer function
the function to be called.
struct cons_pointer arg[args_in_frame]
first 8 arument bindings.
#define vectorpointp(conspoint)
true if conspoint points to a vector pointer, else false.
#define pointer2cell(pointer)
given a cons_pointer as argument, return the cell.
An indirect pointer to a cons cell.
void debug_println(int level)
print a line feed to stderr, if verbosity matches level.
void debug_dump_object(struct cons_pointer pointer, int level)
Like dump_object, q.v., but protected by the verbosity mechanism.
void debug_printf(int level, wchar_t *format,...)
wprintf adapted for the debug logging system.
void debug_print(wchar_t *message, int level)
print this debug message to stderr, if verbosity matches level.
void debug_print_object(struct cons_pointer pointer, int level)
print the object indicated by this pointer to stderr, if verbosity matches level.
#define DEBUG_STACK
Print messages debugging stack operations.
#define DEBUG_ALLOC
Print messages debugging memory allocation.
#define url_fputws(ws, f)
#define url_fwprintf(f,...)
struct cons_pointer eval_form(struct stack_frame *parent, struct cons_pointer parent_pointer, struct cons_pointer form, struct cons_pointer env)
Useful building block; evaluate this single form in the context of this parent stack frame and this e...
struct cons_pointer eval_forms(struct stack_frame *frame, struct cons_pointer frame_pointer, struct cons_pointer list, struct cons_pointer env)
Evaluate all the forms in this list in the context of this stack frame and this env,...
struct cons_pointer print(URL_FILE *output, struct cons_pointer pointer)
Print the cons-space object indicated by pointer to the stream indicated by output.
struct cons_pointer make_special_frame(struct cons_pointer previous, struct cons_pointer args, struct cons_pointer env)
A 'special' frame is exactly like a normal stack frame except that the arguments are unevaluated.
struct cons_pointer fetch_arg(struct stack_frame *frame, unsigned int index)
Fetch a pointer to the value of the local variable at this index.
void set_reg(struct stack_frame *frame, int reg, struct cons_pointer value)
set a register in a stack frame.
struct stack_frame * get_stack_frame(struct cons_pointer pointer)
get the actual stackframe object from this pointer, or NULL if pointer is not a stackframe pointer.
void dump_frame(URL_FILE *output, struct cons_pointer frame_pointer)
Dump a stackframe to this stream for debugging.
void dump_stack_trace(URL_FILE *output, struct cons_pointer pointer)
void free_stack_frame(struct stack_frame *frame)
Free this stack frame.
struct cons_pointer make_empty_frame(struct cons_pointer previous)
Make an empty stack frame, and return it.
struct cons_pointer make_stack_frame(struct cons_pointer previous, struct cons_pointer args, struct cons_pointer env)
Allocate a new stack frame with its previous pointer set to this value, its arguments set up from the...
#define stackframep(vso)
is this vector-space object a stack frame?
struct cons_pointer make_vso(uint32_t tag, uint64_t payload_size)
Allocate a vector space object with this payload_size and tag, and return a cons_pointer which points...
union vector_space_object::@5 payload
we'll malloc size bytes for payload, payload is just the first of these.
#define pointer_to_vso(pointer)
given a pointer to a vector space object, return the object.
a vector_space_object is just a vector_space_header followed by a lump of bytes; what we deem to be i...