mirror of
https://github.com/danbulant/Cosmos
synced 2026-05-24 12:35:31 +00:00
This commit is contained in:
parent
6695af454b
commit
739904bbdb
6 changed files with 10 additions and 10 deletions
|
|
@ -16,7 +16,7 @@ namespace KudzuTest {
|
|||
Console.WriteLine();
|
||||
|
||||
Console.WriteLine("StringBuilder test");
|
||||
Console.WriteLine(" " + Tests.StringBuilder());
|
||||
Console.WriteLine(Tests.StringBuilder());
|
||||
Console.WriteLine();
|
||||
|
||||
//Console.WriteLine("IntToStr 16 test");
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@ using Indy.IL2CPU.Plugs;
|
|||
|
||||
namespace Indy.IL2CPU.IL.X86.CustomImplementations.System {
|
||||
public static unsafe class EventHandlerImpl {
|
||||
public static void Ctor(uint* aThis, uint aObject, uint aMethod, [FieldAccess(Name = "System.Object _target")] ref uint aFldTarget, [FieldAccess(Name = "IntPtr _methodPtr")] ref uint aFldMethod) {
|
||||
public static void Ctor(uint* aThis, uint aObject, uint aMethod, [FieldAccess(Name = "System.Object System.Delegate._target")] ref uint aFldTarget, [FieldAccess(Name = "System.IntPtr System.Delegate._methodPtr")] ref uint aFldMethod) {
|
||||
//// move forward 8 bytes
|
||||
global::System.Diagnostics.Debugger.Break();
|
||||
aFldTarget = aObject;
|
||||
|
|
|
|||
|
|
@ -20,7 +20,7 @@ namespace Indy.IL2CPU.IL.X86 {
|
|||
if (xField == null) {
|
||||
throw new Exception("Field not found!");
|
||||
}
|
||||
string xFieldId = xField.ToString();
|
||||
string xFieldId = xField.GetFullName();
|
||||
mType = Engine.GetTypeInfo(xField.DeclaringType);
|
||||
mField = mType.Fields[xFieldId];
|
||||
}
|
||||
|
|
|
|||
|
|
@ -17,7 +17,7 @@ namespace Indy.IL2CPU.IL.X86 {
|
|||
if (xField == null) {
|
||||
throw new Exception("Field not found!");
|
||||
}
|
||||
string xFieldId = xField.ToString();
|
||||
string xFieldId = xField.GetFullName();
|
||||
mType = Engine.GetTypeInfo(xField.DeclaringType);
|
||||
mField = mType.Fields[xFieldId];
|
||||
}
|
||||
|
|
|
|||
|
|
@ -24,7 +24,7 @@ namespace Indy.IL2CPU.IL.X86 {
|
|||
if (xField == null) {
|
||||
throw new Exception("Field not found!");
|
||||
}
|
||||
string xFieldId = xField.ToString();
|
||||
string xFieldId = xField.GetFullName();
|
||||
mType = Engine.GetTypeInfo(xField.DeclaringType);
|
||||
mField = mType.Fields[xFieldId];
|
||||
}
|
||||
|
|
|
|||
|
|
@ -121,12 +121,12 @@ namespace Indy.IL2CPU.IL.X86 {
|
|||
// param 1 is sender
|
||||
// param 2 is eventargs
|
||||
Ldarg.Ldarg(aAssembler, aMethodInfo.Arguments[0]);
|
||||
Ldarg.Ldfld(aAssembler, aMethodInfo.TypeInfo, "System.Object _target");
|
||||
Ldarg.Ldfld(aAssembler, aMethodInfo.TypeInfo, "System.Object System.Delegate._target");
|
||||
for (int i = 1; i < aMethodInfo.Arguments.Length; i++) {
|
||||
Ldarg.Ldarg(aAssembler, aMethodInfo.Arguments[i]);
|
||||
}
|
||||
Ldarg.Ldarg(aAssembler, aMethodInfo.Arguments[0]);
|
||||
Ldarg.Ldfld(aAssembler, aMethodInfo.TypeInfo, "IntPtr _methodPtr");
|
||||
Ldarg.Ldfld(aAssembler, aMethodInfo.TypeInfo, "System.IntPtr System.Delegate._methodPtr");
|
||||
new CPUx86.Pop("eax");
|
||||
new CPUx86.Call(CPUx86.Registers.EAX);
|
||||
// new CPUx86.Pop(CPUx86.Registers.EAX);
|
||||
|
|
|
|||
Loading…
Reference in a new issue