added -noverify option
authoredwin <none@none>
Tue, 16 Dec 2003 22:47:59 +0000 (22:47 +0000)
committeredwin <none@none>
Tue, 16 Dec 2003 22:47:59 +0000 (22:47 +0000)
global.h
headers.c
jit/jit.c
main.c
src/cacao/cacao.c
src/cacaoh/headers.c
src/vm/global.h
src/vm/jit/jit.c

index b5afcda535c47263b9a4d6b81843f8153fd536ef..512086a2a2f0a11ff1833f941257a045d127fb60 100644 (file)
--- a/global.h
+++ b/global.h
@@ -31,7 +31,7 @@
             Philipp Tomsich
                        Edwin Steiner
 
-   $Id: global.h 792 2003-12-16 18:49:52Z edwin $
+   $Id: global.h 800 2003-12-16 22:47:59Z edwin $
 
 */
 
@@ -780,6 +780,7 @@ extern bool verbose;
 extern bool opt_rt;             /* Rapid Type Analysis for better inlining CO-RT*/
 extern bool opt_xta;            /* X Type Analysis for better inlining    CO-XTA*/
 extern bool opt_vta;            /* Variable Type Analysis for better inlining    CO-VTA*/
+extern bool opt_verify;         /* true if classfiles should be verified      */
 #ifdef TYPECHECK_VERBOSE_OPT
 extern bool typecheckverbose;
 #endif
index 947a4bc875e51bccc94f320ed468f80d6c3326cd..6503b1dd7e88fb659bb4e406e83f605728ce9901 100644 (file)
--- a/headers.c
+++ b/headers.c
@@ -29,7 +29,7 @@
    Changes: Mark Probst
             Philipp Tomsich
 
-   $Id: headers.c 771 2003-12-13 23:11:08Z stefan $
+   $Id: headers.c 800 2003-12-16 22:47:59Z edwin $
 
 */
 
@@ -60,6 +60,7 @@ bool initverbose = false;
 bool opt_rt = false;            /* true if RTA parse should be used     RT-CO */
 bool opt_xta = false;           /* true if XTA parse should be used    XTA-CO */
 bool opt_vta = false;           /* true if VTA parse should be used    VTA-CO */
+bool opt_verify = true;        /* true if classfiles should be verified      */
 
 bool showmethods = false;
 bool showconstantpool = false;
index 1d4c0ba11e8e532106029343c8dfbcffe1252953..2c8a7550dd65ac273d89c4f45bf014598ddcf338 100644 (file)
--- a/jit/jit.c
+++ b/jit/jit.c
@@ -29,7 +29,7 @@
 
    Changes: Edwin Steiner
 
-   $Id: jit.c 796 2003-12-16 22:28:18Z edwin $
+   $Id: jit.c 800 2003-12-16 22:47:59Z edwin $
 
 */
 
@@ -1426,6 +1426,7 @@ static void* do_nothing_function()
 
 *******************************************************************************/
 
+#if 0
 #define LOG_STEP(step)                                                                                 \
        if (compileverbose) {                                                                           \
                char logtext[MAXLOGTEXT];                                                               \
@@ -1436,6 +1437,9 @@ static void* do_nothing_function()
                utf_sprint(logtext+strlen(logtext), m->descriptor);             \
                log_text(logtext);                                                                              \
        }
