src/share/classes/com/sun/tools/javac/main/JavaCompiler.java

changeset 816
7c537f4298fb
parent 757
c44234f680da
child 893
8f0dcb9499db
equal deleted inserted replaced
815:d17f37522154 816:7c537f4298fb
1 /* 1 /*
2 * Copyright (c) 1999, 2010, Oracle and/or its affiliates. All rights reserved. 2 * Copyright (c) 1999, 2011, Oracle and/or its affiliates. All rights reserved.
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 * 4 *
5 * This code is free software; you can redistribute it and/or modify it 5 * This code is free software; you can redistribute it and/or modify it
6 * under the terms of the GNU General Public License version 2 only, as 6 * under the terms of the GNU General Public License version 2 only, as
7 * published by the Free Software Foundation. Oracle designates this 7 * published by the Free Software Foundation. Oracle designates this
846 while (!todo.isEmpty()) 846 while (!todo.isEmpty())
847 generate(desugar(flow(attribute(todo.remove())))); 847 generate(desugar(flow(attribute(todo.remove()))));
848 break; 848 break;
849 849
850 default: 850 default:
851 assert false: "unknown compile policy"; 851 Assert.error("unknown compile policy");
852 } 852 }
853 } catch (Abort ex) { 853 } catch (Abort ex) {
854 if (devVerbose) 854 if (devVerbose)
855 ex.printStackTrace(System.err); 855 ex.printStackTrace(System.err);
856 } 856 }
1064 pckSymbols = pckSymbols.prepend((PackageSymbol)sym); 1064 pckSymbols = pckSymbols.prepend((PackageSymbol)sym);
1065 else 1065 else
1066 classSymbols = classSymbols.prepend((ClassSymbol)sym); 1066 classSymbols = classSymbols.prepend((ClassSymbol)sym);
1067 continue; 1067 continue;
1068 } 1068 }
1069 assert sym.kind == Kinds.PCK; 1069 Assert.check(sym.kind == Kinds.PCK);
1070 log.warning("proc.package.does.not.exist", nameStr); 1070 log.warning("proc.package.does.not.exist", nameStr);
1071 pckSymbols = pckSymbols.prepend((PackageSymbol)sym); 1071 pckSymbols = pckSymbols.prepend((PackageSymbol)sym);
1072 } catch (CompletionFailure e) { 1072 } catch (CompletionFailure e) {
1073 log.error("proc.cant.find.class", nameStr); 1073 log.error("proc.cant.find.class", nameStr);
1074 errors = true; 1074 errors = true;
1084 try { 1084 try {
1085 JavaCompiler c = procEnvImpl.doProcessing(context, roots, classSymbols, pckSymbols); 1085 JavaCompiler c = procEnvImpl.doProcessing(context, roots, classSymbols, pckSymbols);
1086 if (c != this) 1086 if (c != this)
1087 annotationProcessingOccurred = c.annotationProcessingOccurred = true; 1087 annotationProcessingOccurred = c.annotationProcessingOccurred = true;
1088 // doProcessing will have handled deferred diagnostics 1088 // doProcessing will have handled deferred diagnostics
1089 assert c.log.deferDiagnostics == false; 1089 Assert.check(c.log.deferDiagnostics == false
1090 assert c.log.deferredDiagnostics.size() == 0; 1090 && c.log.deferredDiagnostics.size() == 0);
1091 return c; 1091 return c;
1092 } finally { 1092 } finally {
1093 procEnvImpl.close(); 1093 procEnvImpl.close();
1094 } 1094 }
1095 } catch (CompletionFailure ex) { 1095 } catch (CompletionFailure ex) {
1322 if (!(stubOutput || sourceOutput || printFlat)) { 1322 if (!(stubOutput || sourceOutput || printFlat)) {
1323 if (shouldStop(CompileState.LOWER)) 1323 if (shouldStop(CompileState.LOWER))
1324 return; 1324 return;
1325 List<JCTree> pdef = lower.translateTopLevelClass(env, env.tree, localMake); 1325 List<JCTree> pdef = lower.translateTopLevelClass(env, env.tree, localMake);
1326 if (pdef.head != null) { 1326 if (pdef.head != null) {
1327 assert pdef.tail.isEmpty(); 1327 Assert.check(pdef.tail.isEmpty());
1328 results.add(new Pair<Env<AttrContext>, JCClassDecl>(env, (JCClassDecl)pdef.head)); 1328 results.add(new Pair<Env<AttrContext>, JCClassDecl>(env, (JCClassDecl)pdef.head));
1329 } 1329 }
1330 } 1330 }
1331 return; 1331 return;
1332 } 1332 }

mercurial