src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/IsGraalPredicateBase.java
author dlong
Thu, 25 Jul 2019 17:35:58 -0400
changeset 57537 ecc6e394475f
parent 54328 37648a9c4a6a
permissions -rw-r--r--
8226771: Update Graal Reviewed-by: kvn
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
54328
37648a9c4a6a 8221341: Update Graal
jwilhelm
parents:
diff changeset
     1
/*
37648a9c4a6a 8221341: Update Graal
jwilhelm
parents:
diff changeset
     2
 * Copyright (c) 2018, 2019, Oracle and/or its affiliates. All rights reserved.
37648a9c4a6a 8221341: Update Graal
jwilhelm
parents:
diff changeset
     3
 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
37648a9c4a6a 8221341: Update Graal
jwilhelm
parents:
diff changeset
     4
 *
37648a9c4a6a 8221341: Update Graal
jwilhelm
parents:
diff changeset
     5
 * This code is free software; you can redistribute it and/or modify it
37648a9c4a6a 8221341: Update Graal
jwilhelm
parents:
diff changeset
     6
 * under the terms of the GNU General Public License version 2 only, as
37648a9c4a6a 8221341: Update Graal
jwilhelm
parents:
diff changeset
     7
 * published by the Free Software Foundation.
37648a9c4a6a 8221341: Update Graal
jwilhelm
parents:
diff changeset
     8
 *
37648a9c4a6a 8221341: Update Graal
jwilhelm
parents:
diff changeset
     9
 * This code is distributed in the hope that it will be useful, but WITHOUT
37648a9c4a6a 8221341: Update Graal
jwilhelm
parents:
diff changeset
    10
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
37648a9c4a6a 8221341: Update Graal
jwilhelm
parents:
diff changeset
    11
 * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
37648a9c4a6a 8221341: Update Graal
jwilhelm
parents:
diff changeset
    12
 * version 2 for more details (a copy is included in the LICENSE file that
37648a9c4a6a 8221341: Update Graal
jwilhelm
parents:
diff changeset
    13
 * accompanied this code).
37648a9c4a6a 8221341: Update Graal
jwilhelm
parents:
diff changeset
    14
 *
37648a9c4a6a 8221341: Update Graal
jwilhelm
parents:
diff changeset
    15
 * You should have received a copy of the GNU General Public License version
37648a9c4a6a 8221341: Update Graal
jwilhelm
parents:
diff changeset
    16
 * 2 along with this work; if not, write to the Free Software Foundation,
37648a9c4a6a 8221341: Update Graal
jwilhelm
parents:
diff changeset
    17
 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
37648a9c4a6a 8221341: Update Graal
jwilhelm
parents:
diff changeset
    18
 *
37648a9c4a6a 8221341: Update Graal
jwilhelm
parents:
diff changeset
    19
 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
37648a9c4a6a 8221341: Update Graal
jwilhelm
parents:
diff changeset
    20
 * or visit www.oracle.com if you need additional information or have any
37648a9c4a6a 8221341: Update Graal
jwilhelm
parents:
diff changeset
    21
 * questions.
37648a9c4a6a 8221341: Update Graal
jwilhelm
parents:
diff changeset
    22
 */
37648a9c4a6a 8221341: Update Graal
jwilhelm
parents:
diff changeset
    23
37648a9c4a6a 8221341: Update Graal
jwilhelm
parents:
diff changeset
    24
37648a9c4a6a 8221341: Update Graal
jwilhelm
parents:
diff changeset
    25
package org.graalvm.compiler.hotspot;
37648a9c4a6a 8221341: Update Graal
jwilhelm
parents:
diff changeset
    26
37648a9c4a6a 8221341: Update Graal
jwilhelm
parents:
diff changeset
    27
import jdk.vm.ci.hotspot.HotSpotJVMCICompilerFactory;
37648a9c4a6a 8221341: Update Graal
jwilhelm
parents:
diff changeset
    28
import jdk.vm.ci.hotspot.HotSpotJVMCIRuntime;
37648a9c4a6a 8221341: Update Graal
jwilhelm
parents:
diff changeset
    29
37648a9c4a6a 8221341: Update Graal
jwilhelm
parents:
diff changeset
    30
/**
37648a9c4a6a 8221341: Update Graal
jwilhelm
parents:
diff changeset
    31
 * Determines if a given class is a JVMCI or Graal class for the purpose of
37648a9c4a6a 8221341: Update Graal
jwilhelm
parents:
diff changeset
    32
 * {@link HotSpotGraalCompilerFactory.Options#CompileGraalWithC1Only}.
37648a9c4a6a 8221341: Update Graal
jwilhelm
parents:
diff changeset
    33
 */
37648a9c4a6a 8221341: Update Graal
jwilhelm
parents:
diff changeset
    34
abstract class IsGraalPredicateBase {
37648a9c4a6a 8221341: Update Graal
jwilhelm
parents:
diff changeset
    35
37648a9c4a6a 8221341: Update Graal
jwilhelm
parents:
diff changeset
    36
    @SuppressWarnings("unused")
37648a9c4a6a 8221341: Update Graal
jwilhelm
parents:
diff changeset
    37
    void onCompilerConfigurationFactorySelection(HotSpotJVMCIRuntime runtime, CompilerConfigurationFactory factory) {
37648a9c4a6a 8221341: Update Graal
jwilhelm
parents:
diff changeset
    38
    }
37648a9c4a6a 8221341: Update Graal
jwilhelm
parents:
diff changeset
    39
37648a9c4a6a 8221341: Update Graal
jwilhelm
parents:
diff changeset
    40
    abstract boolean apply(Class<?> declaringClass);
37648a9c4a6a 8221341: Update Graal
jwilhelm
parents:
diff changeset
    41
37648a9c4a6a 8221341: Update Graal
jwilhelm
parents:
diff changeset
    42
    HotSpotJVMCICompilerFactory.CompilationLevelAdjustment getCompilationLevelAdjustment() {
37648a9c4a6a 8221341: Update Graal
jwilhelm
parents:
diff changeset
    43
        return HotSpotJVMCICompilerFactory.CompilationLevelAdjustment.ByHolder;
37648a9c4a6a 8221341: Update Graal
jwilhelm
parents:
diff changeset
    44
    }
37648a9c4a6a 8221341: Update Graal
jwilhelm
parents:
diff changeset
    45
}