[Mono-dev] [PATCH] Redirect certain string constructors to CreateString
Kornél Pál
kornelpal at gmail.com
Wed Jul 12 11:27:33 EDT 2006
Hi,
CreateString methods are not yet complete. The attached CreateString methods
were forged for testing only.
Encoding.GetString() methods are currently using new String (char []) so the
performance gain were probably insignificant and Latin1Encoding.GetString ()
methods currently use new String (sbyte*, int, int) that would result in
infinite recursion.
I'm going to check-in the modifications made to the runtime after I finish
the work on Encoding classes. (And when those modifications will be approved
as well.)
Thanks for the approval and your help in implementing the code.
Kornél
----- Original Message -----
From: "Zoltan Varga" <vargaz at gmail.com>
To: "Kornél Pál" <kornelpal at gmail.com>
Cc: <mono-devel-list at lists.ximian.com>
Sent: Wednesday, July 12, 2006 4:30 PM
Subject: Re: [Mono-dev] [PATCH] Redirect certain string constructors to
CreateString
Hi,
This looks ok to check-in, except the Console.WriteLine in CreateString ().
Zoltan
On 7/12/06, Kornél Pál <kornelpal at gmail.com> wrote:
> Attached a modified version. Using a function instead of (-1) is a good
> idea
> not because g_assert_not_reached () can be used but because (-1) will not
> be
> monopolized to string constructors (altought it's very unlikely to need
> any
> other kind of redirection).
>
> And I added two more g_asserts to ensure that CreateString methods are
> implemented using managed code.
>
> If you have any other comments please let me know.
>
> Kornél
>
> ----- Original Message -----
> From: "Zoltan Varga" <vargaz at gmail.com>
> To: "Kornél Pál" <kornelpal at gmail.com>
> Sent: Wednesday, July 12, 2006 12:43 PM
> Subject: Re: [Mono-dev] [PATCH] Redirect certain string constructors to
> CreateString
>
>
> Hi,
>
> This approach seems workable. It would be better to have a dummy string
> ctor (eg ves_icall_System_String_ctor_CreateString with a body of
> g_assert_not_reached ()) instead of the ICALL_... constant. Probably
> only
> mono_marshal_lock () is needed.
>
> On 7/11/06, Kornél Pál <kornelpal at gmail.com> wrote:
> > The previous one did not cache the results. Now this is fixed.
> >
> > BTW is mono_loader_lock () and mono_marshal_lock () necessary as well?
> >
> > Kornél
> >
> > ----- Original Message -----
> > From: "Kornél Pál" <kornelpal at gmail.com>
> > To: <mono-devel-list at lists.ximian.com>
> > Sent: Tuesday, July 11, 2006 9:20 AM
> > Subject: [PATCH] Redirect certain string constructors to CreateString
> >
> >
> > > Hi,
> > >
> > > The attached patch implements what I was planning to do.
> > >
> > > Note that if the patch is approved I'm not going to commit is yet
> > > because
> > > the encoding classes should be updated first.
> > >
> > > This patch contains String.cs modifications as well that should
> > > compile
> > > with
> > > the current encoding classes as well.
> > >
> > > I think this is a good solution and works for me but comments are
> > > welcome.
> > >
> > > Please review and approve the patch.
> > >
> > > Kornél
> > >
> >
> >
> > _______________________________________________
> > Mono-devel-list mailing list
> > Mono-devel-list at lists.ximian.com
> > http://lists.ximian.com/mailman/listinfo/mono-devel-list
> >
> >
> >
> >
>
>
>
More information about the Mono-devel-list
mailing list