8145025: compiler/compilercontrol/commandfile/CompileOnlyTest.java and compiler/compilercontrol/commands/CompileOnlyTest.java fail: java.lang.RuntimeException:
Fix incorrect compileonly setting Reviewed-by: kvn, neliasso
This commit is contained in:
parent
01428c44de
commit
4b3b8b4f59
@ -105,15 +105,15 @@ public abstract class AbstractCommandBuilder
|
|||||||
Map<Executable, State> states = new HashMap<>();
|
Map<Executable, State> states = new HashMap<>();
|
||||||
for (Pair<Executable, Callable<?>> pair : METHODS) {
|
for (Pair<Executable, Callable<?>> pair : METHODS) {
|
||||||
Executable exec = pair.first;
|
Executable exec = pair.first;
|
||||||
State state = getState(commandList, states, exec);
|
State state = getState(commandList, exec);
|
||||||
states.put(exec, state);
|
states.put(exec, state);
|
||||||
}
|
}
|
||||||
return states;
|
return states;
|
||||||
}
|
}
|
||||||
|
|
||||||
private State getState(List<CompileCommand> commandList,
|
private State getState(List<CompileCommand> commandList,
|
||||||
Map<Executable, State> states, Executable exec) {
|
Executable exec) {
|
||||||
State state = states.getOrDefault(exec, new State());
|
State state = new State();
|
||||||
MethodDescriptor execDesc = new MethodDescriptor(exec);
|
MethodDescriptor execDesc = new MethodDescriptor(exec);
|
||||||
for (CompileCommand compileCommand : commandList) {
|
for (CompileCommand compileCommand : commandList) {
|
||||||
if (compileCommand.isValid()) {
|
if (compileCommand.isValid()) {
|
||||||
@ -149,7 +149,8 @@ public abstract class AbstractCommandBuilder
|
|||||||
&& (compileCommand.command == Command.COMPILEONLY)) {
|
&& (compileCommand.command == Command.COMPILEONLY)) {
|
||||||
MethodDescriptor md = compileCommand.methodDescriptor;
|
MethodDescriptor md = compileCommand.methodDescriptor;
|
||||||
if (!execDesc.getCanonicalString().matches(md.getRegexp())
|
if (!execDesc.getCanonicalString().matches(md.getRegexp())
|
||||||
&& (state.getCompilableOptional(
|
// if compilation state wasn't set before
|
||||||
|
&& (!state.getCompilableOptional(
|
||||||
// no matter C1, C2 or both
|
// no matter C1, C2 or both
|
||||||
Scenario.Compiler.C2).isPresent())) {
|
Scenario.Compiler.C2).isPresent())) {
|
||||||
/* compileonly excludes only methods that haven't been
|
/* compileonly excludes only methods that haven't been
|
||||||
|
Loading…
x
Reference in New Issue
Block a user