]> gitweb.factorcode.org Git - factor.git/commitdiff
vm: hard tabs, indent width 8
authorSlava Pestov <slava@factorcode.org>
Tue, 3 Aug 2010 00:50:34 +0000 (20:50 -0400)
committerSlava Pestov <slava@factorcode.org>
Tue, 3 Aug 2010 00:50:34 +0000 (20:50 -0400)
vm/mach_signal.hpp
vm/os-macosx-ppc.hpp
vm/os-macosx-x86.32.hpp
vm/os-macosx-x86.64.hpp
vm/os-windows.cpp
vm/run.cpp

index e17fbf399650268a2e32c0d419986dc40d643a33..a1961359d1a58b0036b47655d0e70f96190790a3 100644 (file)
@@ -44,36 +44,36 @@ extern "C" boolean_t exc_server (mach_msg_header_t *request_msg, mach_msg_header
 extern "C"
 kern_return_t
 catch_exception_raise (mach_port_t exception_port,
-                       mach_port_t thread,
-                       mach_port_t task,
-                       exception_type_t exception,
-                       exception_data_t code,
-                       mach_msg_type_number_t code_count);
+                      mach_port_t thread,
+                      mach_port_t task,
+                      exception_type_t exception,
+                      exception_data_t code,
+                      mach_msg_type_number_t code_count);
 extern "C"
 kern_return_t
 catch_exception_raise_state (mach_port_t exception_port,
-                             exception_type_t exception,
-                             exception_data_t code,
-                             mach_msg_type_number_t code_count,
-                             thread_state_flavor_t *flavor,
-                             thread_state_t in_state,
-                             mach_msg_type_number_t in_state_count,
-                             thread_state_t out_state,
-                             mach_msg_type_number_t *out_state_count);
+                            exception_type_t exception,
+                            exception_data_t code,
+                            mach_msg_type_number_t code_count,
+                            thread_state_flavor_t *flavor,
+                            thread_state_t in_state,
+                            mach_msg_type_number_t in_state_count,
+                            thread_state_t out_state,
+                            mach_msg_type_number_t *out_state_count);
 
 extern "C"
 kern_return_t
 catch_exception_raise_state_identity (mach_port_t exception_port,
-                                      mach_port_t thread,
-                                      mach_port_t task,
-                                      exception_type_t exception,
-                                      exception_data_t code,
-                                      mach_msg_type_number_t codeCnt,
-                                      thread_state_flavor_t *flavor,
-                                      thread_state_t in_state,
-                                      mach_msg_type_number_t in_state_count,
-                                      thread_state_t out_state,
-                                      mach_msg_type_number_t *out_state_count);
+                                     mach_port_t thread,
+                                     mach_port_t task,
+                                     exception_type_t exception,
+                                     exception_data_t code,
+                                     mach_msg_type_number_t codeCnt,
+                                     thread_state_flavor_t *flavor,
+                                     thread_state_t in_state,
+                                     mach_msg_type_number_t in_state_count,
+                                     thread_state_t out_state,
+                                     mach_msg_type_number_t *out_state_count);
 
 namespace factor
 {
index 90da9a26f3108ced64939f2f0d65bf5b453fa0f6..8931d4c7db3179c543e8e324749758f2927e02ba 100644 (file)
@@ -34,23 +34,23 @@ Modified for Factor by Slava Pestov */
        #define MACH_STACK_POINTER(thr_state) (thr_state)->__r1
        #define MACH_PROGRAM_COUNTER(thr_state) (thr_state)->__srr0
 
-        #define UAP_SS(ucontext) &(((ucontext_t *)(ucontext))->uc_mcontext->__ss)
-        #define UAP_FS(ucontext) &(((ucontext_t *)(ucontext))->uc_mcontext->__fs)
+       #define UAP_SS(ucontext) &(((ucontext_t *)(ucontext))->uc_mcontext->__ss)
+       #define UAP_FS(ucontext) &(((ucontext_t *)(ucontext))->uc_mcontext->__fs)
 
-        #define FPSCR(float_state) (float_state)->__fpscr
+       #define FPSCR(float_state) (float_state)->__fpscr
 #else
        #define MACH_EXC_STATE_FAULT(exc_state) (exc_state)->dar
        #define MACH_STACK_POINTER(thr_state) (thr_state)->r1
        #define MACH_PROGRAM_COUNTER(thr_state) (thr_state)->srr0
 
-        #define UAP_SS(ucontext) &(((ucontext_t *)(ucontext))->uc_mcontext->ss)
-        #define UAP_FS(ucontext) &(((ucontext_t *)(ucontext))->uc_mcontext->fs)
+       #define UAP_SS(ucontext) &(((ucontext_t *)(ucontext))->uc_mcontext->ss)
+       #define UAP_FS(ucontext) &(((ucontext_t *)(ucontext))->uc_mcontext->fs)
 
-        #define FPSCR(float_state) (float_state)->fpscr
+       #define FPSCR(float_state) (float_state)->fpscr
 #endif
 
 #define UAP_PROGRAM_COUNTER(ucontext) \
-        MACH_PROGRAM_COUNTER(UAP_SS(ucontext))
+       MACH_PROGRAM_COUNTER(UAP_SS(ucontext))
 
 inline static unsigned int mach_fpu_status(ppc_float_state_t *float_state)
 {
index 3d754ae9e48c0b00c2f774d7074564fa0132ddc1..12a351ae58e264ab29a870c30695eaa0efc1ce5a 100644 (file)
@@ -32,25 +32,25 @@ Modified for Factor by Slava Pestov */
        #define MACH_STACK_POINTER(thr_state) (thr_state)->__esp
        #define MACH_PROGRAM_COUNTER(thr_state) (thr_state)->__eip
 
-        #define UAP_SS(ucontext) &(((ucontext_t *)(ucontext))->uc_mcontext->__ss)
-        #define UAP_FS(ucontext) &(((ucontext_t *)(ucontext))->uc_mcontext->__fs)
+       #define UAP_SS(ucontext) &(((ucontext_t *)(ucontext))->uc_mcontext->__ss)
+       #define UAP_FS(ucontext) &(((ucontext_t *)(ucontext))->uc_mcontext->__fs)
 
-        #define MXCSR(float_state) (float_state)->__fpu_mxcsr
-        #define X87SW(float_state) (float_state)->__fpu_fsw
+       #define MXCSR(float_state) (float_state)->__fpu_mxcsr
+       #define X87SW(float_state) (float_state)->__fpu_fsw
 #else
        #define MACH_EXC_STATE_FAULT(exc_state) (exc_state)->faultvaddr
        #define MACH_STACK_POINTER(thr_state) (thr_state)->esp
        #define MACH_PROGRAM_COUNTER(thr_state) (thr_state)->eip
 
-        #define UAP_SS(ucontext) &(((ucontext_t *)(ucontext))->uc_mcontext->ss)
-        #define UAP_FS(ucontext) &(((ucontext_t *)(ucontext))->uc_mcontext->fs)
+       #define UAP_SS(ucontext) &(((ucontext_t *)(ucontext))->uc_mcontext->ss)
+       #define UAP_FS(ucontext) &(((ucontext_t *)(ucontext))->uc_mcontext->fs)
 
-        #define MXCSR(float_state) (float_state)->fpu_mxcsr
-        #define X87SW(float_state) (float_state)->fpu_fsw
+       #define MXCSR(float_state) (float_state)->fpu_mxcsr
+       #define X87SW(float_state) (float_state)->fpu_fsw
 #endif
 
 #define UAP_PROGRAM_COUNTER(ucontext) \
-        MACH_PROGRAM_COUNTER(UAP_SS(ucontext))
+       MACH_PROGRAM_COUNTER(UAP_SS(ucontext))
 
 inline static unsigned int mach_fpu_status(i386_float_state_t *float_state)
 {
@@ -66,8 +66,8 @@ inline static unsigned int uap_fpu_status(void *uap)
 
 inline static void mach_clear_fpu_status(i386_float_state_t *float_state)
 {
-        MXCSR(float_state) &= 0xffffffc0;
-        memset(&X87SW(float_state), 0, sizeof(X87SW(float_state)));
+       MXCSR(float_state) &= 0xffffffc0;
+       memset(&X87SW(float_state), 0, sizeof(X87SW(float_state)));
 }
 
 inline static void uap_clear_fpu_status(void *uap)
index 7cef436327076d200392898a3f80d9f99e6c3f7f..a9fcb9f274cf810a8822a4b60476df4f7c0c218d 100644 (file)
@@ -31,24 +31,24 @@ Modified for Factor by Slava Pestov and Daniel Ehrenberg */
        #define MACH_EXC_STATE_FAULT(exc_state) (exc_state)->__faultvaddr
        #define MACH_STACK_POINTER(thr_state) (thr_state)->__rsp
        #define MACH_PROGRAM_COUNTER(thr_state) (thr_state)->__rip
-        #define UAP_SS(ucontext) &(((ucontext_t *)(ucontext))->uc_mcontext->__ss)
-        #define UAP_FS(ucontext) &(((ucontext_t *)(ucontext))->uc_mcontext->__fs)
+       #define UAP_SS(ucontext) &(((ucontext_t *)(ucontext))->uc_mcontext->__ss)
+       #define UAP_FS(ucontext) &(((ucontext_t *)(ucontext))->uc_mcontext->__fs)
 
-        #define MXCSR(float_state) (float_state)->__fpu_mxcsr
-        #define X87SW(float_state) (float_state)->__fpu_fsw
+       #define MXCSR(float_state) (float_state)->__fpu_mxcsr
+       #define X87SW(float_state) (float_state)->__fpu_fsw
 #else
        #define MACH_EXC_STATE_FAULT(exc_state) (exc_state)->faultvaddr
        #define MACH_STACK_POINTER(thr_state) (thr_state)->rsp
        #define MACH_PROGRAM_COUNTER(thr_state) (thr_state)->rip
-        #define UAP_SS(ucontext) &(((ucontext_t *)(ucontext))->uc_mcontext->ss)
-        #define UAP_FS(ucontext) &(((ucontext_t *)(ucontext))->uc_mcontext->fs)
+       #define UAP_SS(ucontext) &(((ucontext_t *)(ucontext))->uc_mcontext->ss)
+       #define UAP_FS(ucontext) &(((ucontext_t *)(ucontext))->uc_mcontext->fs)
 
-        #define MXCSR(float_state) (float_state)->fpu_mxcsr
-        #define X87SW(float_state) (float_state)->fpu_fsw
+       #define MXCSR(float_state) (float_state)->fpu_mxcsr
+       #define X87SW(float_state) (float_state)->fpu_fsw
 #endif
 
 #define UAP_PROGRAM_COUNTER(ucontext) \
-        MACH_PROGRAM_COUNTER(UAP_SS(ucontext))
+       MACH_PROGRAM_COUNTER(UAP_SS(ucontext))
 
 inline static unsigned int mach_fpu_status(x86_float_state64_t *float_state)
 {
index 9d4b662f37d595f4a5d93c01ad1a5323fe2043b8..b9af2ec054ea609f058db9207b2ab30dccaf3038 100755 (executable)
@@ -58,7 +58,7 @@ BOOL factor_vm::windows_stat(vm_char *path)
 void factor_vm::windows_image_path(vm_char *full_path, vm_char *temp_path, unsigned int length)
 {
        wcsncpy(temp_path, full_path, length - 1);
-        size_t full_path_len = wcslen(full_path);
+       size_t full_path_len = wcslen(full_path);
        if (full_path_len < length - 1)
                wcsncat(temp_path, L".image", length - full_path_len - 1);
        temp_path[length - 1] = 0;
@@ -78,7 +78,7 @@ const vm_char *factor_vm::default_image_path()
                *ptr = 0;
 
        wcsncpy(temp_path, full_path, MAX_UNICODE_PATH - 1);
-        size_t full_path_len = wcslen(full_path);
+       size_t full_path_len = wcslen(full_path);
        if (full_path_len < MAX_UNICODE_PATH - 1)
                wcsncat(temp_path, L".image", MAX_UNICODE_PATH - full_path_len - 1);
        temp_path[MAX_UNICODE_PATH - 1] = 0;
index 00d15fc42a5aacd2cf4a3ea722be2ab257f324ad..f545340221c6ce003c308b1673e8796cf1609a8e 100755 (executable)
@@ -11,12 +11,13 @@ void factor_vm::primitive_exit()
 void factor_vm::primitive_nano_count()
 {
        u64 nanos = nano_count();
-       if(nanos < last_nano_count) {
-            std::cout << "Monotonic counter decreased from 0x";
-            std::cout << std::hex << last_nano_count;
-            std::cout << " to 0x" << nanos << "." << std::dec << "\n";
-            std::cout << "Please report this error.\n";
-            current_vm()->factorbug();
+       if(nanos < last_nano_count)
+       {
+               std::cout << "Monotonic counter decreased from 0x";
+               std::cout << std::hex << last_nano_count;
+               std::cout << " to 0x" << nanos << "." << std::dec << "\n";
+               std::cout << "Please report this error.\n";
+               current_vm()->factorbug();
        }
        last_nano_count = nanos;
        ctx->push(from_unsigned_8(nanos));