[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[dotgnu-pnet-commits] pnet ChangeLog engine/jitc.c engine/jitc_call.c
From: |
Klaus Treichel |
Subject: |
[dotgnu-pnet-commits] pnet ChangeLog engine/jitc.c engine/jitc_call.c |
Date: |
Sun, 04 Jun 2006 19:33:10 +0000 |
CVSROOT: /sources/dotgnu-pnet
Module name: pnet
Changes by: Klaus Treichel <ktreichel> 06/06/04 19:33:10
Modified files:
. : ChangeLog
engine : jitc.c jitc_call.c
Log message:
* engine/jitc.c: Move the code generation to handle an
exception thrown
in an internalcall to a separate function.
* engine/jitc_call.c: Handle the thrown exceptions after inlined
internalcalls.
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/pnet/ChangeLog?cvsroot=dotgnu-pnet&r1=1.3321&r2=1.3322
http://cvs.savannah.gnu.org/viewcvs/pnet/engine/jitc.c?cvsroot=dotgnu-pnet&r1=1.35&r2=1.36
http://cvs.savannah.gnu.org/viewcvs/pnet/engine/jitc_call.c?cvsroot=dotgnu-pnet&r1=1.17&r2=1.18
Patches:
Index: ChangeLog
===================================================================
RCS file: /sources/dotgnu-pnet/pnet/ChangeLog,v
retrieving revision 1.3321
retrieving revision 1.3322
diff -u -b -r1.3321 -r1.3322
--- ChangeLog 4 Jun 2006 15:56:51 -0000 1.3321
+++ ChangeLog 4 Jun 2006 19:33:10 -0000 1.3322
@@ -1,5 +1,11 @@
2006-06-04 Klaus Treichel <address@hidden>
+ * engine/jitc.c: Move the code generation to handle an exception thrown
+ in an internalcall to a separate function.
+
+ * engine/jitc_call.c: Handle the thrown exceptions after inlined
+ internalcalls.
+
* engine/jitc_delegate.c: Fix a dumb bug in _ILJitDelegateInvokeCodeGen.
* engine/jitc_obj.c: Add support for RVA static fields and pinvoke
static
Index: engine/jitc.c
===================================================================
RCS file: /sources/dotgnu-pnet/pnet/engine/jitc.c,v
retrieving revision 1.35
retrieving revision 1.36
diff -u -b -r1.35 -r1.36
--- engine/jitc.c 3 Jun 2006 11:00:40 -0000 1.35
+++ engine/jitc.c 4 Jun 2006 19:33:10 -0000 1.36
@@ -1337,6 +1337,26 @@
}
/*
+ * Handle an exception thrown in an internal call.
+ */
+static void _ILJitHandleThrownException(ILJitFunction func,
+
ILJitValue thread)
+{
+ ILJitValue thrownException = jit_insn_load_relative(func, thread,
+
offsetof(ILExecThread, thrownException),
+
_IL_JIT_TYPE_VPTR);
+ jit_label_t label = jit_label_undefined;
+
+ jit_insn_branch_if_not(func, thrownException, &label);
+ jit_insn_call_native(func, "jit_exception_clear_last",
+
jit_exception_clear_last,
+
_ILJitSignature_JitExceptionClearLast,
+ 0, 0,
JIT_CALL_NOTHROW);
+ jit_insn_throw(func, thrownException);
+ jit_insn_label(func, &label);
+}
+
+/*
* Perform a class cast, taking arrays into account.
*/
ILInt32 ILRuntimeCanCastClass(ILMethod *method, ILObject *object, ILClass
*toClass)
@@ -2323,7 +2343,6 @@
ILType *type = ILTypeGetEnumType(ILTypeGetParam(ilSignature, 0));
/* Get the function to call. */
ILJitFunction jitFunction = ILJitFunctionFromILMethod(method);
- jit_label_t label = jit_label_undefined;
ILJitType signature = 0;
ILJitType callSignature = 0;
ILJitType returnType = 0;
@@ -2331,7 +2350,6 @@
unsigned int numParams = 0;
unsigned int totalParams = 0;
int hasStructReturn = 0;
- ILJitValue thrownException = 0;
ILUInt32 current = 0;
if(!jitFunction)
@@ -2442,16 +2460,7 @@
}
jit_type_free(callSignature);
}
- thrownException = jit_insn_load_relative(func, thread,
-
offsetof(ILExecThread, thrownException),
-
_IL_JIT_TYPE_VPTR);
- jit_insn_branch_if_not(func, thrownException, &label);
- jit_insn_call_native(func, "jit_exception_clear_last",
-
jit_exception_clear_last,
-
_ILJitSignature_JitExceptionClearLast,
- 0, 0,
JIT_CALL_NOTHROW);
- jit_insn_throw(func, thrownException);
- jit_insn_label(func, &label);
+ _ILJitHandleThrownException(func, thread);
return returnValue;
}
Index: engine/jitc_call.c
===================================================================
RCS file: /sources/dotgnu-pnet/pnet/engine/jitc_call.c,v
retrieving revision 1.17
retrieving revision 1.18
diff -u -b -r1.17 -r1.18
--- engine/jitc_call.c 3 Jun 2006 11:00:40 -0000 1.17
+++ engine/jitc_call.c 4 Jun 2006 19:33:10 -0000 1.18
@@ -1110,6 +1110,8 @@
_IL_Monitor_Enter,
_ILJitSignature_ILMonitorEnter,
args, 2, 0);
+ _ILJitHandleThrownException(jitCoder->jitFunction,
args[0]);
+
return 1;
}
/* Not reached */
@@ -1130,6 +1132,8 @@
_IL_Monitor_Exit,
_ILJitSignature_ILMonitorExit,
args, 2, 0);
+ _ILJitHandleThrownException(jitCoder->jitFunction,
args[0]);
+
return 1;
}
/* Not reached */
@@ -1155,6 +1159,7 @@
_ILGetClrType,
_ILJitSignature_ILGetClrType,
args, 2, 0);
+ _ILJitHandleThrownException(jitCoder->jitFunction,
args[0]);
jit_insn_store(jitCoder->jitFunction,
returnValue,
temp);
- [dotgnu-pnet-commits] pnet ChangeLog engine/jitc.c engine/jitc_call.c,
Klaus Treichel <=