mirror of
https://github.com/AssetRipper/AssetRipper.CIL.git
synced 2026-11-13 04:26:24 -10:00
Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
c56f1aa207 | ||
|
|
eee7febc56 | ||
|
|
42e10fc7d2 | ||
|
|
ed3efe58f7 | ||
|
|
aaa9f870f3 | ||
|
|
46a18efa27 | ||
|
|
61c354bd4f | ||
|
|
227524817f |
No files matched your search
@@ -9,13 +9,13 @@
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="18.3.0" />
|
||||
<PackageReference Include="NUnit" Version="4.5.0" />
|
||||
<PackageReference Include="NUnit.Analyzers" Version="4.11.2">
|
||||
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="18.8.1" />
|
||||
<PackageReference Include="NUnit" Version="4.6.1" />
|
||||
<PackageReference Include="NUnit.Analyzers" Version="4.14.0">
|
||||
<PrivateAssets>all</PrivateAssets>
|
||||
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
|
||||
</PackageReference>
|
||||
<PackageReference Include="NUnit3TestAdapter" Version="6.1.0" />
|
||||
<PackageReference Include="NUnit3TestAdapter" Version="6.2.0" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
|
||||
@@ -1,58 +0,0 @@
|
||||
|
||||
Microsoft Visual Studio Solution File, Format Version 12.00
|
||||
# Visual Studio Version 17
|
||||
VisualStudioVersion = 17.9.34321.82
|
||||
MinimumVisualStudioVersion = 10.0.40219.1
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "AssetRipper.CIL", "AssetRipper.CIL\AssetRipper.CIL.csproj", "{3F385513-F04F-4282-9B91-2693CA93ED1C}"
|
||||
EndProject
|
||||
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{88415A5B-37C1-4CDF-93E0-2682460B6390}"
|
||||
ProjectSection(SolutionItems) = preProject
|
||||
.editorconfig = .editorconfig
|
||||
.gitignore = .gitignore
|
||||
Directory.Build.props = Directory.Build.props
|
||||
LICENSE = LICENSE
|
||||
README.md = README.md
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "AssetRipper.CIL.Validator", "AssetRipper.CIL.Validator\AssetRipper.CIL.Validator.csproj", "{0E177F49-031D-486A-ADD2-6823263D1923}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AssetRipper.CIL.Standardizer", "AssetRipper.CIL.Standardizer\AssetRipper.CIL.Standardizer.csproj", "{9E6D8580-5C3C-4AA8-89C9-34F475B79B24}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AssetRipper.CIL.Stubber", "AssetRipper.CIL.Stubber\AssetRipper.CIL.Stubber.csproj", "{A35A3452-2211-4DF5-A5A5-406FDF1E1A76}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AssetRipper.CIL.Tests", "AssetRipper.CIL.Tests\AssetRipper.CIL.Tests.csproj", "{FC03589F-7457-45E7-9628-F9E003F30BAB}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug|Any CPU = Debug|Any CPU
|
||||
Release|Any CPU = Release|Any CPU
|
||||
EndGlobalSection
|
||||
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||
{3F385513-F04F-4282-9B91-2693CA93ED1C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{3F385513-F04F-4282-9B91-2693CA93ED1C}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{3F385513-F04F-4282-9B91-2693CA93ED1C}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{3F385513-F04F-4282-9B91-2693CA93ED1C}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{0E177F49-031D-486A-ADD2-6823263D1923}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{0E177F49-031D-486A-ADD2-6823263D1923}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{0E177F49-031D-486A-ADD2-6823263D1923}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{0E177F49-031D-486A-ADD2-6823263D1923}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{9E6D8580-5C3C-4AA8-89C9-34F475B79B24}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{9E6D8580-5C3C-4AA8-89C9-34F475B79B24}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{9E6D8580-5C3C-4AA8-89C9-34F475B79B24}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{9E6D8580-5C3C-4AA8-89C9-34F475B79B24}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{A35A3452-2211-4DF5-A5A5-406FDF1E1A76}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{A35A3452-2211-4DF5-A5A5-406FDF1E1A76}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{A35A3452-2211-4DF5-A5A5-406FDF1E1A76}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{A35A3452-2211-4DF5-A5A5-406FDF1E1A76}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{FC03589F-7457-45E7-9628-F9E003F30BAB}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{FC03589F-7457-45E7-9628-F9E003F30BAB}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{FC03589F-7457-45E7-9628-F9E003F30BAB}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{FC03589F-7457-45E7-9628-F9E003F30BAB}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
EndGlobalSection
|
||||
GlobalSection(ExtensibilityGlobals) = postSolution
|
||||
SolutionGuid = {FEAD0DEB-0A49-4BC9-A468-3D1E9D52EF2C}
|
||||
EndGlobalSection
|
||||
EndGlobal
|
||||
@@ -0,0 +1,14 @@
|
||||
<Solution>
|
||||
<Folder Name="/Solution Items/">
|
||||
<File Path=".editorconfig" />
|
||||
<File Path=".gitignore" />
|
||||
<File Path="Directory.Build.props" />
|
||||
<File Path="LICENSE" />
|
||||
<File Path="README.md" />
|
||||
</Folder>
|
||||
<Project Path="AssetRipper.CIL.Standardizer/AssetRipper.CIL.Standardizer.csproj" />
|
||||
<Project Path="AssetRipper.CIL.Stubber/AssetRipper.CIL.Stubber.csproj" />
|
||||
<Project Path="AssetRipper.CIL.Tests/AssetRipper.CIL.Tests.csproj" />
|
||||
<Project Path="AssetRipper.CIL.Validator/AssetRipper.CIL.Validator.csproj" />
|
||||
<Project Path="AssetRipper.CIL/AssetRipper.CIL.csproj" />
|
||||
</Solution>
|
||||
@@ -15,8 +15,8 @@
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="AsmResolver.DotNet" Version="6.0.0-beta.6" />
|
||||
<PackageReference Include="PolySharp" Version="1.15.0" PrivateAssets="all" IncludeAssets="runtime; build; native; contentfiles; analyzers; buildtransitive" />
|
||||
<PackageReference Include="AsmResolver.DotNet" Version="6.0.1" />
|
||||
<PackageReference Include="PolySharp" Version="1.16.0" PrivateAssets="all" IncludeAssets="runtime; build; native; contentfiles; analyzers; buildtransitive" />
|
||||
<PackageReference Include="System.Runtime.CompilerServices.Unsafe" Version="6.1.2" />
|
||||
</ItemGroup>
|
||||
|
||||
|
||||
@@ -61,7 +61,7 @@ public static class IHasCustomAttributeExtensions
|
||||
{
|
||||
TypeReference flagsTypeRef = new(module.CorLibTypeFactory.CorLibScope, "System", nameof(FlagsAttribute));
|
||||
MemberReference constructor = new(flagsTypeRef, ".ctor", MethodSignature.CreateInstance(module.CorLibTypeFactory.Void));
|
||||
return _this.AddCustomAttribute(module.DefaultImporter.ImportMethod(constructor));
|
||||
return _this.AddCustomAttribute(constructor);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -86,7 +86,7 @@ public static class IHasCustomAttributeExtensions
|
||||
|
||||
MemberReference constructor = new(compilerGeneratedTypeRef, ".ctor", MethodSignature.CreateInstance(module.CorLibTypeFactory.Void));
|
||||
|
||||
return _this.AddCustomAttribute(module.DefaultImporter.ImportMethod(constructor));
|
||||
return _this.AddCustomAttribute(constructor);
|
||||
}
|
||||
|
||||
static AssemblyReference GetOrAddReferenceToSystemRuntimeCompilerServices(ModuleDefinition module)
|
||||
|
||||
@@ -71,10 +71,11 @@ internal static class MethodStubber
|
||||
MethodSignature? methodSignature = baseConstructor.Signature;
|
||||
if (methodSignature is not null)
|
||||
{
|
||||
GenericContext genericContext = GenericContext.FromMethod(baseConstructor);
|
||||
methodInstructions.Add(CilOpCodes.Ldarg_0);
|
||||
foreach (TypeSignature baseParameterType in methodSignature.ParameterTypes)
|
||||
{
|
||||
methodInstructions.AddDefaultValue(baseParameterType);
|
||||
methodInstructions.AddDefaultValue(baseParameterType.InstantiateGenericTypes(genericContext));
|
||||
}
|
||||
methodInstructions.Add(CilOpCodes.Call, baseConstructor);
|
||||
}
|
||||
@@ -142,7 +143,7 @@ internal static class MethodStubber
|
||||
}
|
||||
else
|
||||
{
|
||||
return methodDefinition.DeclaringType.DeclaringModule.DefaultImporter.ImportMethod(baseConstructor);
|
||||
return baseConstructor;
|
||||
}
|
||||
}
|
||||
else if (baseType is TypeSpecification baseTypeSpec)
|
||||
@@ -162,8 +163,7 @@ internal static class MethodStubber
|
||||
{
|
||||
return null;
|
||||
}
|
||||
IMethodDefOrRef baseConstructorImported = methodDefinition.DeclaringType.DeclaringModule.DefaultImporter.ImportMethod(baseConstructor);
|
||||
return new MemberReference(baseType, baseConstructorImported.Name, baseConstructorImported.Signature);
|
||||
return new MemberReference(baseType, baseConstructor.Name, baseConstructor.Signature);
|
||||
}
|
||||
|
||||
return null;
|
||||
|
||||
@@ -25,7 +25,7 @@ public static class ModuleDefinitionExtensions
|
||||
?? throw new ArgumentOutOfRangeException(nameof(underlyingType), underlyingType, null);
|
||||
|
||||
TypeReference baseType = new(module.CorLibTypeFactory.CorLibScope, "System", "Enum");
|
||||
TypeDefinition type = new(@namespace, name, visibility.ToTypeAttributes() | TypeAttributes.Sealed, module.DefaultImporter.ImportType(baseType));
|
||||
TypeDefinition type = new(@namespace, name, visibility.ToTypeAttributes() | TypeAttributes.Sealed, baseType);
|
||||
module.TopLevelTypes.Add(type);
|
||||
AddEnumValue(type, underlyingTypeSignature);
|
||||
return type;
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
<CheckForOverflowUnderflow>true</CheckForOverflowUnderflow>
|
||||
<PolySharpIncludeRuntimeSupportedAttributes>true</PolySharpIncludeRuntimeSupportedAttributes>
|
||||
|
||||
<VersionPrefix>1.3.0</VersionPrefix>
|
||||
<VersionPrefix>1.3.2</VersionPrefix>
|
||||
<Copyright>Copyright (c) 2025 ds5678</Copyright>
|
||||
<Authors>ds5678</Authors>
|
||||
<Company>AssetRipper</Company>
|
||||
|
||||
Reference in new issue
Block a user