mirror of
https://github.com/openjdk/jdk.git
synced 2026-05-06 03:35:10 +00:00
8044816: On-demand compiled top-level program doesn't need :createProgramFunction
Reviewed-by: jlaskey, lagergren, sundar
This commit is contained in:
parent
ea992354d0
commit
6a2b656e1a
@ -4312,8 +4312,7 @@ final class CodeGenerator extends NodeOperatorVisitor<CodeGeneratorLexicalContex
|
||||
|
||||
assert data != null : functionNode.getName() + " has no data";
|
||||
|
||||
final FunctionNode parentFn = lc.getParentFunction(functionNode);
|
||||
if (parentFn == null && functionNode.isProgram()) {
|
||||
if (functionNode.isProgram() && !compiler.isOnDemandCompilation()) {
|
||||
final CompileUnit fnUnit = functionNode.getCompileUnit();
|
||||
final MethodEmitter createFunction = fnUnit.getClassEmitter().method(
|
||||
EnumSet.of(Flag.PUBLIC, Flag.STATIC), CREATE_PROGRAM_FUNCTION.symbolName(),
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user