This commit is contained in:
mterwoord_cp 2008-02-07 09:43:42 +00:00
parent 6695af454b
commit 739904bbdb
6 changed files with 10 additions and 10 deletions

View file

@ -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");

View file

@ -6,11 +6,11 @@ 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;
aFldMethod = aMethod;
}
}
}
}

View file

@ -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];
}

View file

@ -2,7 +2,7 @@ using System;
using System.IO;
using CPUx86 = Indy.IL2CPU.Assembler.X86;
using CPUx86 = Indy.IL2CPU.Assembler.X86;
using System.Reflection;
namespace Indy.IL2CPU.IL.X86 {
@ -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];
}

View file

@ -1,6 +1,6 @@
using System;
using System.Collections;
using System.Collections.Generic;
using System.Collections.Generic;
using System.Linq;
@ -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];
}

View file

@ -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);