public inbox for java-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Andrew Haley <aph@redhat.com>
To: GCJ-patches <java-patches@gcc.gnu.org>
Subject: Allow 1.7 class file format
Date: Mon, 23 Apr 2012 13:30:00 -0000	[thread overview]
Message-ID: <4F95596B.5000508@redhat.com> (raw)

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);


             reply	other threads:[~2012-04-23 13:30 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-04-23 13:30 Andrew Haley [this message]
2012-04-23 16:58 ` Andrew Hughes
2012-04-23 17:19   ` Andrew Haley
2012-04-25 10:17 ` Andrew Haley

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4F95596B.5000508@redhat.com \
    --to=aph@redhat.com \
    --cc=java-patches@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).