From e904d28b2cca163ed82a06fbfbf5e58ae0f3dc2f Mon Sep 17 00:00:00 2001 From: Jakub Jelinek Date: Wed, 1 Jul 2009 21:13:03 +0200 Subject: HTML_401F.java (defineElements): Split this huge method into... * gnu/javax/swing/text/html/parser/HTML_401F.java (defineElements): Split this huge method into... (defineElements1, defineElements2, defineElements3, defineElements4, defineElements5, defineElements6): ... these smaller methods. From-SVN: r149148 --- libjava/classpath/ChangeLog.gcj | 7 +++ .../javax/swing/text/html/parser/HTML_401F.java | 63 +++++++++++++++++++++ .../javax/swing/text/html/parser/HTML_401F.class | Bin 74378 -> 74936 bytes 3 files changed, 70 insertions(+) (limited to 'libjava/classpath') diff --git a/libjava/classpath/ChangeLog.gcj b/libjava/classpath/ChangeLog.gcj index 6398644a..4b93934 100644 --- a/libjava/classpath/ChangeLog.gcj +++ b/libjava/classpath/ChangeLog.gcj @@ -1,3 +1,10 @@ +2009-07-01 Jakub Jelinek + + * 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 * tools/gnu/classpath/tools/gjdoc/Main.java (getGjdocVersion): Use diff --git a/libjava/classpath/gnu/javax/swing/text/html/parser/HTML_401F.java b/libjava/classpath/gnu/javax/swing/text/html/parser/HTML_401F.java index 1894b6a..5555412 100644 --- a/libjava/classpath/gnu/javax/swing/text/html/parser/HTML_401F.java +++ b/libjava/classpath/gnu/javax/swing/text/html/parser/HTML_401F.java @@ -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 , diff --git a/libjava/classpath/lib/gnu/javax/swing/text/html/parser/HTML_401F.class b/libjava/classpath/lib/gnu/javax/swing/text/html/parser/HTML_401F.class index 5d9889c..270279b 100644 Binary files a/libjava/classpath/lib/gnu/javax/swing/text/html/parser/HTML_401F.class and b/libjava/classpath/lib/gnu/javax/swing/text/html/parser/HTML_401F.class differ -- cgit v1.1