From bd7c3293bcff7cd6946449bb4a9553c098141f86 Mon Sep 17 00:00:00 2001 From: walon Date: Wed, 23 Oct 2024 12:03:25 +0800 Subject: [PATCH] [version] Release v6.10.0 --- Data~/hybridclr_version.json | 14 +- RELEASELOG.md | 637 ++++++++++++++++++----------------- package.json | 2 +- 3 files changed, 328 insertions(+), 325 deletions(-) diff --git a/Data~/hybridclr_version.json b/Data~/hybridclr_version.json index 637a15f..65fbbd5 100644 --- a/Data~/hybridclr_version.json +++ b/Data~/hybridclr_version.json @@ -2,28 +2,28 @@ "versions": [ { "unity_version":"2019", - "hybridclr" : { "branch":"v6.9.0"}, + "hybridclr" : { "branch":"v6.10.0"}, "il2cpp_plus": { "branch":"v2019-6.7.0"} }, { "unity_version":"2020", - "hybridclr" : { "branch":"v6.9.0"}, + "hybridclr" : { "branch":"v6.10.0"}, "il2cpp_plus": { "branch":"v2020-6.7.0"} }, { "unity_version":"2021", - "hybridclr" : { "branch":"v6.9.0"}, + "hybridclr" : { "branch":"v6.10.0"}, "il2cpp_plus": { "branch":"v2021-6.9.0"} }, { "unity_version":"2022", - "hybridclr" : { "branch":"v6.9.0"}, + "hybridclr" : { "branch":"v6.10.0"}, "il2cpp_plus": { "branch":"v2022-6.9.0"} }, { "unity_version":"2022-tuanjie", - "hybridclr" : { "branch":"v6.9.0"}, - "il2cpp_plus": { "branch":"v2022-tuanjie-6.9.0"} + "hybridclr" : { "branch":"v6.10.0"}, + "il2cpp_plus": { "branch":"v2022-tuanjie-6.10.0"} }, { "unity_version":"2023", @@ -32,7 +32,7 @@ }, { "unity_version":"6000", - "hybridclr" : { "branch":"v6.9.0"}, + "hybridclr" : { "branch":"v6.10.0"}, "il2cpp_plus": { "branch":"v6000-6.9.0"} } ] diff --git a/RELEASELOG.md b/RELEASELOG.md index d8429ba..cb0c1e1 100644 --- a/RELEASELOG.md +++ b/RELEASELOG.md @@ -1,673 +1,674 @@ -# 发布日志 +# ReleaseLog + +## 6.10.0 + +Release Date: 2024-10-23. + +### Runtime + +- [new] Officially supports 6000.0.23f LTS version +- [merge] Merges changes from Tuanjie versions 1.2.6 to 1.3.0 +- [fix] Fixed an issue in MonoHook where processorType was not handled correctly on some CPUs when the processorType was returned in all uppercase (e.g., some machines return 'INTEL' instead of 'Intel'). ## 6.9.0 -发布日期 2024.9.30 +Release Date: 2024-9-30. ### Runtime -- [fix] 修复抛出的异常没有调用il2cpp::vm::Exception::PrepareExceptionForThrow导致StraceTrace为空的bug -- [merge] 合并2021.3.42f1-2021.3.44f1版本改动,修复2021.3.44版本il2cpp改动引入的编译错误 -- [merge] 合并2022.3.41f1-2022.3.48f1版本改动,修复2022.3.48版本il2cpp改动引入的编译错误 -- [merge] 合并6000.0.19f1-6000.0.21f1代码,修复6000.0.20版本il2cpp改动引入的编译错误 -- [merge] 合并Tuanjie 1.1.0-1.2.6版本改动 +- [fix] Fixes the bug where thrown exceptions did not call `il2cpp::vm::Exception::PrepareExceptionForThrow`, resulting in an empty stack trace. +- [merge] Merges changes from versions 2021.3.42f1 to 2021.3.44f1, fixing compilation errors introduced by il2cpp changes in version 2021.3.44. +- [merge] Merges changes from versions 2022.3.41f1 to 2022.3.48f1, fixing compilation errors introduced by il2cpp changes in version 2022.3.48. +- [merge] Merges code from 6000.0.19f1 to 6000.0.21f1, fixing compilation errors introduced by il2cpp changes in version 6000.0.20. +- [merge] Merges changes from Tuanjie versions 1.1.0 to 1.2.6 ## 6.8.0 -发布日期 2024.9.14. +Release Date: 2024-9-14. ### Runtime -- [fix] 修复异常的堆栈中未包含行号的bug -- [fix] 修复Il2CppGenericContextCompare比较时简单比较class_inst和method_inst指针相等的bug,实际上并非所有GenericInst(如s_Il2CppMetadataRegistration->genericInsts)都来自GenericInstPool,因此相同的GenericInst并非指针相同 -- [merge] 合并6000.0.10-6000.0.19版本il2cpp代码改动 +- [fix] Fixes the bug where exception stacks did not include line numbers. +- [fix] Fixes the bug where `Il2CppGenericContextCompare` simply compared class_inst and method_inst pointers for equality, which is not the case for all GenericInst (e.g., `s_Il2CppMetadataRegistration->genericInsts`) that do not come from GenericInstPool, hence identical GenericInst are not pointer equal. +- [merge] Merges il2cpp code changes from version 6000.0.10 to 6000.0.19 ## 6.7.1 -发布日期 2024.8.26. +Release Date: 2024-8-26. ### Runtime -- [fix] 修复Unity 2019发布iOS平台时有编译错误的bug +- [fix] Fixes the bug where there were compilation errors when publishing to the iOS platform with Unity 2019. ## 6.7.0 -发布日期 2024.8.26. +Release Date: 2024-8-26. ### Runtime -- [opt] 在Release编译模式下不再开启PROFILER,此优化减少了10-15%函数调用的开销,整体大约提升了2-4%的性能。 -- [opt] 发布WebGL目标时在Release编译模式下不再维护StackTrace,整体大约提升了1-2%的性能 -- [fix] 修复Transform Enum::GetHashCode时,没有将栈上的变量类型由uintptr_t改为int32_t,导致后续参与数值计算时参数类型被扩展为64位而计算错误的bug -- [fix] 修复解释器函数内大量调用delegate时触发stackoverflow的bug +- [opt] No longer enables PROFILER in Release compilation mode, this optimization reduces the overhead of function calls by 10-15%, and overall performance is improved by approximately 2-4%. +- [opt] When publishing for WebGL targets, StackTrace is no longer maintained in Release compilation mode, which improves performance by about 1-2%. +- [fix] Fixes the bug where `Transform Enum::GetHashCode` did not change the variable type from `uintptr_t` to `int32_t` on the stack, leading to incorrect calculations when participating in subsequent numerical computations due to the parameter type being extended to 64 bits. +- [fix] Fixes the bug where a stack overflow was triggered by calling delegates extensively within interpreter functions. ### Editor -- [new] HybridCLRSettings新增enableProfilerInReleaseBuild和enableStraceTraceInWebGLReleaseBuild两个选项 -- [change] 修复从WebGL平台切换到其他平台时PatchScriptingAssembliesJsonHook出现断言失败的问题(无实质影响) +- [new] HybridCLRSettings adds two new options: `enableProfilerInReleaseBuild` and `enableStackTraceInWebGLReleaseBuild`. +- [change] Fixes the issue where an assertion failure occurred when switching from the WebGL platform to other platforms (no substantial impact). ## 6.6.0 -发布日期 2024.8.12. +Release Date: 2024-8-12. ### Runtime -- [fix] 修复CustomAttribute的构造或者namedArg包含typeof(T[])参数时崩溃的bug -- [fix] 修复 T[index].CallMethod() 当CallMethod为泛型类型T的接口函数,并且array的element为T的子类时抛出ArrayTypeMismatchException的bug -- [fix] 修复MethodBase.GetCurrentMethod未返回正确结果的bug。新增instinct指令MethodBaseGetCurrentMethod -- [fix] 修复在WebGL之类的平台加载pdb后仍然无法显示堆栈代码行数的bug -- [fix] 修复调用子解释器函数后返回,再打印日志时,由于frame->ip未重新设置为&ip,导致后续打印的代码行数永远为调用子函数的代码行数的bug -- [fix] 修复调用子解释器函数时,由于frame->ip指向下一条指令,导致父函数的代码行数显示为下一条语句的行数的bug -- [merge] 合并2021.3.42f1及2022.3.41f1的il2cpp的代码,修复2021.3.42f1及2022.3.40f1新增il2cpp_codegen_memcpy_with_write_barrier函数引发的编译错误 +- [fix] Fixes the bug where `CustomAttribute` construction or namedArg includes a `typeof(T[])` parameter, causing a crash. +- [fix] Fixes the bug where `T[index].CallMethod()` throws an `ArrayTypeMismatchException` when `CallMethod` is an interface function of generic type T, and the array element is a subclass of T. +- [fix] Fixes the bug where `MethodBase.GetCurrentMethod` does not return the correct result. A new instinct instruction `MethodBaseGetCurrentMethod` is added. +- [fix] Fixes the bug where loading pdb on platforms like WebGL still does not display stack code line numbers. +- [fix] Fixes the bug where, after calling a sub-interpreter function and returning, logging prints the code line number of the called function due to `frame->ip` not being reset to `&ip`. +- [fix] Fixes the bug where calling a sub-interpreter function displays the line number of the next statement in the parent function's code line number due to `frame->ip` pointing to the next instruction. +- [merge] Merges il2cpp code from 2021.3.42f1 and 2022.3.41f1, fixing compilation errors caused by the new `il2cpp_codegen_memcpy_with_write_barrier` function in versions 2021.3.42f1 and 2022.3.40f1. ## 6.5.0 -发布日期 2024.8.5. +Release Date: 2024-8-5. ### Runtime -- [new] 2019-2020版本热更新函数堆栈也能正常显示代码文件及行号 -- [merge] 合并Unity 6000.0.1-6000.0.10的il2cpp改动 +- [new] Hot update function stacks for versions 2019-2020 can now correctly display code files and line numbers. +- [merge] Merges il2cpp changes from Unity versions 6000.0.1 to 6000.0.10 ## 6.4.0 -发布日期 2024.7.25. +Release Date: 2024-7-25. ### Runtime -- [new] 支持`Assembly.Load(byte[] assData, byte[] pdbData)`加载dll和pdb符号文件,在2021+版本打印函数堆栈时能显示正确的代码文件和行号 -- [fix] 修复团结引擎平台InterpreterImage::GetEventInfo和GetPropertyInfo时有可能未初始化method,导致getter之类的函数为空的bug -- [opt] 优化StackTrace和UnityEngine.Debug打印的函数栈顺序,大多数情况下可以在正确的栈位置地显示解释器函数 -- [opt] 优化元数据内存 +- [new] Supports loading dll and pdb symbol files with `Assembly.Load(byte[] assData, byte[] pdbData)`, displaying the correct code files and line numbers in function stacks when printing on versions 2021+. +- [fix] Fixes the bug where `InterpreterImage::GetEventInfo` and `GetPropertyInfo` might not initialize `method`, resulting in empty getter functions. +- [opt] Optimizes the order of function stacks printed by `StackTrace` and `UnityEngine.Debug`, displaying interpreter functions at the correct stack positions in most cases. +- [opt] Optimizes metadata memory. ### Editor -- [fix][严重] 修复生成MethodBridge过程中计算等价类时未考虑到ClassLayout、Layout和FieldOffset因素的bug -- [fix] 修复Library/PlayerDataCache目录不存在时,PatchScriptingAssembliesJsonHook运行异常的bug +- [fix] Fixes the bug where `GenerateMethodBridge` did not consider `ClassLayout`, `Layout`, and `FieldOffset` factors when calculating equivalent classes. +- [fix] Fixes the bug where `PatchScriptingAssembliesJsonHook` throws an异常 when the `Library/PlayerDataCache` directory does not exist. ## 6.3.0 -发布日期 2024.7.15. +Release Date: 2024-7-15. ### Runtime -- [opt] 大幅优化metadata元数据内存,内存占用相比6.2.0版本减少了15-40% -- [fix] 修复Transform时未释放IRBasicBlock中insts内存的bug,此bug大约0.7-1.6倍dll大小内存泄露 -- [fix] 修复ClassFieldLayoutCalculator内存泄露的bug -- [fix] 修复 MetadataAllocT 错误使用 HYBRIDCLR_MALLOC的bug,正确应该是 HYBRIDCLR_METADATA_MALLOC -- [opt] 优化Interpreter::Execute占用的原生栈大小,避免嵌套过深时出现栈溢出的错误 +- [opt] Significantly optimizes metadata memory, reducing memory usage by 15-40% compared to version 6.2.0. +- [fix] Fixes the bug where memory was not released for `insts` in `IRBasicBlock` during transformation, causing a memory leak approximately 0.7-1.6 times the size of the dll. +- [fix] Fixes the bug where `ClassFieldLayoutCalculator` caused a memory leak. +- [fix] Fixes the bug where `MetadataAllocT` incorrectly used `HYBRIDCLR_MALLOC` instead of `HYBRIDCLR_METADATA_MALLOC`. +- [opt] Optimizes the native stack size occupied by `Interpreter::Execute` to avoid stack overflow errors when nesting is too deep. ### Editor -- [fix] 修复 Unity 2022导出的xcode工程包含多个ShellScript片段时错误地删除了非重复片断的bug -- [fix] 修复微信小游戏平台当TextureCompression非默认值时临时目录名为WinxinMiniGame{xxx},导致没有成功修改scriptingassemblies.json文件的bug -- [fix] 修复团结引擎微信小游戏平台由于同时定义了UNITY_WEIXINMINIGAME和UNITY_WEBGL宏,导致从错误路径查找scriptingassemblies.json文件失败,运行时出现脚本missing的bug +- [fix] Fixes the bug where exporting an xcode project for Unity 2022 includes multiple ShellScript fragments, incorrectly deleting non-repeated fragments. +- [fix] Fixes the bug where the temporary directory name is `WinxinMiniGame{xxx}` when `TextureCompression` is not the default value on the WeChat Mini Games platform, causing the `scriptingassemblies.json` file to not be successfully modified. +- [fix] Fixes the bug where the WeChat Mini Games platform on the Unity Engine, due to the definition of both `UNITY_WEIXINMINIGAME` and `UNITY_WEBGL` macros, fails to find the `scriptingassemblies.json` file from the wrong path, resulting in a script missing bug at runtime. ## 6.2.0 -发布日期 2024.7.1. +Release Date: 2024-7-1. ### Runtime -- [merge] 合并2021.3.27f1-2021.3.40f1版本改动 -- [opt] 优化metadata元数据内存,内存占用减少了20-25% -- [opt] 优化枚举类型调用GetHashCode的实现,不再产生GC +- [merge] Merges changes from versions 2021.3.27f1 to 2021.3.40f1. +- [opt] Optimizes metadata memory, reducing memory usage by 20-25%. +- [opt] Optimizes the implementation of `GetHashCode` for enum types, no longer generating GC. ## 6.1.0 -发布日期 2024.6.17. +Release Date: 2024-6-17. ### Runtime -- [merge] 合并2022.3.23f1-2022.3.33f1版本改动,修复对2022.3.33版本不兼容的问题 -- [new] 支持2022.3.33版本新增支持的函数返回值Attribute -- [fix] 修复解释部分FieldInfo调用GetFieldMarshaledSizeForField时崩溃的bug +- [merge] Merges changes from versions 2022.3.23f1 to 2022.3.33f1, fixing incompatibility issues with version 2022.3.33. +- [new] Supports the new function return value Attribute added in version 2022.3.33. +- [fix] Fixes the bug where `FieldInfo` calling `GetFieldMarshaledSizeForField` crashes. ### Editor -- [fix] 升级dnlib版本,修复ModuleMD保存dll时将未加Assembly限定的mscorlib程序集中类型的程序集设置为当前程序集的严重bug -- [fix] 修复`Generate/LinkXml`生成的link.xml中对UnityEngine.Debug preserve all导致在Unity 2023及更高版本的iOS、visionOS等平台上出现Undefined symbols for architecture arm64: "CheckApplicationIntegrity(IntegrityCheckLevel)" 编译错误的问题。此bug由Unity引起,我们通过在生成link.xml时忽略UnityEngine.Debug类来临时解决这个问题 +- [fix] Upgrades the dnlib version, fixing the serious bug where `ModuleMD` saves dlls without setting the assembly-qualified `mscorlib` assembly types to the current assembly. +- [fix] Fixes the issue where `Generate/LinkXml` generates a `link.xml` that preserves all `UnityEngine.Debug`, causing compilation errors on iOS and visionOS platforms with Unity 2023 and higher versions. This bug is caused by Unity, and we temporarily solve this problem by ignoring the `UnityEngine.Debug` class when generating `link.xml`. ## 6.0.0 -发布日期 2024.6.11. +Release Date: 2024-6-11. ### Runtime -- [new] 支持Unity 6000.x.y及Unity 2023.2.x版本 -- [refactor] 合并ReversePInvokeMethodStub到MethodBridge,同时将MetadataModule中ReversePInvoke相关代码移到InterpreterModule -- [new] 支持MonoPInvokeCallback函数的参数或返回类型为struct类型 +- [new] Supports Unity 6000.x.y and Unity 2023.2.x versions. +- [refactor] Merges `ReversePInvokeMethodStub` into `MethodBridge`, and moves ReversePInvoke-related code from `MetadataModule` to `InterpreterModule`. +- [new] Supports MonoPInvokeCallback functions with parameters or return types as struct types. ### Editor -- [new] 支持Unity 6000.x.y及Unity 2023.2.x版本 -- [new] 支持MonoPInvokeCallback函数的参数或返回类型为struct类型 -- [new] 新增GeneratedAOTGenericReferenceExcludeExistsAOTClassAndMethods,计算热更新引用的AOT泛型类型和函数时排除掉AOT中已经存在的泛型和函数,最终生成更精准的补充元数据程序集列表 -- [fix] 修复在某些不支持visionOS的Unity版本上CopyStrippedAOTAssemblies类有编译错误的bug -- [fix] 修复计算 MonoPInvokeCallback的CallingConvention时,如果delegate在其他程序集中定义,会被错误当作Winapi,导致wrapper签名计算错误的bug -- [fix] PatchScriptingAssemblyList.cs在Unity 2023+版本webgl平台的编译错误 -- [fix] 修复计算Native2Manager桥接函数未考虑到MonoPInvokeCallback函数,导致从lua或者其他语言调用c#热更新函数有时候会出现UnsupportedNative2ManagedMethod的bug -- [refactor] 合并ReversePInvokeMethodStub到MethodBridge,同时将MetadataModule中ReversePInvoke相关代码移到InterpreterModule -- [opt] 打包时检查生成桥接函数时的development选项与当前development选项一致。`Generate/All`之后切换development选项再打包,将会产生严重的崩溃 -- [opt] `Generate/All`在生成之前检查是否已经安装HybridCLR - +- [new] Supports Unity 6000.x.y and Unity 2023.2.x versions. +- [new] Supports MonoPInvokeCallback functions with parameters or return types as struct types. +- [new] Adds `GeneratedAOTGenericReferenceExcludeExistsAOTClassAndMethods`, which calculates hot update references to AOT generic types and functions, excluding those already existing in AOT, ultimately generating a more accurate list of supplementary metadata assembly programs. +- [fix] Fixes the bug where `CopyStrippedAOTAssemblies` class has compilation errors on some Unity versions that do not support visionOS. +- [fix] Fixes the bug where calculating the `CallingConvention` of `MonoPInvokeCallback` is incorrectly treated as Winapi if the delegate is defined in another assembly, resulting in an incorrect wrapper signature calculation. +- [fix] PatchScriptingAssemblyList.cs has compilation errors on Unity 2023+ WebGL platforms. +- [fix] Fixes the bug where calculating Native2Manager bridge functions does not consider MonoPInvokeCallback functions, leading to `UnsupportedNative2ManagedMethod` when calling C# hot update functions from Lua or other languages. +- [refactor] Merges `ReversePInvokeMethodStub` into `MethodBridge`, and moves ReversePInvoke-related code from `MetadataModule` to `InterpreterModule`. +- [opt] Checks if the development option during packaging is consistent with the current development option. Switching the development option after `Generate/All` and then packaging will cause serious crashes. +- [opt] `Generate/All` checks if HybridCLR is installed before generating. ## 5.4.1 -发布日期 2024.5.30. +Release Date: 2024-5-30. ### Editor -- [new] 支持visionOS平台 -- [fix][**严重**] 修复计算 MonoPInvokeCallback的CallingConvention时,如果delegate在其他程序集中定义,会被错误当作Winapi,导致wrapper签名计算错误的bug -- [fix] 修复tvOS平台使用了错误的Unity-iPhone.xcodeproj路径导致找不到project.pbxproj的bug - +- [new] Supports the visionOS platform. +- [fix]**[Serious]** Fixes the bug where calculating `MonoPInvokeCallback`'s `CallingConvention` incorrectly treats it as Winapi if the delegate is defined in another assembly, resulting in an incorrect wrapper signature calculation. +- [fix] Fixes the bug where the wrong Unity-iPhone.xcodeproj path is used on tvOS platforms, causing the project.pbxproj to not be found. ## 5.4.0 -发布日期 2024.5.20. +Release Date: 2024-5-20. ### Runtime -- [new] ReversePInvoke支持CallingConvention -- [fix] 修复当参数个数为0时,由于argIdxs未赋值,calli的argBasePtr=argIdx[0]导致函数栈帧指向错误位置的bug -- [fix] 修复MetadataModule::GetReversePInvokeWrappe中ComputeSignature可能死锁的bug -- [fix] 修复AOT基类虚函数implements热更新interface函数时,虚函数调用使用CallInterpVirtual导致运行异常的bug -- [fix] 修复Transform中 PREFIX1前缀指令的子指令有部分缺失并且未按指令号排序的问题 -- [fix] 修复no.{x} prefix指令长3字节,但Transform中错误当作2字节处理的bug -- [fix] 修复unaligned.{x} prefix指令长3字节,但Transform中错误当作2字节处理的bug -- [opt] 删除 Interpreter_Execute中不必要的INIT_CLASS操作,因为PREPARE_NEW_FRAME_FROM_NATIVE中一定会检查 -- [opt] 不再缓存非泛型函数的MethodBody,优化内存 -- [opt] **优化补充元数据内存**,大约节省了2.8倍元数据dll大小的内存 -- [refactor] Image::_rawImage字段的类型由RawImage改为RawImage* +- [new] ReversePInvoke supports CallingConvention. +- [fix] Fixes the bug where `calli`'s `argBasePtr=argIdx[0]` when the number of arguments is 0, due to `argIdxs` not being assigned, causing the function stack frame to point to the wrong location. +- [fix] Fixes the bug where `MetadataModule::GetReversePInvokeWrappe`'s `ComputeSignature` might deadlock. +- [fix] Fixes the bug where AOT base class virtual functions implementing hot update interface functions use `CallInterpVirtual`, causing runtime exceptions. +- [fix] Fixes the issue where some sub-instructions of the `PREFIX1` prefix instruction are missing and not sorted by instruction number in the Transform. +- [fix] Fixes the bug where the `no.{x}` prefix instruction is 3 bytes long but incorrectly treated as 2 bytes in the Transform. +- [fix] Fixes the bug where the `unaligned.{x}` prefix instruction is 3 bytes long but incorrectly treated as 2 bytes in the Transform. +- [opt] Removes unnecessary `INIT_CLASS` operations in `Interpreter_Execute`, as `PREPARE_NEW_FRAME_FROM_NATIVE` will always check. +- [opt] No longer caches MethodBody of non-generic functions, optimizing memory. +- [opt] **Optimizes supplementary metadata memory**, saving approximately 2.8 times the size of metadata dll memory. +- [refactor] Changes the type of the `_rawImage` field in `Image` from `RawImage` to `RawImage*`. ### Editor -- [new] ReversePInvoke支持CallingConvention -- [fix] 修复计算struct等价性时,将struct平铺展开计算等价,在某些平台并不适用的bug。例如 struct A { uint8_t x; A2 y; } struct A2 { uint8_t x; int32_t y;}; 跟 struct B {uint8_t x; uint8_t y; int32_t z;} 在x86_64 abi下并不等价 -- [fix] 修复当Append xcode项目到现存的xcode项目时,第1次会导致'Run Script'命令被重复追加,从第2次起将会找不到--external-lib-il2-cpp而打印错误日志的bug +- [new] ReversePInvoke supports CallingConvention. +- [fix] Fixes the bug where calculating the equivalence of structs by flattening and expanding them does not apply on some platforms. For example, struct A { uint8_t x; A2 y; } struct A2 { uint8_t x; int32_t y;}; and struct B { uint8_t x; uint8_t y; int32_t z; } are not equivalent under the x86_64 ABI. +- [fix] Fixes the bug where appending to an existing xcode project causes the 'Run Script' command to be duplicated the first time and subsequently fails to find --external-lib-il2-cpp, printing an error log. ## 5.3.0 -发布日期 2024.4.22. +Release Date: 2024-4-22. ### Runtime -- [fix] 修复WebGL平台MachineState::CollectFramesWithoutDuplicates错误地使用hybridclr::metadata::IsInterpreterMethod移除热更新函数,导致补充元数据函数没有移除,StackFrames列表越来越长,打印Stack时死循环的bug。调整实现,统一使用il2cpp::vm::StackTrace::PushFrame及PopFrame实现完美的解释器栈打印。缺点是调用解释器函数增加了维护栈的开销 -- [fix] 修复StringUtils::Utf16ToUtf8未正确处理maxinumSize==0,导致InterpreterImage::ConvertConstValue中转换长度为0的string时巨幅溢出的严重bug -- [fix] 修复__ReversePInvokeMethod_XXX函数未设置Il2CppThreadContext,导致从native线程回调时获取Thread变量崩溃的bug -- [merge] 合并 2021.3.34-2021.3.37f1 il2cpp改动 -- [merge] 合并 2022.3.19-2022.3.23f1 il2cpp改动 +- [fix] Fixes the bug where MachineState::CollectFramesWithoutDuplicates incorrectly uses `hybridclr::metadata::IsInterpreterMethod` to remove hot update functions, leading to an increasingly long StackFrames list and an infinite loop when printing the stack. The implementation is adjusted to uniformly use `il2cpp::vm::StackTrace::PushFrame` and `PopFrame` for perfect interpreter stack printing. The downside is the increased overhead of maintaining the stack when calling interpreter functions. +- [fix] Fixes the serious bug where `StringUtils::Utf16ToUtf8` does not correctly handle `maxinumSize==0`, causing a significant overflow when converting strings of length 0 in `InterpreterImage::ConvertConstValue`. +- [fix] Fixes the bug where `_ReversePInvokeMethod_XXX` functions do not set `Il2CppThreadContext`, causing a crash when obtaining thread variables from native threads. +- [merge] Merges il2cpp changes from versions 2021.3.34 to 2021.3.37f1. +- [merge] Merges il2cpp changes from versions 2022.3.19 to 2022.3.23f1. ### Editor -- [fix] 修复导出tvOS工程时未修改xcode工程设置,导致打包失败的bug -- [fix] 修复构建tvOS目标时未复制裁剪AOT dll,导致生成桥接函数失败的bug -- [fix] 解决StripAOTDllCommand生成的临时项目的locationPathName不规范导致与某些插件如Embeded Browser不兼容的问题 -- [fix] 修复团结引擎1.1.0起删除TUANJIE_2022宏导致没有复制裁剪后的AOT程序集的bug -- [fix] 修复__ReversePInvokeMethod_XXX函数未设置Il2CppThreadContext,导致从native线程回调时获取Thread变量崩溃的bug -- [fix] 修复iOS平台开启development build选项时出现mono相关头文件找不到的bug +- [fix] Fixes the bug where exporting a tvOS project does not modify xcode project settings, causing packaging to fail. +- [fix] Fixes the bug where building for tvOS targets does not copy the pruned AOT dll, causing bridge function generation to fail. +- [fix] Solves the issue where the locationPathName generated by `StripAOTDllCommand` is not standardized, causing incompatibility with some plugins like the Embedded Browser. +- [fix] Fixes the bug where deleting the `TUANJIE_2022` macro in Unity Engine 1.1.0 does not copy the pruned AOT assembly. +- [fix] Fixes the bug where `_ReversePInvokeMethod_XXX` functions do not set `Il2CppThreadContext`, causing a crash when obtaining thread variables from native threads. +- [fix] Fixes the bug where iOS platform mono-related header files are not found when the development build option is enabled. ## 5.2.1 -发布日期 2024.4.7. +Release Date: 2024-4-7. ### Runtime -- [fix] 修复WebGL平台不打印堆栈日志的bug -- [fix] 修复RuntimeConfig::GetRuntimeOption获取InterpreterThreadExceptionFlowSize错误返回s_threadFrameStackSize的bug +- [fix] Fixes the bug where stack logs are not printed on the WebGL platform. +- [fix] Fixes the bug where `RuntimeConfig::GetRuntimeOption` incorrectly returns `s_threadFrameStackSize` for `InterpreterThreadExceptionFlowSize`. ### Editor -- [opt] LoadModule中设置 mod.EnableTypeDefFindCache = true,计算桥接函数的时间缩短为原来的1/3 -- [fix] 修复团结引擎导出iOS平台xcode工程文件名改名为Tuanjie-iPhone.xcodeproj导致构建xcode工程失败的bug +- [opt] Sets `mod.EnableTypeDefFindCache = true` in `LoadModule`, reducing the time to calculate bridge functions to one-third of the original. +- [fix] Fixes the bug where renaming the xcode project file to `Tuanjie-iPhone.xcodeproj` when exporting for the Unity Engine platform causes xcode project construction to fail. ## 5.2.0 -发布日期 2024.3.25. +Release Date: 2024-3-25. ### Runtime -- [new] 支持团结引擎 -- [new] 支持函数指针,支持IL2CPP_TYPE_FNPTR类型 -- [fix] 修复SetMdArrElementVarVar_ref指令未SetWriteBarrier的bug -- [fix] InvokeSingleDelegate当调用一个未补充元数据的泛型函数时,发生崩溃的bug -- [fix] 修复InterpreterDelegateInvoke调用delegate时,如果delegate指向未补充元数据的泛型函数,发生崩溃的bug -- [fix] 修复当BlobStream为空时, RawImage::GetBlobFromRawIndex断言index < _streamBlobHeap.size失败的bug -- [change] 重构metadata index设计,允许分配最多3个64M dll,16个16M dll,64个4M dll,255个1M dll +- [new] Supports the Unity Engine. +- [new] Supports function pointers, supporting IL2CPP_TYPE_FNPTR type. +- [fix] Fixes the bug where the `SetMdArrElementVarVar_ref` instruction does not SetWriteBarrier. +- [fix] Fixes the bug where `InvokeSingleDelegate` crashes when calling a generic function without supplementary metadata. +- [fix] Fixes the bug where `InterpreterDelegateInvoke` crashes when calling a delegate pointing to a generic function without supplementary metadata. +- [fix] Fixes the bug where `RawImage::GetBlobFromRawIndex` fails when the BlobStream is empty. +- [change] Refactorizes the metadata index design, allowing up to 3 64M dlls, 16 16M dlls, 64 4M dlls, and 255 1M dlls to be allocated. ### Editor -- [new] 支持团结引擎 -- [fix] 修复GenericArgumentContext不支持ElementType.FnPtr的bug -- [change] 为RuntimeApi添加[Preserve]特性,避免被裁剪 +- [new] Supports the Unity Engine. +- [fix] Fixes the bug where `GenericArgumentContext` does not support `ElementType.FnPtr`. +- [change] Adds the `[Preserve]` attribute to RuntimeApi to prevent it from being pruned. ## 5.1.0 -发布日期 2024.2.26. +Release Date: 2024-2-26. ### Runtime -- [fix] 修复2021未实现System.ByReference`1的.ctor及get_Value函数引发的运行错误的问题,il2cpp通过特殊的instrinct函数实现了正常运行 -- [opt] 优化元数据加载,将部分元数据改为延迟加载,大约减少30%的Assembly::Load的执行时间 -- [change] tempRet由Interpreter::Execute的局部变量改为CallDelegateInvoke_xxx的局部变量,减少嵌套过深时栈溢出的可能性 +- [fix] Fixes the runtime error caused by not implementing `System.ByReference`1's .ctor and get_Value functions in 2021, where il2cpp runs normally through special instinct functions. +- [opt] Optimizes metadata loading by delaying the loading of some metadata, reducing the execution time of `Assembly::Load` by approximately 30%. +- [change] Changes `tempRet` from a local variable in `Interpreter::Execute` to a local variable in `CallDelegateInvoke_xxx`, reducing the possibility of stack overflow when nesting is too deep. ## 5.0.0 -发布日期 2024.1.26. +Release Date: 2024-1-26. ### Runtime -- [new] 恢复对2019支持 -- [fix] 修复未按依赖顺序加载dll,由于在创建Image时缓存了当时的程序集列表,如果被依赖的程序集在本程序集后加载,延迟访问时由于不在缓存程序集列表而出现TypeLoadedException的bug - +- [new] Restores support for 2019. +- [fix] Fixes the bug where dlls are not loaded in dependency order, and since the assembly list at the time of image creation is cached, if dependent assemblies are loaded after this assembly, delayed access may result in `TypeLoadedException` due to not being in the cached assembly list. ### Editor -- [new] 恢复对2019支持 -- [new] 支持2019版本在iOS平台以源码形式构建 -- [new] 新增 AOTAssemblyMetadataStripper用于剔除AOT dll中非泛型函数元数据 -- [new] 新增 MissingMetadataChecker检查裁剪类型或者函数丢失的问题 -- [opt] 优化 AOTReference计算,如果泛型的所有泛型参数都是class约束,则不加入到需要补充元数据的集合 -- [change] 为了支持团结引擎而作了一些调整(注意,支持团结引擎的il2cpp_plus分支并未公开) +- [new] Restores support for 2019. +- [new] Supports building 2019 on the iOS platform in source form. +- [new] Adds AOTAssemblyMetadataStripper to remove non-generic function metadata from AOT dlls. +- [new] Adds MissingMetadataChecker to check for missing types or function metadata. +- [opt] Optimizes AOTReference calculations; if all generic parameters of a generic are class-constrained, they are not added to the set of metadata that needs to be supplemented. +- [change] Makes some adjustments to support the Unity Engine (note that the il2cpp_plus branch supporting the Unity Engine has not been made public). ## 4.0.15 -发布日期 2024.1.2. +Release Date: 2024-1-2. ### Runtime -- [fix] 修复计算未完全实例化的泛型类时将VAR和MVAR类型参数大小计算成sizeof(void*),导致计算出无效且过大的instance,在执行LayoutFieldsLocked过程中调用UpdateInstanceSizeForGenericClass错误地使用泛型基类instance覆盖设置了实例类型的instance值的严重bug -- [change] 支持打印热更新栈,虽然顺序不太正确 -- [change] 使用HYBRIDCLR_MALLOC之类分配函数替换IL2CPP_MALLOC -- [refactor] 重构Config接口,统一通过GetRuntimeOption和SetRuntimeOption获取和设置选项 -- [opt] 删除NewValueTypeVar和NewValueTypeInterpVar指令不必要的对结构memset操作 +- [fix] Fixes the serious bug where the size of the instance of a not fully instantiated generic class is calculated as `sizeof(void*)`, resulting in an invalid and excessively large instance. This causes an error when using the generic base class instance to overwrite the instance type value set during `LayoutFieldsLocked` in `UpdateInstanceSizeForGenericClass`. +- [change] Supports printing hot update stacks, although the order is not quite correct. +- [change] Replaces IL2CPP_MALLOC with HYBRIDCLR_MALLOC and similar allocation functions. +- [refactor] Refactorizes the Config interface to统一ly retrieve and set options through `GetRuntimeOption` and `SetRuntimeOption`. +- [opt] Removes unnecessary memset operations on structures for `NewValueTypeVar` and `NewValueTypeInterpVar` instructions. ### Editor -- [fix] 修复Additional Compiler Arguments中输入 -nullable:enable 之后,Editor抛出InvalidCastException的bug。来自报告 https://github.com/focus-creative-games/hybridclr/issues/116 -- [fix] 修复某些情况下报错:BuildFailedException: Build path contains a project previously built without the "Create Visual Studio Solution" -- [opt] 优化桥接函数生成,将同构的struct映射到同一个结构,减少了30-35%的桥接函数数量 -- [change] StripAOTDllCommand导出时不再设置BuildScriptsOnly选项 -- [change] 调整Installer窗口的显示内容 -- [refactor] RuntimeApi中设置hybridclr参数的功能统一通过GetRuntimeOption和SetRuntimeOption函数 +- [fix] Fixes the bug where entering `-nullable:enable` in Additional Compiler Arguments throws an `InvalidCastException` in the Editor. Reported at https://github.com/focus-creative-games/hybridclr/issues/116 +- [fix] Fixes the error: `BuildFailedException: Build path contains a project previously built without the "Create Visual Studio Solution"` +- [opt] Optimizes bridge function generation by mapping isomorphic structs to the same structure, reducing the number of bridge functions by 30-35%. +- [change] `StripAOTDllCommand` no longer sets the `BuildScriptsOnly` option when exporting. +- [change] Adjusts the display content of the Installer window. +- [refactor] Centralizes the functionality of setting hybridclr parameters in RuntimeApi through `GetRuntimeOption` and `SetRuntimeOption` functions. ## 4.0.14 -发布日期 2023.12.11. +Release Date: 2023-12-11. ### Runtime -- [fix] 修复优化 box; brtrue|brfalse序列时,当类型为class或nullable类型时,无条件转换为无条件branch语句的bug -- [fix] 修复 ClassFieldLayoutCalculator未释放 _classMap的每个key-value对中value对象,造成内存泄露的bug -- [fix] 修复计算 ExplicitLayout的struct的native_size的bug -- [fix] 修复当出现签名完全相同的虚函数与虚泛型函数时,计算override未考虑泛型签名,错误地返回了不匹配的函数,导致虚表错误的bug -- [fix][2021] 修复开启faster(smaller) build选项后某些情况下完全泛型共享AOT函数未使用补充元数据来设置函数指针,导致调用时出错的bug +- [fix] Fixes the bug where optimizing the `box; brtrue|brfalse` sequence unconditionally converts to an unconditional branch statement when the type is a class or nullable type. +- [fix] Fixes the bug where `ClassFieldLayoutCalculator` does not release value objects in each key-value pair of `_classMap`, causing a memory leak. +- [fix] Fixes the bug where calculating the native_size of a struct with `ExplicitLayout` is incorrect. +- [fix] Fixes the bug where when there are virtual functions with identical signatures and virtual generic functions, the override calculation does not consider the generic signature, incorrectly returning a non-matching function, resulting in an incorrect vtable. +- [fix][2021] Fixes the bug where when the faster (smaller) build option is enabled, some fully generic shared AOT functions do not use supplementary metadata to set function pointers, causing errors when called. ## 4.0.13 -发布日期 2023.11.27. +Release Date: 2023-11-27. ### Runtime -- [fix] 修复ConvertInvokeArgs有可能传递了非对齐args,导致CopyStackObject在armv7这种要求内存对齐的平台发生崩溃的bug -- [fix] 修复通过StructLayout指定size时,计算ClassFieldLayout的严重bug -- [fix] 修复bgt之类指令未取双重取反进行判断,导致当浮点数与Nan比较时由于不满足对称性执行了错误的分支的bug -- [fix] 修复Class::FromGenericParameter错误地设置了thread_static_fields_size=-1,导致为其分配ThreadStatic内存的严重bug -- [opt] Il2CppGenericInst分配统一使用MetadataCache::GetGenericInst分配唯一池对象,优化内存分配 -- [opt] 由于Interpreter部分Il2CppGenericInst统一使用MetadataCache::GetGenericInst,比较 Il2CppGenericContext时直接比较 class_inst和method_inst指针 +- [fix] Fixes the bug where `ConvertInvokeArgs` might pass non-aligned args, causing `CopyStackObject` to crash on platforms like armv7 that require memory alignment. +- [fix] Fixes the serious bug where calculating `ClassFieldLayout` when the size is specified by `StructLayout`. +- [fix] Fixes the bug where instructions like `bgt` do not double-negate the judgment, causing incorrect branch execution when comparing floating-point numbers with NaN due to不对称性. +- [fix] Fixes the serious bug where `Class::FromGenericParameter` incorrectly sets `thread_static_fields_size=-1`, causing ThreadStatic memory allocation for it. +- [opt] Allocates `Il2CppGenericInst`统一ly using `MetadataCache::GetGenericInst` to allocate unique pool objects, optimizing memory allocation. +- [opt] Since some Il2CppGenericInst in the Interpreter uses `MetadataCache::GetGenericInst` uniformly, compare `Il2CppGenericContext` by directly comparing class_inst and method_inst pointers. ### Editor -- [fix] 修复裁剪aot dll中出现netstandard时,生成桥接函数异常的bug -- [fix] 修复当出现非常规字段名时生成的桥接函数代码文件有编译错误的bug -- [change] 删除不必要的Datas~/Templates目录,直接以原始文件为模板 -- [refactor] 重构 AssemblyCache和 AssemblyReferenceDeepCollector,消除冗余代码 +- [fix] Fixes the bug where pruning aot dll results in an exception when generating bridge functions if netstandard is referenced. +- [fix] Fixes the bug where unusual field names result in compilation errors in the generated bridge function code files. +- [change] Removes the unnecessaryDatas~/Templates directory, using the original files as templates directly. +- [refactor] Refactorizes `AssemblyCache` and `AssemblyReferenceDeepCollector` to eliminate redundant code. ## 4.0.12 -发布日期 2023.11.02. +Release Date: 2023-11-02. ### Editor -- [fix] 修复BashUtil.RemoveDir的bug导致Installer安装失败的bug +- [fix] Fixes the bug in `BashUtil.RemoveDir` causing Installer installation to fail. ## 4.0.11 -发布日期 2023.11.02. +Release Date: 2023-11-02. ### Runtime -- [fix] 修复开启完全泛型共享后, 对于某些MethodInfo,由于methodPointer与virtualMethodPointer使用补充元数据后的解释器函数,而invoker_method仍然为支持完全泛型共享的调用形式,导致invoker_method与methodPointer及virtualMethodPointer不匹配的bug -- [fix] 修复Il2CppGenericContextCompare比较时仅仅对比inst指针的bug,造成热更新模块大量泛型函数重复 -- [fix] 修复完全泛型共享时未正确设置MethodInfo的bug +- [fix] Fixes the bug where when full generic sharing is enabled, for some `MethodInfo`, since `methodPointer` and `virtualMethodPointer` use the interpreter function with supplementary metadata, while `invoker_method` remains in the call form supporting full generic sharing, causing `invoker_method` to mismatch with `methodPointer` and `virtualMethodPointer`. +- [fix] Fixes the bug where `Il2CppGenericContextCompare` only compares inst pointers, causing a large number of duplicate generic functions in the hot update module. +- [fix] Fixes the bug where `MethodInfo` is not correctly set when full generic sharing is enabled. ### Editor -- [new] 检查当前安装的libil2cpp版本是否与package版本匹配,避免升级package后未重新install的问题 -- [new] Generate支持 netstandard -- [fix] 修复 ReversePInvokeWrap生成不必要地解析referenced dll,导致如果有aot dll引用了netstandard会出现解析错误的bug -- [fix] 修复BashUtil.RemoveDir在偶然情况下出现删除目录失败的问题。新增多次重试 -- [fix] 修复桥接函数计算时未归结函数参数类型,导致出现多个同名签名的bug - +- [new] Checks if the currently installed libil2cpp version matches the package version to avoid issues when upgrading the package without reinstalling. +- [new] `Generate` supports netstandard. +- [fix] Fixes the bug where `ReversePInvokeWrap` generates unnecessarily, parsing referenced dlls, causing parsing errors if aot dll references netstandard. +- [fix] Fixes the bug where `BashUtil.RemoveDir` occasionally fails to delete directories. Adds multiple retries. +- [fix] Fixes the bug where bridge function calculation does not reduce function parameter types, resulting in multiple functions with the same signature. ## 4.0.10 -发布日期 2023.10.12. +Release Date: 2023-10-12. ### Runtime -- [merge][il2cpp] 合并2022.3.10-2022.3.11f1的il2cpp改动,修复2022.3.11版本不兼容的问题 +- [merge][il2cpp] Merges il2cpp changes from versions 2022.3.10 to 2022.3.11f1, fixing incompatibility issues with version 2022.3.11. ## 4.0.9 -发布日期 2023.10.11. +Release Date: 2023-10-11. ### Runtime -- [merge][il2cpp][fix] 合并2021.3.29-2021.3.31f1的il2cpp改动,修复在2021.3.31版本的不兼容问题 -- [merge][il2cpp] 合并2022.3.7-2022.3.10f1的il2cpp改动 +- [merge][il2cpp][fix] Merges il2cpp changes from versions 2021.3.29 to 2021.3.31f1, fixing incompatibility issues with version 2021.3.31. +- [merge][il2cpp] Merges il2cpp changes from versions 2022.3.7 to 2022.3.10f1. ### Editor -- [fix] 修复2022版本iOS平台AddLil2cppSourceCodeToXcodeproj2022OrNewer的编译错误 +- [fix] Fixes the compilation error with `AddLil2cppSourceCodeToXcodeproj2022OrNewer` on the iOS platform for Unity 2022 versions. ## 4.0.8 -发布日期 2023.10.10. +Release Date: 2023-10-10. ### Runtime -- [fix] 修复计算值类型泛型桥接函数签名时,错误地将值类型泛型参数类型也换成签名,导致与Editor计算的签名不一致的bug -- [fix][refactor] RuntimeApi相关函数由PInvoke改为InternalCall,解决Android平台调用RuntimeApi时触发重新加载libil2cpp.a的问题 +- [fix] Fixes the bug where calculating the bridge function signature for value type generic bridge functions incorrectly replaces the value type generic parameter type with the signature, resulting in an inconsistent signature with the Editor calculation. +- [fix][refactor] Changes RuntimeApi related functions from PInvoke to InternalCall, solving the issue of reloading libil2cpp.a when calling RuntimeApi on Android platforms. ### Editor -- [refactor] RuntimeApi相关函数由PInvoke改为InternalCall -- [refactor] 调整HybridCLR.Editor模块一些不规范的命名空间 +- [refactor] Changes RuntimeApi related functions from PInvoke to InternalCall . +- [refactor] Adjusts some non-standard namespace names in the HybridCLR.Editor module. ## 4.0.7 -发布日期 2023.10.09. +Release Date: 2023-10-09. ### Runtime -- [fix] 修复initobj调用了CopyN,但CopyN未考虑对象的内存对齐的情况,在32位这种的平台可能发生未对齐访问异常的bug -- [fix] 修复计算未完全实例化的泛型函数的桥接函数签名时崩溃的bug -- [fix] 修复Il2cpp代码生成选项为faster(smaller)时,2021和2022版本GenericMethod::CreateMethodLocked的bug -- [remove] 移除所有array相关指令中index为int64_t的指令,简化代码 -- [remove] 移除ldfld_xxx_ref系列指令 +- [fix] Fixes the bug where `initobj` calls `CopyN`, but `CopyN` does not consider object memory alignment, which may cause unaligned access exceptions on platforms like 32-bit. +- [fix] Fixes the bug where calculating the bridge function signature for not fully instantiated generic functions crashes. +- [fix] Fixes the bug where `GenericMethod::CreateMethodLocked` has issues when the Il2cpp code generation option is faster (smaller) for versions 2021 and 2022. +- [remove] Removes all array-related instructions with int64_t indices to simplify the code. +- [remove] Removes the `ldfld_xxx_ref` series of instructions. ### Editor -- [fix] 修复生成桥接函数时,如果热更新程序集未包含任何代码直接引用了某个aot程序集,则没有为该aot程序集生成桥接函数,导致出现NotSupportNative2Managed异常的bug -- [fix] 修复mac下面路径过长导致拷贝文件失败的bug -- [fix] 修复发布PS5目标时未处理ScriptingAssemblies.json的bug -- [change] 打包时清空裁减aot dll目录 +- [fix] Fixes the bug where generating bridge functions does not generate bridge functions for an aot assembly if the hot update assembly does not directly reference any code, resulting in a `NotSupportNative2Managed` exception. +- [fix] Fixes the bug where copying files fails on Mac due to excessively long paths. +- [fix] Fixes the bug where publishing for PS5 targets does not process `ScriptingAssemblies.json`. +- [change] Clears the pruned aot dll directory when packaging. ## 4.0.6 -发布日期 2023.09.26. +Release Date: 2023-09-26. ### Runtime -- [fix] 修复2021和2022版本开启完全泛型共享后的bug -- [fix] 修复加载PlaceHolder Assembly后未增加assemblyVersion导致Assembly::GetAssemblies()错误地获得了旧程序集列表的bug +- [fix] Fixes the bug with versions 2021 and 2022 when full generic sharing is enabled. +- [fix] Fixes the bug where loading a PlaceHolder Assembly does not increase `assemblyVersion`, causing `Assembly::GetAssemblies()` to incorrectly obtain an old assembly list. ## 4.0.5 -发布日期 2023.09.25. +Release Date: 2023-09-25. ### Runtime -- [fix] 修复Transform中未析构pendingFlows造成内存泄露的bug -- [fix] 修复多维数组SetMdArrElement未区分带ref与不带ref结构的bug -- [fix] 修复CpobjVarVAr_WriteBarrier_n_4未设置size的bug -- [fix] 修复计算interface成员函数slot时未考虑到static之类函数的bug -- [fix] 修复2022版本ExplicitLayout未设置layout.alignment,导致计算出size==0的bug -- [fix] 修复InterpreterInvoke在完全泛型共享时,class类型的methodPointer与virtualMethodPointer有可能不一致,导致失误对this指针+1的bug -- [fix] ldobj当T为byte之类size<4的类型时,未将数据展开为int的bug -- [fix] 修复CopySize未考虑到内存对齐的问题 -- [opt] 优化stelem当元素为size较大的struct时统一当作含ref结构的问题 -- [opt] TemporaryMemoryArena默认内存块大小由1M调整8K -- [opt] 将Image::Image中Assembly::GetAllAssemblies()换成Assembly::GetAllAssemblies(AssemblyVector&),避免创建assembly快照而造成不必要的内存泄露 +- [fix] Fixes the bug where `Transform` does not destruct `pendingFlows`, causing a memory leak. +- [fix] Fixes the bug where `SetMdArrElement` does not distinguish between structures with and without ref. +- [fix] Fixes the bug where `CpobjVarVAr_WriteBarrier_n_4` does not set the size. +- [fix] Fixes the bug where calculating interface member function slots does not consider static and similar functions. +- [fix] Fixes the bug where `ExplicitLayout` is not set for layout.alignment in version 2022, resulting in a size of 0. +- [fix] Fixes the bug where `InterpreterInvoke` in full generic sharing may have inconsistent `methodPointer` and `virtualMethodPointer` for class types, causing an error in incrementing the this pointer by 1. +- [fix] Fixes the bug where `ldobj` does not expand data into an int when T is a type like byte with a size less than 4. +- [fix] Fixes the bug where `CopySize` does not consider memory alignment issues. +- [opt] Optimizes `stelem` when the element is a larger struct, unifying it as a structure containing ref. +- [opt] Adjusts the default memory block size of `TemporaryMemoryArena` from 1M to 8K. +- [opt] Changes `Assembly::GetAllAssemblies()` in `Image::Image` to `Assembly::GetAllAssemblies(AssemblyVector&)`, avoiding the creation of an assembly snapshot and preventing unnecessary memory leaks. ### Editor -- [fix] 修复StandaloneLinux平台DllImport的dllName和裁剪dll路径的错误 -- [change] 对于小版本不兼容的Unity版本,不再禁止安装,而是提示警告 -- [fix] 修复桥接函数计算中MetaUtil.ToShareTypeSig将Ptr和ByRef计算成IntPtr的bug,正确应该是UIntPtr +- [fix] Fixes the bug where `DllImport` for the StandaloneLinux platform has incorrect dllName and pruned dll path errors. +- [change] For Unity versions with minor incompatibility, installation is no longer prohibited, but a warning is displayed instead. +- [fix] Fixes the bug where `MetaUtil.ToShareTypeSig` calculates `Ptr` and `ByRef` as `IntPtr` in bridge function calculations, which should correctly be `UIntPtr`. ## 4.0.4 -发布日期 2023.09.11。 +Release Date: 2023-09-11. ### Runtime -- [new][platform] 彻底支持所有平台,包括UWP和PS5 -- [fix][严重] 修复计算interpreter部分enum类型的桥接函数签名的bug -- [fix] 修复在某些平台下有编译错误的问题 -- [fix] 修复转换STOBJ指令未正确处理增量式GC的bug -- [fix] [fix] 修复 StindVarVar_ref指令未正确设置WriteBarrier的bug -- [fix] 修复2020 GenericMethod::CreateMethodLocked调用vm::MetadataAllocGenericMethod()未持有s_GenericMethodMutex锁的线程安全问题 +- [new][platform] Fully supports all platforms, including UWP and PS5. +- [fix][serious] Fixes the bug where calculating the bridge function signature for interpreter parts of enum types is incorrect. +- [fix] Fixes compilation errors on some platforms. +- [fix] Fixes the bug where converting STOBJ instructions does not correctly handle incremental GC. +- [fix] Fixes the bug where the `StindVarVar_ref` instruction does not correctly set WriteBarrier. +- [fix] Fixes the thread safety issue where `GenericMethod::CreateMethodLocked` calls `vm::MetadataAllocGenericMethod()` without holding the `s_GenericMethodMutex` lock in version 2020. ### Editor -- [fix] 修复AddLil2cppSourceCodeToXcodeproj2021OrOlder在Unity 2020下偶然同时包含了不同目录的两个ThreadPool.cpp文件导致出现编译错误的问题 -- [fix] 修复不正确地从EditorUserBuildSettings.selectedBuildTargetGroup获得BuildGroupTarget的bug -- [fix] StripAOTDllCommand生成AOT dll时的BuildOption采用当前Player的设置,避免当打包开启development时,StripAOTDllCommand生成Release aot dll,而打包生成debug aot dll,产生补充元数据及桥接函数生成不匹配的严重错误 -- [change] 为了更好地支持全平台,调整了RuntimeApi.cs中dllName的实现,默认取 __Internal -- [change] 为了更好地支持全平台,自2021起裁剪AOT dll全都通过MonoHook复制 +- [fix] Fixes the bug where `AddLil2cppSourceCodeToXcodeproj2021OrOlder` includes two ThreadPool.cpp files in different directories, causing compilation errors in Unity 2020. +- [fix] Fixes the bug where obtaining `BuildGroupTarget` from `EditorUserBuildSettings.selectedBuildTargetGroup` is incorrect. +- [fix] `StripAOTDllCommand` generates AOT dlls with the current Player settings to avoid serious mismatches between supplementary metadata and bridge function generation when packaging with development enabled. +- [change] To better support all platforms, adjusts the implementation of dllName in RuntimeApi.cs to default to `__Internal`. +- [change] To better support all platforms, all AOT dll pruning since 2021 is done through MonoHook copying. ## 4.0.3 -发布日期 2023.08.31。 +Release Date: 2023-08-31. ### Editor -- [fix] 修复桥接函数计算的bug +- [fix] Fixes the bug in bridge function calculation. ## 4.0.2 -发布日期 2023.08.29。 +Release Date: 2023-08-29. ### Runtime -- [fix][严重] 修复LdobjVarVar_ref指令的bug。此bug由增量式GC代码引入 -- [fix] 修复未处理ResolveField获得的Field为nullptr时情形导致崩溃的bug -- [fix] 修复未正确处理AOT及interpreter interface中显式实现父接口函数的bug +- [fix][serious] Fixes the bug in `LdobjVarVar_ref` instruction. This bug was introduced by incremental GC code. +- [fix] Fixes the bug where `ResolveField` obtaining a Field as nullptr is not handled, causing a crash. +- [fix] Fixes the bug where AOT and interpreter interface explicitly implement parent interface functions are not correctly handled. ## 4.0.1 -发布日期 2023.08.28。 +Release Date: 2023-08-28. ### Runtime -- [fix] 修复2020版本开启增量式GC后出现编译错误的问题 +- [fix] Fixes the compilation error when incremental GC is enabled in version 2020. ## 4.0.0 -发布日期 2023.08.28。 +Release Date: 2023-08-28. ### Runtime -- [new] 支持增量式GC -- [refactor] 重构桥接函数,彻底支持所有il2cpp支持的平台 -- [opt] 大幅优化Native2Managed方向的传参 +- [new] Supports incremental GC. +- [refactor] Refactorizes bridge functions to fully support all platforms supported by il2cpp. +- [opt] Significantly optimizes Native2Managed direction parameter passing. ### Editor -- [change] 删除增量式GC选项检查 -- [refactor] 重构桥接函数生成 +- [change] Removes incremental GC option checks. +- [refactor] Refactorizes bridge function generation. ## 3.4.2 -发布日期 2023.08.14。 +Release Date: 2023-08-14. ### Runtime -- [fix] 修复RawImage::LoadTables读取_4byteGUIDIndex的bug -- [version] 支持2022.3.7版本 -- [version] 支持2021.3.29版本 +- [fix] Fixes the bug in `RawImage::LoadTables` reading `_4byteGUIDIndex`. +- [version] Supports version 2022.3.7. +- [version] Supports version 2021.3.29. ### Editor -- [fix] 修复计算AOTGenericReference未考虑到泛型调用泛型的情况,导致少计算了泛型及补充元数据 +- [fix] Fixes the bug where calculating AOTGenericReference does not consider generic calls on generics, resulting in fewer calculated generics and supplementary metadata. ## 3.4.1 -发布日期 2023.07.31。 +Release Date: 2023-07-31. ### Runtime -- [fix] 修复 InitializeRuntimeMetadata的内存可见性问题 -- [fix] 修复CustomAttribute未正确处理父类NamedArg导致崩溃的bug -- [opt] 优化Transfrom Instinct指令的代码,从HashMap中快速查找而不是挨个匹配 +- [fix] Fixes the memory visibility issue in `InitializeRuntimeMetadata`. +- [fix] Fixes the bug where `CustomAttribute` does not correctly handle parent NamedArg, causing a crash. +- [opt] Optimizes the code for Transform Instinct instructions, quickly looking up in the HashMap instead of matching one by one. ### Editor -- [fix] 修复FilterHotFixAssemblies只对比程序集名尾部,导致有AOT的尾部与某个热更新程序集匹配时意外被过滤的bug -- [change] 检查Settings中热更新程序集列表配置中程序集名不能为空 +- [fix] Fixes the bug where `FilterHotFixAssemblies` only compares the tail of the assembly name, causing an assembly to be unexpectedly filtered if it matches the tail of an AOT assembly. +- [change] Checks that the assembly name in the hot update assembly list configuration in Settings is not empty. ## 3.4.0 -发布日期 2023.07.17。 +Release Date: 2023-07-17. ### Runtime -- [version] 支持2021.3.28和2022.3.4版本 -- [opt] 删除MachineState::InitEvalStack分配_StackBase后不必要的memset -- [fix] 修复Exception机制的bug -- [fix] 修复CustomAttribute不支持Type[]类型参数的bug -- [fix] 修复不支持new string(xxx)用法的问题 -- [refactor] 重构VTableSetup实现 -- [fix] 修复未计算子interface中显式实现父interface的函数的bug -- [opt] Lazy初始化CustomAttributeData,而不是加载时全部初始化,明显减少Assembly.Load时间 -- [fix] 修复2022 当new byte\[]{a,b,c...}方式初始化较长的byte[]数据时,返回错误数据的bug +- [version] Supports versions 2021.3.28 and 2022.3.4. +- [opt] Removes unnecessary memset after allocating `_StackBase` in `MachineState::InitEvalStack`. +- [fix] Fixes the exception mechanism bug. +- [fix] Fixes the bug where `CustomAttribute` does not support Type[] type parameters. +- [fix] Fixes the issue where the new string(xxx) syntax is not supported. +- [refactor] Refactorizes VTableSetup implementation. +- [fix] Fixes the bug where functions explicitly implementing parent interfaces in subinterfaces are not calculated. +- [opt] Lazily initializes `CustomAttributeData` instead of initializing all at load time, significantly reducing `Assembly.Load` time. +- [fix] Fixes the bug where new byte[]{a,b,c...} initialization of longer byte[] data returns incorrect data in version 2022. ### Editor -- [fix] 修复计算桥接函数未考虑到泛型类的成员函数中可能包含的Native2Managed调用 -- [change] link.xml及AOTGenericReferences.cs默认输出路径改为HybridCLRGenerate,避免与顶层HybridCLRData混淆 -- [fix] 修复Win下生成的Lump文件中include路径以\为目录分隔符导致同步到Mac后找不到路径的bug -- [refactor] 重构Installer - +- [fix] Fixes the bug where calculating bridge functions does not consider Native2Managed calls that may be included in generic class member functions. +- [change] The default output paths for link.xml and AOTGenericReferences.cs are changed to HybridCLRGenerate to avoid confusion with the top-level HybridCLRData. +- [fix] Fixes the bug where the include path in the lump file generated on Windows uses \ as the directory separator, causing path not found errors when synchronized to Mac. +- [refactor] Refactorizes the Installer. ## 3.3.0 -发布日期 2023.07.03。 +Release Date: 2023-07-03. ### Runtime -- [fix] 修复localloc分配的内存未释放的bug -- [change] MachineState改用RegisterRoot的方式注册执行栈,避免GC时扫描整个堆栈 -- [opt] 优化Managed2NativeCallByReflectionInvoke性能,提前计算好传参方式 -- [refactor] 重构ConvertInvokeArgs +- [fix] Fixes the bug where memory allocated by localloc is not released. +- [change] `MachineState` uses RegisterRoot to register the execution stack, avoiding GC scanning of the entire stack. +- [opt] Optimizes the performance of Managed2NativeCallByReflectionInvoke by calculating the parameter passing method in advance. +- [refactor] Refactorizes ConvertInvokeArgs. ### Editor -- [fix] 修复2020-2021编译libil2cpp.a未包含brotli相关代码文件导致出现编译错误的bug -- [fix] 修复从导出xcode项目包含绝对路径导致传送到其他机器上编译时找不到路径的bug -- [fix] 解决Generate LinkXml、 MethodBridge、AOTGenericReference、ReversePInvokeWrap 生成不稳定的问题 -- [fix] 修复使用不兼容版本打开Installer时出现异常的bug -- [change] 禁用hybridclr后打包ios时不再修改导出的xcode工程 +- [fix] Fixes the bug where compiling libil2cpp.a for 2020-2021 does not include brotli-related code files, resulting in compilation errors. +- [fix] Fixes the bug where exporting an xcode project includes absolute paths, causing path not found errors when compiled on other machines. +- [fix] Solves the instability issues in generating LinkXml, MethodBridge, AOTGenericReference, and ReversePInvokeWrap. +- [fix] Fixes the exception when opening the Installer with an incompatible version. +- [change] When hybridclr is disabled, packaging iOS no longer modifies the exported xcode project. ## 3.2.1 ### Runtime -- [fix] 修复il2cpp TypeNameParser未将类型名中转义字符'\'去掉,导致找不到嵌套子类型的bug +- [fix] Fixes the bug where il2cpp TypeNameParser does not remove escape characters '\' from type names, causing nested child types to not be found. ### Editor -- [new] Installer界面新增显示package版本 -- [new] CompileDll新增MacOS、Linux、WebGL目标 -- [fix] 修复重构文档站后的帮助文档的链接错误 -- [change] 为Anaylizer加上using 限定,解决某些情况下与项目的类型同名而产生编译冲突的问题 +- [new] The Installer interface adds display of package version. +- [new] CompileDll adds MacOS, Linux, and WebGL targets. +- [fix] Fixes the help documentation link errors after refactoring the documentation site. +- [change] Adds using qualifiers to Analyzer to resolve compilation conflicts with project types that have the same name. ## 3.2.0 ### Runtime -- [fix] 修复未在PlaceHolder中的Assembly加载时,如果由于不在Assembly列表,也没有任何解释器栈,导致Class::resolve_parse_info_internal查找不到类型的bug -- [fix] 修复读取CustomAttribute System.Type类型数据崩溃的bug +- [fix] Fixes the bug where if an Assembly is not in the PlaceHolder, and there is no interpreter stack, `Class::resolve_parse_info_internal` cannot find the type due to not being in the Assembly list. ### Editor -- [new] 支持直接从源码打包iOS,不再需要单独编译libil2cpp.a -- [opt] 优化版本不兼容时错误提示,不再抛出异常,而是显示"与当前版本不兼容" - +- [new] Supports packaging iOS directly from source code, no longer needing to compile libil2cpp.a separately. +- [opt] Optimizes error prompts for incompatible versions, no longer throwing exceptions, but displaying "incompatible with the current version". ## 3.1.1 ### Runtime -- [fix] 修复2021及更高版本,InterpreterModule::Managed2NativeCallByReflectionInvoke调用值类型成员函数时,对this指针多余this=this-1操作。 -- [fix] 修复解析CustomAttribute中Enum[]类型字段的bug -- [fix] 修复2021及更高版本反射调用值类型 close Delegate的Invoke函数时未修复target指针的bug -- [new] 新增对增量式GC宏的检查,避免build.gradle中意外开启增量式GC引发的极其隐蔽的问题 +- [fix] Fixes the bug where InterpreterModule::Managed2NativeCallByReflectionInvoke calls value type member functions in 2021 and higher versions, with an extra this=this-1 operation. +- [fix] Fixes the bug where parsing CustomAttribute Enum[] type fields. +- [fix] Fixes the bug where invoking the Invoke function of a closed Delegate via reflection in 2021 and higher versions does not repair the target pointer. ### Editor -- [fix] 修复 Win32、Android32、WebGL平台的编译错误 -- [fix] 修复计算桥接函数时未考虑到补充元数据泛型实例化会导致访问到一些非公开的函数的情况,导致少生成一些必要的桥接函数 -- [opt] 生成AOTGenericReferences时,补充元数据assembly列表由注释改成List列表,方便在代码中直接使用。 -- [change] CheckSettings中不再自动设置Api Compatible Level +- [fix] Fixes compilation errors for Win32, Android32, and WebGL platforms. +- [fix] Fixes the bug where calculating bridge functions does not consider supplementary metadata generic instantiation, which may access some non-public functions, resulting in fewer necessary bridge functions being generated. +- [opt] When generating AOTGenericReferences, the supplementary metadata assembly list is changed from comments to List lists for easy direct use in code. +- [change] CheckSettings no longer automatically sets Api Compatible Level. ## 3.1.0 ### Runtime -- [rollback] 还原对Unity 2020.3.x支持 -- [fix] 修复 WebGL平台ABI的bug +- [rollback] Reverts support for Unity 2020.3.x. +- [fix] Fixes the WebGL platform ABI bug. ### Editor -- [rollback] 还原对Unity 2020.3.x支持 +- [rollback] Reverts support for Unity 2020.3.x. ## 3.0.3 ### Runtime -- [fix] 修复Enum::GetValues返回值不正确的bug +- [fix] Fixes the bug where Enum::GetValues returns incorrect values. ## 3.0.2 ### Runtime -- [fix] 修复Memory Profiler中创建内存快照时崩溃的bug +- [fix] Fixes the bug where creating a memory snapshot in Memory Profiler crashes. ### Editor -- [remove] 移除 `HybridCLR/CreateAOTDllSnapshot`菜单 - +- [remove] Removes the `HybridCLR/CreateAOTDllSnapshot` menu. ## 3.0.1 ### Runtime -- [new] 支持2022.3.0 +- [new] Supports version 2022.3.0. ## 3.0.0 ### Runtime -- [fix] 修复不支持访问CustomData字段及值的bug -- [remove] 移除对2019及2020版本支持 +- [fix] Fixes the bug where accessing CustomData fields and values is not supported. +- [remove] Removes support for 2019 and 2020 versions. ### Editor -- 包名更改为com.code-philosophy.hybridclr -- 移除UnityFS插件 -- 移除Zip插件 -- HybridCLR菜单位置调整 +- Changes the package name to com.code-philosophy.hybridclr. +- Removes the UnityFS plugin. +- Removes the Zip plugin. +- Adjusts the HybridCLR menu location. ## 2.4.2 ### Runtime -- [version] 支持 2020.3.48,最后一个2020LTS版本 -- [version] 支持 2021.3.25 +- [version] Supports 2020.3.48, the last 2020 LTS version. +- [version] Supports 2021.3.25. ## 2.4.1 @@ -675,7 +676,7 @@ ### Editor -- [fix] 修复遗漏 RELEASELOG.md.meta 文件的问题 +- [fix] Fixes the遗漏 RELEASELOG.md.meta file issue. ## 2.4.0 @@ -683,9 +684,9 @@ ### Editor -- [new] CheckSettings中检查ScriptingBackend及ApiCompatibleLevel,切换为正确的值 -- [new] 新增 MsvcStdextWorkaround.cs 解决2020 vs下stdext编译错误的问题 -- [fix] 修复当struct只包含一个float或double字段时,在arm64上计算桥接函数签名错误的bug +- [new] CheckSettings checks ScriptingBackend and ApiCompatibleLevel, switching to the correct values. +- [new] Adds MsvcStdextWorkaround.cs to solve stdext compilation errors in 2020 vs. +- [fix] Fixes the bug where calculating bridge function signatures for structs containing only one float or double field is incorrect on arm64. ## 2.3.1 @@ -693,7 +694,7 @@ ### Editor -- [fix] 修复本地复制libil2cpp却仍然从仓库下载安装的bug +- [fix] Fixes the bug where copying libil2cpp locally still downloads and installs from the repository. ## 2.3.0 @@ -701,7 +702,9 @@ ### Editor -- [new] Installer支持从本地目录复制改造后的libil2cpp -- [fix] 修复2019版本MonoBleedingEdge的子目录中包含了过长路径的文件导致Installer复制文件出错的问题 +- [new] The Installer supports copying modified libil2cpp from a local directory. +- [fix] Fixes the bug where the MonoBleedingEdge subdirectory in version 2019 includes files with excessively long paths, causing the Installer to fail when copying files. + + diff --git a/package.json b/package.json index 6151343..fc0723c 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "com.code-philosophy.hybridclr", - "version": "6.9.0", + "version": "6.10.0", "displayName": "HybridCLR", "description": "HybridCLR is a fully featured, zero-cost, high-performance, low-memory solution for Unity's all-platform native c# hotupdate.", "category": "Runtime",