< prev index next > src/jdk.compiler/share/classes/com/sun/tools/javac/main/JavaCompiler.java
Print this page
/*
! * Copyright (c) 1999, 2025, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
/*
! * Copyright (c) 1999, 2026, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
if (completionFailureName == c.fullname) {
throw new CompletionFailure(
c, () -> diagFactory.fragment(Fragments.UserSelectedCompletionFailure), dcfh);
}
JavaFileObject filename = c.classfile;
- JavaFileObject prev = log.useSource(filename);
if (tree == null) {
try {
tree = parse(filename, filename.getCharContent(false));
} catch (IOException e) {
log.error(Errors.ErrorReadingFile(filename, JavacFileManager.getMessage(e)));
tree = make.TopLevel(List.<JCTree>nil());
if (completionFailureName == c.fullname) {
throw new CompletionFailure(
c, () -> diagFactory.fragment(Fragments.UserSelectedCompletionFailure), dcfh);
}
JavaFileObject filename = c.classfile;
if (tree == null) {
+ JavaFileObject prev = log.useSource(filename);
try {
tree = parse(filename, filename.getCharContent(false));
} catch (IOException e) {
log.error(Errors.ErrorReadingFile(filename, JavacFileManager.getMessage(e)));
tree = make.TopLevel(List.<JCTree>nil());
}
}
ScanNested scanner = new ScanNested();
scanner.scan(env.tree);
for (Env<AttrContext> dep: scanner.dependencies) {
! if (!compileStates.isDone(dep, CompileState.WARN))
! desugaredEnvs.put(dep, desugar(warn(flow(attribute(dep)))));
}
//We need to check for error another time as more classes might
//have been attributed and analyzed at this stage
if (shouldStop(CompileState.TRANSTYPES))
}
}
ScanNested scanner = new ScanNested();
scanner.scan(env.tree);
for (Env<AttrContext> dep: scanner.dependencies) {
! if (!compileStates.isDone(dep, CompileState.WARN))
! desugaredEnvs.put(dep, desugar(warn(flow(attribute(dep)))));
}
//We need to check for error another time as more classes might
//have been attributed and analyzed at this stage
if (shouldStop(CompileState.TRANSTYPES))
LambdaToMethod.instance(context).translateTopLevelClass(env, def, localMake);
}
compileStates.put(env, CompileState.UNLAMBDA);
}
+ if (shouldStop(CompileState.STRICT_FIELDS_PROXIES))
+ return;
+ for (JCTree def : cdefs) {
+ LocalProxyVarsGen.instance(context).translateTopLevelClass(def, localMake);
+ }
+ compileStates.put(env, CompileState.STRICT_FIELDS_PROXIES);
+
//generate code for each class
for (List<JCTree> l = cdefs; l.nonEmpty(); l = l.tail) {
JCClassDecl cdef = (JCClassDecl)l.head;
results.add(new Pair<>(env, cdef));
}
< prev index next >