This commit is contained in:
mterwoord_cp 2009-09-14 15:04:29 +00:00
parent 5f7757e3f0
commit 34ef82629d
2 changed files with 10 additions and 2 deletions

View file

@ -22,7 +22,7 @@ namespace Indy.IL2CPU.X86.Plugs.CustomImplementations.MS.System {
}
}
[PlugMethod(Signature = "System_Void__System_String__ctor_System_Char___")]
//[PlugMethod(Signature = "System_Void__System_String__ctor_System_Char___")]
public static unsafe void Ctor(String aThis, [FieldAccess(Name = "$$Storage$$")] ref Char[] aStorage, Char[] aChars,
[FieldAccess(Name = "System.Int32 System.String.m_stringLength")]ref int aStringLength,
[FieldAccess(Name = "System.Int32 System.String.m_arrayLength")] ref int aArrayLength,

View file

@ -457,7 +457,7 @@ namespace Cosmos.IL2CPU {
}
}
if (xNeedsPlug) {
throw new Exception("Plug needed. " + aMethod.DeclaringType + "." + aMethod.Name);
throw new Exception("Plug needed. "+ MethodInfoLabelGenerator.GenerateFullName(aMethod));
}
//TODO: As we scan each method, we could update or put in a new list
@ -594,6 +594,10 @@ namespace Cosmos.IL2CPU {
PlugMethodAttribute xAttrib = null;
foreach (var xImpl in aImpls) {
// TODO: cleanup this loop, next statement shouldnt be neccessary
if (xResult != null) {
break;
}
// Plugs methods must be static, and public
// Search for non signature matches first since signature searches are slower
xResult = xImpl.GetMethod(aMethod.Name, BindingFlags.Static | BindingFlags.Public
@ -607,6 +611,9 @@ namespace Cosmos.IL2CPU {
, null, xParamTypes, null);
}
if (xResult == null) {
if (aTargetType == typeof(string) && aMethod.Name == ".ctor") {
Console.Write("");
}
// Search by signature
foreach (var xSigMethod in xImpl.GetMethods(BindingFlags.Static | BindingFlags.Public)) {
var xParams = xSigMethod.GetParameters();
@ -682,6 +689,7 @@ namespace Cosmos.IL2CPU {
}
if (xTargetMethod == aMethod) {
xResult = xSigMethod;
break;
}
}
}