Compare commits

..

1 Commits

Author SHA1 Message Date
walon 6a31d20923 [version] 发布v3.3.1版本 2023-07-12 23:15:22 +08:00
5 changed files with 28 additions and 80 deletions
+6 -6
View File
@@ -2,18 +2,18 @@
"versions": [
{
"unity_version":"2020",
"hybridclr" : { "branch":"v3.3.3"},
"il2cpp_plus": { "branch":"v2020-3.3.2"}
"hybridclr" : { "branch":"v3.3.0"},
"il2cpp_plus": { "branch":"v2020-3.3.0"}
},
{
"unity_version":"2021",
"hybridclr" : { "branch":"v3.3.3"},
"il2cpp_plus": { "branch":"v2021-3.3.2"}
"hybridclr" : { "branch":"v3.3.0"},
"il2cpp_plus": { "branch":"v2021-3.2.0"}
},
{
"unity_version":"2022",
"hybridclr" : { "branch":"v3.3.3"},
"il2cpp_plus": { "branch":"v2022-3.3.3"}
"hybridclr" : { "branch":"v3.3.0"},
"il2cpp_plus": { "branch":"v2022-3.3.0"}
}
]
}
+11 -7
View File
@@ -58,15 +58,15 @@ namespace HybridCLR.Editor.AOT
return;
}
gc = gc.ToGenericShare();
if (_genericTypes.Add(gc) && NeedWalk(null, gc.Type))
if (_genericTypes.Add(gc) && NeedWalk(gc.Type))
{
WalkType(gc);
}
}
private bool NeedWalk(MethodDef callFrom, TypeDef type)
private bool NeedWalk(TypeDef type)
{
return _hotUpdateAssemblyFiles.Contains(type.Module.Name) || callFrom == null || callFrom.HasGenericParameters;
return _hotUpdateAssemblyFiles.Contains(type.Module.Name);
}
private bool IsAotType(TypeDef type)
@@ -85,7 +85,7 @@ namespace HybridCLR.Editor.AOT
{
return;
}
if (NeedWalk(methodDef, method.Method.DeclaringType) && _genericMethods.Add(method))
if (_genericMethods.Add(method) && NeedWalk(method.Method.DeclaringType))
{
_newMethods.Add(method);
}
@@ -101,7 +101,7 @@ namespace HybridCLR.Editor.AOT
{
return;
}
if (NeedWalk(null, method.Method.DeclaringType) && _genericMethods.Add(method))
if (_genericMethods.Add(method) && NeedWalk(method.Method.DeclaringType))
{
_newMethods.Add(method);
}
@@ -157,9 +157,9 @@ namespace HybridCLR.Editor.AOT
for (uint rid = 1, n = ass.Metadata.TablesStream.TypeSpecTable.Rows; rid <= n; rid++)
{
var ts = ass.ResolveTypeSpec(rid);
var cs = GenericClass.ResolveClass(ts, null)?.ToGenericShare();
if (cs != null)
if (!ts.ContainsGenericParameter)
{
var cs = GenericClass.ResolveClass(ts, null)?.ToGenericShare();
TryAddAndWalkGenericType(cs);
}
}
@@ -167,6 +167,10 @@ namespace HybridCLR.Editor.AOT
for (uint rid = 1, n = ass.Metadata.TablesStream.MethodSpecTable.Rows; rid <= n; rid++)
{
var ms = ass.ResolveMethodSpec(rid);
if (ms.DeclaringType.ContainsGenericParameter || ms.GenericInstMethodSig.ContainsGenericParameter)
{
continue;
}
var gm = GenericMethod.ResolveMethod(ms, null)?.ToGenericShare();
TryAddMethodNotWalkType(gm);
}
@@ -1,7 +1,6 @@
using HybridCLR.Editor.Meta;
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
@@ -26,18 +25,15 @@ namespace HybridCLR.Editor.BuildProcessors
return assemblies;
}
List<string> allHotUpdateDllNames = SettingsUtil.HotUpdateAssemblyNamesExcludePreserved;
List<string> allHotupdateDllFiles = SettingsUtil.HotUpdateAssemblyFilesExcludePreserved;
// 检查是否重复填写
var hotUpdateDllSet = new HashSet<string>();
foreach(var hotUpdateDll in allHotUpdateDllNames)
{
if (string.IsNullOrWhiteSpace(hotUpdateDll))
{
throw new BuildFailedException($"热更新 assembly 名不能为空");
}
if (!hotUpdateDllSet.Add(hotUpdateDll))
{
throw new BuildFailedException($"热更新 assembly:{hotUpdateDll} 在列表中重复,请除去重复条目");
throw new Exception($"热更新 assembly:{hotUpdateDll} 在列表中重复,请除去重复条目");
}
}
@@ -45,24 +41,16 @@ namespace HybridCLR.Editor.BuildProcessors
// 检查是否填写了正确的dll名称
foreach (var hotUpdateDllName in allHotUpdateDllNames)
{
if (assemblies.Select(Path.GetFileNameWithoutExtension).All(ass => ass != hotUpdateDllName)
&& string.IsNullOrEmpty(assResolver.ResolveAssembly(hotUpdateDllName, false)))
string hotUpdateDllFile = hotUpdateDllName + ".dll";
if (assemblies.All(ass => !ass.EndsWith(hotUpdateDllFile)) && string.IsNullOrEmpty(assResolver.ResolveAssembly(hotUpdateDllName, false)))
{
throw new BuildFailedException($"热更新 assembly:{hotUpdateDllName} 不存在,请检查拼写错误");
throw new Exception($"热更新 assembly:{hotUpdateDllFile} 不存在,请检查拼写错误");
}
Debug.Log($"[FilterHotFixAssemblies] 过滤热更新assembly:{hotUpdateDllFile}");
}
// 将热更dll从打包列表中移除
return assemblies.Where(ass =>
{
string assName = Path.GetFileNameWithoutExtension(ass);
bool reserved = allHotUpdateDllNames.All(dll => !assName.Equals(dll, StringComparison.Ordinal));
if (!reserved)
{
Debug.Log($"[FilterHotFixAssemblies] 过滤热更新assembly:{assName}");
}
return reserved;
}).ToArray();
return assemblies.Where(ass => allHotupdateDllFiles.All(dll => !ass.EndsWith(dll, StringComparison.OrdinalIgnoreCase))).ToArray();
}
}
}
+2 -46
View File
@@ -1,50 +1,8 @@
# 发布日志
## 3.4.3
## 3.3.1
### Runtime
- [fix] 修复CalcClassNotStaticFields计算泛型类型的泛型父类时未inflate的bug
- [fix] 修复未处理ResolveField获得的Field为nullptr时情形导致崩溃的bug
- [fix] 修复Transform中未析构pendingFlows造成内存泄露的bug
- [opt] TemporaryMemoryArena默认内存块大小由1M调整8K
- [fix] 修复计算interface成员函数slot时未考虑到static之类函数的bug
- [fix] 修复2022版本ExplicitLayout未设置layout.alignment,导致计算出size==0的bug
- [fix] ldobj当T为byte之类size<4的类型时,未将数据展开为int的bug
- [fix] 修复未正确处理AOT及interpreter interface中显式实现父接口函数的bug
## 3.4.2
发布日期 2023.08.14。
### Runtime
- [fix] 修复RawImage::LoadTables读取_4byteGUIDIndex的bug
- [version] 支持2022.3.7版本
- [version] 支持2021.3.29版本
### Editor
- [fix] 修复计算AOTGenericReference未考虑到泛型调用泛型的情况,导致少计算了泛型及补充元数据
## 3.4.1
发布日期 2023.07.31。
### Runtime
- [fix] 修复 InitializeRuntimeMetadata的内存可见性问题
- [fix] 修复CustomAttribute未正确处理父类NamedArg导致崩溃的bug
- [opt] 优化Transfrom Instinct指令的代码,从HashMap中快速查找而不是挨个匹配
### Editor
- [fix] 修复FilterHotFixAssemblies只对比程序集名尾部,导致有AOT的尾部与某个热更新程序集匹配时意外被过滤的bug
- [change] 检查Settings中热更新程序集列表配置中程序集名不能为空
## 3.4.0
发布日期 2023.07.17。
发布日志 2023.07.17。
### Runtime
@@ -55,8 +13,6 @@
- [fix] 修复不支持new string(xxx)用法的问题
- [refactor] 重构VTableSetup实现
- [fix] 修复未计算子interface中显式实现父interface的函数的bug
- [opt] Lazy初始化CustomAttributeData,而不是加载时全部初始化,明显减少Assembly.Load时间
- [fix] 修复2022 当new byte\[]{a,b,c...}方式初始化较长的byte[]数据时,返回错误数据的bug
### Editor
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "com.code-philosophy.hybridclr",
"version": "3.4.3",
"version": "3.3.1",
"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",