Author: zoltan
Date: 2008-01-26 09:58:34 -0500 (Sat, 26 Jan 2008)
New Revision: 93989

Modified:
   branches/vargaz/mini-linear-il/mono/mono/mini/ChangeLog
   branches/vargaz/mini-linear-il/mono/mono/mini/method-to-ir.c
Log:
2008-01-26  Zoltan Varga  <[EMAIL PROTECTED]>

        * method-to-ir.c (mono_method_to_ir2): Use the 
mono_helper_ldstr_mscorlib opt
        in the non AOT case as well.


Modified: branches/vargaz/mini-linear-il/mono/mono/mini/ChangeLog
===================================================================
--- branches/vargaz/mini-linear-il/mono/mono/mini/ChangeLog     2008-01-26 
14:29:39 UTC (rev 93988)
+++ branches/vargaz/mini-linear-il/mono/mono/mini/ChangeLog     2008-01-26 
14:58:34 UTC (rev 93989)
@@ -1,5 +1,8 @@
 2008-01-26  Zoltan Varga  <[EMAIL PROTECTED]>
 
+       * method-to-ir.c (mono_method_to_ir2): Use the 
mono_helper_ldstr_mscorlib opt
+       in the non AOT case as well.
+
        * mini-amd64.c (peephole_pass): Ignore NOPs in the instruction stream.
 
        * mini.h: Remove some duplicate declarations which crept in during 
merges.

Modified: branches/vargaz/mini-linear-il/mono/mono/mini/method-to-ir.c
===================================================================
--- branches/vargaz/mini-linear-il/mono/mono/mini/method-to-ir.c        
2008-01-26 14:29:39 UTC (rev 93988)
+++ branches/vargaz/mini-linear-il/mono/mono/mini/method-to-ir.c        
2008-01-26 14:58:34 UTC (rev 93989)
@@ -3200,7 +3200,7 @@
                alloc_ftn = mono_object_new;
        } else if (cfg->compile_aot && cfg->cbb->out_of_line && 
klass->type_token && klass->image == mono_defaults.corlib) {
                /* This happens often in argument checking code, eg. throw new 
FooException... */
-               /* Avoid relocations by calling a helper function specialized 
to mscorlib */
+               /* Avoid relocations and save some space by calling a helper 
function specialized to mscorlib */
                EMIT_NEW_ICONST (cfg, iargs [0], mono_metadata_token_index 
(klass->type_token));
                return mono_emit_jit_icall (cfg, mono_helper_newobj_mscorlib, 
iargs);
        } else {
@@ -8002,10 +8002,10 @@
                                        if (bblock->out_of_line) {
                                                MonoInst *iargs [2];
 
-                                               if (cfg->compile_aot && 
cfg->method->klass->image == mono_defaults.corlib) {
+                                               if (cfg->method->klass->image 
== mono_defaults.corlib) {
                                                        /* 
-                                                        * Avoid relocations by 
using a version of helper_ldstr
-                                                        * specialized to 
mscorlib.
+                                                        * Avoid relocations in 
AOT and save some space by using a 
+                                                        * version of 
helper_ldstr specialized to mscorlib.
                                                         */
                                                        EMIT_NEW_ICONST (cfg, 
iargs [0], mono_metadata_token_index (n));
                                                        *sp = 
mono_emit_jit_icall (cfg, mono_helper_ldstr_mscorlib, iargs);

_______________________________________________
Mono-patches maillist  -  [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches

Reply via email to