public inbox for java-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Jakub Jelinek <jakub@redhat.com>
To: Andrew Haley <aph@redhat.com>
Cc: Java Patch List <java-patches@gcc.gnu.org>
Subject: Re: Split gnu/javax/swing/text/html/parser/HTML_401F.java (Was 	[vta]  Add chains from referenced VALUEs to DVs that reference them)
Date: Wed, 01 Jul 2009 19:21:00 -0000	[thread overview]
Message-ID: <20090701192115.GJ4462@tyan-ft48-01.lab.bos.redhat.com> (raw)
In-Reply-To: <4A4B5883.4050905@redhat.com>

[-- Attachment #1: Type: text/plain, Size: 5047 bytes --]

On Wed, Jul 01, 2009 at 01:37:23PM +0100, Andrew Haley wrote:
> It's not an ABI change.  This patch is OK iff accompanied by a comment
> in the code that explains the problem.

Thanks, here is what I've committed.
In doing so, I had to --enable-java-maintainer-mode to update the class
file, which in addition to changing the HTML_401F* files changed a lot of
headers and a handful of classes as well, see attached second patch.
But at least the header changes look wrong, see e.g.
- namespace namespace$
+ namespace namespace
changes in the headers, I guess related to recent keyword handling changes.
Dunno if that is because I had a wrong gcjh or if there is some recent issue in the
tools.

I've only committed the HTML_401F* files, the second patch is just FYI.

Index: classpath/ChangeLog.gcj
===================================================================
--- classpath/ChangeLog.gcj	(revision 149147)
+++ classpath/ChangeLog.gcj	(working copy)
@@ -1,3 +1,10 @@
+2009-07-01  Jakub Jelinek  <jakub@redhat.com>
+
+	* gnu/javax/swing/text/html/parser/HTML_401F.java (defineElements):
+	Split this huge method into...
+	(defineElements1, defineElements2, defineElements3, defineElements4,
+	defineElements5, defineElements6): ... these smaller methods.
+
 2009-06-16  Matthias Klose  <doko@ubuntu.com>
 
 	* tools/gnu/classpath/tools/gjdoc/Main.java (getGjdocVersion): Use
Index: classpath/gnu/javax/swing/text/html/parser/HTML_401F.java
===================================================================
--- classpath/gnu/javax/swing/text/html/parser/HTML_401F.java	(revision 149147)
+++ classpath/gnu/javax/swing/text/html/parser/HTML_401F.java	(working copy)
@@ -379,6 +379,24 @@ public class HTML_401F
    */
   protected void defineElements()
   {
+    /* Define the elements.  This used to be one huge method, which
+       unfortunately took too long to compile and consumed
+       too much memory while compiling it.  While it can serve as
+       a good stress test for gcj, it is better to split it up
+       to save time and memory used during GCC bootstrap.  */
+    defineElements1();
+    defineElements2();
+    defineElements3();
+    defineElements4();
+    defineElements5();
+    defineElements6();
+  }
+
+  /**
+   * Define first sixth of elements of this DTD.
+   */
+  private void defineElements1()
+  {
     /* Define the elements. */
       defElement(PCDATA, 0, false, false, null, NONE, NONE,
         new AttributeList[ 0 ]);
@@ -885,6 +903,15 @@ public class HTML_401F
           0, IMPLIED)
       }
     );
+
+  }
+
+  /**
+   * Define second sixth of elements of this DTD.
+   */
+  private void defineElements2()
+  {
+    /* Define the elements. */
       defElement(CENTER, 0, false, false, null,
       NONE
       ,
@@ -1373,6 +1400,15 @@ public class HTML_401F
         attr(ONKEYUP, null, null, 0, IMPLIED)
       }
     );
+
+  }
+
+  /**
+   * Define third sixth of elements of this DTD.
+   */
+  private void defineElements3()
+  {
+    /* Define the elements. */
       defElement(FONT, 0, false, false, null,
       NONE
       ,
@@ -1861,6 +1897,15 @@ public class HTML_401F
         attr(VSPACE, null, null, 0, IMPLIED)
       }
     );
+
+  }
+
+  /**
+   * Define fourth sixth of elements of this DTD.
+   */
+  private void defineElements4()
+  {
+    /* Define the elements. */
       defElement(INPUT, EMPTY, false, true, null,
       NONE
       ,
@@ -2357,6 +2402,15 @@ public class HTML_401F
         attr(VSPACE, null, null, 0, IMPLIED)
       }
     );
+
+  }
+
+  /**
+   * Define fifth sixth of elements of this DTD.
+   */
+  private void defineElements5()
+  {
+    /* Define the elements. */
       defElement(OL, 0, false, false, createListModel(),
       NONE
       ,
@@ -2859,6 +2913,15 @@ public class HTML_401F
         attr(ONKEYUP, null, null, 0, IMPLIED)
       }
     );
+
+  }
+
+  /**
+   * Define last sixth of elements of this DTD.
+   */
+  private void defineElements6()
+  {
+    /* Define the elements. */
       defElement(SUP, 0, false, false, null,
       NONE
       ,
Index: classpath/lib/gnu/javax/swing/text/html/parser/HTML_401F.class
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Index: gnu/javax/swing/text/html/parser/HTML_401F.h
===================================================================
--- gnu/javax/swing/text/html/parser/HTML_401F.h	(revision 149147)
+++ gnu/javax/swing/text/html/parser/HTML_401F.h	(working copy)
@@ -58,6 +58,14 @@ public:
   static ::javax::swing::text::html::parser::DTD * getInstance();
 public: // actually protected
   virtual void defineElements();
+private:
+  void defineElements1();
+  void defineElements2();
+  void defineElements3();
+  void defineElements4();
+  void defineElements5();
+  void defineElements6();
+public: // actually protected
   virtual void defineEntities();
   virtual ::javax::swing::text::html::parser::ContentModel * model(::java::lang::String *);
 private:

	Jakub

[-- Attachment #2: P.bz2 --]
[-- Type: application/x-bzip2, Size: 7747 bytes --]

  reply	other threads:[~2009-07-01 19:21 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20090630124346.GX4462@tyan-ft48-01.lab.bos.redhat.com>
     [not found] ` <alpine.LSU.1.99.0906301619520.29901@acrux.dbai.tuwien.ac.at>
     [not found]   ` <4A4A2623.9010609@redhat.com>
     [not found]     ` <20090630152911.GA4462@tyan-ft48-01.lab.bos.redhat.com>
2009-07-01 12:37       ` Andrew Haley
2009-07-01 19:21         ` Jakub Jelinek [this message]
2009-07-02  8:15           ` Andrew Haley
2009-07-12 20:27         ` Split gnu/javax/swing/text/html/parser/HTML_401F.java Gerald Pfeifer
2009-07-12 20:36           ` Jakub Jelinek
2009-07-12 21:00             ` Gerald Pfeifer
2009-07-14 16:28             ` [cp-patches] " Audrius Meskauskas
2009-07-27 22:55               ` Andrew John Hughes
2009-07-29  7:06                 ` Andrew Haley
2009-08-02 21:44                   ` Audrius Meskauskas
2009-07-13  9:31           ` 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=20090701192115.GJ4462@tyan-ft48-01.lab.bos.redhat.com \
    --to=jakub@redhat.com \
    --cc=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).