src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.phases/src/org/graalvm/compiler/phases/tiers/PhaseContext.java
author jwilhelm
Thu, 28 Mar 2019 19:39:14 +0100
changeset 54328 37648a9c4a6a
parent 52910 583fd71c47d6
permissions -rw-r--r--
8221341: Update Graal Reviewed-by: kvn
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
43972
1ade39b8381b 8174879: Rename jdk.vm.ci to jdk.internal.vm.ci
kvn
parents:
diff changeset
     1
/*
52910
583fd71c47d6 8214023: Update Graal
dlong
parents: 51736
diff changeset
     2
 * Copyright (c) 2013, 2018, Oracle and/or its affiliates. All rights reserved.
43972
1ade39b8381b 8174879: Rename jdk.vm.ci to jdk.internal.vm.ci
kvn
parents:
diff changeset
     3
 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
1ade39b8381b 8174879: Rename jdk.vm.ci to jdk.internal.vm.ci
kvn
parents:
diff changeset
     4
 *
1ade39b8381b 8174879: Rename jdk.vm.ci to jdk.internal.vm.ci
kvn
parents:
diff changeset
     5
 * This code is free software; you can redistribute it and/or modify it
1ade39b8381b 8174879: Rename jdk.vm.ci to jdk.internal.vm.ci
kvn
parents:
diff changeset
     6
 * under the terms of the GNU General Public License version 2 only, as
1ade39b8381b 8174879: Rename jdk.vm.ci to jdk.internal.vm.ci
kvn
parents:
diff changeset
     7
 * published by the Free Software Foundation.
1ade39b8381b 8174879: Rename jdk.vm.ci to jdk.internal.vm.ci
kvn
parents:
diff changeset
     8
 *
1ade39b8381b 8174879: Rename jdk.vm.ci to jdk.internal.vm.ci
kvn
parents:
diff changeset
     9
 * This code is distributed in the hope that it will be useful, but WITHOUT
1ade39b8381b 8174879: Rename jdk.vm.ci to jdk.internal.vm.ci
kvn
parents:
diff changeset
    10
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
1ade39b8381b 8174879: Rename jdk.vm.ci to jdk.internal.vm.ci
kvn
parents:
diff changeset
    11
 * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
1ade39b8381b 8174879: Rename jdk.vm.ci to jdk.internal.vm.ci
kvn
parents:
diff changeset
    12
 * version 2 for more details (a copy is included in the LICENSE file that
1ade39b8381b 8174879: Rename jdk.vm.ci to jdk.internal.vm.ci
kvn
parents:
diff changeset
    13
 * accompanied this code).
1ade39b8381b 8174879: Rename jdk.vm.ci to jdk.internal.vm.ci
kvn
parents:
diff changeset
    14
 *
1ade39b8381b 8174879: Rename jdk.vm.ci to jdk.internal.vm.ci
kvn
parents:
diff changeset
    15
 * You should have received a copy of the GNU General Public License version
1ade39b8381b 8174879: Rename jdk.vm.ci to jdk.internal.vm.ci
kvn
parents:
diff changeset
    16
 * 2 along with this work; if not, write to the Free Software Foundation,
1ade39b8381b 8174879: Rename jdk.vm.ci to jdk.internal.vm.ci
kvn
parents:
diff changeset
    17
 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
1ade39b8381b 8174879: Rename jdk.vm.ci to jdk.internal.vm.ci
kvn
parents:
diff changeset
    18
 *
1ade39b8381b 8174879: Rename jdk.vm.ci to jdk.internal.vm.ci
kvn
parents:
diff changeset
    19
 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
1ade39b8381b 8174879: Rename jdk.vm.ci to jdk.internal.vm.ci
kvn
parents:
diff changeset
    20
 * or visit www.oracle.com if you need additional information or have any
1ade39b8381b 8174879: Rename jdk.vm.ci to jdk.internal.vm.ci
kvn
parents:
diff changeset
    21
 * questions.
1ade39b8381b 8174879: Rename jdk.vm.ci to jdk.internal.vm.ci
kvn
parents:
diff changeset
    22
 */
50858
2d3e99a72541 8205824: Update Graal
never
parents: 47216
diff changeset
    23
2d3e99a72541 8205824: Update Graal
never
parents: 47216
diff changeset
    24
