]> gitweb.factorcode.org Git - factor.git/commitdiff
removed some vm-> forwarding functions
authorPhil Dawes <phil@phildawes.net>
Sun, 23 Aug 2009 20:19:35 +0000 (21:19 +0100)
committerPhil Dawes <phil@phildawes.net>
Wed, 16 Sep 2009 07:17:26 +0000 (08:17 +0100)
vm/alien.cpp
vm/code_heap.cpp
vm/code_heap.hpp
vm/mach_signal.cpp
vm/os-unix.cpp
vm/os-windows-nt.cpp

index bed24d1037d8fdb1e1e29657733027e6a0797871..282f5c2fc99c0552a9a270a17052539070512d42 100755 (executable)
@@ -93,12 +93,6 @@ void *factorvm::alien_pointer()
        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) \
@@ -232,7 +226,7 @@ char *factorvm::unbox_alien()
 
 VM_C_API char *unbox_alien()
 {
-       printf("*PHIL unbox_alien\n");fflush(stdout);
+       printf("PHIL unbox_alien\n");fflush(stdout);
        return vm->unbox_alien();
 }
 
index d91e349db77328811b83d879816e6d3e0bbcc3cd..372e194cf6c2b5e05b61f65d877858aa211fe124 100755 (executable)
@@ -9,17 +9,11 @@ void factorvm::init_code_heap(cell size)
        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)
 {
index 32e1dacfeed3bef6c24417f039ba9d465945b0e7..a357699591b9bae7a86a425ecd6583c5541b7331 100755 (executable)
@@ -1,8 +1,5 @@
 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);
 
index d8eea06f0b81b62bb67c6153201a055952e0c19d..df5d78d35ee99f70638188a1f3ca51b06d32749e 100644 (file)
@@ -41,7 +41,7 @@ static void call_fault_handler(
        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
index 67327e7d301c9a44c05e262f05dd1c982ac4b8b4..c96addb6f4bb29184dbe7ddc33be20adf14848a5 100644 (file)
@@ -107,7 +107,7 @@ static stack_frame *uap_stack_pointer(void *uap)
        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)
index 9187b88986842a2337b6b073bda7b47e7236c2d0..49594ed14a8d5c63235ce1047dcc9f966631a3f8 100755 (executable)
@@ -21,7 +21,7 @@ FACTOR_STDCALL LONG exception_handler(PEXCEPTION_POINTERS pe)
        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;