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
This commit is contained in:
Jakub Jelinek 2009-07-01 21:13:03 +02:00 committed by Jakub Jelinek
parent 96f9e8545d
commit e904d28b2c
4 changed files with 78 additions and 0 deletions

View File

@ -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> 2009-06-16 Matthias Klose <doko@ubuntu.com>
* tools/gnu/classpath/tools/gjdoc/Main.java (getGjdocVersion): Use * tools/gnu/classpath/tools/gjdoc/Main.java (getGjdocVersion): Use

View File

@ -378,6 +378,24 @@ public class HTML_401F
* Define all elements of this DTD. * Define all elements of this DTD.
*/ */
protected void defineElements() 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. */ /* Define the elements. */
defElement(PCDATA, 0, false, false, null, NONE, NONE, defElement(PCDATA, 0, false, false, null, NONE, NONE,
@ -885,6 +903,15 @@ public class HTML_401F
0, IMPLIED) 0, IMPLIED)
} }
); );
}
/**
* Define second sixth of elements of this DTD.
*/
private void defineElements2()
{
/* Define the elements. */
defElement(CENTER, 0, false, false, null, defElement(CENTER, 0, false, false, null,
NONE NONE
, ,
@ -1373,6 +1400,15 @@ public class HTML_401F
attr(ONKEYUP, null, null, 0, IMPLIED) 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, defElement(FONT, 0, false, false, null,
NONE NONE
, ,
@ -1861,6 +1897,15 @@ public class HTML_401F
attr(VSPACE, null, null, 0, IMPLIED) 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, defElement(INPUT, EMPTY, false, true, null,
NONE NONE
, ,
@ -2357,6 +2402,15 @@ public class HTML_401F
attr(VSPACE, null, null, 0, IMPLIED) 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(), defElement(OL, 0, false, false, createListModel(),
NONE NONE
, ,
@ -2859,6 +2913,15 @@ public class HTML_401F
attr(ONKEYUP, null, null, 0, IMPLIED) 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, defElement(SUP, 0, false, false, null,
NONE NONE
, ,

View File

@ -58,6 +58,14 @@ public:
static ::javax::swing::text::html::parser::DTD * getInstance(); static ::javax::swing::text::html::parser::DTD * getInstance();
public: // actually protected public: // actually protected
virtual void defineElements(); virtual void defineElements();
private:
void defineElements1();
void defineElements2();
void defineElements3();
void defineElements4();
void defineElements5();
void defineElements6();
public: // actually protected
virtual void defineEntities(); virtual void defineEntities();
virtual ::javax::swing::text::html::parser::ContentModel * model(::java::lang::String *); virtual ::javax::swing::text::html::parser::ContentModel * model(::java::lang::String *);
private: private: