equal
deleted
inserted
replaced
211 } |
211 } |
212 //where |
212 //where |
213 private static final String XMODULES_PREFIX = "-Xmodule:"; |
213 private static final String XMODULES_PREFIX = "-Xmodule:"; |
214 |
214 |
215 int depth = -1; |
215 int depth = -1; |
216 private void dprintln(String msg) { |
|
217 for (int i = 0; i < depth; i++) |
|
218 System.err.print(" "); |
|
219 System.err.println(msg); |
|
220 } |
|
221 |
216 |
222 public void addExtraAddModules(String... extras) { |
217 public void addExtraAddModules(String... extras) { |
223 extraAddMods.addAll(Arrays.asList(extras)); |
218 extraAddMods.addAll(Arrays.asList(extras)); |
224 } |
|
225 |
|
226 public void addExtraLimitModules(String... extras) { |
|
227 extraLimitMods.addAll(Arrays.asList(extras)); |
|
228 } |
219 } |
229 |
220 |
230 boolean inInitModules; |
221 boolean inInitModules; |
231 public void initModules(List<JCCompilationUnit> trees) { |
222 public void initModules(List<JCCompilationUnit> trees) { |
232 Assert.check(!inInitModules); |
223 Assert.check(!inInitModules); |
273 |
264 |
274 for (ModuleSymbol msym: roots) { |
265 for (ModuleSymbol msym: roots) { |
275 msym.complete(); |
266 msym.complete(); |
276 } |
267 } |
277 } catch (CompletionFailure ex) { |
268 } catch (CompletionFailure ex) { |
278 log.error(JCDiagnostic.DiagnosticFlag.NON_DEFERRABLE, Position.NOPOS, "cant.access", ex.sym, ex.getDetailValue()); |
269 log.error(JCDiagnostic.DiagnosticFlag.NON_DEFERRABLE, Position.NOPOS, Errors.CantAccess(ex.sym, ex.getDetailValue())); |
279 if (ex instanceof ClassFinder.BadClassFile) throw new Abort(); |
270 if (ex instanceof ClassFinder.BadClassFile) throw new Abort(); |
280 } finally { |
271 } finally { |
281 depth--; |
272 depth--; |
282 } |
273 } |
283 |
274 |
554 throw new Error(e); |
545 throw new Error(e); |
555 } |
546 } |
556 |
547 |
557 JavaFileObject prev = log.useSource(tree.sourcefile); |
548 JavaFileObject prev = log.useSource(tree.sourcefile); |
558 try { |
549 try { |
559 log.error(tree.pos(), "file.sb.on.source.or.patch.path.for.module"); |
550 log.error(tree.pos(), Errors.FileSbOnSourceOrPatchPathForModule); |
560 } finally { |
551 } finally { |
561 log.useSource(prev); |
552 log.useSource(prev); |
562 } |
553 } |
563 } |
554 } |
564 |
555 |