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

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

[dotgnu-pnet-commits] pnet/engine jitc.c jitc_ptr.c jitc_setup.c


From: Klaus Treichel
Subject: [dotgnu-pnet-commits] pnet/engine jitc.c jitc_ptr.c jitc_setup.c
Date: Thu, 05 Jan 2006 19:40:07 +0000

CVSROOT:        /cvsroot/dotgnu-pnet
Module name:    pnet
Branch:         
Changes by:     Klaus Treichel <address@hidden> 06/01/05 19:40:07

Modified files:
        engine         : jitc.c jitc_ptr.c jitc_setup.c 

Log message:
        Make some minor changes needed for jitc_call.c

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/dotgnu-pnet/pnet/engine/jitc.c.diff?tr1=1.8&tr2=1.9&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/dotgnu-pnet/pnet/engine/jitc_ptr.c.diff?tr1=1.2&tr2=1.3&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/dotgnu-pnet/pnet/engine/jitc_setup.c.diff?tr1=1.4&tr2=1.5&r1=text&r2=text

Patches:
Index: pnet/engine/jitc.c
diff -u pnet/engine/jitc.c:1.8 pnet/engine/jitc.c:1.9
--- pnet/engine/jitc.c:1.8      Wed Jan  4 18:54:39 2006
+++ pnet/engine/jitc.c  Thu Jan  5 19:40:07 2006
@@ -362,7 +362,7 @@
 
 /*
  * Get the jit type representing the local type for the given ILType.
- * Returns 0 whne the type could not be found or out of memory.
+ * Returns 0 when the type could not be found or out of memory.
  */
 static ILJitType _ILJitGetLocalsType(ILType *type, ILExecProcess *process)
 {
@@ -596,13 +596,12 @@
  */
 static void JITCoder_MarkBytecode(ILCoder *coder, ILUInt32 offset)
 {
-       /* 
-       ILCacheMarkBytecode(&(((ILCVMCoder *)coder)->codePosn), offset);
-       if(((ILCVMCoder *)coder)->debugEnabled)
+       ILJITCoder *jitCoder = _ILCoderToILJITCoder(coder);
+
+       if(offset != 0)
        {
-               CVM_OUT_BREAK(IL_BREAK_DEBUG_LINE);
+               jit_insn_mark_offset(jitCoder->jitFunction, (jit_int)offset);
        }
-       */
 }
 
 /*
@@ -677,7 +676,7 @@
 /*
  * Set the method member in the ILExecThread instance.
  */
-static void SetMethodInThread(jit_function_t func, ILJitValue thread, ILMethod 
*method)
+static void _ILJitSetMethodInThread(ILJitFunction func, ILJitValue thread, 
ILMethod *method)
 {
        ILJitValue methodPtr = jit_value_create_nint_constant(func, 
_IL_JIT_TYPE_VPTR, (jit_nint)method);
 
@@ -685,6 +684,19 @@
 }
 
 /*
+ * Get the classPrivate pointer from an object reference.
+ */
+static ILJitValue _ILJitGetObjectClassPrivate(ILJitFunction func, ILJitValue 
object)
+{
+       ILJitValue classPrivate = 
+               jit_insn_load_relative(func, object, 
+                                                  -IL_OBJECT_HEADER_SIZE +
+                                                          
offsetof(ILObjectHeader, classPrivate),
+                                                          _IL_JIT_TYPE_VPTR);
+       return classPrivate;    
+}
+
+/*
  * Generate the stub for calling an internal function.
  */
 static int _ILJitCompileInternal(jit_function_t func, ILMethod *method, void 
*nativeFunction)
@@ -706,7 +718,7 @@
                                return JIT_RESULT_OUT_OF_MEMORY;
                        }
                }
-               SetMethodInThread(func, jitParams[0], method);
+               _ILJitSetMethodInThread(func, jitParams[0], method);
                returnValue = jit_insn_call_native(func, 0, nativeFunction, 
signature, jitParams, numParams, 0);
        }
        else
@@ -939,7 +951,7 @@
        ILJitType jitArgs[total];
 
        /* Get the return type for this function */
-       if(isCtor)
+       if(isCtor && isArrayOrString)
        {
                type = ILType_FromClass(info);
        }
Index: pnet/engine/jitc_ptr.c
diff -u pnet/engine/jitc_ptr.c:1.2 pnet/engine/jitc_ptr.c:1.3
--- pnet/engine/jitc_ptr.c:1.2  Wed Jan  4 18:54:39 2006
+++ pnet/engine/jitc_ptr.c      Thu Jan  5 19:40:07 2006
@@ -601,7 +601,7 @@
        args[0] = jit_value_get_param(jitCoder->jitFunction, 0);
        args[1] = length;
        JITC_ADJUST(jitCoder, -1);
-       SetMethodInThread(jitCoder->jitFunction, args[0], ctor);
+       _ILJitSetMethodInThread(jitCoder->jitFunction, args[0], ctor);
        /* Output code to call the array type's constructor */
        returnValue = jit_insn_call(jitCoder->jitFunction, 0, jitFunction,
                                                                0, args, 2, 0);
Index: pnet/engine/jitc_setup.c
diff -u pnet/engine/jitc_setup.c:1.4 pnet/engine/jitc_setup.c:1.5
--- pnet/engine/jitc_setup.c:1.4        Sat Dec 31 14:09:19 2005
+++ pnet/engine/jitc_setup.c    Thu Jan  5 19:40:07 2006
@@ -97,6 +97,8 @@
 
        /* Record the current jitted function. */
        coder->jitFunction = (ILJitFunction)(method->userData);
+       /* Record the current method. */
+       coder->currentMethod = method;
 
        /* Create the local variables. */
        if(!_JITCreateLocals(coder, code->localVarSig))




reply via email to

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