This is the mail archive of the
java@gcc.gnu.org
mailing list for the Java project.
Weird Code in parse.y (java_layout_seen_class_methods)
- From: Ranjit Mathew <rmathew at gmail dot com>
- To: java at gcc dot gnu dot org
- Date: Thu, 10 Jun 2004 19:01:49 +0530
- Subject: Weird Code in parse.y (java_layout_seen_class_methods)
Hi,
Consider the body of java_layout_seen_class_methods()
in parse.y:
-------------------------- 8< --------------------------
7577 void java_layout_seen_class_methods (void)
7578 {
7579 tree previous_list = all_class_list;
7580 tree end = NULL_TREE;
7581 tree current;
7582
7583 while (1)
7584 {
7585 for (current = previous_list;
7586 current != end; current = TREE_CHAIN (current))
7587 layout_class_methods (TREE_TYPE (TREE_VALUE (current)));
7588
7589 if (previous_list != all_class_list)
7590 {
7591 end = previous_list;
7592 previous_list = all_class_list;
7593 }
7594 else
7595 break;
7596 }
7597 }
-------------------------- 8< --------------------------
How can code between 7590-7593 ever execute?
And why is there a while(1) around the for loop?
Is this some vestigial code that should have been
removed?
BTW, the method name is not the first word on
the line #7577.
Thanks,
Ranjit.
--
Ranjit Mathew Email: rmathew AT gmail DOT com
Bangalore, INDIA. Web: http://ranjitmathew.tripod.com/