This is the mail archive of the java-patches@gcc.gnu.org mailing list for the Java project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Allow 1.7 class file format


There's no real reason to disallow 1.7 class files.  Anyone trying to
use any of the new opcodes or new constants will fail verification,
and most Java programs don't use them.

Andrew.


012-04-23  Andrew Haley  <aph@redhat.com>

	* defineclass.cc (MAJOR_1_7,  MINOR_1_7): New.
	(parse): Allow MAJOR_1_7 classfile version.

Index: defineclass.cc
===================================================================
--- defineclass.cc	(revision 186103)
+++ defineclass.cc	(working copy)
@@ -361,6 +361,8 @@
 #define MINOR_1_5  0
 #define MAJOR_1_6 50
 #define MINOR_1_6  0
+#define MAJOR_1_7 51
+#define MINOR_1_7  0

 void
 _Jv_ClassReader::parse ()
@@ -371,8 +373,8 @@

   int minor_version = read2u ();
   int major_version = read2u ();
-  if (major_version < MAJOR_1_1 || major_version > MAJOR_1_6
-      || (major_version == MAJOR_1_6 && minor_version > MINOR_1_6))
+  if (major_version < MAJOR_1_1 || major_version > MAJOR_1_7
+      || (major_version == MAJOR_1_7 && minor_version > MINOR_1_7))
     throw_class_format_error ("unrecognized class file version");
   is_15 = (major_version >= MAJOR_1_5);



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]