diff options
-rw-r--r-- | eng/native/functions.cmake | 9 | ||||
-rw-r--r-- | src/coreclr/vm/eventing/eventpipe/CMakeLists.txt | 8 | ||||
-rw-r--r-- | src/mono/CMakeLists.txt | 1 | ||||
-rw-r--r-- | src/mono/cmake/config.h.in | 21 | ||||
-rw-r--r-- | src/mono/cmake/defines-todo.cmake | 6 | ||||
-rw-r--r-- | src/mono/dlls/dbgshim/CMakeLists.txt | 3 | ||||
-rw-r--r-- | src/mono/dlls/mscordbi/CMakeLists.txt | 3 | ||||
-rw-r--r-- | src/mono/mono/eventpipe/gen-eventing.cmake | 4 | ||||
-rw-r--r-- | src/mono/mono/metadata/class.c | 210 | ||||
-rw-r--r-- | src/mono/mono/mini/CMakeLists.txt | 8 | ||||
-rw-r--r-- | src/mono/mono/mini/mini-generic-sharing.c | 12 | ||||
-rw-r--r-- | src/mono/mono/mini/simd-intrinsics.c | 2 |
12 files changed, 126 insertions, 161 deletions
diff --git a/eng/native/functions.cmake b/eng/native/functions.cmake index 66a91ca0af8..9edddb6aef9 100644 --- a/eng/native/functions.cmake +++ b/eng/native/functions.cmake @@ -75,6 +75,15 @@ function(get_include_directories_asm IncludeDirectories) set(${IncludeDirectories} ${INC_DIRECTORIES} PARENT_SCOPE) endfunction(get_include_directories_asm) +# Adds prefix to paths list +function(addprefix var prefix list) + set(f) + foreach(i ${list}) + set(f ${f} ${prefix}/${i}) + endforeach() + set(${var} ${f} PARENT_SCOPE) +endfunction() + # Finds and returns unwind libs function(find_unwind_libs UnwindLibs) if(CLR_CMAKE_HOST_ARCH_ARM) diff --git a/src/coreclr/vm/eventing/eventpipe/CMakeLists.txt b/src/coreclr/vm/eventing/eventpipe/CMakeLists.txt index 46a11ee8602..51c6e0a2888 100644 --- a/src/coreclr/vm/eventing/eventpipe/CMakeLists.txt +++ b/src/coreclr/vm/eventing/eventpipe/CMakeLists.txt @@ -1,13 +1,5 @@ include(FindPythonInterp) -function(addprefix var prefix list) - set(f) - foreach(i ${list}) - set(f ${f} ${prefix}/${i}) - endforeach() - set(${var} ${f} PARENT_SCOPE) -endfunction() - set(CMAKE_INCLUDE_CURRENT_DIR ON) set(GENERATE_SCRIPT ${CLR_DIR}/scripts/genEventPipe.py) diff --git a/src/mono/CMakeLists.txt b/src/mono/CMakeLists.txt index 7ce13324e2f..9b368a57786 100644 --- a/src/mono/CMakeLists.txt +++ b/src/mono/CMakeLists.txt @@ -7,6 +7,7 @@ endif() project(mono) include(../../eng/native/configurepaths.cmake) +include(${CLR_ENG_NATIVE_DIR}/functions.cmake) set(CMAKE_C_FLAGS_CHECKED "") set(CMAKE_CXX_FLAGS_CHECKED "") diff --git a/src/mono/cmake/config.h.in b/src/mono/cmake/config.h.in index 30f429a7893..65b33364ce0 100644 --- a/src/mono/cmake/config.h.in +++ b/src/mono/cmake/config.h.in @@ -53,24 +53,6 @@ #endif #endif -/* Define to the full name of this package. */ -#cmakedefine PACKAGE_NAME 1 - -/* Define to the one symbol short name of this package. */ -#cmakedefine PACKAGE_TARNAME 1 - -/* Define to the version of this package. */ -#cmakedefine PACKAGE_VERSION 1 - -/* Define to the full name and version of this package. */ -#cmakedefine PACKAGE_STRING 1 - -/* Define to the address where bug reports for this package should be sent. */ -#cmakedefine PACKAGE_BUGREPORT 1 - -/* Define to the home page for this package. */ -#cmakedefine PACKAGE_URL 1 - /* This platform does not support symlinks */ #cmakedefine HOST_NO_SYMLINKS 1 @@ -116,9 +98,6 @@ /* Don't use UWP Windows API support */ #cmakedefine HAVE_UWP_WINAPI_SUPPORT 1 -/* Define to 1 if you have the ANSI C header files. */ -#cmakedefine STDC_HEADERS 1 - /* Define to 1 if you have the <sys/types.h> header file. */ #cmakedefine HAVE_SYS_TYPES_H 1 diff --git a/src/mono/cmake/defines-todo.cmake b/src/mono/cmake/defines-todo.cmake index 8d2828d53e9..24d703d10ad 100644 --- a/src/mono/cmake/defines-todo.cmake +++ b/src/mono/cmake/defines-todo.cmake @@ -14,12 +14,6 @@ #option (HAVE_EPOLL "epoll_create1") #option (USE_KQUEUE_FOR_THREADPOOL "Use kqueue for the threadpool") #option (HAVE_SIOCGIFCONF "Can get interface list") -#option (PACKAGE_NAME "Define to the full name of this package.") -#option (PACKAGE_TARNAME "Define to the one symbol short name of this package.") -#option (PACKAGE_VERSION "Define to the version of this package.") -#option (PACKAGE_STRING "Define to the full name and version of this package.") -#option (PACKAGE_BUGREPORT "Define to the address where bug reports for this package should be sent.") -#option (PACKAGE_URL "Define to the home page for this package.") #option (HOST_NO_SYMLINKS "This platform does not support symlinks") #option (NEED_LINK_UNLINK "Define if Unix sockets cannot be created in an anonymous namespace") #option (HAVE_CLASSIC_WINAPI_SUPPORT "Use classic Windows API support") diff --git a/src/mono/dlls/dbgshim/CMakeLists.txt b/src/mono/dlls/dbgshim/CMakeLists.txt index a8bc91ddb22..2f84b94aa89 100644 --- a/src/mono/dlls/dbgshim/CMakeLists.txt +++ b/src/mono/dlls/dbgshim/CMakeLists.txt @@ -7,8 +7,7 @@ set(CMAKE_CXX_STANDARD 11) set(CMAKE_CXX_STANDARD_REQUIRED ON) set(CLR_CMAKE_RUNTIME_MONO 1) -set(CLR_DIR ${PROJECT_SOURCE_DIR}/../../../coreclr) -set(VM_DIR ${PROJECT_SOURCE_DIR}/../../../coreclr/vm) +set(CLR_DIR ${CLR_REPO_ROOT_DIR}/src/coreclr) set(CMAKE_OSX_ARCHITECTURES ${CMAKE_SYSTEM_PROCESSOR}) set(CMAKE_EXE_LINKER_FLAGS_CHECKED "") set(CMAKE_SHARED_LINKER_FLAGS_CHECKED "") diff --git a/src/mono/dlls/mscordbi/CMakeLists.txt b/src/mono/dlls/mscordbi/CMakeLists.txt index 98059fb1b89..a1ef9088a31 100644 --- a/src/mono/dlls/mscordbi/CMakeLists.txt +++ b/src/mono/dlls/mscordbi/CMakeLists.txt @@ -7,8 +7,7 @@ set(CMAKE_CXX_STANDARD 11) set(CMAKE_CXX_STANDARD_REQUIRED ON) set(CLR_CMAKE_RUNTIME_MONO 1) -set(CLR_DIR ${PROJECT_SOURCE_DIR}/../../../coreclr) -set(VM_DIR ${PROJECT_SOURCE_DIR}/../../../coreclr/vm) +set(CLR_DIR ${CLR_REPO_ROOT_DIR}/src/coreclr) set(CMAKE_OSX_ARCHITECTURES ${CMAKE_SYSTEM_PROCESSOR}) set(CMAKE_EXE_LINKER_FLAGS_CHECKED "") set(CMAKE_SHARED_LINKER_FLAGS_CHECKED "") diff --git a/src/mono/mono/eventpipe/gen-eventing.cmake b/src/mono/mono/eventpipe/gen-eventing.cmake index 71a0520b740..68d50cbd888 100644 --- a/src/mono/mono/eventpipe/gen-eventing.cmake +++ b/src/mono/mono/eventpipe/gen-eventing.cmake @@ -1,6 +1,6 @@ if(ENABLE_PERFTRACING) - set(CORECLR_DIR ${CMAKE_CURRENT_SOURCE_DIR}/../../../coreclr) + set(CORECLR_DIR ${CLR_REPO_ROOT_DIR}/src/coreclr) set(CORECLR_VM_DIR ${CORECLR_DIR}/vm) set(EVENT_MANIFEST ${CORECLR_VM_DIR}/ClrEtwAll.man) @@ -92,7 +92,7 @@ if(ENABLE_PERFTRACING) set_source_files_properties(${MONO_EVENTPIPE_GEN_SOURCES} PROPERTIES GENERATED TRUE) - add_custom_target(${MONO_DIAGNOSTICS_TRACING_COMPONENT_NAME}-gen-sources + add_custom_target(${MONO_DIAGNOSTICS_TRACING_COMPONENT_NAME}-gen-sources DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}/${MONO_DIAGNOSTICS_TRACING_COMPONENT_NAME}-gen-sources.timestamp ${MONO_DIAGNOSTICS_TRACING_COMPONENT_NAME}-gen-headers) else(ENABLE_PERFTRACING) add_custom_target(${MONO_DIAGNOSTICS_TRACING_COMPONENT_NAME}-gen-headers) diff --git a/src/mono/mono/metadata/class.c b/src/mono/mono/metadata/class.c index 076419d0786..978d09ef3f9 100644 --- a/src/mono/mono/metadata/class.c +++ b/src/mono/mono/metadata/class.c @@ -157,7 +157,7 @@ mono_class_from_typeref_checked (MonoImage *image, guint32 type_token, MonoError return NULL; } - enclosing = mono_class_from_typeref_checked (image, MONO_TOKEN_TYPE_REF | idx, error); + enclosing = mono_class_from_typeref_checked (image, MONO_TOKEN_TYPE_REF | idx, error); return_val_if_nok (error, NULL); GList *nested_classes = mono_class_get_nested_classes_property (enclosing); @@ -205,7 +205,7 @@ mono_class_from_typeref_checked (MonoImage *image, guint32 type_token, MonoError MonoAssemblyName aname; memset (&aname, 0, sizeof (MonoAssemblyName)); char *human_name; - + mono_assembly_get_assemblyref (image, idx - 1, &aname); human_name = mono_stringify_assembly_name (&aname); mono_error_set_simple_file_not_found (error, human_name); @@ -233,7 +233,7 @@ mono_image_memdup (MonoImage *image, void *data, guint size) memcpy (res, data, size); return res; } - + /* Copy everything mono_metadata_free_array free. */ MonoArrayType * mono_dup_array_type (MonoImage *image, MonoArrayType *a) @@ -259,13 +259,13 @@ MonoMethodSignature* mono_metadata_signature_deep_dup (MonoImage *image, MonoMethodSignature *sig) { int i; - + sig = mono_metadata_signature_dup_full (image, sig); - + sig->ret = mono_metadata_type_dup (image, sig->ret); for (i = 0; i < sig->param_count; ++i) sig->params [i] = mono_metadata_type_dup (image, sig->params [i]); - + return sig; } @@ -350,7 +350,7 @@ mono_type_get_name_recurse (MonoType *type, GString *str, gboolean is_recursed, MonoTypeNameFormat format) { MonoClass *klass; - + switch (type->type) { case MONO_TYPE_ARRAY: { int i, rank = type->data.array->rank; @@ -371,7 +371,7 @@ mono_type_get_name_recurse (MonoType *type, GString *str, gboolean is_recursed, for (i = 1; i < rank; i++) g_string_append_c (str, ','); g_string_append_c (str, ']'); - + mono_type_name_check_byref (type, str); if (format == MONO_TYPE_NAME_FORMAT_ASSEMBLY_QUALIFIED) @@ -387,7 +387,7 @@ mono_type_get_name_recurse (MonoType *type, GString *str, gboolean is_recursed, mono_type_get_name_recurse ( m_class_get_byval_arg (type->data.klass), str, FALSE, nested_format); g_string_append (str, "[]"); - + mono_type_name_check_byref (type, str); if (format == MONO_TYPE_NAME_FORMAT_ASSEMBLY_QUALIFIED) @@ -478,7 +478,7 @@ mono_type_get_name_recurse (MonoType *type, GString *str, gboolean is_recursed, (t->type != MONO_TYPE_VAR) && (type->type != MONO_TYPE_MVAR)) g_string_append_c (str, ']'); } - if (format == MONO_TYPE_NAME_FORMAT_IL) + if (format == MONO_TYPE_NAME_FORMAT_IL) g_string_append_c (str, '>'); else g_string_append_c (str, ']'); @@ -487,7 +487,7 @@ mono_type_get_name_recurse (MonoType *type, GString *str, gboolean is_recursed, (format != MONO_TYPE_NAME_FORMAT_ASSEMBLY_QUALIFIED)) { int i; - if (format == MONO_TYPE_NAME_FORMAT_IL) + if (format == MONO_TYPE_NAME_FORMAT_IL) g_string_append_c (str, '<'); else g_string_append_c (str, '['); @@ -496,7 +496,7 @@ mono_type_get_name_recurse (MonoType *type, GString *str, gboolean is_recursed, g_string_append_c (str, ','); g_string_append (str, mono_generic_container_get_param_info (mono_class_get_generic_container (klass), i)->name); } - if (format == MONO_TYPE_NAME_FORMAT_IL) + if (format == MONO_TYPE_NAME_FORMAT_IL) g_string_append_c (str, '>'); else g_string_append_c (str, ']'); @@ -516,7 +516,7 @@ mono_type_get_name_recurse (MonoType *type, GString *str, gboolean is_recursed, * \param type a type * \param format the format for the return string. * - * + * * \returns The string representation in a number of formats: * * if \p format is \c MONO_TYPE_NAME_FORMAT_REFLECTION, the return string is @@ -640,7 +640,7 @@ can_inflate_gparam_with (MonoGenericParam *gparam, MonoType *type) { if (!mono_type_is_valid_generic_argument (type)) return FALSE; -#if FALSE +#if 0 /* Avoid inflating gparams with valuetype constraints with ref types during gsharing */ MonoGenericParamInfo *info = mono_generic_param_info (gparam); if (info && (info->flags & GENERIC_PARAMETER_ATTRIBUTE_VALUE_TYPE_CONSTRAINT)) { @@ -700,7 +700,7 @@ inflate_generic_type (MonoImage *image, MonoType *type, MonoGenericContext *cont const char *pname = mono_generic_param_name (gparam); mono_error_set_bad_image (error, image, "MVAR %d (%s) cannot be expanded with type 0x%x", num, pname ? pname : "", inst->type_argv [num]->type); - return NULL; + return NULL; } /* * Note that the VAR/MVAR cases are different from the rest. The other cases duplicate @type, @@ -733,7 +733,7 @@ inflate_generic_type (MonoImage *image, MonoType *type, MonoGenericContext *cont const char *pname = mono_generic_param_name (gparam); mono_error_set_bad_image (error, image, "VAR %d (%s) cannot be expanded with type 0x%x", num, pname ? pname : "", inst->type_argv [num]->type); - return NULL; + return NULL; } #ifdef DEBUG_INFLATE_CMODS @@ -897,7 +897,7 @@ inflate_generic_custom_modifiers (MonoImage *image, const MonoType *type, MonoGe for (int i = 0; i < count; ++i) { if (candidate_mods->modifiers [i].type == NULL) { candidate_mods->modifiers [i].type = mono_metadata_type_dup (NULL, mono_type_get_custom_modifier (type, i, NULL, error)); - + /* it didn't error in the first loop, so should be ok now, too */ mono_error_assert_ok (error); } @@ -985,7 +985,7 @@ mono_class_inflate_generic_type_with_mempool (MonoImage *image, MonoType *type, * \param context a generics context * \deprecated Please use \c mono_class_inflate_generic_type_checked instead * - * If \p type is a generic type and \p context is not NULL, instantiate it using the + * If \p type is a generic type and \p context is not NULL, instantiate it using the * generics context \p context. * * \returns The instantiated type or a copy of \p type. The returned \c MonoType is allocated @@ -1007,7 +1007,7 @@ mono_class_inflate_generic_type (MonoType *type, MonoGenericContext *context) * @context: a generics context * @error: error context to use * - * If @type is a generic type and @context is not NULL, instantiate it using the + * If @type is a generic type and @context is not NULL, instantiate it using the * generics context @context. * * Returns: The instantiated type or a copy of @type. The returned MonoType is allocated @@ -1028,7 +1028,7 @@ mono_class_inflate_generic_type_checked (MonoType *type, MonoGenericContext *con static MonoType* mono_class_inflate_generic_type_no_copy (MonoImage *image, MonoType *type, MonoGenericContext *context, MonoError *error) { - MonoType *inflated = NULL; + MonoType *inflated = NULL; error_init (error); if (context) { @@ -1182,12 +1182,12 @@ mono_class_inflate_generic_method_full_checked (MonoMethod *method, MonoClass *k /* * A method only needs to be inflated if the context has argument for which it is * parametric. Eg: - * + * * class Foo<T> { void Bar(); } - doesn't need to be inflated if only mvars' are supplied * class Foo { void Bar<T> (); } - doesn't need to be if only vars' are supplied - * + * */ - if (!((method->is_generic && context->method_inst) || + if (!((method->is_generic && context->method_inst) || (mono_class_is_gtd (method->klass) && context->class_inst))) return method; @@ -1285,7 +1285,7 @@ mono_class_inflate_generic_method_full_checked (MonoMethod *method, MonoClass *k if (!result->klass) { MonoType *inflated = inflate_generic_type (NULL, m_class_get_byval_arg (method->klass), context, error); - if (!is_ok (error)) + if (!is_ok (error)) goto fail; result->klass = inflated ? mono_class_from_mono_type_internal (inflated) : method->klass; @@ -1535,7 +1535,7 @@ mono_method_set_is_covariant_override_impl (MonoMethod *method) mono_method_get_infrequent_bits (method)->is_covariant_override_impl = 1; } -/** +/** * mono_class_find_enum_basetype: * \param class The enum class * @@ -1659,7 +1659,7 @@ gpointer * \param klass the class that is failing * \param caused_by the class that caused the failure * \param msg Why \p klass is failing. - * + * * If \p caused_by has a failure, sets a TypeLoadException failure on * \p klass with message "\p msg, due to: {\p caused_by message}". * @@ -1734,7 +1734,7 @@ mono_class_get_method_by_index (MonoClass *klass, int index) g_assert (index >= 0 && index < mono_class_get_method_count (klass)); return m_class_get_methods (klass) [index]; } -} +} /** * mono_class_get_inflated_method: @@ -1780,7 +1780,7 @@ mono_class_get_inflated_method (MonoClass *klass, MonoMethod *method, MonoError } g_assert_not_reached (); -} +} /* * mono_class_get_vtable_entry: @@ -1795,7 +1795,7 @@ mono_class_get_vtable_entry (MonoClass *klass, int offset) if (m_class_get_rank (klass) == 1) { MonoClass *klass_parent = m_class_get_parent (klass); - /* + /* * szarrays do not overwrite any methods of Array, so we can avoid * initializing their vtables in some cases. */ @@ -1898,14 +1898,14 @@ mono_class_interface_offset (MonoClass *klass, MonoClass *itf) MonoClass *result = klass_interfaces_packed[i]; if (m_class_get_interface_id(result) == m_class_get_interface_id(itf)) { return m_class_get_interface_offsets_packed (klass) [i]; - } + } } return -1; } /** * mono_class_interface_offset_with_variance: - * + * * Return the interface offset of \p itf in \p klass. Sets \p non_exact_match to TRUE if the match required variance check * If \p itf is an interface with generic variant arguments, try to find the compatible one. * @@ -1920,7 +1920,7 @@ mono_class_interface_offset_with_variance (MonoClass *klass, MonoClass *itf, gbo *non_exact_match = FALSE; if (i >= 0) return i; - + int klass_interface_offsets_count = m_class_get_interface_offsets_count (klass); if (m_class_is_array_special_interface (itf) && m_class_get_rank (klass) < 2) { @@ -2283,10 +2283,10 @@ mono_class_create_from_typespec (MonoImage *image, guint32 type_spec, MonoGeneri /** * mono_bounded_array_class_get: - * \param element_class element class + * \param element_class element class * \param rank the dimension of the array class * \param bounded whenever the array has non-zero bounds - * \returns A class object describing the array with element type \p element_type and + * \returns A class object describing the array with element type \p element_type and * dimension \p rank. */ MonoClass * @@ -2297,9 +2297,9 @@ mono_bounded_array_class_get (MonoClass *eclass, guint32 rank, gboolean bounded) /** * mono_array_class_get: - * \param element_class element class + * \param element_class element class * \param rank the dimension of the array class - * \returns A class object describing the array with element type \p element_type and + * \returns A class object describing the array with element type \p element_type and * dimension \p rank. */ MonoClass * @@ -2318,7 +2318,7 @@ mono_array_class_get (MonoClass *eclass, guint32 rank) */ gint32 mono_class_instance_size (MonoClass *klass) -{ +{ if (!m_class_is_size_inited (klass)) mono_class_init_internal (klass); @@ -2327,7 +2327,7 @@ mono_class_instance_size (MonoClass *klass) /** * mono_class_min_align: - * \param klass a class + * \param klass a class * * Use to get the computed minimum alignment requirements for the specified class. * @@ -2335,7 +2335,7 @@ mono_class_instance_size (MonoClass *klass) */ gint32 mono_class_min_align (MonoClass *klass) -{ +{ if (!m_class_is_size_inited (klass)) mono_class_init_internal (klass); @@ -2344,13 +2344,13 @@ mono_class_min_align (MonoClass *klass) /** * mono_class_data_size: - * \param klass a class - * + * \param klass a class + * * \returns The size of the static class data */ gint32 mono_class_data_size (MonoClass *klass) -{ +{ if (!m_class_is_inited (klass)) mono_class_init_internal (klass); /* This can happen with dynamically created types */ @@ -2383,7 +2383,7 @@ mono_class_get_field_idx (MonoClass *klass, int idx) MonoImage *klass_image = m_class_get_image (klass); MonoClassField *klass_fields = m_class_get_fields (klass); if (klass_image->uncompressed_metadata) { - /* + /* * first_field_idx points to the FieldPtr table, while idx points into the * Field table, so we have to do a search. */ @@ -2395,7 +2395,7 @@ mono_class_get_field_idx (MonoClass *klass, int idx) if (mono_field_get_name (&klass_fields [i]) == name) return &klass_fields [i]; g_assert_not_reached (); - } else { + } else { if (fcount) { if ((idx >= first_field_idx) && (idx < first_field_idx + fcount)){ return &klass_fields [idx - first_field_idx]; @@ -2432,7 +2432,7 @@ mono_class_get_field (MonoClass *klass, guint32 field_token) * \param name the field name * * Search the class \p klass and its parents for a field with the name \p name. - * + * * \returns The \c MonoClassField pointer of the named field or NULL */ MonoClassField * @@ -2495,7 +2495,7 @@ mono_class_get_field_from_name_full (MonoClass *klass, const char *name, MonoTyp * * Get the token of a field. Note that the tokesn is only valid for the image * the field was loaded from. Don't use this function for fields in dynamic types. - * + * * \returns The token representing the field in the image it was loaded from. */ guint32 @@ -2561,7 +2561,7 @@ mono_class_get_field_default_value (MonoClassField *field, MonoTypeEnum *def_typ } field_index = mono_field_get_index (field); - + if (!def_values [field_index].data) { MonoImage *field_parent_image = m_class_get_image (field->parent); cindex = mono_metadata_get_constant_index (field_parent_image, mono_class_get_field_token (field), 0); @@ -2687,7 +2687,7 @@ mono_class_get_property_token (MonoProperty *prop) while ((p = mono_class_get_properties (klass, &iter))) { if (&info->properties [i] == prop) return mono_metadata_make_token (MONO_TABLE_PROPERTY, info->first + i + 1); - + i ++; } klass = m_class_get_parent (klass); @@ -2706,7 +2706,7 @@ mono_class_name_from_token (MonoImage *image, guint32 type_token) const char *name, *nspace; if (image_is_dynamic (image)) return g_strdup_printf ("DynamicType 0x%08x", type_token); - + switch (type_token & 0xff000000){ case MONO_TOKEN_TYPE_DEF: { guint tidx = mono_metadata_token_index (type_token); @@ -2743,7 +2743,7 @@ mono_class_name_from_token (MonoImage *image, guint32 type_token) else return g_strdup_printf ("%s.%s", nspace, name); } - + case MONO_TOKEN_TYPE_SPEC: return g_strdup_printf ("Typespec 0x%08x", type_token); default: @@ -2756,7 +2756,7 @@ mono_assembly_name_from_token (MonoImage *image, guint32 type_token) { if (image_is_dynamic (image)) return g_strdup_printf ("DynamicAssembly %s", image->name); - + switch (type_token & 0xff000000){ case MONO_TOKEN_TYPE_DEF: if (image->assembly) @@ -2773,7 +2773,7 @@ mono_assembly_name_from_token (MonoImage *image, guint32 type_token) if (mono_metadata_table_bounds_check (image, MONO_TABLE_TYPEREF, idx)) return g_strdup_printf ("Invalid type token 0x%08x", type_token); - + mono_metadata_decode_row (t, idx-1, cols, MONO_TYPEREF_SIZE); idx = cols [MONO_TYPEREF_SCOPE] >> MONO_RESOLUTION_SCOPE_BITS; @@ -2870,7 +2870,7 @@ mono_class_get_checked (MonoImage *image, guint32 type_token, MonoError *error) switch (type_token & 0xff000000){ case MONO_TOKEN_TYPE_DEF: klass = mono_class_create_from_typedef (image, type_token, error); - break; + break; case MONO_TOKEN_TYPE_REF: klass = mono_class_from_typeref_checked (image, type_token, error); break; @@ -2900,8 +2900,8 @@ done: * \param context the generic context used to evaluate generic instantiations in * \param error Error handling context * - * This functions exists to fullfill the fact that sometimes it's desirable to have access to the - * + * This functions exists to fullfill the fact that sometimes it's desirable to have access to the + * * \returns The MonoType that represents \p type_token in \p image */ MonoType * @@ -3081,7 +3081,7 @@ mono_image_init_name_cache (MonoImage *image) * mono_image_add_to_name_cache: */ void -mono_image_add_to_name_cache (MonoImage *image, const char *nspace, +mono_image_add_to_name_cache (MonoImage *image, const char *nspace, const char *name, guint32 index) { GHashTable *nspace_table; @@ -3160,7 +3160,7 @@ mono_class_from_name_case (MonoImage *image, const char* name_space, const char * \param image The MonoImage where the type is looked up in * \param name_space the type namespace * \param name the type short name. - * \param error if + * \param error if * * Obtains a MonoClass with a given namespace and a given name which * is located in the given MonoImage. The namespace and name @@ -3224,7 +3224,7 @@ search_modules (MonoImage *image, const char *name_space, const char *name, gboo error_init (error); - /* + /* * The EXPORTEDTYPES table only contains public types, so have to search the * modules as well. * Note: image->modules contains the contents of the MODULEREF table, while @@ -3379,7 +3379,7 @@ mono_class_from_name_checked_aux (MonoImage *image, const char* name_space, cons mono_assembly_load_reference (image, assembly_idx - 1); g_assert (image->references [assembly_idx - 1]); if (image->references [assembly_idx - 1] == (gpointer)-1) - return NULL; + return NULL; klass = mono_class_from_name_checked_aux (image->references [assembly_idx - 1]->image, name_space, name, visited_images, case_sensitive, error); if (nested) return klass ? return_nested_in (klass, nested, case_sensitive) : NULL; @@ -3497,7 +3497,7 @@ mono_class_try_load_from_name (MonoImage *image, const char* name_space, const c return klass; } -static gboolean +static gboolean mono_interface_implements_interface (MonoClass *interface_implementer, MonoClass *interface_implemented) { int i; @@ -3528,7 +3528,7 @@ mono_class_is_subclass_of_internal (MonoClass *klass, MonoClass *klassc, mono_class_init_internal (klass); mono_class_init_internal (klassc); } - + if (check_interfaces && MONO_CLASS_IS_INTERFACE_INTERNAL (klassc) && !MONO_CLASS_IS_INTERFACE_INTERNAL (klass)) { if (MONO_CLASS_IMPLEMENTS_INTERFACE (klass, m_class_get_interface_id (klassc))) return TRUE; @@ -3546,7 +3546,7 @@ mono_class_is_subclass_of_internal (MonoClass *klass, MonoClass *klassc, return TRUE; } - /* + /* * MS.NET thinks interfaces are a subclass of Object, so we think it as * well. */ @@ -3604,7 +3604,7 @@ mono_gparam_is_reference_conversible (MonoClass *target, MonoClass *candidate, g * @container the generic container from the GTD * @klass: the class to be assigned to * @oklass: the source class - * + * * Both @klass and @oklass must be instances of the same generic interface. * * Returns: TRUE if @klass can be assigned to a @klass variable @@ -3804,9 +3804,9 @@ mono_byref_type_is_assignable_from (MonoType *type, MonoType *ctype, gboolean si return klass == klassc; if (m_class_is_valuetype (klassc)) return FALSE; - /* + /* * assignment compatability for location types, ECMA I.8.7.2 - two managed pointer types T& and U& are - * assignment compatible if the verification types of T and U are identical. + * assignment compatible if the verification types of T and U are identical. */ if (signature_assignment) return klass == klassc; @@ -3972,8 +3972,8 @@ mono_class_is_assignable_from_general (MonoClass *klass, MonoClass *oklass, gboo /* interface_offsets might not be set for dynamic classes */ if (mono_class_get_ref_info_handle (oklass) && !m_class_get_interface_bitmap (oklass)) { - /* - * oklass might be a generic type parameter but they have + /* + * oklass might be a generic type parameter but they have * interface_offsets set. */ gboolean assign_result = mono_reflection_call_is_assignable_to (oklass, klass, error); @@ -3989,7 +3989,7 @@ mono_class_is_assignable_from_general (MonoClass *klass, MonoClass *oklass, gboo if (MONO_CLASS_IMPLEMENTS_INTERFACE (oklass, m_class_get_interface_id (klass))) { *result = TRUE; return; - } + } if (m_class_is_array_special_interface (klass) && m_class_get_rank (oklass) == 1) { if (mono_class_is_gtd (klass)) { @@ -4079,13 +4079,13 @@ mono_class_is_assignable_from_general (MonoClass *klass, MonoClass *oklass, gboo } - /* + /* * a is b does not imply a[] is b[] when a is a valuetype, and * b is a reference type. */ if (m_class_is_valuetype (eoclass)) { - if ((eclass == mono_defaults.enum_class) || + if ((eclass == mono_defaults.enum_class) || (eclass == m_class_get_parent (mono_defaults.enum_class)) || (!m_class_is_valuetype (eclass))) { *result = FALSE; @@ -4093,7 +4093,7 @@ mono_class_is_assignable_from_general (MonoClass *klass, MonoClass *oklass, gboo } } - /* + /* * a is b does not imply a[] is b[] in the case where b is an interface and * a is a generic parameter, unless a has an additional class constraint. * For example (C#): @@ -4186,7 +4186,7 @@ mono_class_is_assignable_from_general (MonoClass *klass, MonoClass *oklass, gboo } *result = mono_class_has_parent (oklass, klass); -} +} /*Check if @oklass is variant compatible with @klass.*/ static gboolean @@ -4283,7 +4283,7 @@ mono_class_implement_interface_slow (MonoClass *target, MonoClass *candidate) for (i = 0; i < candidate_interface_count; ++i) { if (candidate_interfaces [i] == target) return TRUE; - + if (is_variant && mono_class_is_variant_compatible_slow (target, candidate_interfaces [i])) return TRUE; @@ -4419,7 +4419,7 @@ mono_class_get_cctor (MonoClass *klass) MonoCachedClassInfo cached_info; if (image_is_dynamic (m_class_get_image (klass))) { - /* + /* * has_cctor is not set for these classes because mono_class_init_internal () is * not run for them. */ @@ -4507,7 +4507,7 @@ gint32 mono_class_array_element_size (MonoClass *klass) { MonoType *type = m_class_get_byval_arg (klass); - + handle_enum: switch (type->type) { case MONO_TYPE_I1: @@ -4530,7 +4530,7 @@ handle_enum: case MONO_TYPE_STRING: case MONO_TYPE_OBJECT: case MONO_TYPE_SZARRAY: - case MONO_TYPE_ARRAY: + case MONO_TYPE_ARRAY: return TARGET_SIZEOF_VOID_P; case MONO_TYPE_I8: case MONO_TYPE_U8: @@ -4554,7 +4554,7 @@ handle_enum: } case MONO_TYPE_VOID: return 0; - + default: g_error ("unknown type 0x%02x in mono_class_array_element_size", type->type); } @@ -4795,7 +4795,7 @@ mono_class_is_enum (MonoClass *klass) * \param klass the \c MonoClass to act on * * Use this function to get the underlying type for an enumeration value. - * + * * \returns The underlying type representation for an enumeration. */ MonoType* @@ -4812,7 +4812,7 @@ mono_class_enum_basetype_internal (MonoClass *klass) * \param klass the \c MonoClass to act on * * Use this function to get the underlying type for an enumeration value. - * + * * \returns The underlying type representation for an enumeration. */ MonoType* @@ -4933,7 +4933,7 @@ mono_class_get_type_token (MonoClass *klass) * mono_class_get_byref_type: * \param klass the \c MonoClass to act on * - * + * */ MonoType* mono_class_get_byref_type (MonoClass *klass) @@ -5322,7 +5322,7 @@ class_implements_interface_ignore_generics (MonoClass* klass, MonoClass* iface) } return FALSE; } - + /** * mono_field_get_name: @@ -5453,7 +5453,7 @@ mono_field_get_rva (MonoClassField *field, int swizzle) } field_index = mono_field_get_index (field); - + if (!def_values [field_index].data) { const char *rvaData; @@ -5525,7 +5525,7 @@ mono_field_get_data (MonoClassField *field) } /** - * mono_property_get_name: + * mono_property_get_name: * \param prop the \c MonoProperty to act on * \returns The name of the property */ @@ -5783,7 +5783,7 @@ mono_class_get_method_from_name_checked (MonoClass *klass, const char *name, for (i = 0; i < mcount; ++i) { MonoMethod *method = klass_methods [i]; - if (method->name[0] == name [0] && + if (method->name[0] == name [0] && !strcmp (name, method->name) && (param_count == -1 || mono_method_signature_internal (method)->param_count == param_count) && ((method->flags & flags) == flags)) { @@ -5878,12 +5878,12 @@ mono_class_get_generic_type_definition (MonoClass *klass) /* * Check if @klass is a subtype of @parent ignoring generic instantiations. - * + * * Generic instantiations are ignored for all super types of @klass. - * - * Visibility checks ignoring generic instantiations. - * - * Class implementing interface visibility checks ignore generic instantiations + * + * Visibility checks ignoring generic instantiations. + * + * Class implementing interface visibility checks ignore generic instantiations */ gboolean mono_class_has_parent_and_ignore_generics (MonoClass *klass, MonoClass *parent) @@ -5900,7 +5900,7 @@ mono_class_has_parent_and_ignore_generics (MonoClass *klass, MonoClass *parent) if (MONO_CLASS_IS_INTERFACE_INTERNAL (parent) && class_implements_interface_ignore_generics (klass, parent)) return TRUE; - + return FALSE; } /* @@ -6088,7 +6088,7 @@ can_access_type (MonoClass *access_klass, MonoClass *member_klass) return ignores_access_checks_to (access_klass_assembly, member_klass_assembly); case TYPE_ATTRIBUTE_NESTED_FAMILY: - return mono_class_has_parent_and_ignore_generics (access_klass, m_class_get_nested_in (member_klass)); + return mono_class_has_parent_and_ignore_generics (access_klass, m_class_get_nested_in (member_klass)); case TYPE_ATTRIBUTE_NESTED_ASSEMBLY: return can_access_internals (access_klass_assembly, member_klass_assembly) && member_klass_nested_in && can_access_type (access_klass, member_klass_nested_in); @@ -6113,7 +6113,7 @@ can_access_member (MonoClass *access_klass, MonoClass *member_klass, MonoClass* MonoGenericClass *access_gklass = mono_class_try_get_generic_class (access_klass); if (((access_gklass && access_gklass->container_class) || - mono_class_is_gtd (access_klass)) && + mono_class_is_gtd (access_klass)) && (member_generic_def = get_generic_definition_class (member_klass))) { MonoClass *access_container; @@ -6211,13 +6211,13 @@ mono_method_can_access_method (MonoMethod *method, MonoMethod *called) /* * mono_method_can_access_method_full: - * @method: The caller method - * @called: The called method + * @method: The caller method + * @called: The called method * @context_klass: The static type on stack of the owner @called object used - * + * * This function must be used with instance calls, as they have more strict family accessibility. * It can be used with static methods, but context_klass should be NULL. - * + * * Returns: TRUE if caller have proper visibility and acessibility to @called */ gboolean @@ -6262,20 +6262,20 @@ mono_method_can_access_method_full (MonoMethod *method, MonoMethod *called, Mono if (infl->context.method_inst && !can_access_instantiation (access_class, infl->context.method_inst)) return FALSE; } - + return TRUE; } /* * mono_method_can_access_field_full: - * @method: The caller method + * @method: The caller method * @field: The accessed field * @context_klass: The static type on stack of the owner @field object used - * + * * This function must be used with instance fields, as they have more strict family accessibility. * It can be used with static fields, but context_klass should be NULL. - * + * * Returns: TRUE if caller have proper visibility and acessibility to @field */ gboolean @@ -6316,11 +6316,11 @@ mono_method_can_access_field_full (MonoMethod *method, MonoClassField *field, Mo /* * mono_class_can_access_class: - * @source_class: The source class + * @source_class: The source class * @target_class: The accessed class - * + * * This function returns is @target_class is visible to @source_class - * + * * Returns: TRUE if source have proper visibility and acessibility to target */ gboolean @@ -6366,7 +6366,7 @@ gboolean mono_type_is_valid_enum_basetype (MonoType * type) { * FIXME: enum types are not allowed to have a cctor, but mono_reflection_create_runtime_class sets has_cctor to 1 for all types * FIXME: TypeBuilder enums can have any kind of static fields, but the spec is very explicit about that (P II 14.3) * - * \returns TRUE if the informed enum class is valid + * \returns TRUE if the informed enum class is valid */ gboolean mono_class_is_valid_enum (MonoClass *klass) @@ -6688,7 +6688,7 @@ retry: } /* found might be FALSE if we looked in an abstract class * that doesn't override an abstract method of its - * parent: + * parent: * abstract class Base { * public abstract void Foo (); * } diff --git a/src/mono/mono/mini/CMakeLists.txt b/src/mono/mono/mini/CMakeLists.txt index 2610dda6b93..4e5c32d26b3 100644 --- a/src/mono/mono/mini/CMakeLists.txt +++ b/src/mono/mono/mini/CMakeLists.txt @@ -2,14 +2,6 @@ project(mini) include(FindPython3) -function(addprefix var prefix list) - set(f) - foreach(i ${list}) - set(f ${f} ${prefix}/${i}) - endforeach() - set(${var} ${f} PARENT_SCOPE) -endfunction() - include_directories( ${PROJECT_BINARY_DIR}/ ${PROJECT_BINARY_DIR}/../.. diff --git a/src/mono/mono/mini/mini-generic-sharing.c b/src/mono/mono/mini/mini-generic-sharing.c index 93534fedf54..f974b56f94c 100644 --- a/src/mono/mono/mini/mini-generic-sharing.c +++ b/src/mono/mono/mini/mini-generic-sharing.c @@ -30,7 +30,7 @@ #define ALLOW_PARTIAL_SHARING TRUE //#define ALLOW_PARTIAL_SHARING FALSE - + #if 0 #define DEBUG(...) __VA_ARGS__ #else @@ -767,7 +767,7 @@ free_inflated_info (MonoRgctxInfoType info_type, gpointer info) static MonoRuntimeGenericContextInfoTemplate class_get_rgctx_template_oti (MonoClass *klass, int type_argc, guint32 slot, gboolean temporary, gboolean shared, gboolean *do_free); - + static MonoClass* class_uninstantiated (MonoClass *klass) { @@ -2503,7 +2503,7 @@ instantiate_info (MonoMemoryManager *mem_manager, MonoRuntimeGenericContextInfoT } else if (call_sig == mono_method_signature_internal (method)) { } else { sig = mono_method_signature_internal (method); - gsig = mono_method_signature_internal (jinfo_get_method (callee_ji)); + gsig = mono_method_signature_internal (jinfo_get_method (callee_ji)); addr = mini_get_gsharedvt_wrapper (TRUE, jinfo_get_ftnptr (callee_ji), sig, gsig, -1, FALSE); @@ -2541,7 +2541,7 @@ instantiate_info (MonoMemoryManager *mem_manager, MonoRuntimeGenericContextInfoT align = sizeof (gpointer); if (MONO_TYPE_ISSTRUCT (t) && align < 2 * sizeof (gpointer)) align = 2 * sizeof (gpointer); - + // FIXME: Do the same things as alloc_stack_slots offset += align - 1; offset &= ~(align - 1); @@ -3528,7 +3528,7 @@ mono_method_is_generic_sharable_full (MonoMethod *method, gboolean allow_type_va g_assert (inflated->declaring); -#if FALSE +#if 0 if (inflated->declaring->is_generic) { if (has_constraints (mono_method_get_generic_container (inflated->declaring))) { } @@ -3891,7 +3891,7 @@ mini_type_stack_size_full (MonoType *t, guint32 *align, gboolean pinvoke) size = mini_type_stack_size (t, NULL); } } - + return size; } diff --git a/src/mono/mono/mini/simd-intrinsics.c b/src/mono/mono/mini/simd-intrinsics.c index 38e40bffde0..f63cf472b9e 100644 --- a/src/mono/mono/mini/simd-intrinsics.c +++ b/src/mono/mono/mini/simd-intrinsics.c @@ -73,7 +73,7 @@ void mono_simd_intrinsics_init (void) { register_size = 16; -#if FALSE +#if 0 if ((mini_get_cpu_features () & MONO_CPU_X86_AVX) != 0) register_size = 32; #endif |