-
Notifications
You must be signed in to change notification settings - Fork 5.4k
Expand file tree
/
Copy pathMethodDescCodeData.cs
More file actions
25 lines (20 loc) · 1.14 KB
/
MethodDescCodeData.cs
File metadata and controls
25 lines (20 loc) · 1.14 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
namespace Microsoft.Diagnostics.DataContractReader.Data;
internal sealed class MethodDescCodeData : IData<MethodDescCodeData>
{
static MethodDescCodeData IData<MethodDescCodeData>.Create(Target target, TargetPointer address) => new MethodDescCodeData(target, address);
public MethodDescCodeData(Target target, TargetPointer address)
{
Target.TypeInfo type = target.GetTypeInfo(DataType.MethodDescCodeData);
TemporaryEntryPoint = target.ReadCodePointer(address + (ulong)type.Fields[nameof(TemporaryEntryPoint)].Offset);
VersioningState = target.ReadPointer(address + (ulong)type.Fields[nameof(VersioningState)].Offset);
if (type.Fields.ContainsKey(nameof(OptimizationTier)))
{
OptimizationTier = target.Read<uint>(address + (ulong)type.Fields[nameof(OptimizationTier)].Offset);
}
}
public TargetCodePointer TemporaryEntryPoint { get; set; }
public TargetPointer VersioningState { get; set; }
public uint? OptimizationTier { get; init; }
}