annotate src/share/vm/prims/jvmtiEnvFill.java @ 452:00b023ae2d78

6722113: CMS: Incorrect overflow handling during precleaning of Reference lists Summary: When we encounter marking stack overflow during precleaning of Reference lists, we were using the overflow list mechanism, which can cause problems on account of mutating the mark word of the header because of conflicts with mutator accesses and updates of that field. Instead we should use the usual mechanism for overflow handling in concurrent phases, namely dirtying of the card on which the overflowed object lies. Since precleaning effectively does a form of discovered list processing, albeit with discovery enabled, we needed to adjust some code to be correct in the face of interleaved processing and discovery. Reviewed-by: apetrusenko, jcoomes
author ysr
date Thu, 20 Nov 2008 12:27:41 -0800
parents a61af66fc99e
children c18cbe5936b8
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
a61af66fc99e Initial load
duke
parents:
diff changeset
1 /*
a61af66fc99e Initial load
duke
parents:
diff changeset
2 * Copyright 2003-2005 Sun Microsystems, Inc. All Rights Reserved.
a61af66fc99e Initial load
duke
parents:
diff changeset
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
a61af66fc99e Initial load
duke
parents:
diff changeset
4 *
a61af66fc99e Initial load
duke
parents:
diff changeset
5 * This code is free software; you can redistribute it and/or modify it
a61af66fc99e Initial load
duke
parents:
diff changeset
6 * under the terms of the GNU General Public License version 2 only, as
a61af66fc99e Initial load
duke
parents:
diff changeset
7 * published by the Free Software Foundation.
a61af66fc99e Initial load
duke
parents:
diff changeset
8 *
a61af66fc99e Initial load
duke
parents:
diff changeset
9 * This code is distributed in the hope that it will be useful, but WITHOUT
a61af66fc99e Initial load
duke
parents:
diff changeset
10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
a61af66fc99e Initial load
duke
parents:
diff changeset
11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
a61af66fc99e Initial load
duke
parents:
diff changeset
12 * version 2 for more details (a copy is included in the LICENSE file that
a61af66fc99e Initial load
duke
parents:
diff changeset
13 * accompanied this code).
a61af66fc99e Initial load
duke
parents:
diff changeset
14 *
a61af66fc99e Initial load
duke
parents:
diff changeset
15 * You should have received a copy of the GNU General Public License version
a61af66fc99e Initial load
duke
parents:
diff changeset
16 * 2 along with this work; if not, write to the Free Software Foundation,
a61af66fc99e Initial load
duke
parents:
diff changeset
17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
a61af66fc99e Initial load
duke
parents:
diff changeset
18 *
a61af66fc99e Initial load
duke
parents:
diff changeset
19 * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
a61af66fc99e Initial load
duke
parents:
diff changeset
20 * CA 95054 USA or visit www.sun.com if you need additional information or
a61af66fc99e Initial load
duke
parents:
diff changeset
21 * have any questions.
a61af66fc99e Initial load
duke
parents:
diff changeset
22 *
a61af66fc99e Initial load
duke
parents:
diff changeset
23 */
a61af66fc99e Initial load
duke
parents:
diff changeset
24
a61af66fc99e Initial load
duke
parents:
diff changeset
25 import java.io.*;
a61af66fc99e Initial load
duke
parents:
diff changeset
26 import java.util.*;
a61af66fc99e Initial load
duke
parents:
diff changeset
27
a61af66fc99e Initial load
duke
parents:
diff changeset
28 class jvmtiEnvFill {
a61af66fc99e Initial load
duke
parents:
diff changeset
29
a61af66fc99e Initial load
duke
parents:
diff changeset
30 public static void main(String[] args) throws IOException {
a61af66fc99e Initial load
duke
parents:
diff changeset
31 if (args.length != 3) {
a61af66fc99e Initial load
duke
parents:
diff changeset
32 System.err.println("usage: <filledFile> <stubFile> <resultFile>");
a61af66fc99e Initial load
duke
parents:
diff changeset
33 System.exit(1);
a61af66fc99e Initial load
duke
parents:
diff changeset
34 }
a61af66fc99e Initial load
duke
parents:
diff changeset
35 String filledFN = args[0];
a61af66fc99e Initial load
duke
parents:
diff changeset
36 String stubFN = args[1];
a61af66fc99e Initial load
duke
parents:
diff changeset
37 String resultFN = args[2];
a61af66fc99e Initial load
duke
parents:
diff changeset
38
a61af66fc99e Initial load
duke
parents:
diff changeset
39 SourceFile filledSF = new SourceFile(filledFN);
a61af66fc99e Initial load
duke
parents:
diff changeset
40 SourceFile stubSF = new SourceFile(stubFN);
a61af66fc99e Initial load
duke
parents:
diff changeset
41
a61af66fc99e Initial load
duke
parents:
diff changeset
42
a61af66fc99e Initial load
duke
parents:
diff changeset
43 stubSF.fill(filledSF);
a61af66fc99e Initial load
duke
parents:
diff changeset
44
a61af66fc99e Initial load
duke
parents:
diff changeset
45 PrintWriter out = new PrintWriter(new FileWriter(resultFN));
a61af66fc99e Initial load
duke
parents:
diff changeset
46 stubSF.output(out);
a61af66fc99e Initial load
duke
parents:
diff changeset
47 out.close();
a61af66fc99e Initial load
duke
parents:
diff changeset
48 }
a61af66fc99e Initial load
duke
parents:
diff changeset
49 }
a61af66fc99e Initial load
duke
parents:
diff changeset
50
a61af66fc99e Initial load
duke
parents:
diff changeset
51 class SourceFile {
a61af66fc99e Initial load
duke
parents:
diff changeset
52
a61af66fc99e Initial load
duke
parents:
diff changeset
53 static final String endFilePrefix = "// end file prefix";
a61af66fc99e Initial load
duke
parents:
diff changeset
54 static final String functionPrefix = "JvmtiEnv::";
a61af66fc99e Initial load
duke
parents:
diff changeset
55
a61af66fc99e Initial load
duke
parents:
diff changeset
56 final String fn;
a61af66fc99e Initial load
duke
parents:
diff changeset
57 LineNumberReader in;
a61af66fc99e Initial load
duke
parents:
diff changeset
58 String line;
a61af66fc99e Initial load
duke
parents:
diff changeset
59 List<String> top = new ArrayList<String>();
a61af66fc99e Initial load
duke
parents:
diff changeset
60 List<String> before = new ArrayList<String>();
a61af66fc99e Initial load
duke
parents:
diff changeset
61 boolean inFilePrefix = true;
a61af66fc99e Initial load
duke
parents:
diff changeset
62 List<Function> functions = new ArrayList<Function>();
a61af66fc99e Initial load
duke
parents:
diff changeset
63 Map<String, Function> functionMap = new HashMap<String, Function>();
a61af66fc99e Initial load
duke
parents:
diff changeset
64
a61af66fc99e Initial load
duke
parents:
diff changeset
65 class Function {
a61af66fc99e Initial load
duke
parents:
diff changeset
66 String name;
a61af66fc99e Initial load
duke
parents:
diff changeset
67 String args;
a61af66fc99e Initial load
duke
parents:
diff changeset
68 String compareArgs;
a61af66fc99e Initial load
duke
parents:
diff changeset
69 List comment;
a61af66fc99e Initial load
duke
parents:
diff changeset
70 List<String> body = new ArrayList<String>();
a61af66fc99e Initial load
duke
parents:
diff changeset
71
a61af66fc99e Initial load
duke
parents:
diff changeset
72 Function() throws IOException {
a61af66fc99e Initial load
duke
parents:
diff changeset
73 line = in.readLine();
a61af66fc99e Initial load
duke
parents:
diff changeset
74 String trimmed = line.trim();
a61af66fc99e Initial load
duke
parents:
diff changeset
75 if (!trimmed.startsWith(functionPrefix)) {
a61af66fc99e Initial load
duke
parents:
diff changeset
76 error("expected '" + functionPrefix + "'");
a61af66fc99e Initial load
duke
parents:
diff changeset
77 }
a61af66fc99e Initial load
duke
parents:
diff changeset
78 int index = trimmed.indexOf('(', functionPrefix.length());
a61af66fc99e Initial load
duke
parents:
diff changeset
79 if (index == -1) {
a61af66fc99e Initial load
duke
parents:
diff changeset
80 error("missing open paren");
a61af66fc99e Initial load
duke
parents:
diff changeset
81 }
a61af66fc99e Initial load
duke
parents:
diff changeset
82 name = trimmed.substring(functionPrefix.length(), index);
a61af66fc99e Initial load
duke
parents:
diff changeset
83 int index2 = trimmed.indexOf(')', index);
a61af66fc99e Initial load
duke
parents:
diff changeset
84 if (index2 == -1) {
a61af66fc99e Initial load
duke
parents:
diff changeset
85 error("missing close paren - must be on same line");
a61af66fc99e Initial load
duke
parents:
diff changeset
86 }
a61af66fc99e Initial load
duke
parents:
diff changeset
87 args = trimmed.substring(index+1, index2);
a61af66fc99e Initial load
duke
parents:
diff changeset
88 compareArgs = args.replaceAll("\\s", "");
a61af66fc99e Initial load
duke
parents:
diff changeset
89 String tail = trimmed.substring(index2+1).trim();
a61af66fc99e Initial load
duke
parents:
diff changeset
90 if (!tail.equals("{")) {
a61af66fc99e Initial load
duke
parents:
diff changeset
91 error("function declaration first line must end with open bracket '{', instead got '" +
a61af66fc99e Initial load
duke
parents:
diff changeset
92 tail + "'");
a61af66fc99e Initial load
duke
parents:
diff changeset
93 }
a61af66fc99e Initial load
duke
parents:
diff changeset
94 while(true) {
a61af66fc99e Initial load
duke
parents:
diff changeset
95 line = in.readLine();
a61af66fc99e Initial load
duke
parents:
diff changeset
96 if (line == null) {
a61af66fc99e Initial load
duke
parents:
diff changeset
97 line = ""; // so error does not look wierd
a61af66fc99e Initial load
duke
parents:
diff changeset
98 error("unexpected end of file");
a61af66fc99e Initial load
duke
parents:
diff changeset
99 }
a61af66fc99e Initial load
duke
parents:
diff changeset
100 if (line.startsWith("}")) {
a61af66fc99e Initial load
duke
parents:
diff changeset
101 break;
a61af66fc99e Initial load
duke
parents:
diff changeset
102 }
a61af66fc99e Initial load
duke
parents:
diff changeset
103 body.add(line);
a61af66fc99e Initial load
duke
parents:
diff changeset
104 }
a61af66fc99e Initial load
duke
parents:
diff changeset
105 String expected = "} /* end " + name + " */";
a61af66fc99e Initial load
duke
parents:
diff changeset
106 trimmed = line.replaceAll("\\s","");
a61af66fc99e Initial load
duke
parents:
diff changeset
107 if (!trimmed.equals(expected.replaceAll("\\s",""))) {
a61af66fc99e Initial load
duke
parents:
diff changeset
108 error("function end is malformed - should be: " + expected);
a61af66fc99e Initial load
duke
parents:
diff changeset
109 }
a61af66fc99e Initial load
duke
parents:
diff changeset
110 // copy over the comment prefix
a61af66fc99e Initial load
duke
parents:
diff changeset
111 comment = before;
a61af66fc99e Initial load
duke
parents:
diff changeset
112 before = new ArrayList<String>();
a61af66fc99e Initial load
duke
parents:
diff changeset
113 }
a61af66fc99e Initial load
duke
parents:
diff changeset
114
a61af66fc99e Initial load
duke
parents:
diff changeset
115 void remove() {
a61af66fc99e Initial load
duke
parents:
diff changeset
116 functionMap.remove(name);
a61af66fc99e Initial load
duke
parents:
diff changeset
117 }
a61af66fc99e Initial load
duke
parents:
diff changeset
118
a61af66fc99e Initial load
duke
parents:
diff changeset
119 String fileName() {
a61af66fc99e Initial load
duke
parents:
diff changeset
120 return fn;
a61af66fc99e Initial load
duke
parents:
diff changeset
121 }
a61af66fc99e Initial load
duke
parents:
diff changeset
122
a61af66fc99e Initial load
duke
parents:
diff changeset
123 void fill(Function filledFunc) {
a61af66fc99e Initial load
duke
parents:
diff changeset
124 if (filledFunc == null) {
a61af66fc99e Initial load
duke
parents:
diff changeset
125 System.err.println("Warning: function " + name + " missing from filled file");
a61af66fc99e Initial load
duke
parents:
diff changeset
126 body.add(0, " /*** warning: function added and not filled in ***/");
a61af66fc99e Initial load
duke
parents:
diff changeset
127 } else {
a61af66fc99e Initial load
duke
parents:
diff changeset
128 int fbsize = filledFunc.body.size();
a61af66fc99e Initial load
duke
parents:
diff changeset
129 int bsize = body.size();
a61af66fc99e Initial load
duke
parents:
diff changeset
130 if (fbsize > bsize || !body.subList(bsize-fbsize,bsize).equals(filledFunc.body)) {
a61af66fc99e Initial load
duke
parents:
diff changeset
131 // it has actually been filled in
a61af66fc99e Initial load
duke
parents:
diff changeset
132 body = filledFunc.body;
a61af66fc99e Initial load
duke
parents:
diff changeset
133 if (!compareArgs.equals(filledFunc.compareArgs)) {
a61af66fc99e Initial load
duke
parents:
diff changeset
134 System.err.println("Warning: function " + name +
a61af66fc99e Initial load
duke
parents:
diff changeset
135 ": filled and stub arguments differ");
a61af66fc99e Initial load
duke
parents:
diff changeset
136 System.err.println(" old (filled): " + filledFunc.args);
a61af66fc99e Initial load
duke
parents:
diff changeset
137 System.err.println(" new (stub): " + args);
a61af66fc99e Initial load
duke
parents:
diff changeset
138 body.add(0, " /*** warning: arguments changed, were: " +
a61af66fc99e Initial load
duke
parents:
diff changeset
139 filledFunc.args + " ***/");
a61af66fc99e Initial load
duke
parents:
diff changeset
140 }
a61af66fc99e Initial load
duke
parents:
diff changeset
141 }
a61af66fc99e Initial load
duke
parents:
diff changeset
142 filledFunc.remove(); // mark used
a61af66fc99e Initial load
duke
parents:
diff changeset
143 }
a61af66fc99e Initial load
duke
parents:
diff changeset
144 }
a61af66fc99e Initial load
duke
parents:
diff changeset
145
a61af66fc99e Initial load
duke
parents:
diff changeset
146 void output(PrintWriter out) {
a61af66fc99e Initial load
duke
parents:
diff changeset
147 Iterator it = comment.iterator();
a61af66fc99e Initial load
duke
parents:
diff changeset
148 while (it.hasNext()) {
a61af66fc99e Initial load
duke
parents:
diff changeset
149 out.println(it.next());
a61af66fc99e Initial load
duke
parents:
diff changeset
150 }
a61af66fc99e Initial load
duke
parents:
diff changeset
151 out.println("jvmtiError");
a61af66fc99e Initial load
duke
parents:
diff changeset
152 out.print(functionPrefix);
a61af66fc99e Initial load
duke
parents:
diff changeset
153 out.print(name);
a61af66fc99e Initial load
duke
parents:
diff changeset
154 out.print('(');
a61af66fc99e Initial load
duke
parents:
diff changeset
155 out.print(args);
a61af66fc99e Initial load
duke
parents:
diff changeset
156 out.println(") {");
a61af66fc99e Initial load
duke
parents:
diff changeset
157 it = body.iterator();
a61af66fc99e Initial load
duke
parents:
diff changeset
158 while (it.hasNext()) {
a61af66fc99e Initial load
duke
parents:
diff changeset
159 out.println(it.next());
a61af66fc99e Initial load
duke
parents:
diff changeset
160 }
a61af66fc99e Initial load
duke
parents:
diff changeset
161 out.print("} /* end ");
a61af66fc99e Initial load
duke
parents:
diff changeset
162 out.print(name);
a61af66fc99e Initial load
duke
parents:
diff changeset
163 out.println(" */");
a61af66fc99e Initial load
duke
parents:
diff changeset
164 }
a61af66fc99e Initial load
duke
parents:
diff changeset
165 }
a61af66fc99e Initial load
duke
parents:
diff changeset
166
a61af66fc99e Initial load
duke
parents:
diff changeset
167 SourceFile(String fn) throws IOException {
a61af66fc99e Initial load
duke
parents:
diff changeset
168 this.fn = fn;
a61af66fc99e Initial load
duke
parents:
diff changeset
169 Reader reader = new FileReader(fn);
a61af66fc99e Initial load
duke
parents:
diff changeset
170 in = new LineNumberReader(reader);
a61af66fc99e Initial load
duke
parents:
diff changeset
171
a61af66fc99e Initial load
duke
parents:
diff changeset
172 while (readGaps()) {
a61af66fc99e Initial load
duke
parents:
diff changeset
173 Function func = new Function();
a61af66fc99e Initial load
duke
parents:
diff changeset
174 functionMap.put(func.name, func);
a61af66fc99e Initial load
duke
parents:
diff changeset
175 functions.add(func);
a61af66fc99e Initial load
duke
parents:
diff changeset
176 }
a61af66fc99e Initial load
duke
parents:
diff changeset
177
a61af66fc99e Initial load
duke
parents:
diff changeset
178 in.close();
a61af66fc99e Initial load
duke
parents:
diff changeset
179 }
a61af66fc99e Initial load
duke
parents:
diff changeset
180
a61af66fc99e Initial load
duke
parents:
diff changeset
181 void error(String msg) {
a61af66fc99e Initial load
duke
parents:
diff changeset
182 System.err.println("Fatal error parsing file: " + fn);
a61af66fc99e Initial load
duke
parents:
diff changeset
183 System.err.println("Line number: " + in.getLineNumber());
a61af66fc99e Initial load
duke
parents:
diff changeset
184 System.err.println("Error message: " + msg);
a61af66fc99e Initial load
duke
parents:
diff changeset
185 System.err.println("Source line: " + line);
a61af66fc99e Initial load
duke
parents:
diff changeset
186 System.exit(1);
a61af66fc99e Initial load
duke
parents:
diff changeset
187 }
a61af66fc99e Initial load
duke
parents:
diff changeset
188
a61af66fc99e Initial load
duke
parents:
diff changeset
189 boolean readGaps() throws IOException {
a61af66fc99e Initial load
duke
parents:
diff changeset
190 while(true) {
a61af66fc99e Initial load
duke
parents:
diff changeset
191 line = in.readLine();
a61af66fc99e Initial load
duke
parents:
diff changeset
192 if (line == null) {
a61af66fc99e Initial load
duke
parents:
diff changeset
193 return false; // end of file
a61af66fc99e Initial load
duke
parents:
diff changeset
194 }
a61af66fc99e Initial load
duke
parents:
diff changeset
195 if (!inFilePrefix && line.startsWith("}")) {
a61af66fc99e Initial load
duke
parents:
diff changeset
196 error("unexpected close bracket in first column, outside of function.\n");
a61af66fc99e Initial load
duke
parents:
diff changeset
197 }
a61af66fc99e Initial load
duke
parents:
diff changeset
198 String trimmed = line.trim();
a61af66fc99e Initial load
duke
parents:
diff changeset
199 if (line.startsWith("jvmtiError")) {
a61af66fc99e Initial load
duke
parents:
diff changeset
200 if (trimmed.equals("jvmtiError")) {
a61af66fc99e Initial load
duke
parents:
diff changeset
201 if (inFilePrefix) {
a61af66fc99e Initial load
duke
parents:
diff changeset
202 error("unexpected 'jvmtiError' line in file prefix.\n" +
a61af66fc99e Initial load
duke
parents:
diff changeset
203 "is '" + endFilePrefix + "'... line missing?");
a61af66fc99e Initial load
duke
parents:
diff changeset
204 }
a61af66fc99e Initial load
duke
parents:
diff changeset
205 return true; // beginning of a function
a61af66fc99e Initial load
duke
parents:
diff changeset
206 } else {
a61af66fc99e Initial load
duke
parents:
diff changeset
207 error("extra characters at end of 'jvmtiError'");
a61af66fc99e Initial load
duke
parents:
diff changeset
208 }
a61af66fc99e Initial load
duke
parents:
diff changeset
209 }
a61af66fc99e Initial load
duke
parents:
diff changeset
210 if (inFilePrefix) {
a61af66fc99e Initial load
duke
parents:
diff changeset
211 top.add(line);
a61af66fc99e Initial load
duke
parents:
diff changeset
212 } else {
a61af66fc99e Initial load
duke
parents:
diff changeset
213 trimmed = line.trim();
a61af66fc99e Initial load
duke
parents:
diff changeset
214 if (!trimmed.equals("") && !trimmed.startsWith("//") && !trimmed.startsWith("#")) {
a61af66fc99e Initial load
duke
parents:
diff changeset
215 error("only comments and blank lines allowed between functions");
a61af66fc99e Initial load
duke
parents:
diff changeset
216 }
a61af66fc99e Initial load
duke
parents:
diff changeset
217 before.add(line);
a61af66fc99e Initial load
duke
parents:
diff changeset
218 }
a61af66fc99e Initial load
duke
parents:
diff changeset
219 if (line.replaceAll("\\s","").toLowerCase().startsWith(endFilePrefix.replaceAll("\\s",""))) {
a61af66fc99e Initial load
duke
parents:
diff changeset
220 if (!inFilePrefix) {
a61af66fc99e Initial load
duke
parents:
diff changeset
221 error("excess '" + endFilePrefix + "'");
a61af66fc99e Initial load
duke
parents:
diff changeset
222 }
a61af66fc99e Initial load
duke
parents:
diff changeset
223 inFilePrefix = false;
a61af66fc99e Initial load
duke
parents:
diff changeset
224 }
a61af66fc99e Initial load
duke
parents:
diff changeset
225 }
a61af66fc99e Initial load
duke
parents:
diff changeset
226 }
a61af66fc99e Initial load
duke
parents:
diff changeset
227
a61af66fc99e Initial load
duke
parents:
diff changeset
228 void fill(SourceFile filledSF) {
a61af66fc99e Initial load
duke
parents:
diff changeset
229 // copy beginning of file straight from filled file
a61af66fc99e Initial load
duke
parents:
diff changeset
230 top = filledSF.top;
a61af66fc99e Initial load
duke
parents:
diff changeset
231
a61af66fc99e Initial load
duke
parents:
diff changeset
232 // file in functions
a61af66fc99e Initial load
duke
parents:
diff changeset
233 Iterator it = functions.iterator();
a61af66fc99e Initial load
duke
parents:
diff changeset
234 while (it.hasNext()) {
a61af66fc99e Initial load
duke
parents:
diff changeset
235 Function stubFunc = (Function)(it.next());
a61af66fc99e Initial load
duke
parents:
diff changeset
236 Function filledFunc = (Function)filledSF.functionMap.get(stubFunc.name);
a61af66fc99e Initial load
duke
parents:
diff changeset
237 stubFunc.fill(filledFunc);
a61af66fc99e Initial load
duke
parents:
diff changeset
238 }
a61af66fc99e Initial load
duke
parents:
diff changeset
239 if (filledSF.functionMap.size() > 0) {
a61af66fc99e Initial load
duke
parents:
diff changeset
240 System.err.println("Warning: the following functions were present in the " +
a61af66fc99e Initial load
duke
parents:
diff changeset
241 "filled file but missing in the stub file and thus not copied:");
a61af66fc99e Initial load
duke
parents:
diff changeset
242 it = filledSF.functionMap.values().iterator();
a61af66fc99e Initial load
duke
parents:
diff changeset
243 while (it.hasNext()) {
a61af66fc99e Initial load
duke
parents:
diff changeset
244 System.err.println(" " + ((Function)(it.next())).name);
a61af66fc99e Initial load
duke
parents:
diff changeset
245 }
a61af66fc99e Initial load
duke
parents:
diff changeset
246 }
a61af66fc99e Initial load
duke
parents:
diff changeset
247 }
a61af66fc99e Initial load
duke
parents:
diff changeset
248
a61af66fc99e Initial load
duke
parents:
diff changeset
249 void output(PrintWriter out) {
a61af66fc99e Initial load
duke
parents:
diff changeset
250 Iterator it = top.iterator();
a61af66fc99e Initial load
duke
parents:
diff changeset
251 while (it.hasNext()) {
a61af66fc99e Initial load
duke
parents:
diff changeset
252 out.println(it.next());
a61af66fc99e Initial load
duke
parents:
diff changeset
253 }
a61af66fc99e Initial load
duke
parents:
diff changeset
254 it = functions.iterator();
a61af66fc99e Initial load
duke
parents:
diff changeset
255 while (it.hasNext()) {
a61af66fc99e Initial load
duke
parents:
diff changeset
256 Function stubFunc = (Function)(it.next());
a61af66fc99e Initial load
duke
parents:
diff changeset
257 stubFunc.output(out);
a61af66fc99e Initial load
duke
parents:
diff changeset
258 }
a61af66fc99e Initial load
duke
parents:
diff changeset
259 }
a61af66fc99e Initial load
duke
parents:
diff changeset
260 }