src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/ea/TrufflePEATest.java
equal
deleted
inserted
replaced
1 /* |
1 /* |
2 * Copyright (c) 2017, 2018, Oracle and/or its affiliates. All rights reserved. |
2 * Copyright (c) 2017, 2019, Oracle and/or its affiliates. All rights reserved. |
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
4 * |
4 * |
5 * This code is free software; you can redistribute it and/or modify it |
5 * This code is free software; you can redistribute it and/or modify it |
6 * under the terms of the GNU General Public License version 2 only, as |
6 * under the terms of the GNU General Public License version 2 only, as |
7 * published by the Free Software Foundation. |
7 * published by the Free Software Foundation. |
30 import org.graalvm.compiler.core.test.GraalCompilerTest; |
30 import org.graalvm.compiler.core.test.GraalCompilerTest; |
31 import org.graalvm.compiler.nodes.StructuredGraph; |
31 import org.graalvm.compiler.nodes.StructuredGraph; |
32 import org.graalvm.compiler.nodes.extended.RawLoadNode; |
32 import org.graalvm.compiler.nodes.extended.RawLoadNode; |
33 import org.graalvm.compiler.nodes.extended.RawStoreNode; |
33 import org.graalvm.compiler.nodes.extended.RawStoreNode; |
34 import org.graalvm.compiler.nodes.virtual.CommitAllocationNode; |
34 import org.graalvm.compiler.nodes.virtual.CommitAllocationNode; |
35 import org.graalvm.compiler.phases.common.CanonicalizerPhase; |
|
36 import org.graalvm.compiler.phases.tiers.HighTierContext; |
35 import org.graalvm.compiler.phases.tiers.HighTierContext; |
37 import org.graalvm.compiler.virtual.phases.ea.PartialEscapePhase; |
36 import org.graalvm.compiler.virtual.phases.ea.PartialEscapePhase; |
38 import org.junit.Test; |
37 import org.junit.Test; |
39 |
38 |
40 import sun.misc.Unsafe; |
39 import sun.misc.Unsafe; |
121 |
120 |
122 protected StructuredGraph processMethod(final String snippet) { |
121 protected StructuredGraph processMethod(final String snippet) { |
123 StructuredGraph graph = parseEager(snippet, StructuredGraph.AllowAssumptions.NO); |
122 StructuredGraph graph = parseEager(snippet, StructuredGraph.AllowAssumptions.NO); |
124 HighTierContext context = getDefaultHighTierContext(); |
123 HighTierContext context = getDefaultHighTierContext(); |
125 createInliningPhase().apply(graph, context); |
124 createInliningPhase().apply(graph, context); |
126 new PartialEscapePhase(true, true, new CanonicalizerPhase(), null, graph.getOptions()).apply(graph, context); |
125 new PartialEscapePhase(true, true, createCanonicalizerPhase(), null, graph.getOptions()).apply(graph, context); |
127 return graph; |
126 return graph; |
128 } |
127 } |
129 |
128 |
130 public static double accessDynamicObject(double v) { |
129 public static double accessDynamicObject(double v) { |
131 DynamicObject obj = new DynamicObject(); |
130 DynamicObject obj = new DynamicObject(); |