src/share/classes/com/sun/tools/javac/api/JavacTaskImpl.java

Mon, 10 Jan 2011 14:57:59 -0800

author
jjg
date
Mon, 10 Jan 2011 14:57:59 -0800
changeset 815
d17f37522154
parent 695
3c9b64e55c5d
child 930
cb119107aeea
permissions
-rw-r--r--

6992999: fully remove JSR 308 from langtools
Reviewed-by: mcimadamore

duke@1 1 /*
jjg@695 2 * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
duke@1 3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
duke@1 4 *
duke@1 5 * This code is free software; you can redistribute it and/or modify it
duke@1 6 * under the terms of the GNU General Public License version 2 only, as
ohair@554 7 * published by the Free Software Foundation. Oracle designates this
duke@1 8 * particular file as subject to the "Classpath" exception as provided
ohair@554 9 * by Oracle in the LICENSE file that accompanied this code.
duke@1 10 *
duke@1 11 * This code is distributed in the hope that it will be useful, but WITHOUT
duke@1 12 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
duke@1 13 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
duke@1 14 * version 2 for more details (a copy is included in the LICENSE file that
duke@1 15 * accompanied this code).
duke@1 16 *
duke@1 17 * You should have received a copy of the GNU General Public License version
duke@1 18 * 2 along with this work; if not, write to the Free Software Foundation,
duke@1 19 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
duke@1 20 *
ohair@554 21 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
ohair@554 22 * or visit www.oracle.com if you need additional information or have any
ohair@554 23 * questions.
duke@1 24 */
duke@1 25
duke@1 26 package com.sun.tools.javac.api;
duke@1 27
duke@1 28 import java.io.File;
duke@1 29 import java.io.IOException;
jjg@111 30 import java.nio.CharBuffer;
duke@1 31 import java.util.*;
duke@1 32 import java.util.concurrent.atomic.AtomicBoolean;
duke@1 33
duke@1 34 import javax.annotation.processing.Processor;
duke@1 35 import javax.lang.model.element.Element;
duke@1 36 import javax.lang.model.element.TypeElement;
duke@1 37 import javax.lang.model.type.TypeMirror;
duke@1 38 import javax.tools.*;
duke@1 39
duke@1 40 import com.sun.source.tree.*;
duke@1 41 import com.sun.source.util.*;
duke@1 42 import com.sun.tools.javac.code.*;
duke@1 43 import com.sun.tools.javac.code.Symbol.*;
duke@1 44 import com.sun.tools.javac.comp.*;
jjg@50 45 import com.sun.tools.javac.file.JavacFileManager;
duke@1 46 import com.sun.tools.javac.main.*;
duke@1 47 import com.sun.tools.javac.model.*;
duke@1 48 import com.sun.tools.javac.parser.Parser;
jjg@111 49 import com.sun.tools.javac.parser.ParserFactory;
duke@1 50 import com.sun.tools.javac.tree.*;
duke@1 51 import com.sun.tools.javac.tree.JCTree.*;
duke@1 52 import com.sun.tools.javac.util.*;
duke@1 53 import com.sun.tools.javac.util.List;
duke@1 54 import com.sun.tools.javac.main.JavaCompiler;
duke@1 55
duke@1 56 /**
jjg@582 57 * Provides access to functionality specific to the JDK Java Compiler, javac.
duke@1 58 *
jjg@581 59 * <p><b>This is NOT part of any supported API.
duke@1 60 * If you write code that depends on this, you do so at your own
duke@1 61 * risk. This code and its internal interfaces are subject to change
duke@1 62 * or deletion without notice.</b></p>
duke@1 63 *
duke@1 64 * @author Peter von der Ah&eacute;
duke@1 65 * @author Jonathan Gibbons
duke@1 66 */
duke@1 67 public class JavacTaskImpl extends JavacTask {
duke@1 68 private JavacTool tool;
duke@1 69 private Main compilerMain;
duke@1 70 private JavaCompiler compiler;
mcimadamore@136 71 private Locale locale;
duke@1 72 private String[] args;
duke@1 73 private Context context;
duke@1 74 private List<JavaFileObject> fileObjects;
duke@1 75 private Map<JavaFileObject, JCCompilationUnit> notYetEntered;
duke@1 76 private ListBuffer<Env<AttrContext>> genList;
duke@1 77 private TaskListener taskListener;
duke@1 78 private AtomicBoolean used = new AtomicBoolean();
duke@1 79 private Iterable<? extends Processor> processors;
duke@1 80
duke@1 81 private Integer result = null;
duke@1 82
duke@1 83 JavacTaskImpl(JavacTool tool,
duke@1 84 Main compilerMain,
duke@1 85 String[] args,
duke@1 86 Context context,
duke@1 87 List<JavaFileObject> fileObjects) {
duke@1 88 this.tool = tool;
duke@1 89 this.compilerMain = compilerMain;
duke@1 90 this.args = args;
duke@1 91 this.context = context;
duke@1 92 this.fileObjects = fileObjects;
mcimadamore@136 93 setLocale(Locale.getDefault());
duke@1 94 // null checks
duke@1 95 compilerMain.getClass();
duke@1 96 args.getClass();
duke@1 97 context.getClass();
duke@1 98 fileObjects.getClass();
duke@1 99 }
duke@1 100
duke@1 101 JavacTaskImpl(JavacTool tool,
duke@1 102 Main compilerMain,
duke@1 103 Iterable<String> flags,
duke@1 104 Context context,
duke@1 105 Iterable<String> classes,
duke@1 106 Iterable<? extends JavaFileObject> fileObjects) {
duke@1 107 this(tool, compilerMain, toArray(flags, classes), context, toList(fileObjects));
duke@1 108 }
duke@1 109
duke@1 110 static private String[] toArray(Iterable<String> flags, Iterable<String> classes) {
duke@1 111 ListBuffer<String> result = new ListBuffer<String>();
duke@1 112 if (flags != null)
duke@1 113 for (String flag : flags)
duke@1 114 result.append(flag);
duke@1 115 if (classes != null)
duke@1 116 for (String cls : classes)
duke@1 117 result.append(cls);
duke@1 118 return result.toArray(new String[result.length()]);
duke@1 119 }
duke@1 120
duke@1 121 static private List<JavaFileObject> toList(Iterable<? extends JavaFileObject> fileObjects) {
duke@1 122 if (fileObjects == null)
duke@1 123 return List.nil();
duke@1 124 ListBuffer<JavaFileObject> result = new ListBuffer<JavaFileObject>();
duke@1 125 for (JavaFileObject fo : fileObjects)
duke@1 126 result.append(fo);
duke@1 127 return result.toList();
duke@1 128 }
duke@1 129
duke@1 130 public Boolean call() {
duke@1 131 if (!used.getAndSet(true)) {
duke@1 132 beginContext();
jjg@308 133 notYetEntered = new HashMap<JavaFileObject, JCCompilationUnit>();
duke@1 134 try {
duke@1 135 compilerMain.setFatalErrors(true);
duke@1 136 result = compilerMain.compile(args, context, fileObjects, processors);
duke@1 137 } finally {
duke@1 138 endContext();
duke@1 139 }
duke@1 140 compilerMain = null;
duke@1 141 args = null;
duke@1 142 context = null;
duke@1 143 fileObjects = null;
jjg@308 144 notYetEntered = null;
duke@1 145 return result == 0;
duke@1 146 } else {
duke@1 147 throw new IllegalStateException("multiple calls to method 'call'");
duke@1 148 }
duke@1 149 }
duke@1 150
duke@1 151 public void setProcessors(Iterable<? extends Processor> processors) {
duke@1 152 processors.getClass(); // null check
duke@1 153 // not mt-safe
duke@1 154 if (used.get())
duke@1 155 throw new IllegalStateException();
duke@1 156 this.processors = processors;
duke@1 157 }
duke@1 158
duke@1 159 public void setLocale(Locale locale) {
duke@1 160 if (used.get())
duke@1 161 throw new IllegalStateException();
mcimadamore@136 162 this.locale = locale;
duke@1 163 }
duke@1 164
duke@1 165 private void prepareCompiler() throws IOException {
duke@1 166 if (!used.getAndSet(true)) {
duke@1 167 beginContext();
duke@1 168 compilerMain.setOptions(Options.instance(context));
duke@1 169 compilerMain.filenames = new ListBuffer<File>();
duke@1 170 List<File> filenames = compilerMain.processArgs(CommandLine.parse(args));
duke@1 171 if (!filenames.isEmpty())
duke@1 172 throw new IllegalArgumentException("Malformed arguments " + filenames.toString(" "));
duke@1 173 compiler = JavaCompiler.instance(context);
duke@1 174 compiler.keepComments = true;
duke@1 175 compiler.genEndPos = true;
duke@1 176 // NOTE: this value will be updated after annotation processing
duke@1 177 compiler.initProcessAnnotations(processors);
duke@1 178 notYetEntered = new HashMap<JavaFileObject, JCCompilationUnit>();
duke@1 179 for (JavaFileObject file: fileObjects)
duke@1 180 notYetEntered.put(file, null);
duke@1 181 genList = new ListBuffer<Env<AttrContext>>();
duke@1 182 // endContext will be called when all classes have been generated
duke@1 183 // TODO: should handle the case after each phase if errors have occurred
duke@1 184 args = null;
duke@1 185 }
duke@1 186 }
duke@1 187
duke@1 188 private void beginContext() {
duke@1 189 context.put(JavacTaskImpl.class, this);
duke@1 190 if (context.get(TaskListener.class) != null)
duke@1 191 context.put(TaskListener.class, (TaskListener)null);
duke@1 192 if (taskListener != null)
duke@1 193 context.put(TaskListener.class, wrap(taskListener));
duke@1 194 tool.beginContext(context);
mcimadamore@136 195 //initialize compiler's default locale
mcimadamore@136 196 JavacMessages.instance(context).setCurrentLocale(locale);
duke@1 197 }
duke@1 198 // where
duke@1 199 private TaskListener wrap(final TaskListener tl) {
duke@1 200 tl.getClass(); // null check
duke@1 201 return new TaskListener() {
duke@1 202 public void started(TaskEvent e) {
duke@1 203 try {
duke@1 204 tl.started(e);
duke@1 205 } catch (Throwable t) {
duke@1 206 throw new ClientCodeException(t);
duke@1 207 }
duke@1 208 }
duke@1 209
duke@1 210 public void finished(TaskEvent e) {
duke@1 211 try {
duke@1 212 tl.finished(e);
duke@1 213 } catch (Throwable t) {
duke@1 214 throw new ClientCodeException(t);
duke@1 215 }
duke@1 216 }
duke@1 217
duke@1 218 };
duke@1 219 }
duke@1 220
duke@1 221 private void endContext() {
duke@1 222 tool.endContext();
duke@1 223 }
duke@1 224
duke@1 225 /**
duke@1 226 * Construct a JavaFileObject from the given file.
duke@1 227 *
duke@1 228 * <p><b>TODO: this method is useless here</b></p>
duke@1 229 *
duke@1 230 * @param file a file
duke@1 231 * @return a JavaFileObject from the standard file manager.
duke@1 232 */
duke@1 233 public JavaFileObject asJavaFileObject(File file) {
duke@1 234 JavacFileManager fm = (JavacFileManager)context.get(JavaFileManager.class);
duke@1 235 return fm.getRegularFile(file);
duke@1 236 }
duke@1 237
duke@1 238 public void setTaskListener(TaskListener taskListener) {
duke@1 239 this.taskListener = taskListener;
duke@1 240 }
duke@1 241
duke@1 242 /**
duke@1 243 * Parse the specified files returning a list of abstract syntax trees.
duke@1 244 *
duke@1 245 * @throws java.io.IOException TODO
duke@1 246 * @return a list of abstract syntax trees
duke@1 247 */
duke@1 248 public Iterable<? extends CompilationUnitTree> parse() throws IOException {
duke@1 249 try {
duke@1 250 prepareCompiler();
duke@1 251 List<JCCompilationUnit> units = compiler.parseFiles(fileObjects);
duke@1 252 for (JCCompilationUnit unit: units) {
duke@1 253 JavaFileObject file = unit.getSourceFile();
duke@1 254 if (notYetEntered.containsKey(file))
duke@1 255 notYetEntered.put(file, unit);
duke@1 256 }
duke@1 257 return units;
duke@1 258 }
duke@1 259 finally {
duke@1 260 parsed = true;
duke@1 261 if (compiler != null && compiler.log != null)
duke@1 262 compiler.log.flush();
duke@1 263 }
duke@1 264 }
duke@1 265
duke@1 266 private boolean parsed = false;
duke@1 267
duke@1 268 /**
duke@1 269 * Translate all the abstract syntax trees to elements.
duke@1 270 *
duke@1 271 * @throws IOException TODO
duke@1 272 * @return a list of elements corresponding to the top level
duke@1 273 * classes in the abstract syntax trees
duke@1 274 */
duke@1 275 public Iterable<? extends TypeElement> enter() throws IOException {
duke@1 276 return enter(null);
duke@1 277 }
duke@1 278
duke@1 279 /**
duke@1 280 * Translate the given abstract syntax trees to elements.
duke@1 281 *
duke@1 282 * @param trees a list of abstract syntax trees.
duke@1 283 * @throws java.io.IOException TODO
duke@1 284 * @return a list of elements corresponding to the top level
duke@1 285 * classes in the abstract syntax trees
duke@1 286 */
duke@1 287 public Iterable<? extends TypeElement> enter(Iterable<? extends CompilationUnitTree> trees)
duke@1 288 throws IOException
duke@1 289 {
duke@1 290 prepareCompiler();
duke@1 291
duke@1 292 ListBuffer<JCCompilationUnit> roots = null;
duke@1 293
duke@1 294 if (trees == null) {
duke@1 295 // If there are still files which were specified to be compiled
duke@1 296 // (i.e. in fileObjects) but which have not yet been entered,
duke@1 297 // then we make sure they have been parsed and add them to the
duke@1 298 // list to be entered.
duke@1 299 if (notYetEntered.size() > 0) {
duke@1 300 if (!parsed)
duke@1 301 parse(); // TODO would be nice to specify files needed to be parsed
duke@1 302 for (JavaFileObject file: fileObjects) {
duke@1 303 JCCompilationUnit unit = notYetEntered.remove(file);
duke@1 304 if (unit != null) {
duke@1 305 if (roots == null)
duke@1 306 roots = new ListBuffer<JCCompilationUnit>();
duke@1 307 roots.append(unit);
duke@1 308 }
duke@1 309 }
duke@1 310 notYetEntered.clear();
duke@1 311 }
duke@1 312 }
duke@1 313 else {
duke@1 314 for (CompilationUnitTree cu : trees) {
duke@1 315 if (cu instanceof JCCompilationUnit) {
duke@1 316 if (roots == null)
duke@1 317 roots = new ListBuffer<JCCompilationUnit>();
duke@1 318 roots.append((JCCompilationUnit)cu);
duke@1 319 notYetEntered.remove(cu.getSourceFile());
duke@1 320 }
duke@1 321 else
duke@1 322 throw new IllegalArgumentException(cu.toString());
duke@1 323 }
duke@1 324 }
duke@1 325
duke@1 326 if (roots == null)
duke@1 327 return List.nil();
duke@1 328
duke@1 329 try {
duke@1 330 List<JCCompilationUnit> units = compiler.enterTrees(roots.toList());
duke@1 331
duke@1 332 if (notYetEntered.isEmpty())
duke@1 333 compiler = compiler.processAnnotations(units);
duke@1 334
duke@1 335 ListBuffer<TypeElement> elements = new ListBuffer<TypeElement>();
duke@1 336 for (JCCompilationUnit unit : units) {
jjg@695 337 for (JCTree node : unit.defs) {
jjg@695 338 if (node.getTag() == JCTree.CLASSDEF) {
jjg@695 339 JCClassDecl cdef = (JCClassDecl) node;
jjg@695 340 if (cdef.sym != null) // maybe null if errors in anno processing
jjg@695 341 elements.append(cdef.sym);
jjg@695 342 }
jjg@695 343 }
duke@1 344 }
duke@1 345 return elements.toList();
duke@1 346 }
duke@1 347 finally {
duke@1 348 compiler.log.flush();
duke@1 349 }
duke@1 350 }
duke@1 351
duke@1 352 /**
duke@1 353 * Complete all analysis.
duke@1 354 * @throws IOException TODO
duke@1 355 */
duke@1 356 @Override
duke@1 357 public Iterable<? extends Element> analyze() throws IOException {
duke@1 358 return analyze(null);
duke@1 359 }
duke@1 360
duke@1 361 /**
duke@1 362 * Complete all analysis on the given classes.
duke@1 363 * This can be used to ensure that all compile time errors are reported.
duke@1 364 * The classes must have previously been returned from {@link #enter}.
duke@1 365 * If null is specified, all outstanding classes will be analyzed.
duke@1 366 *
duke@1 367 * @param classes a list of class elements
duke@1 368 */
duke@1 369 // This implementation requires that we open up privileges on JavaCompiler.
duke@1 370 // An alternative implementation would be to move this code to JavaCompiler and
duke@1 371 // wrap it here
duke@1 372 public Iterable<? extends Element> analyze(Iterable<? extends TypeElement> classes) throws IOException {
duke@1 373 enter(null); // ensure all classes have been entered
duke@1 374
duke@1 375 final ListBuffer<Element> results = new ListBuffer<Element>();
duke@1 376 try {
duke@1 377 if (classes == null) {
duke@1 378 handleFlowResults(compiler.flow(compiler.attribute(compiler.todo)), results);
duke@1 379 } else {
duke@1 380 Filter f = new Filter() {
duke@1 381 public void process(Env<AttrContext> env) {
duke@1 382 handleFlowResults(compiler.flow(compiler.attribute(env)), results);
duke@1 383 }
duke@1 384 };
duke@1 385 f.run(compiler.todo, classes);
duke@1 386 }
duke@1 387 } finally {
duke@1 388 compiler.log.flush();
duke@1 389 }
duke@1 390 return results;
duke@1 391 }
duke@1 392 // where
jjg@70 393 private void handleFlowResults(Queue<Env<AttrContext>> queue, ListBuffer<Element> elems) {
jjg@70 394 for (Env<AttrContext> env: queue) {
duke@1 395 switch (env.tree.getTag()) {
duke@1 396 case JCTree.CLASSDEF:
duke@1 397 JCClassDecl cdef = (JCClassDecl) env.tree;
duke@1 398 if (cdef.sym != null)
duke@1 399 elems.append(cdef.sym);
duke@1 400 break;
duke@1 401 case JCTree.TOPLEVEL:
duke@1 402 JCCompilationUnit unit = (JCCompilationUnit) env.tree;
duke@1 403 if (unit.packge != null)
duke@1 404 elems.append(unit.packge);
duke@1 405 break;
duke@1 406 }
duke@1 407 }
jjg@70 408 genList.addAll(queue);
duke@1 409 }
duke@1 410
duke@1 411
duke@1 412 /**
duke@1 413 * Generate code.
duke@1 414 * @throws IOException TODO
duke@1 415 */
duke@1 416 @Override
duke@1 417 public Iterable<? extends JavaFileObject> generate() throws IOException {
duke@1 418 return generate(null);
duke@1 419 }
duke@1 420
duke@1 421 /**
duke@1 422 * Generate code corresponding to the given classes.
duke@1 423 * The classes must have previously been returned from {@link #enter}.
duke@1 424 * If there are classes outstanding to be analyzed, that will be done before
duke@1 425 * any classes are generated.
duke@1 426 * If null is specified, code will be generated for all outstanding classes.
duke@1 427 *
duke@1 428 * @param classes a list of class elements
duke@1 429 */
duke@1 430 public Iterable<? extends JavaFileObject> generate(Iterable<? extends TypeElement> classes) throws IOException {
duke@1 431 final ListBuffer<JavaFileObject> results = new ListBuffer<JavaFileObject>();
duke@1 432 try {
duke@1 433 analyze(null); // ensure all classes have been parsed, entered, and analyzed
duke@1 434
duke@1 435 if (classes == null) {
jjg@70 436 compiler.generate(compiler.desugar(genList), results);
duke@1 437 genList.clear();
duke@1 438 }
duke@1 439 else {
duke@1 440 Filter f = new Filter() {
duke@1 441 public void process(Env<AttrContext> env) {
jjg@70 442 compiler.generate(compiler.desugar(ListBuffer.of(env)), results);
duke@1 443 }
duke@1 444 };
duke@1 445 f.run(genList, classes);
duke@1 446 }
duke@1 447 if (genList.isEmpty()) {
duke@1 448 compiler.reportDeferredDiagnostics();
duke@1 449 compiler.log.flush();
duke@1 450 endContext();
duke@1 451 }
duke@1 452 }
duke@1 453 finally {
duke@1 454 compiler.log.flush();
duke@1 455 }
duke@1 456 return results;
duke@1 457 }
duke@1 458
duke@1 459 public TypeMirror getTypeMirror(Iterable<? extends Tree> path) {
duke@1 460 // TODO: Should complete attribution if necessary
duke@1 461 Tree last = null;
duke@1 462 for (Tree node : path)
duke@1 463 last = node;
duke@1 464 return ((JCTree)last).type;
duke@1 465 }
duke@1 466
duke@1 467 public JavacElements getElements() {
duke@1 468 if (context == null)
duke@1 469 throw new IllegalStateException();
duke@1 470 return JavacElements.instance(context);
duke@1 471 }
duke@1 472
duke@1 473 public JavacTypes getTypes() {
duke@1 474 if (context == null)
duke@1 475 throw new IllegalStateException();
duke@1 476 return JavacTypes.instance(context);
duke@1 477 }
duke@1 478
duke@1 479 public Iterable<? extends Tree> pathFor(CompilationUnitTree unit, Tree node) {
duke@1 480 return TreeInfo.pathFor((JCTree) node, (JCTree.JCCompilationUnit) unit).reverse();
duke@1 481 }
duke@1 482
duke@1 483 abstract class Filter {
jjg@119 484 void run(Queue<Env<AttrContext>> list, Iterable<? extends TypeElement> classes) {
duke@1 485 Set<TypeElement> set = new HashSet<TypeElement>();
duke@1 486 for (TypeElement item: classes)
duke@1 487 set.add(item);
duke@1 488
jjg@119 489 ListBuffer<Env<AttrContext>> defer = ListBuffer.<Env<AttrContext>>lb();
jjg@119 490 while (list.peek() != null) {
jjg@119 491 Env<AttrContext> env = list.remove();
duke@1 492 ClassSymbol csym = env.enclClass.sym;
duke@1 493 if (csym != null && set.contains(csym.outermostClass()))
duke@1 494 process(env);
duke@1 495 else
jjg@119 496 defer = defer.append(env);
duke@1 497 }
duke@1 498
jjg@119 499 list.addAll(defer);
duke@1 500 }
duke@1 501
duke@1 502 abstract void process(Env<AttrContext> env);
duke@1 503 }
duke@1 504
duke@1 505 /**
jjg@581 506 * For internal use only. This method will be
duke@1 507 * removed without warning.
duke@1 508 */
duke@1 509 public Context getContext() {
duke@1 510 return context;
duke@1 511 }
duke@1 512
duke@1 513 /**
jjg@581 514 * For internal use only. This method will be
duke@1 515 * removed without warning.
duke@1 516 */
duke@1 517 public void updateContext(Context newContext) {
duke@1 518 context = newContext;
duke@1 519 }
duke@1 520
duke@1 521 /**
jjg@581 522 * For internal use only. This method will be
duke@1 523 * removed without warning.
duke@1 524 */
duke@1 525 public Type parseType(String expr, TypeElement scope) {
duke@1 526 if (expr == null || expr.equals(""))
duke@1 527 throw new IllegalArgumentException();
duke@1 528 compiler = JavaCompiler.instance(context);
duke@1 529 JavaFileObject prev = compiler.log.useSource(null);
jjg@111 530 ParserFactory parserFactory = ParserFactory.instance(context);
duke@1 531 Attr attr = Attr.instance(context);
duke@1 532 try {
jjg@111 533 CharBuffer buf = CharBuffer.wrap((expr+"\u0000").toCharArray(), 0, expr.length());
jjg@111 534 Parser parser = parserFactory.newParser(buf, false, false, false);
jjg@111 535 JCTree tree = parser.parseType();
duke@1 536 return attr.attribType(tree, (Symbol.TypeSymbol)scope);
duke@1 537 } finally {
duke@1 538 compiler.log.useSource(prev);
duke@1 539 }
duke@1 540 }
duke@1 541
duke@1 542 }

mercurial