• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

SamboyCoding / Cpp2IL / 11023494789

24 Sep 2024 11:30PM UTC coverage: 28.383% (-0.1%) from 28.517%
11023494789

push

github

SamboyCoding
Core: A bunch of changes to WASM sig calculation.

This still doesn't work properly. Make it make sense. Please.

1238 of 6094 branches covered (20.32%)

Branch coverage included in aggregate %.

15 of 86 new or added lines in 13 files covered. (17.44%)

2 existing lines in 2 files now uncovered.

3341 of 10039 relevant lines covered (33.28%)

102017.76 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

42.22
/Cpp2IL.Core/Model/Contexts/SystemTypesContext.cs
1
namespace Cpp2IL.Core.Model.Contexts;
2

3
public class SystemTypesContext
4
{
5
    private ApplicationAnalysisContext _appContext;
6

7
    public TypeAnalysisContext SystemObjectType { get; }
73,365✔
8
    public TypeAnalysisContext SystemVoidType { get; }
354✔
9
    public TypeAnalysisContext SystemBooleanType { get; }
2,472✔
10
    public TypeAnalysisContext SystemCharType { get; }
48✔
11
    public TypeAnalysisContext SystemSByteType { get; }
×
12
    public TypeAnalysisContext SystemByteType { get; }
24✔
13
    public TypeAnalysisContext SystemInt16Type { get; }
×
14
    public TypeAnalysisContext SystemUInt16Type { get; }
×
15
    public TypeAnalysisContext SystemInt32Type { get; }
40,816✔
16
    public TypeAnalysisContext SystemUInt32Type { get; }
36✔
17
    public TypeAnalysisContext SystemInt64Type { get; }
×
18
    public TypeAnalysisContext SystemUInt64Type { get; }
36✔
19
    public TypeAnalysisContext SystemSingleType { get; }
72✔
20
    public TypeAnalysisContext SystemDoubleType { get; }
×
21
    public TypeAnalysisContext SystemIntPtrType { get; }
5,820✔
22
    public TypeAnalysisContext SystemUIntPtrType { get; }
×
23
    public TypeAnalysisContext SystemExceptionType { get; }
×
24
    public TypeAnalysisContext SystemStringType { get; }
3,950✔
25
    public TypeAnalysisContext SystemTypedReferenceType { get; }
×
26
    public TypeAnalysisContext SystemTypeType { get; }
×
27
    public TypeAnalysisContext SystemAttributeType { get; }
×
28
    public TypeAnalysisContext? UnmanagedCallersOnlyAttributeType { get; }
×
29

30
    public SystemTypesContext(ApplicationAnalysisContext appContext)
12✔
31
    {
32
        _appContext = appContext;
12✔
33

34
        var systemAssembly = _appContext.GetAssemblyByName("mscorlib") ?? throw new("Could not find system assembly");
12!
35

36
        SystemObjectType = systemAssembly.GetTypeByFullName("System.Object")!;
12✔
37
        SystemVoidType = systemAssembly.GetTypeByFullName("System.Void")!;
12✔
38

39
        SystemBooleanType = systemAssembly.GetTypeByFullName("System.Boolean")!;
12✔
40
        SystemCharType = systemAssembly.GetTypeByFullName("System.Char")!;
12✔
41

42
        SystemSByteType = systemAssembly.GetTypeByFullName("System.SByte")!;
12✔
43
        SystemByteType = systemAssembly.GetTypeByFullName("System.Byte")!;
12✔
44

45
        SystemInt16Type = systemAssembly.GetTypeByFullName("System.Int16")!;
12✔
46
        SystemUInt16Type = systemAssembly.GetTypeByFullName("System.UInt16")!;
12✔
47

48
        SystemInt32Type = systemAssembly.GetTypeByFullName("System.Int32")!;
12✔
49
        SystemUInt32Type = systemAssembly.GetTypeByFullName("System.UInt32")!;
12✔
50

51
        SystemInt64Type = systemAssembly.GetTypeByFullName("System.Int64")!;
12✔
52
        SystemUInt64Type = systemAssembly.GetTypeByFullName("System.UInt64")!;
12✔
53

54
        SystemSingleType = systemAssembly.GetTypeByFullName("System.Single")!;
12✔
55
        SystemDoubleType = systemAssembly.GetTypeByFullName("System.Double")!;
12✔
56

57
        SystemIntPtrType = systemAssembly.GetTypeByFullName("System.IntPtr")!;
12✔
58
        SystemUIntPtrType = systemAssembly.GetTypeByFullName("System.UIntPtr")!;
12✔
59

60
        SystemStringType = systemAssembly.GetTypeByFullName("System.String")!;
12✔
61
        SystemTypedReferenceType = systemAssembly.GetTypeByFullName("System.TypedReference")!;
12✔
62
        SystemTypeType = systemAssembly.GetTypeByFullName("System.Type")!;
12✔
63

64
        SystemExceptionType = systemAssembly.GetTypeByFullName("System.Exception")!;
12✔
65
        SystemAttributeType = systemAssembly.GetTypeByFullName("System.Attribute")!;
12✔
66
        
67
        UnmanagedCallersOnlyAttributeType = systemAssembly.GetTypeByFullName("System.Runtime.InteropServices.UnmanagedCallersOnlyAttribute");
12✔
68
    }
12✔
69

70
    public bool IsPrimitive(TypeAnalysisContext context)
71
    {
NEW
72
        return context == SystemBooleanType || 
×
NEW
73
               context == SystemCharType || 
×
NEW
74
               context == SystemSByteType || 
×
NEW
75
               context == SystemByteType ||
×
NEW
76
               context == SystemInt16Type || 
×
NEW
77
               context == SystemUInt16Type || 
×
NEW
78
               context == SystemInt32Type || 
×
NEW
79
               context == SystemUInt32Type || 
×
NEW
80
               context == SystemInt64Type ||
×
NEW
81
               context == SystemUInt64Type || 
×
NEW
82
               context == SystemSingleType || 
×
NEW
83
               context == SystemDoubleType || 
×
NEW
84
               context == SystemIntPtrType ||
×
NEW
85
               context == SystemUIntPtrType;
×
86
    }
87
}
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc