Killed panic's.
authortwisti <none@none>
Sun, 22 May 2005 19:49:53 +0000 (19:49 +0000)
committertwisti <none@none>
Sun, 22 May 2005 19:49:53 +0000 (19:49 +0000)
src/vm/jit/loop/analyze.c
src/vm/jit/loop/graph.c
src/vm/jit/loop/loop.c

index 1516580e5cdffe832de315f1916fbd71bee5b675..4e47233fbde2515e600a7f1e8a02cf2ed4a7114c 100644 (file)
@@ -1,4 +1,4 @@
-/* vm/jit/loop/analyze.c - bound check removal functions
+/* src/vm/jit/loop/analyze.c - bound check removal functions
 
    Copyright (C) 1996-2005 R. Grafl, A. Krall, C. Kruegel, C. Oates,
    R. Obermaisser, M. Platter, M. Probst, S. Ring, E. Steiner,
 
    Authors: Christopher Kruegel
 
+   Changes: Christian Thalinger
+
    Contains the functions which perform the bound check removals. With
    the loops identified, these functions scan the code for array
    accesses that take place in loops and try to guarantee that their
    bounds are never violated. The function to call is
    optimize_loops().
 
-   $Id: analyze.c 1735 2004-12-07 14:33:27Z twisti $
+   $Id: analyze.c 2495 2005-05-22 19:49:53Z twisti $
 
 */
 
 
+#include <assert.h>
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
@@ -1731,7 +1734,8 @@ stackptr copy_stack_from(stackptr source) {
                LOAD_ARRAYLENGTH(ld->c_rightside->var); \
                break; \
        default: \
-               panic("C_ERROR: illegal trace on rightside of loop-header"); \
+               log_text("C_ERROR: illegal trace on rightside of loop-header"); \
+               assert(0); \
        } \
 }
 
index 33beaccdc17198db1c50c7ff86e4e03c9fc8ddbc..d93b84fe3c1f66f75075db14cc072cb879740b72 100644 (file)
@@ -1,4 +1,4 @@
-/* vm/jit/loop/graph.c - control flow graph
+/* src/vm/jit/loop/graph.c - control flow graph
 
    Copyright (C) 1996-2005 R. Grafl, A. Krall, C. Kruegel, C. Oates,
    R. Obermaisser, M. Platter, M. Probst, S. Ring, E. Steiner,
    Contains the functions which build a list, that represents the
    control flow graph of the procedure, that is being analyzed.
 
-   $Id: graph.c 1735 2004-12-07 14:33:27Z twisti $
+   $Id: graph.c 2495 2005-05-22 19:49:53Z twisti $
 
 */
 
 
+#include <assert.h>
+
 #include "mm/memory.h"
+#include "toolbox/logging.h"
 #include "vm/jit/jit.h"
 #include "vm/jit/loop/graph.h"
 #include "vm/jit/loop/loop.h"
@@ -135,7 +138,8 @@ void dF(methodinfo *m, loopdata *ld, int from, int blockIndex)
 
 #ifdef C_DEBUG
        if (blockIndex > m->basicblockcount) {
-               panic("DepthFirst: BlockIndex exceeded\n");
+               log_text("DepthFirst: BlockIndex exceeded\n");
+               assert(0);
        }               
 #endif
 
@@ -293,7 +297,8 @@ void dF_Exception(methodinfo *m, loopdata *ld, int from, int blockIndex)
        
 #ifdef C_DEBUG
        if (blockIndex > m->basicblockcount) {
-               panic("DepthFirst: BlockIndex exceeded");
+               log_text("DepthFirst: BlockIndex exceeded");
+               assert(0);
        }
 #endif
 
index b7a4f12497bb959d3db0e47511a669c58dc246b2..340ddd4250299fc34606ae907a508281e86b3fb9 100644 (file)
@@ -1,4 +1,4 @@
-/* vm/jit/loop/loop.c - array bound removal
+/* src/vm/jit/loop/loop.c - array bound removal
 
    Copyright (C) 1996-2005 R. Grafl, A. Krall, C. Kruegel, C. Oates,
    R. Obermaisser, M. Platter, M. Probst, S. Ring, E. Steiner,
 
    Contact: cacao@complang.tuwien.ac.at
 
-   Authors: Christopher Kruegel      EMAIL: cacao@complang.tuwien.ac.at
+   Authors: Christopher Kruegel
+
+   Changes: Christian Thalinger
 
    The loop detection is performed according to Lengauer-Tarjan
    algorithm that uses dominator trees (found eg. in modern compiler
    implementation by a.w. appel)
 
-   $Id: loop.c 1735 2004-12-07 14:33:27Z twisti $
+   $Id: loop.c 2495 2005-05-22 19:49:53Z twisti $
 
 */
 
 
+#include <assert.h>
 /*  #include <stdio.h> */
 /*  #include <stdlib.h> */
 
@@ -332,7 +335,8 @@ void resultPass2(loopdata *ld)
 
 void c_mem_error()
 {
-  panic("C_ERROR: Not enough memeory");
+       log_text("C_ERROR: Not enough memeory");
+       assert(0);
 }