mirror of
https://github.com/Ryujinx/Opentk.git
synced 2024-12-23 11:25:27 +00:00
Add slots into entry point table
This commit is contained in:
parent
7b93a87bb0
commit
2045f3e98e
|
@ -129,11 +129,27 @@ namespace Bind
|
|||
Console.WriteLine("Removing overloaded delegates.");
|
||||
RemoveOverloadedDelegates(delegates, wrappers);
|
||||
|
||||
Console.WriteLine("Generating address table.");
|
||||
GenerateAddressTable(delegates);
|
||||
|
||||
return wrappers;
|
||||
}
|
||||
|
||||
#region Private Members
|
||||
|
||||
static void GenerateAddressTable(DelegateCollection delegates)
|
||||
{
|
||||
int slot = -1;
|
||||
foreach (var list in delegates.Values)
|
||||
{
|
||||
slot++;
|
||||
foreach (var d in list)
|
||||
{
|
||||
d.Slot = slot;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// When we have a list of overloaded delegates, make sure that
|
||||
// all generated wrappers use the first (original) delegate, not
|
||||
// the overloaded ones. This allows us to reduce the amount
|
||||
|
|
|
@ -53,6 +53,7 @@ namespace Bind.Structures
|
|||
DeprecatedVersion = d.DeprecatedVersion;
|
||||
EntryPoint = d.EntryPoint;
|
||||
Obsolete = d.Obsolete;
|
||||
Slot = d.Slot;
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
@ -242,6 +243,9 @@ namespace Bind.Structures
|
|||
public string EntryPoint { get; set; }
|
||||
public string Obsolete { get; set; }
|
||||
|
||||
// Slot index in the address table
|
||||
public int Slot { get; set; }
|
||||
|
||||
#endregion
|
||||
|
||||
// This method should only be used for debugging purposes, not for code generation!
|
||||
|
|
Loading…
Reference in a new issue