+#else
+#define LOG_STEP(step)
+#endif
 
 methodptr jit_compile(methodinfo *m)
 {
@@ -1548,9 +1552,11 @@ methodptr jit_compile(methodinfo *m)
        analyse_stack();
    
 #ifdef CACAO_TYPECHECK
-       LOG_STEP("Typechecking");
-       typecheck();
-       LOG_STEP("Done typechecking");
+       if (opt_verify) {
+               LOG_STEP("Typechecking");
+               typecheck();
+               LOG_STEP("Done typechecking");
+       }
 #endif
        
        if (opt_loops) {
diff --git a/main.c b/main.c
index 7354e8f2e542486732e45eb6939aed457bfc0505..b0ac350a6487c1276ddffe7758006f6a1428465d 100644 (file)
--- a/main.c
+++ b/main.c
@@ -37,7 +37,7 @@
      - Calling the class loader
      - Running the main method
 
-   $Id: main.c 771 2003-12-13 23:11:08Z stefan $
+   $Id: main.c 800 2003-12-16 22:47:59Z edwin $
 
 */
 
@@ -103,6 +103,8 @@ bool makeinitializations = true;
 bool getloadingtime = false;   /* to measure the runtime                     */
 s8 loadingtime = 0;
 
+bool opt_verify = true;        /* true if classfiles should be verified      */
+
 
 static classinfo *topclass;
 
@@ -146,6 +148,7 @@ void **stackbottom = 0;
 #define OPT_XTA         27 
 #define OPT_VTA         28
 #define OPT_VERBOSETC   29
+#define OPT_NOVERIFY    30
 
 
 struct {char *name; bool arg; int value;} opts[] = {
@@ -154,7 +157,7 @@ struct {char *name; bool arg; int value;} opts[] = {
        {"ms",          true,   OPT_MS},
        {"mx",          true,   OPT_MX},
        {"noasyncgc",   false,  OPT_IGNORE},
-       {"noverify",    false,  OPT_IGNORE},
+       {"noverify",    false,  OPT_NOVERIFY},
        {"oss",         true,   OPT_IGNORE},
        {"ss",          true,   OPT_IGNORE},
        {"v",           false,  OPT_VERBOSE1},
@@ -259,6 +262,7 @@ static void print_usage()
 #if defined(__ALPHA__)
        printf("          -noieee .............. don't use ieee compliant arithmetic\n");
 #endif
+       printf("          -noverify ............ don't verify classfiles\n");
        printf("          -softnull ............ use software nullpointer check\n");
        printf("          -time ................ measure the runtime\n");
        printf("          -stat ................ detailed compiler statistics\n");
@@ -665,6 +669,10 @@ int main(int argc, char **argv)
                        opt_noieee = true;
                        break;
 
+               case OPT_NOVERIFY:
+                       opt_verify = false;
+                       break;
+
                case OPT_SOFTNULL:
                        checknull = true;
                        break;
index c36fb1bb190cafbbb0ede94a3363fce55e7a3429..3aca56f15358bbf0360828d567738b7fd2f6803a 100644 (file)
@@ -37,7 +37,7 @@
      - Calling the class loader
      - Running the main method
 
-   $Id: cacao.c 771 2003-12-13 23:11:08Z stefan $
+   $Id: cacao.c 800 2003-12-16 22:47:59Z edwin $
 
 */
 
@@ -103,6 +103,8 @@ bool makeinitializations = true;
 bool getloadingtime = false;   /* to measure the runtime                     */
 s8 loadingtime = 0;
 
+bool opt_verify = true;        /* true if classfiles should be verified      */
+
 
 static classinfo *topclass;
 
@@ -146,6 +148,7 @@ void **stackbottom = 0;
 #define OPT_XTA         27 
 #define OPT_VTA         28
 #define OPT_VERBOSETC   29
+#define OPT_NOVERIFY    30
 
 
 struct {char *name; bool arg; int value;} opts[] = {
@@ -154,7 +157,7 @@ struct {char *name; bool arg; int value;} opts[] = {
        {"ms",          true,   OPT_MS},
        {"mx",          true,   OPT_MX},
        {"noasyncgc",   false,  OPT_IGNORE},
-       {"noverify",    false,  OPT_IGNORE},
+       {"noverify",    false,  OPT_NOVERIFY},
        {"oss",         true,   OPT_IGNORE},
        {"ss",          true,   OPT_IGNORE},
        {"v",           false,  OPT_VERBOSE1},
@@ -259,6 +262,7 @@ static void print_usage()
 #if defined(__ALPHA__)
        printf("          -noieee .............. don't use ieee compliant arithmetic\n");
 #endif
+       printf("          -noverify ............ don't verify classfiles\n");
        printf("          -softnull ............ use software nullpointer check\n");
        printf("          -time ................ measure the runtime\n");
        printf("          -stat ................ detailed compiler statistics\n");
@@ -665,6 +669,10 @@ int main(int argc, char **argv)
                        opt_noieee = true;
                        break;
 
+               case OPT_NOVERIFY:
+                       opt_verify = false;
+                       break;
+
                case OPT_SOFTNULL:
                        checknull = true;
                        break;
index 947a4bc875e51bccc94f320ed468f80d6c3326cd..6503b1dd7e88fb659bb4e406e83f605728ce9901 100644 (file)
@@ -29,7 +29,7 @@
    Changes: Mark Probst
             Philipp Tomsich
 
-   $Id: headers.c 771 2003-12-13 23:11:08Z stefan $
+   $Id: headers.c 800 2003-12-16 22:47:59Z edwin $
 
 */
 
@@ -60,6 +60,7 @@ bool initverbose = false;
 bool opt_rt = false;            /* true if RTA parse should be used     RT-CO */
 bool opt_xta = false;           /* true if XTA parse should be used    XTA-CO */
 bool opt_vta = false;           /* true if VTA parse should be used    VTA-CO */
+bool opt_verify = true;        /* true if classfiles should be verified      */
 
 bool showmethods = false;
 bool showconstantpool = false;
index b5afcda535c47263b9a4d6b81843f8153fd536ef..512086a2a2f0a11ff1833f941257a045d127fb60 100644 (file)
@@ -31,7 +31,7 @@
             Philipp Tomsich
                        Edwin Steiner
 
-   $Id: global.h 792 2003-12-16 18:49:52Z edwin $
+   $Id: global.h 800 2003-12-16 22:47:59Z edwin $
 
 */
 
@@ -780,6 +780,7 @@ extern bool verbose;
 extern bool opt_rt;             /* Rapid Type Analysis for better inlining CO-RT*/
 extern bool opt_xta;            /* X Type Analysis for better inlining    CO-XTA*/
 extern bool opt_vta;            /* Variable Type Analysis for better inlining    CO-VTA*/
+extern bool opt_verify;         /* true if classfiles should be verified      */
 #ifdef TYPECHECK_VERBOSE_OPT
 extern bool typecheckverbose;
 #endif
index 1d4c0ba11e8e532106029343c8dfbcffe1252953..2c8a7550dd65ac273d89c4f45bf014598ddcf338 100644 (file)
@@ -29,7 +29,7 @@
 
    Changes: Edwin Steiner
 
-   $Id: jit.c 796 2003-12-16 22:28:18Z edwin $
+   $Id: jit.c 800 2003-12-16 22:47:59Z edwin $
 
 */
 
@@ -1426,6 +1426,7 @@ static void* do_nothing_function()
 
 *******************************************************************************/
 
+#if 0
 #define LOG_STEP(step)                                                                                 \
        if (compileverbose) {                                                                           \
                char logtext[MAXLOGTEXT];                                                               \
@@ -1436,6 +1437,9 @@ static void* do_nothing_function()
                utf_sprint(logtext+strlen(logtext), m->descriptor);             \
                log_text(logtext);                                                                              \
        }
+#else
+#define LOG_STEP(step)
+#endif
 
 methodptr jit_compile(methodinfo *m)
 {
@@ -1548,9 +1552,11 @@ methodptr jit_compile(methodinfo *m)
        analyse_stack();
    
 #ifdef CACAO_TYPECHECK
-       LOG_STEP("Typechecking");
-       typecheck();
-       LOG_STEP("Done typechecking");
+       if (opt_verify) {
+               LOG_STEP("Typechecking");
+               typecheck();
+               LOG_STEP("Done typechecking");
+       }
 #endif
        
        if (opt_loops) {