[Mono-dev] [PATCH] Enable inlining of pointer-sized initonly static fields when using moving GC

Zoltan Varga vargaz at gmail.com
Thu Apr 22 06:01:02 EDT 2010


Looks ok.

     Zoltan

2010/4/22 Kornél Pál <kornelpal at gmail.com>

> Hi,
>
> native int, unsigned native int, unmanaged pointers, and function pointers
> are all unmanaged; thus are not affected by a moving GC.
>
> Please review the patch.
>
> Thanks.
>
> Kornél
>
> Index: mono/mono/mini/method-to-ir.c
> ===================================================================
> --- mono/mono/mini/method-to-ir.c       (revision 155936)
> +++ mono/mono/mini/method-to-ir.c       (working copy)
> @@ -8247,21 +8247,21 @@
>                                                EMIT_NEW_ICONST (cfg, *sp,
> *((guint32 *)addr));
>                                                sp++;
>                                                break;
> -#ifndef HAVE_MOVING_COLLECTOR
>                                        case MONO_TYPE_I:
>                                        case MONO_TYPE_U:
> +                                       case MONO_TYPE_PTR:
> +                                       case MONO_TYPE_FNPTR:
> +#ifndef HAVE_MOVING_COLLECTOR
>                                        case MONO_TYPE_STRING:
>                                        case MONO_TYPE_OBJECT:
>                                        case MONO_TYPE_CLASS:
>                                        case MONO_TYPE_SZARRAY:
> -                                       case MONO_TYPE_PTR:
> -                                       case MONO_TYPE_FNPTR:
>                                        case MONO_TYPE_ARRAY:
> +#endif
>                                                EMIT_NEW_PCONST (cfg, *sp,
> *((gpointer *)addr));
>                                                type_to_eval_stack_type
> ((cfg), field->type, *sp);
>                                                sp++;
>                                                break;
> -#endif
>                                        case MONO_TYPE_I8:
>                                        case MONO_TYPE_U8:
>                                                EMIT_NEW_I8CONST (cfg, *sp,
> *((gint64 *)addr));
>
> _______________________________________________
> Mono-devel-list mailing list
> Mono-devel-list at lists.ximian.com
> http://lists.ximian.com/mailman/listinfo/mono-devel-list
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.ximian.com/pipermail/mono-devel-list/attachments/20100422/8d0517fe/attachment.html 


More information about the Mono-devel-list mailing list