parent
9b56fbb1c1
commit
b6f323450f
|
@ -254,6 +254,12 @@ void factor_vm::print_callstack()
|
|||
std::cout << "*** Context not initialized" << std::endl;
|
||||
}
|
||||
|
||||
void factor_vm::print_callstack_object(callstack *obj)
|
||||
{
|
||||
stack_frame_printer printer(this);
|
||||
iterate_callstack_object(obj,printer);
|
||||
}
|
||||
|
||||
struct padded_address {
|
||||
cell value;
|
||||
|
||||
|
|
|
@ -148,8 +148,7 @@ void quotation_jit::emit_mega_cache_lookup(cell methods_, fixnum index, cell cac
|
|||
data_root<array> methods(methods_,parent);
|
||||
data_root<array> cache(cache_,parent);
|
||||
|
||||
/* Load the object from the datastack. */
|
||||
emit_with_literal(parent->special_objects[PIC_LOAD],tag_fixnum(-index * sizeof(cell)));
|
||||
/* The object must be on the top of the datastack at this point. */
|
||||
|
||||
/* Do a cache lookup. */
|
||||
emit_with_literal(parent->special_objects[MEGA_LOOKUP],cache.value());
|
||||
|
|
|
@ -78,7 +78,7 @@ void factor_vm::general_error(vm_error_type error, cell arg1, cell arg2)
|
|||
unwind_native_frames(special_objects[ERROR_HANDLER_QUOT],
|
||||
ctx->callstack_top);
|
||||
}
|
||||
/* Error was thrown in early startup before error handler is set, just
|
||||
/* Error was thrown in early startup before error handler is set, so just
|
||||
crash. */
|
||||
else
|
||||
{
|
||||
|
|
|
@ -281,11 +281,15 @@ void quotation_jit::iterate_quotation()
|
|||
/* Method dispatch */
|
||||
if(mega_lookup_p(i,length))
|
||||
{
|
||||
fixnum index = untag_fixnum(array_nth(elements.untagged(),i + 1));
|
||||
/* Load the object from the datastack, then remove our stack frame. */
|
||||
emit_with_literal(parent->special_objects[PIC_LOAD],tag_fixnum(-index * sizeof(cell)));
|
||||
emit_epilog(safepoint, stack_frame);
|
||||
tail_call = true;
|
||||
|
||||
emit_mega_cache_lookup(
|
||||
array_nth(elements.untagged(),i),
|
||||
untag_fixnum(array_nth(elements.untagged(),i + 1)),
|
||||
index,
|
||||
array_nth(elements.untagged(),i + 2));
|
||||
i += 3;
|
||||
}
|
||||
|
|
|
@ -406,6 +406,7 @@ struct factor_vm
|
|||
void print_datastack();
|
||||
void print_retainstack();
|
||||
void print_callstack();
|
||||
void print_callstack_object(callstack *obj);
|
||||
void dump_cell(cell x);
|
||||
void dump_memory(cell from, cell to);
|
||||
template<typename Generation> void dump_generation(const char *name, Generation *gen);
|
||||
|
|
Loading…
Reference in New Issue