1. 31 12月, 2020 1 次提交
  2. 05 11月, 2020 3 次提交
  3. 27 10月, 2020 1 次提交
  4. 11 8月, 2020 1 次提交
    • U
      Exposing functions: mono_custom_attrs_construct_by_type and mono_unity_error_convert_to_exception · a6741c54
      UnityAlex 提交于
      * mono_custom_attrs_construct_by_type allows unity to have a chance at handling the error if one arises instead of fatally asserting
      * mono_unity_error_convert_to_exception allows unity to take the provided MonoError and fetch the MonoException object within to log into the editor as the exception that was thrown.
      
      This change has associated unity changes in order to fix (case 1255935)
      a6741c54
  5. 13 7月, 2020 1 次提交
  6. 09 7月, 2020 1 次提交
  7. 22 6月, 2020 2 次提交
  8. 14 5月, 2020 1 次提交
  9. 06 5月, 2020 4 次提交
  10. 13 4月, 2020 1 次提交
  11. 01 2月, 2020 1 次提交
  12. 05 11月, 2019 1 次提交
  13. 01 11月, 2019 1 次提交
  14. 27 9月, 2019 1 次提交
  15. 12 9月, 2019 1 次提交
    • A
      [metadata] Fields whose types are gparams with a reference type constraint... · fb10d893
      Aleksey Kliger (λgeek) 提交于
      [metadata] Fields whose types are gparams with a reference type constraint aren't blittlable. (#15761)
      
      * [metadata] Fields whose types are gparams with a reference type constraint
      aren't blittlable.
      Don't try to layout the field to find out if it's blittable.
      For gshared gparams, follow the blittability of the constraint.
      
      Fixes certain recursive examples.
      
      ```
      using System;
      
      namespace TestRecursiveType
      {
          class Program
          {
              static void Main(string[] args)
              {
                  SubClass subC = new SubClass();
                  Console.WriteLine(subC.GetTest());
              }
          }
      
          public struct ValueTest<U>
          {
              // When U is instantiated with T, from BaseClass, we know it'll be a
      	// reference field, so we know the instantiation ValueTest<T> won't
      	// be blittable.
              public readonly U value;
          }
      
          public abstract class BaseClass<T> where T : BaseClass<T>
          {
              public ValueTest<T> valueTest = default(ValueTest<T>);
          }
      
          public class SubClass : BaseClass<SubClass>
          {
              private String test = "test";
      
              public string GetTest()
              {
                  return test;
              }
          }
      }
      ```
      
      Fixes https://github.com/mono/mono/issues/15760
      
      ---
      
      The failure is happening when we are doing mono_class_setup_fields ("BaseClass<T>") which needs to decide for each field whether it is blittable or not. So therefore we are trying to decide if ValueTest<T> (that is: the ValueTest<U> field inside BaseClass<T>) is blittable or not.
      
      So we instantiate U with T.
      Now to decide whether VaueTest<T> is blittable or not, we look at every field.
      So then we look at T value.
      To decide if T is blittable we first check if it's a reference type.
      
      That check is currently inadequate for generic parameters - what the PR adds is the ability to see if theres a T : class constraint or a T : C constraint - where C is some class. As soon as we know that T's constraint will force it to be a reference type we can definitely say that T won't be blittable without having to initialize C, at all.
      
      Previously, Mono would see that T is some kind of type for which it couldn't definitively decide that it's a reference type and it would call: mono_class_setup_fields (field_class) which would then try to setup the fields of the parent class BaseClass<T>. And that would hit the recursion check.
      
      Unity cherry-pick note: Needed to bring MONO_CLASS_IS_INTERFACE_INTERNAL
      and mono_class_get_valuetype_class forward
      fb10d893
  16. 30 7月, 2019 2 次提交
    • J
      Handle the empty file inode on macOS and FAT32 (with the proper define) · 7df88d5b
      Josh Peterson 提交于
      Previously, 5174f7ed was an attempt to
      correct this issue. However, the `#define` scheme for Mono changed since
      then, so `PLATFORM_MACOSX` became `HOST_DARWIN`.
      
      This change uses the proper define to correct Unity case 1166108.
      7df88d5b
    • A
      [Memoryprofiler] Exposing required mono API for backend migration (#1206) · 610a9ac9
      Alex Busnita 提交于
      * improve mempool chunk reporting in order to get exact range for each chunk
      
      * added mono_unity_class_for_each in order to allow for simple iteration logic over all initialized classes in the VM
      
      * added mono_type_get_name_chunked in order to report type names in null terminated chunks.
      A good example for this can be using a preallocated instance of core::string as user_data for the callback which will then append onto the preallocated string
      
      * added mono_unity_image_set_mempool_chunk_foreach in order to report memory blocks from the VM heap
      added mono_unity_domain_mempool_chunk_foreach in order to report memory blocks inside the current domain's memory pool
      added mono_unity_root_domain_mempool_chunk_foreach in order to report memory blocks inside the root domain's memory pool
      added mono_unity_assembly_mempool_chunk_foreach in order to report memory blocks inside an assembly's image's memory pool
      added mono_unity_class_get_data_size in order to return static field data size for a MonoClass
      added mono_unity_class_get_static_field_data in order to access static fields memory for a given MonoClass
      added mono_unity_class_field_is_literal in order to find out if the attributes
      added mono_unity_start/stop_gc_world() in order to control the GC world state
      added mono_unity_gc_heap_foreach in order to report each allocated GC heap section
      added mono_unity_gchandles_foreach_get_target in order to report all gc handle targets tracked by the garbage collector
      added mono_unity_object_header_size in order to report mono object header size
      added mono_unity_array_object_header_size in order to report mono array object header size
      added mono_unity_offset_of_array_length/bounds_in_array_object_header in order to report the offset of the length/bounds of the array within the header
      added mono_unity_allocation_granularity in order to report the minimum allocation granulariy inside the vm
      added mono_unity_get_name_full_chunked in order to extract a types name in chunks
      added mono_unity_type_is_static in order to report if the given type is static
      added mono_unity_type_is_pointer_type in order to report if the given type is a pointer type
      
      * added missing include
      
      * fixed up missing user_data assignment during context initialization for mono_unity_class_for_each
      
      * move type name streaming utility out of class.h/.c
      610a9ac9
  17. 25 7月, 2019 1 次提交
  18. 08 7月, 2019 1 次提交
    • J
      Handle the empty file inode on macOS and FAT32 · 5174f7ed
      Josh Peterson 提交于
      On macOS and FAT32 partitions, we will sometimes get this inode value
      for more than one file. It means the file is empty.  When this happens,
      the hash table of file shares becomes corrupt, since more then one file
      has the same inode. Instead, let's assume it is always fine to share
      empty files. (Unity case 950616).
      5174f7ed
  19. 29 5月, 2019 1 次提交
  20. 24 5月, 2019 2 次提交
  21. 23 4月, 2019 2 次提交
  22. 11 3月, 2019 1 次提交
  23. 14 2月, 2019 1 次提交
  24. 08 2月, 2019 1 次提交
  25. 06 2月, 2019 1 次提交
  26. 29 1月, 2019 1 次提交
  27. 27 1月, 2019 1 次提交
  28. 25 1月, 2019 1 次提交
  29. 24 1月, 2019 3 次提交