changeset 22874:b308931fc253

API to get the GraalRuntime of the JVMCI system compiler.
author Roland Schatz <roland.schatz@oracle.com>
date Wed, 21 Oct 2015 16:20:23 +0200
parents 3566ad79cf86
children fcd9e8f41e2b
files graal/com.oracle.graal.api.runtime/src/com/oracle/graal/api/runtime/GraalJVMCICompiler.java graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/HotSpotGraalCompiler.java mx.graal/suite.py
diffstat 3 files changed, 38 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/graal/com.oracle.graal.api.runtime/src/com/oracle/graal/api/runtime/GraalJVMCICompiler.java	Wed Oct 21 16:20:23 2015 +0200
@@ -0,0 +1,33 @@
+/*
+ * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+package com.oracle.graal.api.runtime;
+
+import jdk.vm.ci.runtime.JVMCICompiler;
+
+/**
+ * Graal specific extension of the {@link JVMCICompiler} interface.
+ */
+public interface GraalJVMCICompiler extends JVMCICompiler {
+
+    GraalRuntime getGraalRuntime();
+}
--- a/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/HotSpotGraalCompiler.java	Tue Oct 20 15:56:18 2015 +0200
+++ b/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/HotSpotGraalCompiler.java	Wed Oct 21 16:20:23 2015 +0200
@@ -39,6 +39,7 @@
 import jdk.vm.ci.meta.SpeculationLog;
 import jdk.vm.ci.runtime.JVMCICompiler;
 
+import com.oracle.graal.api.runtime.GraalJVMCICompiler;
 import com.oracle.graal.compiler.GraalCompiler;
 import com.oracle.graal.debug.Debug;
 import com.oracle.graal.debug.DebugConfigScope;
@@ -64,7 +65,7 @@
 import com.oracle.graal.phases.tiers.HighTierContext;
 import com.oracle.graal.phases.tiers.Suites;
 
-public class HotSpotGraalCompiler implements JVMCICompiler {
+public class HotSpotGraalCompiler implements GraalJVMCICompiler {
 
     private final HotSpotJVMCIRuntimeProvider jvmciRuntime;
     private final HotSpotGraalRuntimeProvider graalRuntime;
@@ -74,7 +75,8 @@
         this.graalRuntime = graalRuntime;
     }
 
-    HotSpotGraalRuntimeProvider getGraalRuntime() {
+    @Override
+    public HotSpotGraalRuntimeProvider getGraalRuntime() {
         return graalRuntime;
     }
 
--- a/mx.graal/suite.py	Tue Oct 20 15:56:18 2015 +0200
+++ b/mx.graal/suite.py	Wed Oct 21 16:20:23 2015 +0200
@@ -150,7 +150,7 @@
       "subDir" : "graal",
       "sourceDirs" : ["src"],
       "dependencies" : [
-        "jvmci:JVMCI_SERVICE",
+        "jvmci:JVMCI_API",
       ],
       "checkstyle" : "com.oracle.graal.graph",
       "javaCompliance" : "1.8",