[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[dotgnu-pnet-commits] pnet ChangeLog engine/ilrun.c engine/cvmc_call....
From: |
Klaus Treichel |
Subject: |
[dotgnu-pnet-commits] pnet ChangeLog engine/ilrun.c engine/cvmc_call.... |
Date: |
Fri, 19 Jan 2007 18:42:11 +0000 |
CVSROOT: /cvsroot/dotgnu-pnet
Module name: pnet
Changes by: Klaus Treichel <ktreichel> 07/01/19 18:42:11
Modified files:
. : ChangeLog
engine : ilrun.c cvmc_call.c jitc_call.c
Log message:
2007-01-19 Klaus Treichel <address@hidden>
* engine/cvmc_call.c: Check for running a cctor too if a
function pointer
is pushed on the stack.
* engine/jitc_call.c: Check for running a cctor too if a
function pointer
is pushed on the stack.
* engine/ilrun.c: Use the coder's cctor running function for
running the
cctor of the class containing the main function. This prevents
this cctor
being executed twice.
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/pnet/ChangeLog?cvsroot=dotgnu-pnet&r1=1.3403&r2=1.3404
http://cvs.savannah.gnu.org/viewcvs/pnet/engine/ilrun.c?cvsroot=dotgnu-pnet&r1=1.54&r2=1.55
http://cvs.savannah.gnu.org/viewcvs/pnet/engine/cvmc_call.c?cvsroot=dotgnu-pnet&r1=1.34&r2=1.35
http://cvs.savannah.gnu.org/viewcvs/pnet/engine/jitc_call.c?cvsroot=dotgnu-pnet&r1=1.34&r2=1.35
Patches:
Index: ChangeLog
===================================================================
RCS file: /cvsroot/dotgnu-pnet/pnet/ChangeLog,v
retrieving revision 1.3403
retrieving revision 1.3404
diff -u -b -r1.3403 -r1.3404
--- ChangeLog 16 Jan 2007 20:40:52 -0000 1.3403
+++ ChangeLog 19 Jan 2007 18:42:11 -0000 1.3404
@@ -1,3 +1,15 @@
+2007-01-19 Klaus Treichel <address@hidden>
+
+ * engine/cvmc_call.c: Check for running a cctor too if a function
pointer
+ is pushed on the stack.
+
+ * engine/jitc_call.c: Check for running a cctor too if a function
pointer
+ is pushed on the stack.
+
+ * engine/ilrun.c: Use the coder's cctor running function for running the
+ cctor of the class containing the main function. This prevents this
cctor
+ being executed twice.
+
2007-01-16 Radek Polak <address@hidden>
* libgc/include/gc.h: Patch for compiling with uclibc which does not
Index: engine/ilrun.c
===================================================================
RCS file: /cvsroot/dotgnu-pnet/pnet/engine/ilrun.c,v
retrieving revision 1.54
retrieving revision 1.55
diff -u -b -r1.54 -r1.55
--- engine/ilrun.c 17 Sep 2006 18:32:31 -0000 1.54
+++ engine/ilrun.c 19 Jan 2007 18:42:11 -0000 1.55
@@ -158,20 +158,12 @@
static int CallStaticConstructor(ILExecThread *thread, ILMethod * method)
{
ILClass *classInfo=ILMethod_Owner(method);
- ILMethod *cctor = 0;
- while((cctor = (ILMethod *)ILClassNextMemberByKind
- (classInfo, (ILMember *)cctor,
- IL_META_MEMBERKIND_METHOD)) != 0)
- {
- if(ILMethod_IsStaticConstructor(cctor))
- {
- if(ILExecThreadCall(thread, cctor, NULL))
+ ILCoder *coder = _ILExecThreadProcess(thread)->coder;
+
+ if(!ILCoderRunCCtor(coder, classInfo))
{
- /* An exception was thrown while executing the
program */
return 1;
}
- }
- }
return 0;
}
Index: engine/cvmc_call.c
===================================================================
RCS file: /cvsroot/dotgnu-pnet/pnet/engine/cvmc_call.c,v
retrieving revision 1.34
retrieving revision 1.35
diff -u -b -r1.34 -r1.35
--- engine/cvmc_call.c 16 Jan 2007 06:46:08 -0000 1.34
+++ engine/cvmc_call.c 19 Jan 2007 18:42:11 -0000 1.35
@@ -501,6 +501,8 @@
static void CVMCoder_LoadFuncAddr(ILCoder *coder, ILMethod *methodInfo)
{
+ /* Queue the cctor to run. */
+ ILCCtorMgr_OnCallMethod(&(((ILCVMCoder *)coder)->cctorMgr), methodInfo);
CVMP_OUT_PTR(COP_PREFIX_LDFTN, methodInfo);
CVM_ADJUST(1);
}
Index: engine/jitc_call.c
===================================================================
RCS file: /cvsroot/dotgnu-pnet/pnet/engine/jitc_call.c,v
retrieving revision 1.34
retrieving revision 1.35
diff -u -b -r1.34 -r1.35
--- engine/jitc_call.c 16 Jan 2007 06:46:08 -0000 1.34
+++ engine/jitc_call.c 19 Jan 2007 18:42:11 -0000 1.35
@@ -1792,6 +1792,13 @@
}
jitFunction = ILJitFunctionFromILMethod(methodInfo);
}
+#ifdef IL_JIT_ENABLE_CCTORMGR
+ /* Queue the cctor to run. */
+ ILCCtorMgr_OnCallMethod(&(jitCoder->cctorMgr), methodInfo);
+#else /* !IL_JIT_ENABLE_CCTORMGR */
+ /* Output a call to the static constructor */
+ _ILJitCallStaticConstructor(jitCoder, ILMethod_Owner(methodInfo), 1);
+#endif /* !IL_JIT_ENABLE_CCTORMGR */
#ifndef IL_JIT_FNPTR_ILMETHOD
/* Get the vtable pointer for the function. */
function = jit_function_to_vtable_pointer(jitFunction);
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [dotgnu-pnet-commits] pnet ChangeLog engine/ilrun.c engine/cvmc_call....,
Klaus Treichel <=