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

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

[dotgnu-pnet-commits] pnet ChangeLog engine/jitc_delegate.c


From: Klaus Treichel
Subject: [dotgnu-pnet-commits] pnet ChangeLog engine/jitc_delegate.c
Date: Thu, 13 Jul 2006 18:16:05 +0000

CVSROOT:        /sources/dotgnu-pnet
Module name:    pnet
Changes by:     Klaus Treichel <ktreichel>      06/07/13 18:16:05

Modified files:
        .              : ChangeLog 
        engine         : jitc_delegate.c 

Log message:
        2006-07-13  Klaus Treichel  <address@hidden>
        
                * engine/jitc_delegate.c: Fix Delegate.Invoke if the current 
thread is
                not included in the method's signature.

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/pnet/ChangeLog?cvsroot=dotgnu-pnet&r1=1.3338&r2=1.3339
http://cvs.savannah.gnu.org/viewcvs/pnet/engine/jitc_delegate.c?cvsroot=dotgnu-pnet&r1=1.5&r2=1.6

Patches:
Index: ChangeLog
===================================================================
RCS file: /sources/dotgnu-pnet/pnet/ChangeLog,v
retrieving revision 1.3338
retrieving revision 1.3339
diff -u -b -r1.3338 -r1.3339
--- ChangeLog   13 Jul 2006 17:09:45 -0000      1.3338
+++ ChangeLog   13 Jul 2006 18:16:05 -0000      1.3339
@@ -1,3 +1,8 @@
+2006-07-13  Klaus Treichel  <address@hidden>
+
+       * engine/jitc_delegate.c: Fix Delegate.Invoke if the current thread is
+       not included in the method's signature.
+
 2006-07-13  Radek Polak  <address@hidden>
 
        * engine/lib_task.c: Fix working dir on cygwin when starting process.

Index: engine/jitc_delegate.c
===================================================================
RCS file: /sources/dotgnu-pnet/pnet/engine/jitc_delegate.c,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -b -r1.5 -r1.6
--- engine/jitc_delegate.c      6 Jul 2006 18:09:26 -0000       1.5
+++ engine/jitc_delegate.c      13 Jul 2006 18:16:05 -0000      1.6
@@ -52,11 +52,16 @@
                }
                jitCtor = ILJitFunctionFromILMethod(ctor);
        }
+#ifdef IL_JIT_THREAD_IN_SIGNATURE
        args[0] = thread;
        args[1] = arrayLength;
        array = jit_insn_call(jitFunction, 0, jitCtor,
                                                  0, args, 2, 0);
-
+#else
+       args[0] = arrayLength;
+       array = jit_insn_call(jitFunction, 0, jitCtor,
+                                                 0, args, 1, 0);
+#endif
        return array;
 }
 
@@ -77,12 +82,6 @@
        ILClass *info;
        ILUInt32 typeSize;
        ILJitValue thread = _ILJitFunctionGetThread(jitFunction);
-       ILJitValue arrayBaseOffset = jit_value_create_nint_constant(jitFunction,
-                                                                               
                                                _IL_JIT_TYPE_UINT32,
-                                                                               
                                                
(jit_nint)(sizeof(System_Array)));
-       ILJitValue ptrSize = jit_value_create_nint_constant(jitFunction,
-                                                                               
                                _IL_JIT_TYPE_UINT32,
-                                                                               
                                (jit_nint)(sizeof(void *)));
        ILJitValue array;
        ILJitValue arrayBase;
        ILJitValue boxObject;
@@ -606,7 +605,7 @@
        {
                return JIT_RESULT_COMPILE_ERROR;
        }
-       ctorArgs[1] = args[1]; /* _this */
+       ctorArgs[1] = args[0]; /* _this */
        if(!(ctorArgs[2] = _ILJitPackDelegateArgs(func, _thread,
                                                                                
          beginInvokeSignature,
                                                                                
          &(args[1]),
@@ -800,11 +799,13 @@
 #endif
 #ifdef IL_JIT_THREAD_IN_SIGNATURE
        ILJitValue thread = _ILJitFunctionGetThread(func);
+       ILJitValue delegate = jit_value_get_param(func, 1);
+#else
+       ILJitValue delegate = jit_value_get_param(func, 0);
 #endif
        ILJitType signature = jit_function_get_signature(func);
        ILUInt32 numArgs = jit_type_num_params(signature);
        jit_label_t invokeThis = jit_label_undefined;
-       ILJitValue delegate = jit_value_get_param(func, 1);
        ILJitValue returnValue;
        ILJitValue prevDelegate = jit_insn_load_relative(func, delegate,
                                                                                
                         offsetof(System_Delegate, prev),
@@ -820,7 +821,11 @@
                ILMutexUnlock(globalTraceMutex);
        }
 #endif
+#ifdef IL_JIT_THREAD_IN_SIGNATURE
        if(numArgs < 2)
+#else
+       if(numArgs < 1)
+#endif
        {
                /* There is something wrong with this delegate. */
                return JIT_RESULT_COMPILE_ERROR;




reply via email to

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