mirror of
https://github.com/Perfare/Il2CppDumper.git
synced 2025-01-25 02:03:02 -03:00
减少重复输出
This commit is contained in:
parent
2769c77526
commit
54e94ea462
1 changed files with 6 additions and 2 deletions
|
@ -25,6 +25,7 @@ namespace Il2CppDumper
|
||||||
private List<ulong> genericClassList = new List<ulong>();
|
private List<ulong> genericClassList = new List<ulong>();
|
||||||
private StringBuilder arrayClassHeader = new StringBuilder();
|
private StringBuilder arrayClassHeader = new StringBuilder();
|
||||||
private StringBuilder methodInfoHeader = new StringBuilder();
|
private StringBuilder methodInfoHeader = new StringBuilder();
|
||||||
|
private static HashSet<ulong> methodInfoCache = new HashSet<ulong>();
|
||||||
private static HashSet<string> keyword = new HashSet<string>(StringComparer.Ordinal)
|
private static HashSet<string> keyword = new HashSet<string>(StringComparer.Ordinal)
|
||||||
{ "klass", "monitor", "register", "_cs", "auto", "friend", "template", "near", "far", "flat", "default", "_ds", "interrupt", "inline",
|
{ "klass", "monitor", "register", "_cs", "auto", "friend", "template", "near", "far", "flat", "default", "_ds", "interrupt", "inline",
|
||||||
"unsigned", "signed", "asm", "if", "case", "break", "continue", "do", "new", "_", "short", "union"};
|
"unsigned", "signed", "asm", "if", "case", "break", "continue", "do", "new", "_", "short", "union"};
|
||||||
|
@ -137,10 +138,13 @@ namespace Il2CppDumper
|
||||||
var scriptMethod = new ScriptMethod();
|
var scriptMethod = new ScriptMethod();
|
||||||
json.ScriptMethod.Add(scriptMethod);
|
json.ScriptMethod.Add(scriptMethod);
|
||||||
scriptMethod.Address = il2Cpp.GetRVA(genericMethodPointer);
|
scriptMethod.Address = il2Cpp.GetRVA(genericMethodPointer);
|
||||||
var methodInfoName = $"MethodInfo_{scriptMethod.Address}";
|
var methodInfoName = $"MethodInfo_{scriptMethod.Address:X}";
|
||||||
var structTypeName = structNameDic[typeDef];
|
var structTypeName = structNameDic[typeDef];
|
||||||
var rgctxs = GenerateRGCTX(imageName, methodDef);
|
var rgctxs = GenerateRGCTX(imageName, methodDef);
|
||||||
GenerateMethodInfo(methodInfoName, structTypeName, rgctxs);
|
if (methodInfoCache.Add(genericMethodPointer))
|
||||||
|
{
|
||||||
|
GenerateMethodInfo(methodInfoName, structTypeName, rgctxs);
|
||||||
|
}
|
||||||
(var methodSpecTypeName, var methodSpecMethodName) = executor.GetMethodSpecName(methodSpec, true);
|
(var methodSpecTypeName, var methodSpecMethodName) = executor.GetMethodSpecName(methodSpec, true);
|
||||||
var methodFullName = methodSpecTypeName + "$$" + methodSpecMethodName;
|
var methodFullName = methodSpecTypeName + "$$" + methodSpecMethodName;
|
||||||
scriptMethod.Name = methodFullName;
|
scriptMethod.Name = methodFullName;
|
||||||
|
|
Loading…
Add table
Reference in a new issue