Welcome to mirror list, hosted at ThFree Co, Russian Federation.

CalliMarshallingMethodThunk.Mangling.cs « Stubs « IL « TypeSystem « Common « tools « coreclr « src - github.com/dotnet/runtime.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 95beb89a11add254eb733869a17ed2f072bb4a1d (plain)
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
26
27
28
29
30
31
32
33
34
35
36
37
38
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.

using System;
using System.Diagnostics;

using Internal.TypeSystem;

namespace Internal.IL.Stubs
{
    public partial class CalliMarshallingMethodThunk : IPrefixMangledSignature
    {
        MethodSignature IPrefixMangledSignature.BaseSignature
        {
            get
            {
                return _targetSignature;
            }
        }

        string IPrefixMangledSignature.Prefix
        {
            get
            {
                string prefix = RuntimeMarshallingEnabled ? "CalliWithRuntimeMarshalling" : "Calli";

                // The target signature is expected to be normalized as MethodSignatureFlags.UnmanagedCallingConvention
                Debug.Assert((_targetSignature.Flags & MethodSignatureFlags.UnmanagedCallingConventionMask) == MethodSignatureFlags.UnmanagedCallingConvention);

                // Append calling convention details to the prefix
                if (_targetSignature.HasEmbeddedSignatureData)
                    prefix += _targetSignature.GetStandaloneMethodSignatureCallingConventions().ToString("x");

                return prefix;
            }
        }
    }
}