mirror of
https://github.com/Ryujinx/Opentk.git
synced 2025-01-11 05:35:35 +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.");
|
Console.WriteLine("Removing overloaded delegates.");
|
||||||
RemoveOverloadedDelegates(delegates, wrappers);
|
RemoveOverloadedDelegates(delegates, wrappers);
|
||||||
|
|
||||||
|
Console.WriteLine("Generating address table.");
|
||||||
|
GenerateAddressTable(delegates);
|
||||||
|
|
||||||
return wrappers;
|
return wrappers;
|
||||||
}
|
}
|
||||||
|
|
||||||
#region Private Members
|
#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
|
// When we have a list of overloaded delegates, make sure that
|
||||||
// all generated wrappers use the first (original) delegate, not
|
// all generated wrappers use the first (original) delegate, not
|
||||||
// the overloaded ones. This allows us to reduce the amount
|
// the overloaded ones. This allows us to reduce the amount
|
||||||
|
|
|
@ -53,6 +53,7 @@ namespace Bind.Structures
|
||||||
DeprecatedVersion = d.DeprecatedVersion;
|
DeprecatedVersion = d.DeprecatedVersion;
|
||||||
EntryPoint = d.EntryPoint;
|
EntryPoint = d.EntryPoint;
|
||||||
Obsolete = d.Obsolete;
|
Obsolete = d.Obsolete;
|
||||||
|
Slot = d.Slot;
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
@ -242,6 +243,9 @@ namespace Bind.Structures
|
||||||
public string EntryPoint { get; set; }
|
public string EntryPoint { get; set; }
|
||||||
public string Obsolete { get; set; }
|
public string Obsolete { get; set; }
|
||||||
|
|
||||||
|
// Slot index in the address table
|
||||||
|
public int Slot { get; set; }
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
// This method should only be used for debugging purposes, not for code generation!
|
// This method should only be used for debugging purposes, not for code generation!
|
||||||
|
|
Loading…
Reference in a new issue