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

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

[dotgnu-pnet-commits] libjit ChangeLog include/jit/jit-except.h jit/j...


From: Aleksey Demakov
Subject: [dotgnu-pnet-commits] libjit ChangeLog include/jit/jit-except.h jit/j...
Date: Sun, 10 May 2009 16:01:09 +0000

CVSROOT:        /sources/dotgnu-pnet
Module name:    libjit
Changes by:     Aleksey Demakov <avd>   09/05/10 16:01:09

Modified files:
        .              : ChangeLog 
        include/jit    : jit-except.h 
        jit            : jit-except.c 

Log message:
        add JIT_RESULT_UNDEFINED_LABEL builtin error

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/libjit/ChangeLog?cvsroot=dotgnu-pnet&r1=1.431&r2=1.432
http://cvs.savannah.gnu.org/viewcvs/libjit/include/jit/jit-except.h?cvsroot=dotgnu-pnet&r1=1.6&r2=1.7
http://cvs.savannah.gnu.org/viewcvs/libjit/jit/jit-except.c?cvsroot=dotgnu-pnet&r1=1.10&r2=1.11

Patches:
Index: ChangeLog
===================================================================
RCS file: /sources/dotgnu-pnet/libjit/ChangeLog,v
retrieving revision 1.431
retrieving revision 1.432
diff -u -b -r1.431 -r1.432
--- ChangeLog   9 May 2009 21:54:31 -0000       1.431
+++ ChangeLog   10 May 2009 16:01:08 -0000      1.432
@@ -1,5 +1,9 @@
 2009-05-10  Aleksey Demakov  <address@hidden>
 
+       * include/jit/jit-except.h (JIT_RESULT_UNDEFINED_LABEL):
+       * jit/jit-except.c (jit_exception_builtin): add new builtin
+       exception.
+
        * jit/jit-internal.h (struct _jit_label_info): add srtuct.
        (struct _jit_builder): replace label_blocks with label_info.
 

Index: include/jit/jit-except.h
===================================================================
RCS file: /sources/dotgnu-pnet/libjit/include/jit/jit-except.h,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -b -r1.6 -r1.7
--- include/jit/jit-except.h    29 May 2008 18:53:01 -0000      1.6
+++ include/jit/jit-except.h    10 May 2009 16:01:08 -0000      1.7
@@ -30,16 +30,17 @@
 /*
  * Builtin exception type codes, and result values for intrinsic functions.
  */
-#define        JIT_RESULT_OK                            1
-#define        JIT_RESULT_OVERFLOW                      0
-#define        JIT_RESULT_ARITHMETIC           -1
-#define        JIT_RESULT_DIVISION_BY_ZERO     -2
-#define        JIT_RESULT_COMPILE_ERROR        -3
-#define        JIT_RESULT_OUT_OF_MEMORY        -4
-#define        JIT_RESULT_NULL_REFERENCE       -5
-#define        JIT_RESULT_NULL_FUNCTION        -6
-#define        JIT_RESULT_CALLED_NESTED        -7
-#define        JIT_RESULT_OUT_OF_BOUNDS        -8
+#define JIT_RESULT_OK                  (1)
+#define JIT_RESULT_OVERFLOW            (0)
+#define JIT_RESULT_ARITHMETIC          (-1)
+#define JIT_RESULT_DIVISION_BY_ZERO    (-2)
+#define JIT_RESULT_COMPILE_ERROR       (-3)
+#define JIT_RESULT_OUT_OF_MEMORY       (-4)
+#define JIT_RESULT_NULL_REFERENCE      (-5)
+#define JIT_RESULT_NULL_FUNCTION       (-6)
+#define JIT_RESULT_CALLED_NESTED       (-7)
+#define JIT_RESULT_OUT_OF_BOUNDS       (-8)
+#define JIT_RESULT_UNDEFINED_LABEL     (-9)
 
 /*
  * Exception handling function for builtin exceptions.
@@ -59,12 +60,13 @@
 jit_exception_func jit_exception_get_handler(void);
 jit_stack_trace_t jit_exception_get_stack_trace(void);
 unsigned int jit_stack_trace_get_size(jit_stack_trace_t trace);
-jit_function_t jit_stack_trace_get_function
-       (jit_context_t context, jit_stack_trace_t trace, unsigned int posn);
-void *jit_stack_trace_get_pc
-       (jit_stack_trace_t trace, unsigned int posn);
-unsigned int jit_stack_trace_get_offset
-       (jit_context_t context, jit_stack_trace_t trace, unsigned int posn);
+jit_function_t jit_stack_trace_get_function(jit_context_t context,
+                                           jit_stack_trace_t trace,
+                                           unsigned int posn);
+void *jit_stack_trace_get_pc(jit_stack_trace_t trace, unsigned int posn);
+unsigned int jit_stack_trace_get_offset(jit_context_t context,
+                                       jit_stack_trace_t trace,
+                                       unsigned int posn);
 void jit_stack_trace_free(jit_stack_trace_t trace);
 
 #ifdef __cplusplus

Index: jit/jit-except.c
===================================================================
RCS file: /sources/dotgnu-pnet/libjit/jit/jit-except.c,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -b -r1.10 -r1.11
--- jit/jit-except.c    29 May 2008 21:03:30 -0000      1.10
+++ jit/jit-except.c    10 May 2009 16:01:08 -0000      1.11
@@ -24,10 +24,10 @@
 #include "jit-rules.h"
 #include <config.h>
 #ifdef HAVE_STDLIB_H
-       #include <stdlib.h>
+# include <stdlib.h>
 #endif
 #if defined(JIT_BACKEND_INTERP)
-       #include "jit-interp.h"
+# include "jit-interp.h"
 #endif
 #include <stdio.h>
 #include "jit-setjmp.h"
@@ -195,6 +195,15 @@
  * @item JIT_RESULT_CALLED_NESTED
  * An attempt was made to call a nested function from a non-nested context
  * (value is -7).
+ *
+ * @vindex JIT_RESULT_OUT_OF_BOUNDS
+ * @item JIT_RESULT_OUT_OF_BOUNDS
+ * The operation resulted in an out of bounds array access (value is -8).
+ *
+ * @vindex JIT_RESULT_UNDEFINED_LABEL
+ * @item JIT_RESULT_UNDEFINED_LABEL
+ * A branch operation used a label that was not defined anywhere in the
+ * function (value is -9).
  * @end table
  * @end deftypefun
 @*/
@@ -212,7 +221,8 @@
                "Null pointer dereferenced",
                "Null function pointer called",
                "Nested function called from non-nested context",
-               "Array index out of bounds"
+               "Array index out of bounds",
+               "Undefined label"
        };
        #define num_messages    (sizeof(messages) / sizeof(const char *))
 




reply via email to

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