From: Phil Dawes Date: Tue, 1 Sep 2009 18:40:03 +0000 (+0100) Subject: removed vm ptr from mach_signal and some other places X-Git-Tag: 0.97~5502^2~2^2~18 X-Git-Url: https://gitweb.factorcode.org/gitweb.cgi?p=factor.git;a=commitdiff_plain;h=9e460f6decdc801be87423b81ca7f24146fe0af8 removed vm ptr from mach_signal and some other places --- diff --git a/vm/mach_signal.cpp b/vm/mach_signal.cpp index ecded49c0f..03a6ca2b72 100644 --- a/vm/mach_signal.cpp +++ b/vm/mach_signal.cpp @@ -41,18 +41,18 @@ 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(vm->in_code_heap_p(MACH_PROGRAM_COUNTER(thread_state))) - vm->signal_callstack_top = (stack_frame *)MACH_STACK_POINTER(thread_state); + if(SIGNAL_VM_PTR()->in_code_heap_p(MACH_PROGRAM_COUNTER(thread_state))) + SIGNAL_VM_PTR()->signal_callstack_top = (stack_frame *)MACH_STACK_POINTER(thread_state); /* Are we in C? Then use the saved callstack top */ else - vm->signal_callstack_top = NULL; + SIGNAL_VM_PTR()->signal_callstack_top = NULL; MACH_STACK_POINTER(thread_state) = fix_stack_pointer(MACH_STACK_POINTER(thread_state)); /* Now we point the program counter at the right handler function. */ if(exception == EXC_BAD_ACCESS) { - vm->signal_fault_addr = MACH_EXC_STATE_FAULT(exc_state); + SIGNAL_VM_PTR()->signal_fault_addr = MACH_EXC_STATE_FAULT(exc_state); MACH_PROGRAM_COUNTER(thread_state) = (cell)memory_signal_handler_impl; } else if(exception == EXC_ARITHMETIC && code != MACH_EXC_INTEGER_DIV) @@ -63,7 +63,7 @@ static void call_fault_handler( } else { - vm->signal_number = (exception == EXC_ARITHMETIC ? SIGFPE : SIGABRT); + SIGNAL_VM_PTR()->signal_number = (exception == EXC_ARITHMETIC ? SIGFPE : SIGABRT); MACH_PROGRAM_COUNTER(thread_state) = (cell)misc_signal_handler_impl; } } diff --git a/vm/os-freebsd.cpp b/vm/os-freebsd.cpp index 64c8ac19da..d259658284 100644 --- a/vm/os-freebsd.cpp +++ b/vm/os-freebsd.cpp @@ -33,7 +33,7 @@ const char *vm_executable_path() if(strcmp(path, "unknown") == 0) return NULL; - return vm->safe_strdup(path); + return safe_strdup(path); } } diff --git a/vm/os-linux-arm.cpp b/vm/os-linux-arm.cpp index 9a9ce7ada5..0f459d5ec5 100644 --- a/vm/os-linux-arm.cpp +++ b/vm/os-linux-arm.cpp @@ -25,7 +25,7 @@ void flush_icache(cell start, cell len) : "r0","r1","r2"); if(result < 0) - vm->critical_error("flush_icache() failed",result); + SIGNAL_VM_PTR->critical_error("flush_icache() failed",result); } } diff --git a/vm/os-linux.cpp b/vm/os-linux.cpp index 7929701d41..66b197e7c9 100644 --- a/vm/os-linux.cpp +++ b/vm/os-linux.cpp @@ -42,19 +42,19 @@ VM_C_API int inotify_rm_watch(int fd, u32 wd) VM_C_API int inotify_init() { - vm->not_implemented_error(); + VM_PTR->not_implemented_error(); return -1; } VM_C_API int inotify_add_watch(int fd, const char *name, u32 mask) { - vm->not_implemented_error(); + VM_PTR->not_implemented_error(); return -1; } VM_C_API int inotify_rm_watch(int fd, u32 wd) { - vm->not_implemented_error(); + VM_PTR->not_implemented_error(); return -1; }