return unbox_alien() + offset;
}
-void *alien_pointer()
-{
- return vm->alien_pointer();
-}
-
-
/* define words to read/write values at an alien address */
#define DEFINE_ALIEN_ACCESSOR(name,type,boxer,to) \
PRIMITIVE(alien_##name) \
VM_C_API char *unbox_alien()
{
- printf("*PHIL unbox_alien\n");fflush(stdout);
+ printf("PHIL unbox_alien\n");fflush(stdout);
return vm->unbox_alien();
}
new_heap(&code,size);
}
-
bool factorvm::in_code_heap_p(cell ptr)
{
return (ptr >= code.seg->start && ptr <= code.seg->end);
}
-bool in_code_heap_p(cell ptr)
-{
- return vm->in_code_heap_p(ptr); // used by os specific signal handlers
-}
-
/* Compile a word definition with the non-optimizing compiler. Allocates memory */
void factorvm::jit_compile_word(cell word_, cell def_, bool relocate)
{
namespace factor
{
-
-bool in_code_heap_p(cell ptr); // Used by platform specific code
-
struct factorvm;
typedef void (*code_heap_iterator)(code_block *compiled,factorvm *myvm);
a divide by zero or stack underflow in the listener */
/* Are we in compiled Factor code? Then use the current stack pointer */
- if(in_code_heap_p(MACH_PROGRAM_COUNTER(thread_state)))
+ if(vm->in_code_heap_p(MACH_PROGRAM_COUNTER(thread_state)))
signal_callstack_top = (stack_frame *)MACH_STACK_POINTER(thread_state);
/* Are we in C? Then use the saved callstack top */
else
delivered during stack frame setup/teardown or while transitioning
from Factor to C is a sign of things seriously gone wrong, not just
a divide by zero or stack underflow in the listener */
- if(in_code_heap_p(UAP_PROGRAM_COUNTER(uap)))
+ if(vm->in_code_heap_p(UAP_PROGRAM_COUNTER(uap)))
{
stack_frame *ptr = (stack_frame *)ucontext_stack_pointer(uap);
if(!ptr)
PEXCEPTION_RECORD e = (PEXCEPTION_RECORD)pe->ExceptionRecord;
CONTEXT *c = (CONTEXT*)pe->ContextRecord;
- if(in_code_heap_p(c->EIP))
+ if(vm->in_code_heap_p(c->EIP))
signal_callstack_top = (stack_frame *)c->ESP;
else
signal_callstack_top = NULL;