src/jdk.aot/share/classes/jdk.tools.jaotc/src/jdk/tools/jaotc/CompilationSpec.java
Index
Unified diffs
Context diffs
Sdiffs
Frames
Patch
New
Old
Previous File
Next File
hotspot Cdiff src/jdk.aot/share/classes/jdk.tools.jaotc/src/jdk/tools/jaotc/CompilationSpec.java
src/jdk.aot/share/classes/jdk.tools.jaotc/src/jdk/tools/jaotc/CompilationSpec.java
Print this page
*** 1,7 ****
/*
! * Copyright (c) 2016, 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.
--- 1,7 ----
/*
! * Copyright (c) 2016, 2017, 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.
*** 30,40 ****
import jdk.vm.ci.meta.ResolvedJavaMethod;
/**
* A class encapsulating any user-specified compilation restrictions.
*/
! public class CompilationSpec {
/**
* Set of method names to restrict compilation to.
*/
private HashSet<String> compileOnlyStrings = new HashSet<>();
--- 30,40 ----
import jdk.vm.ci.meta.ResolvedJavaMethod;
/**
* A class encapsulating any user-specified compilation restrictions.
*/
! final class CompilationSpec {
/**
* Set of method names to restrict compilation to.
*/
private HashSet<String> compileOnlyStrings = new HashSet<>();
*** 49,59 ****
/**
* Add a {@code compileOnly} directive to the compile-only list.
*
* @param pattern regex or non-regex pattern string
*/
! public void addCompileOnlyPattern(String pattern) {
if (pattern.contains("*")) {
compileOnlyPatterns.add(Pattern.compile(pattern));
} else {
compileOnlyStrings.add(pattern);
}
--- 49,59 ----
/**
* Add a {@code compileOnly} directive to the compile-only list.
*
* @param pattern regex or non-regex pattern string
*/
! void addCompileOnlyPattern(String pattern) {
if (pattern.contains("*")) {
compileOnlyPatterns.add(Pattern.compile(pattern));
} else {
compileOnlyStrings.add(pattern);
}
*** 62,72 ****
/**
* Add an {@code exclude} directive to the exclude list.
*
* @param pattern regex or non-regex pattern string
*/
! public void addExcludePattern(String pattern) {
if (pattern.contains("*")) {
excludePatterns.add(Pattern.compile(pattern));
} else {
excludeStrings.add(pattern);
}
--- 62,72 ----
/**
* Add an {@code exclude} directive to the exclude list.
*
* @param pattern regex or non-regex pattern string
*/
! void addExcludePattern(String pattern) {
if (pattern.contains("*")) {
excludePatterns.add(Pattern.compile(pattern));
} else {
excludeStrings.add(pattern);
}
*** 76,93 ****
* Check if a given method is part of a restrictive compilation.
*
* @param method method to be checked
* @return true or false
*/
! public boolean shouldCompileMethod(ResolvedJavaMethod method) {
if (compileWithRestrictions()) {
// If there are user-specified compileOnly patterns, default action
// is not to compile the method.
boolean compileMethod = compileOnlyStrings.isEmpty() && compileOnlyPatterns.isEmpty();
// Check if the method matches with any of the specified compileOnly patterns.
! String methodName = MiscUtils.uniqueMethodName(method);
// compileOnly
if (!compileMethod) {
compileMethod = compileOnlyStrings.contains(methodName);
}
--- 76,93 ----
* Check if a given method is part of a restrictive compilation.
*
* @param method method to be checked
* @return true or false
*/
! boolean shouldCompileMethod(ResolvedJavaMethod method) {
if (compileWithRestrictions()) {
// If there are user-specified compileOnly patterns, default action
// is not to compile the method.
boolean compileMethod = compileOnlyStrings.isEmpty() && compileOnlyPatterns.isEmpty();
// Check if the method matches with any of the specified compileOnly patterns.
! String methodName = JavaMethodInfo.uniqueMethodName(method);
// compileOnly
if (!compileMethod) {
compileMethod = compileOnlyStrings.contains(methodName);
}
src/jdk.aot/share/classes/jdk.tools.jaotc/src/jdk/tools/jaotc/CompilationSpec.java
Index
Unified diffs
Context diffs
Sdiffs
Frames
Patch
New
Old
Previous File
Next File