annotate jvmci/jdk.vm.ci.runtime/src/jdk/vm/ci/runtime/JVMCICompilerFactory.java @ 24234:ea6f94ab283b default tip

Added tag jvmci-0.36 for changeset 8128b98d4736
author Gilles Duboscq <gilles.m.duboscq@oracle.com>
date Mon, 18 Sep 2017 18:49:45 +0200
parents 5cf445d2acf6
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
22429
a1b0a76567c7 Select default compiler from jvmci.compiler system property.
Roland Schatz <roland.schatz@oracle.com>
parents:
diff changeset
1 /*
23358
7eaa740eaca2 make JVMCICompilerFactory an abstract class with security checks (JDK-8155622)
Doug Simon <doug.simon@oracle.com>
parents: 22697
diff changeset
2 * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
22429
a1b0a76567c7 Select default compiler from jvmci.compiler system property.
Roland Schatz <roland.schatz@oracle.com>
parents:
diff changeset
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
a1b0a76567c7 Select default compiler from jvmci.compiler system property.
Roland Schatz <roland.schatz@oracle.com>
parents:
diff changeset
4 *
a1b0a76567c7 Select default compiler from jvmci.compiler system property.
Roland Schatz <roland.schatz@oracle.com>
parents:
diff changeset
5 * This code is free software; you can redistribute it and/or modify it
a1b0a76567c7 Select default compiler from jvmci.compiler system property.
Roland Schatz <roland.schatz@oracle.com>
parents:
diff changeset
6 * under the terms of the GNU General Public License version 2 only, as
a1b0a76567c7 Select default compiler from jvmci.compiler system property.
Roland Schatz <roland.schatz@oracle.com>
parents:
diff changeset
7 * published by the Free Software Foundation.
a1b0a76567c7 Select default compiler from jvmci.compiler system property.
Roland Schatz <roland.schatz@oracle.com>
parents:
diff changeset
8 *
a1b0a76567c7 Select default compiler from jvmci.compiler system property.
Roland Schatz <roland.schatz@oracle.com>
parents:
diff changeset
9 * This code is distributed in the hope that it will be useful, but WITHOUT
a1b0a76567c7 Select default compiler from jvmci.compiler system property.
Roland Schatz <roland.schatz@oracle.com>
parents:
diff changeset
10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
a1b0a76567c7 Select default compiler from jvmci.compiler system property.
Roland Schatz <roland.schatz@oracle.com>
parents:
diff changeset
11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
a1b0a76567c7 Select default compiler from jvmci.compiler system property.
Roland Schatz <roland.schatz@oracle.com>
parents:
diff changeset
12 * version 2 for more details (a copy is included in the LICENSE file that
a1b0a76567c7 Select default compiler from jvmci.compiler system property.
Roland Schatz <roland.schatz@oracle.com>
parents:
diff changeset
13 * accompanied this code).
a1b0a76567c7 Select default compiler from jvmci.compiler system property.
Roland Schatz <roland.schatz@oracle.com>
parents:
diff changeset
14 *
a1b0a76567c7 Select default compiler from jvmci.compiler system property.
Roland Schatz <roland.schatz@oracle.com>
parents:
diff changeset
15 * You should have received a copy of the GNU General Public License version
a1b0a76567c7 Select default compiler from jvmci.compiler system property.
Roland Schatz <roland.schatz@oracle.com>
parents:
diff changeset
16 * 2 along with this work; if not, write to the Free Software Foundation,
a1b0a76567c7 Select default compiler from jvmci.compiler system property.
Roland Schatz <roland.schatz@oracle.com>
parents:
diff changeset
17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
a1b0a76567c7 Select default compiler from jvmci.compiler system property.
Roland Schatz <roland.schatz@oracle.com>
parents:
diff changeset
18 *
a1b0a76567c7 Select default compiler from jvmci.compiler system property.
Roland Schatz <roland.schatz@oracle.com>
parents:
diff changeset
19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
a1b0a76567c7 Select default compiler from jvmci.compiler system property.
Roland Schatz <roland.schatz@oracle.com>
parents:
diff changeset
20 * or visit www.oracle.com if you need additional information or have any
a1b0a76567c7 Select default compiler from jvmci.compiler system property.
Roland Schatz <roland.schatz@oracle.com>
parents:
diff changeset
21 * questions.
a1b0a76567c7 Select default compiler from jvmci.compiler system property.
Roland Schatz <roland.schatz@oracle.com>
parents:
diff changeset
22 */
23785
5cf445d2acf6 Exported elements referring to inaccessible types in jdk.vm.ci (JDK-8167180)
Doug Simon <doug.simon@oracle.com>
parents: 23783
diff changeset
23 package jdk.vm.ci.runtime;
23363
56479400913e jdk.vm.ci needs to securely export services (JDK-8155023)
Doug Simon <doug.simon@oracle.com>
parents: 23358
diff changeset
24
23777
6c8eaf47db9a added -XX:+JVMCIPrintFlags to support printing of JVMCI flags without having to know how to trigger JVMCI initialization
Doug Simon <doug.simon@oracle.com>
parents: 23723
diff changeset
25 import java.io.PrintStream;
6c8eaf47db9a added -XX:+JVMCIPrintFlags to support printing of JVMCI flags without having to know how to trigger JVMCI initialization
Doug Simon <doug.simon@oracle.com>
parents: 23723
diff changeset
26
22429
a1b0a76567c7 Select default compiler from jvmci.compiler system property.
Roland Schatz <roland.schatz@oracle.com>
parents:
diff changeset
27 /**
23785
5cf445d2acf6 Exported elements referring to inaccessible types in jdk.vm.ci (JDK-8167180)
Doug Simon <doug.simon@oracle.com>
parents: 23783
diff changeset
28 * Factory for creating JVMCI compilers.
22429
a1b0a76567c7 Select default compiler from jvmci.compiler system property.
Roland Schatz <roland.schatz@oracle.com>
parents:
diff changeset
29 */
23785
5cf445d2acf6 Exported elements referring to inaccessible types in jdk.vm.ci (JDK-8167180)
Doug Simon <doug.simon@oracle.com>
parents: 23783
diff changeset
30 public interface JVMCICompilerFactory {
22429
a1b0a76567c7 Select default compiler from jvmci.compiler system property.
Roland Schatz <roland.schatz@oracle.com>
parents:
diff changeset
31
a1b0a76567c7 Select default compiler from jvmci.compiler system property.
Roland Schatz <roland.schatz@oracle.com>
parents:
diff changeset
32 /**
23358
7eaa740eaca2 make JVMCICompilerFactory an abstract class with security checks (JDK-8155622)
Doug Simon <doug.simon@oracle.com>
parents: 22697
diff changeset
33 * Get the name of this compiler. The name is used by JVMCI to determine which factory to use.
22429
a1b0a76567c7 Select default compiler from jvmci.compiler system property.
Roland Schatz <roland.schatz@oracle.com>
parents:
diff changeset
34 */
23785
5cf445d2acf6 Exported elements referring to inaccessible types in jdk.vm.ci (JDK-8167180)
Doug Simon <doug.simon@oracle.com>
parents: 23783
diff changeset
35 String getCompilerName();
23358
7eaa740eaca2 make JVMCICompilerFactory an abstract class with security checks (JDK-8155622)
Doug Simon <doug.simon@oracle.com>
parents: 22697
diff changeset
36
7eaa740eaca2 make JVMCICompilerFactory an abstract class with security checks (JDK-8155622)
Doug Simon <doug.simon@oracle.com>
parents: 22697
diff changeset
37 /**
7eaa740eaca2 make JVMCICompilerFactory an abstract class with security checks (JDK-8155622)
Doug Simon <doug.simon@oracle.com>
parents: 22697
diff changeset
38 * Notifies this object that it has been selected to {@linkplain #createCompiler(JVMCIRuntime)
7eaa740eaca2 make JVMCICompilerFactory an abstract class with security checks (JDK-8155622)
Doug Simon <doug.simon@oracle.com>
parents: 22697
diff changeset
39 * create} a compiler and it should now perform any heavy weight initialization that it deferred
7eaa740eaca2 make JVMCICompilerFactory an abstract class with security checks (JDK-8155622)
Doug Simon <doug.simon@oracle.com>
parents: 22697
diff changeset
40 * during construction.
7eaa740eaca2 make JVMCICompilerFactory an abstract class with security checks (JDK-8155622)
Doug Simon <doug.simon@oracle.com>
parents: 22697
diff changeset
41 */
23785
5cf445d2acf6 Exported elements referring to inaccessible types in jdk.vm.ci (JDK-8167180)
Doug Simon <doug.simon@oracle.com>
parents: 23783
diff changeset
42 default void onSelection() {
23358
7eaa740eaca2 make JVMCICompilerFactory an abstract class with security checks (JDK-8155622)
Doug Simon <doug.simon@oracle.com>
parents: 22697
diff changeset
43 }
7eaa740eaca2 make JVMCICompilerFactory an abstract class with security checks (JDK-8155622)
Doug Simon <doug.simon@oracle.com>
parents: 22697
diff changeset
44
7eaa740eaca2 make JVMCICompilerFactory an abstract class with security checks (JDK-8155622)
Doug Simon <doug.simon@oracle.com>
parents: 22697
diff changeset
45 /**
7eaa740eaca2 make JVMCICompilerFactory an abstract class with security checks (JDK-8155622)
Doug Simon <doug.simon@oracle.com>
parents: 22697
diff changeset
46 * Create a new instance of a {@link JVMCICompiler}.
7eaa740eaca2 make JVMCICompilerFactory an abstract class with security checks (JDK-8155622)
Doug Simon <doug.simon@oracle.com>
parents: 22697
diff changeset
47 */
23785
5cf445d2acf6 Exported elements referring to inaccessible types in jdk.vm.ci (JDK-8167180)
Doug Simon <doug.simon@oracle.com>
parents: 23783
diff changeset
48 JVMCICompiler createCompiler(JVMCIRuntime runtime);
23777
6c8eaf47db9a added -XX:+JVMCIPrintFlags to support printing of JVMCI flags without having to know how to trigger JVMCI initialization
Doug Simon <doug.simon@oracle.com>
parents: 23723
diff changeset
49
6c8eaf47db9a added -XX:+JVMCIPrintFlags to support printing of JVMCI flags without having to know how to trigger JVMCI initialization
Doug Simon <doug.simon@oracle.com>
parents: 23723
diff changeset
50 /**
23783
1523f2f7832f renamed JVMCIPrintSystemProperties to JVMCIPrintProperties
Doug Simon <doug.simon@oracle.com>
parents: 23781
diff changeset
51 * Prints a description of the properties used to configure this compiler.
23777
6c8eaf47db9a added -XX:+JVMCIPrintFlags to support printing of JVMCI flags without having to know how to trigger JVMCI initialization
Doug Simon <doug.simon@oracle.com>
parents: 23723
diff changeset
52 *
6c8eaf47db9a added -XX:+JVMCIPrintFlags to support printing of JVMCI flags without having to know how to trigger JVMCI initialization
Doug Simon <doug.simon@oracle.com>
parents: 23723
diff changeset
53 * @param out where to print the message
6c8eaf47db9a added -XX:+JVMCIPrintFlags to support printing of JVMCI flags without having to know how to trigger JVMCI initialization
Doug Simon <doug.simon@oracle.com>
parents: 23723
diff changeset
54 */
23785
5cf445d2acf6 Exported elements referring to inaccessible types in jdk.vm.ci (JDK-8167180)
Doug Simon <doug.simon@oracle.com>
parents: 23783
diff changeset
55 default void printProperties(PrintStream out) {
23777
6c8eaf47db9a added -XX:+JVMCIPrintFlags to support printing of JVMCI flags without having to know how to trigger JVMCI initialization
Doug Simon <doug.simon@oracle.com>
parents: 23723
diff changeset
56 }
22429
a1b0a76567c7 Select default compiler from jvmci.compiler system property.
Roland Schatz <roland.schatz@oracle.com>
parents:
diff changeset
57 }