src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/HotSpotGraalServices.java
author chegar
Thu, 17 Oct 2019 20:54:25 +0100
branchdatagramsocketimpl-branch
changeset 58679 9c3209ff7550
parent 58678 9cf78a70fa4f
parent 58299 6df94ce3ab2f
permissions -rw-r--r--
datagramsocketimpl-branch: merge with default
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
55509
d58442b8abc1 8225497: Update Graal
jwilhelm
parents:
diff changeset
     1
/*
d58442b8abc1 8225497: Update Graal
jwilhelm
parents:
diff changeset
     2
 * Copyright (c) 2019, Oracle and/or its affiliates. All rights reserved.
d58442b8abc1 8225497: Update Graal
jwilhelm
parents:
diff changeset
     3
 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
d58442b8abc1 8225497: Update Graal
jwilhelm
parents:
diff changeset
     4
 *
d58442b8abc1 8225497: Update Graal
jwilhelm
parents:
diff changeset
     5
 * This code is free software; you can redistribute it and/or modify it
d58442b8abc1 8225497: Update Graal
jwilhelm
parents:
diff changeset
     6
 * under the terms of the GNU General Public License version 2 only, as
d58442b8abc1 8225497: Update Graal
jwilhelm
parents:
diff changeset
     7
 * published by the Free Software Foundation.
d58442b8abc1 8225497: Update Graal
jwilhelm
parents:
diff changeset
     8
 *
d58442b8abc1 8225497: Update Graal
jwilhelm
parents:
diff changeset
     9
 * This code is distributed in the hope that it will be useful, but WITHOUT
d58442b8abc1 8225497: Update Graal
jwilhelm
parents:
diff changeset
    10
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
d58442b8abc1 8225497: Update Graal
jwilhelm
parents:
diff changeset
    11
 * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
d58442b8abc1 8225497: Update Graal
jwilhelm
parents:
diff changeset
    12
 * version 2 for more details (a copy is included in the LICENSE file that
d58442b8abc1 8225497: Update Graal
jwilhelm
parents:
diff changeset
    13
 * accompanied this code).
d58442b8abc1 8225497: Update Graal
jwilhelm
parents:
diff changeset
    14
 *
d58442b8abc1 8225497: Update Graal
jwilhelm
parents:
diff changeset
    15
 * You should have received a copy of the GNU General Public License version
d58442b8abc1 8225497: Update Graal
jwilhelm
parents:
diff changeset
    16
 * 2 along with this work; if not, write to the Free Software Foundation,
d58442b8abc1 8225497: Update Graal
jwilhelm
parents:
diff changeset
    17
 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
d58442b8abc1 8225497: Update Graal
jwilhelm
parents:
diff changeset
    18
 *
d58442b8abc1 8225497: Update Graal
jwilhelm
parents:
diff changeset
    19
 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
d58442b8abc1 8225497: Update Graal
jwilhelm
parents:
diff changeset
    20
 * or visit www.oracle.com if you need additional information or have any
d58442b8abc1 8225497: Update Graal
jwilhelm
parents:
diff changeset
    21
 * questions.
d58442b8abc1 8225497: Update Graal
jwilhelm
parents:
diff changeset
    22
 */
d58442b8abc1 8225497: Update Graal
jwilhelm
parents:
diff changeset
    23
d58442b8abc1 8225497: Update Graal
jwilhelm
parents:
diff changeset
    24
d58442b8abc1 8225497: Update Graal
jwilhelm
parents:
diff changeset
    25
package org.graalvm.compiler.hotspot;
d58442b8abc1 8225497: Update Graal
jwilhelm
parents:
diff changeset
    26
d58442b8abc1 8225497: Update Graal
jwilhelm
parents:
diff changeset
    27
import jdk.vm.ci.hotspot.HotSpotMetaData;
58299
6df94ce3ab2f 8229201: Update Graal
dlong
parents: 57537
diff changeset
    28
import jdk.vm.ci.hotspot.HotSpotSpeculationLog;
6df94ce3ab2f 8229201: Update Graal
dlong
parents: 57537
diff changeset
    29
