Smaller code formatting changes.
authorlateralusX <lateralusx.github@gmail.com>
Thu, 2 Mar 2017 11:36:11 +0000 (12:36 +0100)
committerlateralusX <lateralusx.github@gmail.com>
Thu, 2 Mar 2017 11:36:11 +0000 (12:36 +0100)
mono/mini/exceptions-amd64.c
mono/mini/mini-amd64.c
mono/mini/mini-amd64.h
mono/mini/mini-windows-dlldac.c

index 79ed9b33755ebeb1833c8237e1be4bfebbe81321..5c84cf3aa4f169b502888483f58701e5466aa716 100644 (file)
@@ -919,7 +919,7 @@ mono_arch_unwindinfo_add_push_nonvol (PUNWIND_INFO unwindinfo, MonoUnwindOp *unw
                g_error ("Larger allocation needed for the unwind information.");
 
        codeindex = MONO_MAX_UNWIND_CODES - (++unwindinfo->CountOfCodes);
-       unwindcode = &unwindinfo->UnwindCode[codeindex];
+       unwindcode = &unwindinfo->UnwindCode [codeindex];
        unwindcode->UnwindOp = UWOP_PUSH_NONVOL;
        unwindcode->CodeOffset = (guchar)unwind_op->when;
        unwindcode->OpInfo = unwind_op->reg;
@@ -942,11 +942,11 @@ mono_arch_unwindinfo_add_set_fpreg (PUNWIND_INFO unwindinfo, MonoUnwindOp *unwin
                g_error ("Larger allocation needed for the unwind information.");
 
        codeindex = MONO_MAX_UNWIND_CODES - (++unwindinfo->CountOfCodes);
-       unwindcode = &unwindinfo->UnwindCode[codeindex];
+       unwindcode = &unwindinfo->UnwindCode [codeindex];
        unwindcode->UnwindOp = UWOP_SET_FPREG;
        unwindcode->CodeOffset = (guchar)unwind_op->when;
 
-       g_assert(unwind_op->val % 16 == 0);
+       g_assert (unwind_op->val % 16 == 0);
        unwindinfo->FrameRegister = unwind_op->reg;
        unwindinfo->FrameOffset = unwind_op->val / 16;
 
@@ -982,7 +982,7 @@ mono_arch_unwindinfo_add_alloc_stack (PUNWIND_INFO unwindinfo, MonoUnwindOp *unw
                g_error ("Larger allocation needed for the unwind information.");
 
        codeindex = MONO_MAX_UNWIND_CODES - (unwindinfo->CountOfCodes += codesneeded);
-       unwindcode = &unwindinfo->UnwindCode[codeindex];
+       unwindcode = &unwindinfo->UnwindCode [codeindex];
 
        unwindcode->CodeOffset = (guchar)unwind_op->when;
 
@@ -1042,9 +1042,9 @@ static RtlDeleteGrowableFunctionTablePtr g_rtl_delete_growable_function_table;
 // When using function table callback solution an out of proc module is needed by
 // debuggers in order to read unwind info from debug target.
 #ifdef _MSC_VER
-#define MONO_DAC_MODULE L"mono-2.0-dac-sgen.dll"
+#define MONO_DAC_MODULE TEXT("mono-2.0-dac-sgen.dll")
 #else
-#define MONO_DAC_MODULE L"mono-2.0-sgen.dll"
+#define MONO_DAC_MODULE TEXT("mono-2.0-sgen.dll")
 #endif
 
 #define MONO_DAC_MODULE_MAX_PATH 1024
@@ -1344,14 +1344,14 @@ mono_arch_unwindinfo_insert_range_in_table (const gpointer code_block, gsize blo
 
                                        // DAC module should be in the same directory as the
                                        // main executable.
-                                       GetModuleFileNameW (NULL, buffer, G_N_ELEMENTS (buffer));
+                                       GetModuleFileNameW (NULL, buffer, G_N_ELEMENTS(buffer));
                                        path = wcsrchr (buffer, TEXT('\\'));
                                        if (path != NULL) {
                                                path++;
                                                *path = TEXT('\0');
                                        }
 
-                                       wcscat_s (buffer, G_N_ELEMENTS (buffer), MONO_DAC_MODULE);
+                                       wcscat_s (buffer, G_N_ELEMENTS(buffer), MONO_DAC_MODULE);
                                        path = buffer;
 
                                        // Register function table callback + out of proc module.
@@ -1383,7 +1383,7 @@ mono_arch_unwindinfo_remove_range_in_table_no_lock (GList *entry)
                if (entry == g_dynamic_function_table_end)
                        g_dynamic_function_table_end = entry->prev;
 
-               g_dynamic_function_table_begin = g_list_remove_link(g_dynamic_function_table_begin, entry);
+               g_dynamic_function_table_begin = g_list_remove_link (g_dynamic_function_table_begin, entry);
                DynamicFunctionTableEntry *removed_entry = (DynamicFunctionTableEntry *)entry->data;
 
                g_assert_checked (removed_entry != NULL);
@@ -1579,7 +1579,7 @@ mono_arch_unwindinfo_insert_rt_func_in_table (const gpointer code, gsize code_si
                                        }
 
                                        if (current_rt_funcs [from_index].UnwindData != 0)
-                                               new_rt_funcs[to_index++] = current_rt_funcs [from_index];
+                                               new_rt_funcs [to_index++] = current_rt_funcs [from_index];
                                }
 
                                // If we didn't insert by now, put it last in the list.
index 62a3c0863bfcd824affa9e74e63b457ce7406726..db13e665ccc4e9d1d30545fe95f511bee33eae88 100644 (file)
@@ -6486,10 +6486,10 @@ mono_arch_register_lowlevel_calls (void)
 
 #if defined(TARGET_WIN32) || defined(HOST_WIN32)
 #if _MSC_VER
-       extern void __chkstk(void);
+       extern void __chkstk (void);
        mono_register_jit_icall_full (__chkstk, "mono_chkstk_win64", NULL, TRUE, FALSE, "__chkstk");
 #else
-       extern void ___chkstk_ms(void);
+       extern void ___chkstk_ms (void);
        mono_register_jit_icall_full (___chkstk_ms, "mono_chkstk_win64", NULL, TRUE, FALSE, "___chkstk_ms");
 #endif
 #endif
@@ -6562,7 +6562,7 @@ get_max_epilog_size (MonoCompile *cfg)
 
 #ifdef TARGET_WIN32
 guint8 *
-mono_arch_emit_prolog_setup_sp_win64(MonoCompile *cfg, guint8 *code, int alloc_size, int *cfa_offset_input)
+mono_arch_emit_prolog_setup_sp_win64 (MonoCompile *cfg, guint8 *code, int alloc_size, int *cfa_offset_input)
 {
        int cfa_offset = *cfa_offset_input;
 
@@ -6696,7 +6696,7 @@ mono_arch_emit_prolog (MonoCompile *cfg)
 
        /* Allocate stack frame */
 #ifdef TARGET_WIN32
-       code = mono_arch_emit_prolog_setup_sp_win64(cfg, code, alloc_size, &cfa_offset);
+       code = mono_arch_emit_prolog_setup_sp_win64 (cfg, code, alloc_size, &cfa_offset);
 #else
        if (alloc_size) {
                /* See mono_emit_stack_alloc */
index bc4614444a8226953b84bb6635d10eb3e9c3d00e..b857422ef643190d19d9fd8ac901a2956220d1f1 100644 (file)
@@ -555,11 +555,6 @@ typedef struct _UNWIND_INFO {
  *     OPTIONAL ULONG ExceptionData[]; */
 } UNWIND_INFO, *PUNWIND_INFO;
 
-//typedef struct
-//{
-//     UNWIND_INFO unwindInfo;
-//} MonoUnwindInfo, *PMonoUnwindInfo;
-
 inline guint
 mono_arch_unwindinfo_get_size (guchar code_count)
 {
@@ -574,13 +569,23 @@ mono_arch_unwindinfo_get_size (guchar code_count)
                (sizeof (UNWIND_CODE) * ((MONO_MAX_UNWIND_CODES - ((code_count + 1) & ~1))));
 }
 
-guchar mono_arch_unwindinfo_get_code_count (GSList *unwind_ops);
-guint mono_arch_unwindinfo_init_method_unwind_info (gpointer cfg);
-void mono_arch_unwindinfo_install_method_unwind_info (gpointer *monoui, gpointer code, guint code_size);
-void mono_arch_unwindinfo_install_tramp_unwind_info (GSList *unwind_ops, gpointer code, guint code_size);
+guchar
+mono_arch_unwindinfo_get_code_count (GSList *unwind_ops);
+
+guint
+mono_arch_unwindinfo_init_method_unwind_info (gpointer cfg);
 
-void mono_arch_code_chunk_new (void *chunk, int size);
-void mono_arch_code_chunk_destroy (void *chunk);
+void
+mono_arch_unwindinfo_install_method_unwind_info (gpointer *monoui, gpointer code, guint code_size);
+
+void
+mono_arch_unwindinfo_install_tramp_unwind_info (GSList *unwind_ops, gpointer code, guint code_size);
+
+void
+mono_arch_code_chunk_new (void *chunk, int size);
+
+void
+mono_arch_code_chunk_destroy (void *chunk);
 
 #endif /* G_HAVE_API_SUPPORT(HAVE_CLASSIC_WINAPI_SUPPORT) */
 #endif /* defined(TARGET_WIN32) && !defined(DISABLE_JIT) */
index 1654fc62ff530eaee474555502a5ce3dc228992f..5d19a1635469d42c8e6f8fde433b24cb6ddd38d5 100644 (file)
@@ -31,12 +31,15 @@ typedef struct _DYNAMIC_FUNCTION_TABLE {
 } DYNAMIC_FUNCTION_TABLE, *PDYNAMIC_FUNCTION_TABLE;
 
 typedef BOOL (ReadMemoryFunction)(PVOID user_context, LPCVOID base_address, PVOID buffer, SIZE_T size, SIZE_T *read);
-BOOL read_memory(PVOID user_context, LPCVOID base_address, PVOID buffer, SIZE_T size, SIZE_T* read)
+
+BOOL
+read_memory(PVOID user_context, LPCVOID base_address, PVOID buffer, SIZE_T size, SIZE_T* read)
 {
-    return ReadProcessMemory((HANDLE)user_context, base_address, buffer, size, read);
+    return ReadProcessMemory ((HANDLE)user_context, base_address, buffer, size, read);
 }
 
-MONO_API_EXPORT DWORD OutOfProcessFunctionTableCallbackEx (ReadMemoryFunction read_memory, PVOID user_context, PVOID table_address, PDWORD entries, PRUNTIME_FUNCTION *functions)
+MONO_API_EXPORT DWORD
+OutOfProcessFunctionTableCallbackEx (ReadMemoryFunction read_memory, PVOID user_context, PVOID table_address, PDWORD entries, PRUNTIME_FUNCTION *functions)
 {
        DYNAMIC_FUNCTION_TABLE func_table = { 0 };
        DynamicFunctionTableEntry func_table_entry = { 0 };
@@ -62,14 +65,16 @@ MONO_API_EXPORT DWORD OutOfProcessFunctionTableCallbackEx (ReadMemoryFunction re
        return result;
 }
 
-MONO_API_EXPORT DWORD OutOfProcessFunctionTableCallback (HANDLE process, PVOID table_address, PDWORD entries, PRUNTIME_FUNCTION *functions)
+MONO_API_EXPORT DWORD
+OutOfProcessFunctionTableCallback (HANDLE process, PVOID table_address, PDWORD entries, PRUNTIME_FUNCTION *functions)
 {
        return OutOfProcessFunctionTableCallbackEx (&read_memory, process, table_address, entries, functions);
 }
 #endif /* defined(TARGET_AMD64) && !defined(DISABLE_JIT) */
 
 #ifdef _MSC_VER
-BOOL APIENTRY DllMain (HMODULE module_handle, DWORD reason, LPVOID reserved)
+BOOL APIENTRY
+DllMain (HMODULE module_handle, DWORD reason, LPVOID reserved)
 {
        return TRUE;
 }