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

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

[dotgnu-pnet-commits] libjit ./ChangeLog jit/jit-insn.c


From: Klaus Treichel
Subject: [dotgnu-pnet-commits] libjit ./ChangeLog jit/jit-insn.c
Date: Sun, 12 Mar 2006 20:04:39 +0000

CVSROOT:        /cvsroot/dotgnu-pnet
Module name:    libjit
Branch:         
Changes by:     Klaus Treichel <address@hidden> 06/03/12 20:04:39

Modified files:
        .              : ChangeLog 
        jit            : jit-insn.c 

Log message:
        2006-03-12  Klaus Treichel  <address@hidden>
        
        * jit/jit-insn.c: Pop the setjump context on return from functions with
        a catcher.
        
        2006-03-11  Kirill Kononenko  <address@hidden>
        
        * jit/jit-insn.c (create_call_setup_insn): fix tail calls, work
        if the called function is not the callee function
        (thanks klausT for finding the bug).

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/dotgnu-pnet/libjit/ChangeLog.diff?tr1=1.207&tr2=1.208&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/dotgnu-pnet/libjit/jit/jit-insn.c.diff?tr1=1.42&tr2=1.43&r1=text&r2=text

Patches:
Index: libjit/ChangeLog
diff -u libjit/ChangeLog:1.207 libjit/ChangeLog:1.208
--- libjit/ChangeLog:1.207      Mon Feb 27 13:23:44 2006
+++ libjit/ChangeLog    Sun Mar 12 20:04:39 2006
@@ -1,3 +1,14 @@
+2006-03-12  Klaus Treichel  <address@hidden>
+
+       * jit/jit-insn.c: Pop the setjump context on return from functions with
+       a catcher.
+
+2006-03-11  Kirill Kononenko  <address@hidden>
+
+       * jit/jit-insn.c (create_call_setup_insn): fix tail calls, work
+       if the called function is not the callee function
+       (thanks klausT for finding the bug).
+
 2006-02-27  Aleksey Demakov  <address@hidden>
 
        * jit/jit-insn.c (jit_insn_convert): fix int->uint and uint->int
Index: libjit/jit/jit-insn.c
diff -u libjit/jit/jit-insn.c:1.42 libjit/jit/jit-insn.c:1.43
--- libjit/jit/jit-insn.c:1.42  Mon Feb 27 13:23:44 2006
+++ libjit/jit/jit-insn.c       Sun Mar 12 20:04:39 2006
@@ -5202,8 +5202,8 @@
                args = new_args;
        }
 
-       /* If we are calling ourselves, then store back to our own parameters */
-       if((flags & JIT_CALL_TAIL) != 0 && func == callee)
+       /* If we are performing a tail call, then store back to our own 
parameters */
+       if((flags & JIT_CALL_TAIL) != 0)
        {
                for(arg_num = 0; arg_num < num_args; ++arg_num)
                {
@@ -6608,6 +6608,21 @@
                return 0;
        }
 
+       /* We need to pop the "setjmp" context */
+       if(func->has_try)
+       {
+               type = jit_type_create_signature
+                       (jit_abi_cdecl, jit_type_void, 0, 0, 1);
+               if(!type)
+               {
+                       return 0;
+               }
+               jit_insn_call_native
+                       (func, "_jit_unwind_pop_setjmp",
+                        (void *)_jit_unwind_pop_setjmp, type, 0, 0, 
JIT_CALL_NOTHROW);
+               jit_type_free(type);
+       }
+
        /* This function has an ordinary return path */
        func->builder->ordinary_return = 1;
 
@@ -6761,6 +6776,21 @@
                return 0;
        }
 
+       /* We need to pop the "setjmp" context */
+       if(func->has_try)
+       {
+               type = jit_type_create_signature
+                       (jit_abi_cdecl, jit_type_void, 0, 0, 1);
+               if(!type)
+               {
+                       return 0;
+               }
+               jit_insn_call_native
+                       (func, "_jit_unwind_pop_setjmp",
+                        (void *)_jit_unwind_pop_setjmp, type, 0, 0, 
JIT_CALL_NOTHROW);
+               jit_type_free(type);
+       }
+
        /* This function has an ordinary return path */
        func->builder->ordinary_return = 1;
 




reply via email to

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