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. b71672f3244561f517ee616f41247a432c8f4b62
Date: Fri, 07 Jan 2011 09:12:39 +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  b71672f3244561f517ee616f41247a432c8f4b62 (commit)
      from  1d7295fc8b96b3df583bc39f78eb387b06a082b9 (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=b71672f3244561f517ee616f41247a432c8f4b62

commit b71672f3244561f517ee616f41247a432c8f4b62
Author: Klaus Treichel <address@hidden>
Date:   Fri Jan 7 10:11:31 2011 +0100

    Fix interrupt based exceptions.

diff --git a/ChangeLog b/ChangeLog
index e403717..340dc20 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2011-01-07  Klaus Treichel  <address@hidden>
+
+       * engine/cvm.c, engine/cvm_interrupts.c: Do some reformatting.
+
+       * engine/cvm_call.c, engine/cvm_except.c: Pop the current jump buffer
+       if interrupt based exceptions are used on exit from the interpreter.
+
 2011-01-06  Klaus Treichel  <address@hidden>
 
        * engine/cvm.c, engine/cvm_config.c: Revert the optimizations for
diff --git a/engine/cvm.c b/engine/cvm.c
index a51b662..ef3684f 100644
--- a/engine/cvm.c
+++ b/engine/cvm.c
@@ -1346,7 +1346,7 @@ int _ILCVMInterpreter(ILExecThread *thread)
 {
        int result;
 
-               if(!thread)
+       if(!thread)
        {
                /*
                 * Export the goto label tables from the interpreter if 
necessary
diff --git a/engine/cvm_call.c b/engine/cvm_call.c
index 961ad9b..77d536c 100644
--- a/engine/cvm_call.c
+++ b/engine/cvm_call.c
@@ -1152,11 +1152,11 @@ popFrame:
        /* Should we return to an external method? */
        if(pc == IL_INVALID_PC)
        {
-#if defined(IL_USE_INTERRUPT_BASED_NULL_POINTER_CHECKS)
+#if defined(IL_USE_INTERRUPT_BASED_X)
                IL_MEMCPY(&thread->exceptionJumpBuffer, &backupJumpBuffer, 
sizeof(IL_JMP_BUFFER));
 #endif
                COPY_STATE_TO_THREAD();
-               return 0;
+               return _CVM_EXIT_OK;
        }
 
 #ifdef IL_DUMP_CVM
diff --git a/engine/cvm_except.c b/engine/cvm_except.c
index eb45566..d179f84 100644
--- a/engine/cvm_except.c
+++ b/engine/cvm_except.c
@@ -128,6 +128,9 @@ VMCASE(COP_RET_JSR):
        if((unsigned char *)(stacktop[-1].ptrValue) == IL_INVALID_PC)
        {
                COPY_STATE_TO_THREAD();
+#if defined(IL_USE_INTERRUPT_BASED_X)
+               IL_MEMCPY(&thread->exceptionJumpBuffer, &backupJumpBuffer, 
sizeof(IL_JMP_BUFFER));
+#endif
                return _CVM_EXIT_RETURN;
        }
        else
@@ -183,6 +186,9 @@ throwException:
        fputs("Throw ", IL_DUMP_CVM_STREAM);
        DUMP_STACK();
 #endif
+#if defined(IL_USE_INTERRUPT_BASED_X)
+       IL_MEMCPY(&thread->exceptionJumpBuffer, &backupJumpBuffer, 
sizeof(IL_JMP_BUFFER));
+#endif
        return _CVM_EXIT_THROW;
 
        /*
@@ -328,6 +334,9 @@ VMCASE(COP_PREFIX_LEAVE_CATCH):
        if((stacktop[0].ptrValue == IL_INVALID_PC) && (thread->aborting))
        {
                COPY_STATE_TO_THREAD();
+#if defined(IL_USE_INTERRUPT_BASED_X)
+               IL_MEMCPY(&thread->exceptionJumpBuffer, &backupJumpBuffer, 
sizeof(IL_JMP_BUFFER));
+#endif
                return _CVM_EXIT_PROPAGATE_ABORT;
        }
        MODIFY_PC_AND_STACK(CVMP_LEN_NONE, 0);
@@ -356,6 +365,9 @@ VMCASE(COP_PREFIX_RET_FROM_FILTER):
 {
        COPY_STATE_TO_THREAD();
        MODIFY_PC_AND_STACK(CVMP_LEN_NONE, 0);
+#if defined(IL_USE_INTERRUPT_BASED_X)
+       IL_MEMCPY(&thread->exceptionJumpBuffer, &backupJumpBuffer, 
sizeof(IL_JMP_BUFFER));
+#endif
        return _CVM_EXIT_RETURN;
 }
 VMBREAK(COP_PREFIX_RET_FROM_FILTER);
diff --git a/engine/cvm_interrupt.c b/engine/cvm_interrupt.c
index 9d837ff..9808de9 100644
--- a/engine/cvm_interrupt.c
+++ b/engine/cvm_interrupt.c
@@ -31,13 +31,13 @@ IL_JMP_BUFFER backupJumpBuffer;
 IL_MEMCPY(&backupJumpBuffer, &thread->exceptionJumpBuffer, 
sizeof(IL_JMP_BUFFER));
 
 #if (defined(IL_NO_REGISTERS_USED) && defined(IL_USE_INTERRUPT_BASED_X))
-do
-{
-       /* Make sure the compiler allocates these locals on the stack */
-       volatile void *addr;
-       addr = &pc;
-       addr = &stacktop;
-       addr = &frame;
+do
+{
+       /* Make sure the compiler allocates these locals on the stack */
+       volatile void *addr;
+       addr = &pc;
+       addr = &stacktop;
+       addr = &frame;
 }
 while (0);
 #endif
@@ -76,4 +76,4 @@ switch (IL_SETJMP(thread->exceptionJumpBuffer))
 
 #endif
 
-#endif /* IL_USE_INTERRUPT_BASED_NULL_POINTER_CHECKS */
+#endif /* IL_USE_INTERRUPT_BASED_X */

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

Summary of changes:
 ChangeLog              |    7 +++++++
 engine/cvm.c           |    2 +-
 engine/cvm_call.c      |    4 ++--
 engine/cvm_except.c    |   12 ++++++++++++
 engine/cvm_interrupt.c |   16 ++++++++--------
 5 files changed, 30 insertions(+), 11 deletions(-)


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



reply via email to

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