dotgnu-pnet-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[dotgnu-pnet-commits] [SCM] DotGNU Portable.NET engine, compilers and to


From: Klaus Treichel
Subject: [dotgnu-pnet-commits] [SCM] DotGNU Portable.NET engine, compilers and tools (pnet) branch, master, updated. f701605f1686559e385d18b82c1e2784876e62bf
Date: Tue, 24 Nov 2009 14:49:05 +0000

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "DotGNU Portable.NET engine, compilers and tools (pnet)".

The branch, master has been updated
       via  f701605f1686559e385d18b82c1e2784876e62bf (commit)
      from  0bcd8b91a1463f78b5c7fd228bbf21dda9c29201 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
http://git.savannah.gnu.org/cgit/pnet.git/commit/?id=f701605f1686559e385d18b82c1e2784876e62bf

commit f701605f1686559e385d18b82c1e2784876e62bf
Author: Klaus Treichel <address@hidden>
Date:   Tue Nov 24 15:48:50 2009 +0100

    Fix inlining of member loads for value types.

diff --git a/ChangeLog b/ChangeLog
index c33194f..fd889c9 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2009-11-24  Klaus Treichel  <address@hidden>
+
+       * engine/verify_call.c (TryInlineLoad): Remove the extra check for value
+       types.
+       Fix the case in inlining a constant load where the first argument to the
+       method to be inlined is not an object but a reference to a value type.
+
 2009-11-15  Klaus Treichel  <address@hidden>
 
        * configure.in: Add checks for the gcc options
diff --git a/engine/verify_call.c b/engine/verify_call.c
index 807ab7e..9bd1a70 100644
--- a/engine/verify_call.c
+++ b/engine/verify_call.c
@@ -90,10 +90,6 @@ static int TryInlineLoad(ILExecProcess *process, ILMethod 
*method, int numParams
                        return 0;
                }
        }
-       else if(ILClassIsValueType(ILMethod_Owner(method)))
-       {
-               return 0;
-       }
        else
        {
                if (numParams != 1)
@@ -177,7 +173,7 @@ static int TryInlineLoad(ILExecProcess *process, ILMethod 
*method, int numParams
        }
        
        *inlinePc = pc;
-       *inlineOpcode = opcode; 
+       *inlineOpcode = opcode;
        
        ADVANCE();
        GET_NEXT_INSTRUCTION();
@@ -1832,16 +1828,24 @@ callNonvirtualFromVirtual:
 #endif
                                                if (tryInlineType == 
V_INLINE_CONST_LOAD)
                                                {
-                                                       if(numParams > 0 && 
!ILMethod_IsStatic(methodInfo) &&
-                                                               stack[stackSize 
- numParams].engineType == ILEngineType_O)
+                                                       if(numParams > 0 && 
!ILMethod_IsStatic(methodInfo))
                                                        {
-                                                               /* Check the 
first parameter against "null" */
-                                                               
ILCoderCheckCallNull(coder, &callInfo);
-                                                               /* Now pop the 
this parameter as this a constant load */
-                                                               
ILCoderPop(coder, ILEngineType_O, 
-                                                                       
stack[stackSize - numParams].typeInfo);
+                                                               
if(stack[stackSize - numParams].engineType == ILEngineType_O)
+                                                               {
+                                                                       /* 
Check the first parameter against "null" */
+                                                                       
ILCoderCheckCallNull(coder, &callInfo);
+                                                                       /* Now 
pop the this parameter as this a constant load */
+                                                                       
ILCoderPop(coder, ILEngineType_O, 
+                                                                               
stack[stackSize - numParams].typeInfo);
+                                                               }
+                                                               else
+                                                               {
+                                                                       /* Pop 
the reference to the value type as this a constant load */
+                                                                       
ILCoderPop(coder, ILEngineType_M,
+                                                                               
stack[stackSize - numParams].typeInfo);
+                                                               }
                                                        }
-
+                                                       
                                                        switch (tryInlineOpcode)
                                                        {
                                                        case IL_OP_LDNULL:
@@ -1975,7 +1979,7 @@ callNonvirtualFromVirtual:
                                                                        
if(IsSubClass(stack[stackSize - 2].typeInfo,
                                                                                
                ILField_Owner(fieldInfo)) &&
                                                                        
AssignCompatible(methodInfo, &(stack[stackSize - 1]),
-                                                                               
                                classType, unsafeAllowed))
+                                                                               
                                classType, unsafeAllowed))
                                                                        {
                                                                                
if(!ILField_IsStatic(fieldInfo))
                                                                                
{

-----------------------------------------------------------------------

Summary of changes:
 ChangeLog            |    7 +++++++
 engine/verify_call.c |   32 ++++++++++++++++++--------------
 2 files changed, 25 insertions(+), 14 deletions(-)


hooks/post-receive
-- 
DotGNU Portable.NET engine, compilers and tools (pnet)




reply via email to

[Prev in Thread] Current Thread [Next in Thread]