changeset 21539:d3002f7bd223

renamed com.oracle.graal.service.processor to com.oracle.jvmci.runtime.processor (JBS:GRAAL-53)
author Doug Simon <doug.simon@oracle.com>
date Mon, 25 May 2015 17:34:32 +0200
parents c1e2fdb5fea3
children ccb1b1391192
files graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/jvmci/CompilerToVM.java graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/jvmci/CompilerToVMImpl.java graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/jvmci/HexCodeFile.java graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/jvmci/HotSpotCodeCacheProvider.java graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/jvmci/HotSpotCompiledCode.java graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/jvmci/HotSpotCompiledNmethod.java graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/jvmci/HotSpotCompressedNullConstant.java graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/jvmci/HotSpotConstant.java graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/jvmci/HotSpotConstantPool.java graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/jvmci/HotSpotConstantReflectionProvider.java graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/jvmci/HotSpotForeignCallTarget.java graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/jvmci/HotSpotInstalledCode.java graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/jvmci/HotSpotJavaType.java graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/jvmci/HotSpotMemoryAccessProvider.java graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/jvmci/HotSpotMemoryAccessProviderImpl.java graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/jvmci/HotSpotMetaAccessProvider.java graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/jvmci/HotSpotMetaspaceConstant.java graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/jvmci/HotSpotMetaspaceConstantImpl.java graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/jvmci/HotSpotMethod.java graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/jvmci/HotSpotMethodData.java graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/jvmci/HotSpotMethodDataAccessor.java graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/jvmci/HotSpotMethodHandleAccessProvider.java graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/jvmci/HotSpotMethodUnresolved.java graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/jvmci/HotSpotNmethod.java graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/jvmci/HotSpotObjectConstant.java graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/jvmci/HotSpotObjectConstantImpl.java graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/jvmci/HotSpotOptions.java graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/jvmci/HotSpotOptionsLoader.java graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/jvmci/HotSpotProfilingInfo.java graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/jvmci/HotSpotProxified.java graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/jvmci/HotSpotReferenceMap.java graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/jvmci/HotSpotResolvedJavaField.java graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/jvmci/HotSpotResolvedJavaFieldImpl.java graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/jvmci/HotSpotResolvedJavaMethod.java graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/jvmci/HotSpotResolvedJavaMethodImpl.java graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/jvmci/HotSpotResolvedJavaType.java graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/jvmci/HotSpotResolvedObjectType.java graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/jvmci/HotSpotResolvedObjectTypeImpl.java graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/jvmci/HotSpotResolvedPrimitiveType.java graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/jvmci/HotSpotSignature.java graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/jvmci/HotSpotSpeculationLog.java graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/jvmci/HotSpotStackFrameReference.java graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/jvmci/HotSpotUnresolvedField.java graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/jvmci/HotSpotUnresolvedJavaType.java graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/jvmci/HotSpotVMConfig.java graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/jvmci/HotSpotVMConfigVerifier.java graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/jvmci/HotSpotVmSymbols.java graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/jvmci/InitTimer.java graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/jvmci/PrintStreamOption.java graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/jvmci/Stable.java graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/jvmci/logging/CountingProxy.java graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/jvmci/logging/Logger.java graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/jvmci/logging/LoggingProxy.java graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/jvmci/logging/ProxyUtil.java graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/jvmci/logging/package-info.java graal/com.oracle.graal.service.processor/src/META-INF/services/javax.annotation.processing.Processor graal/com.oracle.graal.service.processor/src/com/oracle/graal/service/processor/ServiceProviderProcessor.java graal/com.oracle.jvmci.runtime.processor/src/META-INF/services/javax.annotation.processing.Processor graal/com.oracle.jvmci.runtime.processor/src/com/oracle/jvmci/runtime/processor/ServiceProviderProcessor.java graal/com.oracle.jvmci.runtime/src/com/oracle/jvmci/runtime/Service.java graal/com.oracle.jvmci.runtime/src/com/oracle/jvmci/runtime/ServiceProvider.java graal/com.oracle.jvmci.runtime/src/com/oracle/jvmci/runtime/Services.java mx/suite.py
diffstat 5 files changed, 124 insertions(+), 124 deletions(-) [+]
line wrap: on
line diff
--- a/graal/com.oracle.graal.service.processor/src/META-INF/services/javax.annotation.processing.Processor	Mon May 25 17:20:39 2015 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,1 +0,0 @@
-com.oracle.graal.service.processor.ServiceProviderProcessor
--- a/graal/com.oracle.graal.service.processor/src/com/oracle/graal/service/processor/ServiceProviderProcessor.java	Mon May 25 17:20:39 2015 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,111 +0,0 @@
-/*
- * Copyright (c) 2013, 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.service.processor;
-
-import java.io.*;
-import java.util.*;
-
-import javax.annotation.processing.*;
-import javax.lang.model.*;
-import javax.lang.model.element.*;
-import javax.lang.model.type.*;
-import javax.tools.Diagnostic.Kind;
-import javax.tools.*;
-
-import com.oracle.jvmci.runtime.*;
-
-@SupportedAnnotationTypes("com.oracle.jvmci.runtime.ServiceProvider")
-public class ServiceProviderProcessor extends AbstractProcessor {
-
-    private final Set<TypeElement> processed = new HashSet<>();
-
-    @Override
-    public SourceVersion getSupportedSourceVersion() {
-        return SourceVersion.latest();
-    }
-
-    private boolean verifyAnnotation(TypeMirror serviceInterface, TypeElement serviceProvider) {
-        if (!processingEnv.getTypeUtils().isSubtype(serviceProvider.asType(), serviceInterface)) {
-            String msg = String.format("Service provider class %s doesn't implement service interface %s", serviceProvider.getSimpleName(), serviceInterface);
-            processingEnv.getMessager().printMessage(Kind.ERROR, msg, serviceProvider);
-            return false;
-        }
-
-        return true;
-    }
-
-    private void processElement(TypeElement serviceProvider) {
-        if (processed.contains(serviceProvider)) {
-            return;
-        }
-
-        processed.add(serviceProvider);
-        ServiceProvider annotation = serviceProvider.getAnnotation(ServiceProvider.class);
-        if (annotation != null) {
-            try {
-                annotation.value();
-            } catch (MirroredTypeException ex) {
-                TypeMirror serviceInterface = ex.getTypeMirror();
-                if (verifyAnnotation(serviceInterface, serviceProvider)) {
-                    String interfaceName = ex.getTypeMirror().toString();
-                    createProviderFile(serviceProvider, interfaceName);
-                }
-            }
-        }
-    }
-
-    private void createProviderFile(TypeElement serviceProvider, String interfaceName) {
-        if (serviceProvider.getNestingKind().isNested()) {
-            // This is a simplifying constraint that means we don't have to
-            // processed the qualified name to insert '$' characters at
-            // the relevant positions.
-            String msg = String.format("Service provider class %s must be a top level class", serviceProvider.getSimpleName());
-            processingEnv.getMessager().printMessage(Kind.ERROR, msg, serviceProvider);
-            return;
-        }
-
-        String filename = "META-INF/providers/" + serviceProvider.getQualifiedName();
-        try {
-            FileObject file = processingEnv.getFiler().createResource(StandardLocation.CLASS_OUTPUT, "", filename, serviceProvider);
-            PrintWriter writer = new PrintWriter(new OutputStreamWriter(file.openOutputStream(), "UTF-8"));
-            writer.println(interfaceName);
-            writer.close();
-        } catch (IOException e) {
-            processingEnv.getMessager().printMessage(Kind.ERROR, e.getMessage(), serviceProvider);
-        }
-    }
-
-    @Override
-    public boolean process(Set<? extends TypeElement> annotations, RoundEnvironment roundEnv) {
-        if (roundEnv.processingOver()) {
-            return true;
-        }
-
-        for (Element element : roundEnv.getElementsAnnotatedWith(ServiceProvider.class)) {
-            assert element.getKind().isClass();
-            processElement((TypeElement) element);
-        }
-
-        return true;
-    }
-}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/graal/com.oracle.jvmci.runtime.processor/src/META-INF/services/javax.annotation.processing.Processor	Mon May 25 17:34:32 2015 +0200
@@ -0,0 +1,1 @@
+com.oracle.jvmci.runtime.processor.ServiceProviderProcessor
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/graal/com.oracle.jvmci.runtime.processor/src/com/oracle/jvmci/runtime/processor/ServiceProviderProcessor.java	Mon May 25 17:34:32 2015 +0200
@@ -0,0 +1,111 @@
+/*
+ * Copyright (c) 2013, 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.jvmci.runtime.processor;
+
+import java.io.*;
+import java.util.*;
+
+import javax.annotation.processing.*;
+import javax.lang.model.*;
+import javax.lang.model.element.*;
+import javax.lang.model.type.*;
+import javax.tools.Diagnostic.Kind;
+import javax.tools.*;
+
+import com.oracle.jvmci.runtime.*;
+
+@SupportedAnnotationTypes("com.oracle.jvmci.runtime.ServiceProvider")
+public class ServiceProviderProcessor extends AbstractProcessor {
+
+    private final Set<TypeElement> processed = new HashSet<>();
+
+    @Override
+    public SourceVersion getSupportedSourceVersion() {
+        return SourceVersion.latest();
+    }
+
+    private boolean verifyAnnotation(TypeMirror serviceInterface, TypeElement serviceProvider) {
+        if (!processingEnv.getTypeUtils().isSubtype(serviceProvider.asType(), serviceInterface)) {
+            String msg = String.format("Service provider class %s doesn't implement service interface %s", serviceProvider.getSimpleName(), serviceInterface);
+            processingEnv.getMessager().printMessage(Kind.ERROR, msg, serviceProvider);
+            return false;
+        }
+
+        return true;
+    }
+
+    private void processElement(TypeElement serviceProvider) {
+        if (processed.contains(serviceProvider)) {
+            return;
+        }
+
+        processed.add(serviceProvider);
+        ServiceProvider annotation = serviceProvider.getAnnotation(ServiceProvider.class);
+        if (annotation != null) {
+            try {
+                annotation.value();
+            } catch (MirroredTypeException ex) {
+                TypeMirror serviceInterface = ex.getTypeMirror();
+                if (verifyAnnotation(serviceInterface, serviceProvider)) {
+                    String interfaceName = ex.getTypeMirror().toString();
+                    createProviderFile(serviceProvider, interfaceName);
+                }
+            }
+        }
+    }
+
+    private void createProviderFile(TypeElement serviceProvider, String interfaceName) {
+        if (serviceProvider.getNestingKind().isNested()) {
+            // This is a simplifying constraint that means we don't have to
+            // processed the qualified name to insert '$' characters at
+            // the relevant positions.
+            String msg = String.format("Service provider class %s must be a top level class", serviceProvider.getSimpleName());
+            processingEnv.getMessager().printMessage(Kind.ERROR, msg, serviceProvider);
+            return;
+        }
+
+        String filename = "META-INF/providers/" + serviceProvider.getQualifiedName();
+        try {
+            FileObject file = processingEnv.getFiler().createResource(StandardLocation.CLASS_OUTPUT, "", filename, serviceProvider);
+            PrintWriter writer = new PrintWriter(new OutputStreamWriter(file.openOutputStream(), "UTF-8"));
+            writer.println(interfaceName);
+            writer.close();
+        } catch (IOException e) {
+            processingEnv.getMessager().printMessage(Kind.ERROR, e.getMessage(), serviceProvider);
+        }
+    }
+
+    @Override
+    public boolean process(Set<? extends TypeElement> annotations, RoundEnvironment roundEnv) {
+        if (roundEnv.processingOver()) {
+            return true;
+        }
+
+        for (Element element : roundEnv.getElementsAnnotatedWith(ServiceProvider.class)) {
+            assert element.getKind().isClass();
+            processElement((TypeElement) element);
+        }
+
+        return true;
+    }
+}
--- a/mx/suite.py	Mon May 25 17:20:39 2015 +0200
+++ b/mx/suite.py	Mon May 25 17:34:32 2015 +0200
@@ -268,7 +268,7 @@
       "workingSets" : "API,Graal,Replacements",
     },
 
-    "com.oracle.graal.service.processor" : {
+    "com.oracle.jvmci.runtime.processor" : {
       "subDir" : "graal",
       "sourceDirs" : ["src"],
       "dependencies" : ["com.oracle.jvmci.runtime"],
@@ -324,7 +324,7 @@
       "checkstyle" : "com.oracle.graal.graph",
       "annotationProcessors" : [
         "com.oracle.graal.replacements.verifier",
-        "com.oracle.graal.service.processor",
+        "com.oracle.jvmci.runtime.processor",
         "com.oracle.graal.hotspotvmconfig.processor",
       ],
       "javaCompliance" : "1.8",
@@ -357,7 +357,7 @@
         "JFR",
       ],
       "checkstyle" : "com.oracle.graal.graph",
-      "annotationProcessors" : ["com.oracle.graal.service.processor"],
+      "annotationProcessors" : ["com.oracle.jvmci.runtime.processor"],
       "javaCompliance" : "1.8",
       "profile" : "",
       "workingSets" : "Graal,HotSpot",
@@ -372,7 +372,7 @@
         "com.oracle.graal.replacements.amd64",
       ],
       "checkstyle" : "com.oracle.graal.graph",
-      "annotationProcessors" : ["com.oracle.graal.service.processor"],
+      "annotationProcessors" : ["com.oracle.jvmci.runtime.processor"],
       "javaCompliance" : "1.8",
       "workingSets" : "Graal,HotSpot,AMD64",
     },
@@ -385,7 +385,7 @@
         "com.oracle.graal.replacements.sparc",
       ],
       "checkstyle" : "com.oracle.graal.graph",
-      "annotationProcessors" : ["com.oracle.graal.service.processor", "com.oracle.graal.compiler.match.processor"],
+      "annotationProcessors" : ["com.oracle.jvmci.runtime.processor", "com.oracle.graal.compiler.match.processor"],
       "javaCompliance" : "1.8",
       "workingSets" : "Graal,HotSpot,SPARC",
     },
@@ -589,7 +589,7 @@
       "javaCompliance" : "1.8",
       "annotationProcessors" : [
         "com.oracle.graal.replacements.verifier",
-        "com.oracle.graal.service.processor",
+        "com.oracle.jvmci.runtime.processor",
       ],
       "workingSets" : "Graal,Replacements",
     },
@@ -603,7 +603,7 @@
           ],
       "checkstyle" : "com.oracle.graal.graph",
       "javaCompliance" : "1.8",
-      "annotationProcessors" : ["com.oracle.graal.service.processor"],
+      "annotationProcessors" : ["com.oracle.jvmci.runtime.processor"],
       "workingSets" : "Graal,Replacements,AMD64",
     },
 
@@ -733,7 +733,7 @@
       ],
       "checkstyle" : "com.oracle.graal.graph",
       "javaCompliance" : "1.8",
-      "annotationProcessors" : ["com.oracle.graal.service.processor"],
+      "annotationProcessors" : ["com.oracle.jvmci.runtime.processor"],
       "workingSets" : "Graal",
     },
 
@@ -819,7 +819,7 @@
         "com.oracle.graal.graphbuilderconf"
       ],
       "checkstyle" : "com.oracle.graal.graph",
-      "annotationProcessors" : ["com.oracle.graal.service.processor"],
+      "annotationProcessors" : ["com.oracle.jvmci.runtime.processor"],
       "javaCompliance" : "1.8",
       "workingSets" : "Graal,Java",
     },
@@ -1122,7 +1122,7 @@
       ],
       "checkstyle" : "com.oracle.graal.graph",
       "javaCompliance" : "1.8",
-      "annotationProcessors" : ["com.oracle.graal.service.processor"],
+      "annotationProcessors" : ["com.oracle.jvmci.runtime.processor"],
       "workingSets" : "Graal,Truffle",
     },
 
@@ -1135,7 +1135,7 @@
       ],
       "checkstyle" : "com.oracle.graal.graph",
       "javaCompliance" : "1.8",
-      "annotationProcessors" : ["com.oracle.graal.service.processor"],
+      "annotationProcessors" : ["com.oracle.jvmci.runtime.processor"],
       "workingSets" : "Graal,Truffle",
     },
 
@@ -1148,7 +1148,7 @@
       ],
       "checkstyle" : "com.oracle.graal.graph",
       "javaCompliance" : "1.8",
-      "annotationProcessors" : ["com.oracle.graal.service.processor"],
+      "annotationProcessors" : ["com.oracle.jvmci.runtime.processor"],
       "workingSets" : "Graal,Truffle,SPARC",
     }
   },