43972
1ade39b8381b 8174879: Rename jdk.vm.ci to jdk.internal.vm.ci
kvn
parents:
diff changeset
    25
package org.graalvm.compiler.phases.tiers;
1ade39b8381b 8174879: Rename jdk.vm.ci to jdk.internal.vm.ci
kvn
parents:
diff changeset
    26
1ade39b8381b 8174879: Rename jdk.vm.ci to jdk.internal.vm.ci
kvn
parents:
diff changeset
    27
import org.graalvm.compiler.core.common.spi.ConstantFieldProvider;
54328
37648a9c4a6a 8221341: Update Graal
jwilhelm
parents: 52910
diff changeset
    28
import org.graalvm.compiler.core.common.spi.ForeignCallsProvider;
37648a9c4a6a 8221341: Update Graal
jwilhelm
parents: 52910
diff changeset
    29
import org.graalvm.compiler.nodes.spi.CoreProviders;
43972
1ade39b8381b 8174879: Rename jdk.vm.ci to jdk.internal.vm.ci
kvn
parents:
diff changeset
    30
import org.graalvm.compiler.nodes.spi.LoweringProvider;
1ade39b8381b 8174879: Rename jdk.vm.ci to jdk.internal.vm.ci
kvn
parents:
diff changeset
    31
import org.graalvm.compiler.nodes.spi.Replacements;
1ade39b8381b 8174879: Rename jdk.vm.ci to jdk.internal.vm.ci
kvn
parents:
diff changeset
    32
import org.graalvm.compiler.nodes.spi.StampProvider;
1ade39b8381b 8174879: Rename jdk.vm.ci to jdk.internal.vm.ci
kvn
parents:
diff changeset
    33
1ade39b8381b 8174879: Rename jdk.vm.ci to jdk.internal.vm.ci
kvn
parents:
diff changeset
    34
import jdk.vm.ci.meta.ConstantReflectionProvider;
1ade39b8381b 8174879: Rename jdk.vm.ci to jdk.internal.vm.ci
kvn
parents:
diff changeset
    35
import jdk.vm.ci.meta.MetaAccessProvider;
1ade39b8381b 8174879: Rename jdk.vm.ci to jdk.internal.vm.ci
kvn
parents:
diff changeset
    36
54328
37648a9c4a6a 8221341: Update Graal
jwilhelm
parents: 52910
diff changeset
    37
