]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
[multiple changes]
authorBryce McKinlay <bryce@gcc.gnu.org>
Fri, 13 May 2005 01:02:39 +0000 (02:02 +0100)
committerBryce McKinlay <bryce@gcc.gnu.org>
Fri, 13 May 2005 01:02:39 +0000 (02:02 +0100)
2005-05-12  Bryce McKinlay  <mckinlay@redhat.com>

* include/jvm.h (gcj::verifyClasses): Declare.
* link.cc (gcj::verbose_class_flag): Moved.
* prims.cc (gcj::verifyClasses): Define here.
(gcj::verbose_class_flag): Move definition here.
(_Jv_Linker::wait_for_state): Don't call verify_class
if gcj::verifyClasses is not set.
* gij.cc (main): Set gcj::verifyClasses when '-noverify' is given.

2005-05-12  Aaron Luchko  <aluchko@redhat.com>

* gij.cc (main): Recognize '-verify', '-noverify', and
'-verifyremote'

2005-05-12  Aaron Luchko <aluchko@redhat.com>

        * gcj.texi: Add '-verify', '-noverify', and '-verifyremote'.

From-SVN: r99646

gcc/java/ChangeLog
gcc/java/gcj.texi
libjava/ChangeLog
libjava/gij.cc
libjava/include/jvm.h
libjava/link.cc
libjava/prims.cc

index 126e0c836eecaf09687ef0faa97f457462ae1bd7..6341396673f9b009f6d146f2fdfb74c04d838461 100644 (file)
@@ -1,3 +1,7 @@
+2005-05-12  Aaron Luchko <aluchko@redhat.com>
+
+        * gcj.texi: Add '-verify', '-noverify', and '-verifyremote'.
+
 2005-05-11  Tom Tromey  <tromey@redhat.com>
 
        * gcj.texi (Code Generation): Document -fbootstrap-classes.
index 3b2f12e57fdcffea3218c035c63b2b7355dc84ba..28316bf21d4c6a1b0b7080648e37072bafe3257b 100644 (file)
@@ -1095,6 +1095,11 @@ Equivalent to @code{-Xms}.
 @item -mx=@var{number}
 Equivalent to @code{-Xmx}.
 
+@item -noverify
+Do not verify compliance of bytecode with the VM specification. In addition,
+this option disables type verification which is otherwise performed on BC-ABI
+compiled code.
+
 @item -X
 @itemx -X@var{argument}
 Supplying @code{-X} by itself will cause @code{gij} to list all the
@@ -1137,7 +1142,8 @@ Each time a class is initialized, print a short message on standard error.
 compatibility with existing application launch scripts:
 @code{-client}, @code{-server}, @code{-hotspot}, @code{-jrockit},
 @code{-agentlib}, @code{-agentpath}, @code{-debug}, @code{-d32},
-@code{-d64}, @code{-javaagent} and @code{-noclassgc}.
+@code{-d64}, @code{-javaagent}, @code{-noclassgc}, @code{-verify},
+and @code{-verifyremote}.
 
 @c man end
 
index e0508a5c3379cff4aa1aacf34e443f306b068fdc..469bb76bc2a1dce38cfb93351a821ec8bc6718ad 100644 (file)
@@ -1,3 +1,18 @@
+2005-05-12  Bryce McKinlay  <mckinlay@redhat.com>
+
+       * include/jvm.h (gcj::verifyClasses): Declare.
+       * link.cc (gcj::verbose_class_flag): Moved.
+       * prims.cc (gcj::verifyClasses): Define here.
+       (gcj::verbose_class_flag): Move definition here.
+       (_Jv_Linker::wait_for_state): Don't call verify_class
+       if gcj::verifyClasses is not set.
+       * gij.cc (main): Set gcj::verifyClasses when '-noverify' is given.      
+
+2005-05-12  Aaron Luchko  <aluchko@redhat.com>
+
+       * gij.cc (main): Recognize '-verify', '-noverify', and
+       '-verifyremote'
+
 2005-05-12  Kaz Kojima  <kkojima@gcc.gnu.org>
 
        * configure.host: Set IEEESPEC to -mieee for sh*-*-*.
index 010e72fb5fc1796dd83b0b0b29902ff82210bbe8..60d5b34817d9fe2b42e84e00529016829851eb9e 100644 (file)
@@ -296,6 +296,14 @@ main (int argc, char const** argv)
         nonstandard_opts_help ();
       else if (! strncmp (arg, "-X", 2))
         add_option (vm_args, arg, NULL);
+      // Obsolete options recognized for backwards-compatibility.
+      else if (! strcmp (arg, "-verify")
+               || ! strcmp (arg, "-verifyremote"))
+       continue;
+      else if (! strcmp (arg, "-noverify"))
+        {
+         gcj::verifyClasses = false;
+       }
       else
        {
          fprintf (stderr, "gij: unrecognized option -- `%s'\n", argv[i]);
index 6b978f906e426c1ac550f413b3fa31d3a91390ce..bceb291fb581967bdc3587b517817fc9c4846929 100644 (file)
@@ -230,6 +230,9 @@ namespace gcj
 
   /* Print out class names as they are initialized. */
   extern bool verbose_class_flag;
+  
+  /* When true, enable the bytecode verifier and BC-ABI verification. */
+  extern bool verifyClasses;
 }
 
 // This class handles all aspects of class preparation and linking.
index 0a705736628d659afcec9763869ddd500401ddcf..3fe073463f9d45952b13f70abff0aff7e69f9c85 100644 (file)
@@ -44,9 +44,6 @@ details.  */
 
 using namespace gcj;
 
-// When true, print debugging information about class loading.
-bool gcj::verbose_class_flag;
-
 typedef unsigned int uaddr __attribute__ ((mode (pointer)));
 
 template<typename T>
@@ -1728,7 +1725,8 @@ _Jv_Linker::wait_for_state (jclass klass, int state)
 
       if (state >= JV_STATE_LINKED && klass->state < JV_STATE_LINKED)
        {
-         verify_class (klass);
+         if (gcj::verifyClasses)
+           verify_class (klass);
 
          ensure_class_linked (klass);
          link_exception_table (klass);
index 98d3023245121b094eb60a0289b9c782f4be12ed..af177241acf0e34901788d3d649f8bae70df68a4 100644 (file)
@@ -953,6 +953,12 @@ namespace gcj
   _Jv_Utf8Const *finit_name;
   
   bool runtimeInitialized = false;
+  
+  // When true, print debugging information about class loading.
+  bool verbose_class_flag;
+  
+  // When true, enable the bytecode verifier and BC-ABI type verification. 
+  bool verifyClasses = true;
 }
 
 // We accept all non-standard options accepted by Sun's java command,