public void CompileInvokeDotNet(string msgname)
{
msgname = msgname.Substring(1);
int p = msgname.IndexOf(':');
string mthname;
if (p >= 0)
{
string rest = msgname.Substring(p + 1);
if (string.IsNullOrEmpty(rest) || rest.StartsWith("with:"))
mthname = msgname.Substring(0, p);
else
mthname = msgname.Replace(":", string.Empty);
}
else
{
mthname = msgname;
}
if (mthname == "new")
{
this.CompileByteCode(ByteCode.NewDotNetObject, MessageArity(msgname));
}
else
{
this.CompileByteCode(ByteCode.InvokeDotNetMethod, this.CompileConstant(mthname), MessageArity(msgname));
}
}