public class PhaseContext implements CoreProviders {
43972
1ade39b8381b 8174879: Rename jdk.vm.ci to jdk.internal.vm.ci
kvn
parents:
diff changeset
    38
54328
37648a9c4a6a 8221341: Update Graal
jwilhelm
parents: 52910
diff changeset
    39
    private final CoreProviders providers;
43972
1ade39b8381b 8174879: Rename jdk.vm.ci to jdk.internal.vm.ci
kvn
parents:
diff changeset
    40
54328
37648a9c4a6a 8221341: Update Graal
jwilhelm
parents: 52910
diff changeset
    41
    public PhaseContext(CoreProviders providers) {
37648a9c4a6a 8221341: Update Graal
jwilhelm
parents: 52910
diff changeset
    42
        this.providers = providers;
43972
1ade39b8381b 8174879: Rename jdk.vm.ci to jdk.internal.vm.ci
kvn
parents:
diff changeset
    43
    }
1ade39b8381b 8174879: Rename jdk.vm.ci to jdk.internal.vm.ci
kvn
parents:
diff changeset
    44
54328
37648a9c4a6a 8221341: Update Graal
jwilhelm
parents: 52910
diff changeset
    45
    @Override
37648a9c4a6a 8221341: Update Graal
jwilhelm
parents: 52910
diff changeset
    46
    public MetaAccessProvider getMetaAccess() {
37648a9c4a6a 8221341: Update Graal
jwilhelm
parents: 52910
diff changeset
    47
        return providers.getMetaAccess();
37648a9c4a6a 8221341: Update Graal
jwilhelm
parents: 52910
diff changeset
    48
    }
37648a9c4a6a 8221341: Update Graal
jwilhelm
parents: 52910
diff changeset
    49
37648a9c4a6a 8221341: Update Graal
jwilhelm
parents: 52910
diff changeset
    50
    @Override
37648a9c4a6a 8221341: Update Graal
jwilhelm
parents: 52910
diff changeset
    51
    public ConstantReflectionProvider getConstantReflection() {
37648a9c4a6a 8221341: Update Graal
jwilhelm
parents: 52910
diff changeset
    52
        return providers.getConstantReflection();
43972
1ade39b8381b 8174879: Rename jdk.vm.ci to jdk.internal.vm.ci
kvn
parents:
diff changeset
    53
    }
1ade39b8381b 8174879: Rename jdk.vm.ci to jdk.internal.vm.ci
kvn
parents:
diff changeset
    54
54328
37648a9c4a6a 8221341: Update Graal
jwilhelm
parents: 52910
diff changeset
    55
    @Override
37648a9c4a6a 8221341: Update Graal
jwilhelm
parents: 52910
diff changeset
    56
    public ConstantFieldProvider getConstantFieldProvider() {
37648a9c4a6a 8221341: Update Graal
jwilhelm
parents: 52910
diff changeset
    57
        return providers.getConstantFieldProvider();
43972
1ade39b8381b 8174879: Rename jdk.vm.ci to jdk.internal.vm.ci
kvn
parents:
diff changeset
    58
    }
1ade39b8381b 8174879: Rename jdk.vm.ci to jdk.internal.vm.ci
kvn
parents:
diff changeset
    59
54328
37648a9c4a6a 8221341: Update Graal
jwilhelm
parents: 52910
diff changeset
    60
    @Override
37648a9c4a6a 8221341: Update Graal
jwilhelm
parents: 52910
diff changeset
    61
    public LoweringProvider getLowerer() {
37648a9c4a6a 8221341: Update Graal
jwilhelm
parents: 52910
diff changeset
    62
        return providers.getLowerer();
43972
1ade39b8381b 8174879: Rename jdk.vm.ci to jdk.internal.vm.ci
kvn
parents:
diff changeset
    63
    }
1ade39b8381b 8174879: Rename jdk.vm.ci to jdk.internal.vm.ci
kvn
parents:
diff changeset
    64
54328
37648a9c4a6a 8221341: Update Graal
jwilhelm
parents: 52910
diff changeset
    65
    @Override
43972
1ade39b8381b 8174879: Rename jdk.vm.ci to jdk.internal.vm.ci
kvn
parents:
diff changeset
    66
    public Replacements getReplacements() {
54328
37648a9c4a6a 8221341: Update Graal
jwilhelm
parents: 52910
diff changeset
    67
        return providers.getReplacements();
43972
1ade39b8381b 8174879: Rename jdk.vm.ci to jdk.internal.vm.ci
kvn
parents:
diff changeset
    68
    }
1ade39b8381b 8174879: Rename jdk.vm.ci to jdk.internal.vm.ci
kvn
parents:
diff changeset
    69
54328
37648a9c4a6a 8221341: Update Graal
jwilhelm
parents: 52910
diff changeset
    70
    @Override
43972
1ade39b8381b 8174879: Rename jdk.vm.ci to jdk.internal.vm.ci
kvn
parents:
diff changeset
    71
    public StampProvider getStampProvider() {
54328
37648a9c4a6a 8221341: Update Graal
jwilhelm
parents: 52910
diff changeset
    72
        return providers.getStampProvider();
43972
1ade39b8381b 8174879: Rename jdk.vm.ci to jdk.internal.vm.ci
kvn
parents:
diff changeset
    73
    }
1ade39b8381b 8174879: Rename jdk.vm.ci to jdk.internal.vm.ci
kvn
parents:
diff changeset
    74
54328
37648a9c4a6a 8221341: Update Graal
jwilhelm
parents: 52910
diff changeset
    75
    @Override
51736
42d99cb7f50f 8210478: Update Graal
iveresov
parents: 50858
diff changeset
    76
    public ForeignCallsProvider getForeignCalls() {
54328
37648a9c4a6a 8221341: Update Graal
jwilhelm
parents: 52910
diff changeset
    77
        return providers.getForeignCalls();
51736
42d99cb7f50f 8210478: Update Graal
iveresov
parents: 50858
diff changeset
    78
    }
43972
1ade39b8381b 8174879: Rename jdk.vm.ci to jdk.internal.vm.ci
kvn
parents:
diff changeset
    79
}