import jdk.vm.ci.meta.SpeculationLog;
55509
d58442b8abc1 8225497: Update Graal
jwilhelm
parents:
diff changeset
    30
57537
ecc6e394475f 8226771: Update Graal
dlong
parents: 55509
diff changeset
    31
/**
ecc6e394475f 8226771: Update Graal
dlong
parents: 55509
diff changeset
    32
 * JDK 13 version of {@code HotSpotGraalServices}.
ecc6e394475f 8226771: Update Graal
dlong
parents: 55509
diff changeset
    33
 */
55509
d58442b8abc1 8225497: Update Graal
jwilhelm
parents:
diff changeset
    34
public class HotSpotGraalServices {
d58442b8abc1 8225497: Update Graal
jwilhelm
parents:
diff changeset
    35
d58442b8abc1 8225497: Update Graal
jwilhelm
parents:
diff changeset
    36
    /**
d58442b8abc1 8225497: Update Graal
jwilhelm
parents:
diff changeset
    37
     * Get the implicit exceptions section of a {@code HotSpotMetaData} if it exists.
d58442b8abc1 8225497: Update Graal
jwilhelm
parents:
diff changeset
    38
     */
d58442b8abc1 8225497: Update Graal
jwilhelm
parents:
diff changeset
    39
    @SuppressWarnings("unused")
d58442b8abc1 8225497: Update Graal
jwilhelm
parents:
diff changeset
    40
    public static byte[] getImplicitExceptionBytes(HotSpotMetaData metaData) {
d58442b8abc1 8225497: Update Graal
jwilhelm
parents:
diff changeset
    41
        return metaData.implicitExceptionBytes();
d58442b8abc1 8225497: Update Graal
jwilhelm
parents:
diff changeset
    42
    }
57537
ecc6e394475f 8226771: Update Graal
dlong
parents: 55509
diff changeset
    43
ecc6e394475f 8226771: Update Graal
dlong
parents: 55509
diff changeset
    44
    public static CompilationContext enterGlobalCompilationContext() {
ecc6e394475f 8226771: Update Graal
dlong
parents: 55509
diff changeset
    45
        return null;
ecc6e394475f 8226771: Update Graal
dlong
parents: 55509
diff changeset
    46
    }
ecc6e394475f 8226771: Update Graal
dlong
parents: 55509
diff changeset
    47
ecc6e394475f 8226771: Update Graal
dlong
parents: 55509
diff changeset
    48
    @SuppressWarnings("unused")
ecc6e394475f 8226771: Update Graal
dlong
parents: 55509
diff changeset
    49
    public static CompilationContext openLocalCompilationContext(Object description) {
ecc6e394475f 8226771: Update Graal
dlong
parents: 55509
diff changeset
    50
        return null;
ecc6e394475f 8226771: Update Graal
dlong
parents: 55509
diff changeset
    51
    }
ecc6e394475f 8226771: Update Graal
dlong
parents: 55509
diff changeset
    52
ecc6e394475f 8226771: Update Graal
dlong
parents: 55509
diff changeset
    53
    public static void exit(int status) {
ecc6e394475f 8226771: Update Graal
dlong
parents: 55509
diff changeset
    54
        System.exit(status);
ecc6e394475f 8226771: Update Graal
dlong
parents: 55509
diff changeset
    55
    }
58299
6df94ce3ab2f 8229201: Update Graal
dlong
parents: 57537
diff changeset
    56
6df94ce3ab2f 8229201: Update Graal
dlong
parents: 57537
diff changeset
    57
    public static SpeculationLog newHotSpotSpeculationLog(long cachedFailedSpeculationsAddress) {
6df94ce3ab2f 8229201: Update Graal
dlong
parents: 57537
diff changeset
    58
        return new HotSpotSpeculationLog(cachedFailedSpeculationsAddress);
6df94ce3ab2f 8229201: Update Graal
dlong
parents: 57537
diff changeset
    59
    }
55509
d58442b8abc1 8225497: Update Graal
jwilhelm
parents:
diff changeset
    60
}