Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WrappedTypeAnalysisContext.IsValueType #304

Merged
merged 2 commits into from
Jun 28, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions Cpp2IL.Core/Model/Contexts/ArrayTypeAnalysisContext.cs
Original file line number Diff line number Diff line change
Expand Up @@ -19,5 +19,7 @@ public ArrayTypeAnalysisContext(Il2CppType rawType, AssemblyAnalysisContext refe

public override string DefaultName => $"{ElementType.Name}[{Rank}]";

public sealed override bool IsValueType => false;
ds5678 marked this conversation as resolved.
Show resolved Hide resolved

public int Rank { get; }
}
2 changes: 2 additions & 0 deletions Cpp2IL.Core/Model/Contexts/ByRefTypeAnalysisContext.cs
Original file line number Diff line number Diff line change
Expand Up @@ -17,5 +17,7 @@ public ByRefTypeAnalysisContext(Il2CppType rawType, AssemblyAnalysisContext refe

public override string DefaultName => $"{ElementType.Name}&";

public sealed override bool IsValueType => false;

public override TypeAnalysisContext ElementType => base.ElementType ?? throw new("TODO Support TYPE_BYREF");
}
2 changes: 2 additions & 0 deletions Cpp2IL.Core/Model/Contexts/PointerTypeAnalysisContext.cs
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,6 @@ public PointerTypeAnalysisContext(Il2CppType rawType, AssemblyAnalysisContext re
public override Il2CppTypeEnum Type => Il2CppTypeEnum.IL2CPP_TYPE_PTR;

public override string DefaultName => $"{ElementType.Name}*";

public sealed override bool IsValueType => false;
}
2 changes: 2 additions & 0 deletions Cpp2IL.Core/Model/Contexts/SzArrayTypeAnalysisContext.cs
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,6 @@ public SzArrayTypeAnalysisContext(Il2CppType rawType, AssemblyAnalysisContext re
public override Il2CppTypeEnum Type => Il2CppTypeEnum.IL2CPP_TYPE_SZARRAY;

public override string DefaultName => $"{ElementType.Name}[]";

public sealed override bool IsValueType => false;
}
2 changes: 0 additions & 2 deletions Cpp2IL.Core/Model/Contexts/WrappedTypeAnalysisContext.cs
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,6 @@ public abstract class WrappedTypeAnalysisContext : ReferencedTypeAnalysisContext

public override string DefaultNs => ElementType.Namespace;

public override bool IsValueType => ElementType.IsValueType; //We don't set a definition so the default implementation cannot determine if we're a value type or not.

protected WrappedTypeAnalysisContext(TypeAnalysisContext elementType, AssemblyAnalysisContext referencedFrom) : base(referencedFrom)
{
ElementType = elementType;
Expand Down
Loading