From c3bfd9dcc2a16d69b199789ec3619f5ee138aa3a Mon Sep 17 00:00:00 2001 From: Christian Humer Date: Sun, 18 Jun 2023 17:01:04 +0200 Subject: [PATCH 01/43] Add new runtime and compiler truffle project. --- truffle/mx.truffle/suite.py | 40 +++++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) diff --git a/truffle/mx.truffle/suite.py b/truffle/mx.truffle/suite.py index 7977f1fbb6bc..5049429e6e77 100644 --- a/truffle/mx.truffle/suite.py +++ b/truffle/mx.truffle/suite.py @@ -244,6 +244,44 @@ "javaCompliance" : "17+", "workingSets" : "API,Truffle", }, + + "com.oracle.truffle.runtime" : { + "subDir" : "src", + "sourceDirs" : ["src"], + "dependencies" : [ + "sdk:GRAAL_SDK", + "com.oracle.truffle.api.instrumentation", + "com.oracle.truffle.api.exception", + ], + "requires" : [ + "java.logging", + "jdk.management", + "jdk.unsupported", # sun.misc.Unsafe + ], + "annotationProcessors" : ["TRUFFLE_DSL_PROCESSOR"], + "checkstyle" : "com.oracle.truffle.api", + "javaCompliance" : "17+", + "workingSets" : "API,Truffle", + }, + + "com.oracle.truffle.compiler" : { + "subDir" : "src", + "sourceDirs" : ["src"], + "dependencies" : [ + "sdk:GRAAL_SDK", + "com.oracle.truffle.api.instrumentation", + "com.oracle.truffle.api.exception", + ], + "requires" : [ + "java.logging", + "jdk.management", + "jdk.unsupported", # sun.misc.Unsafe + ], + "annotationProcessors" : ["TRUFFLE_DSL_PROCESSOR"], + "checkstyle" : "com.oracle.truffle.api", + "javaCompliance" : "17+", + "workingSets" : "API,Truffle", + }, "com.oracle.truffle.host" : { "subDir" : "src", @@ -1095,6 +1133,7 @@ # Qualified exports "com.oracle.truffle.api.impl to jdk.internal.vm.compiler, org.graalvm.locator", "com.oracle.truffle.object to jdk.internal.vm.compiler, com.oracle.graal.graal_enterprise", + "com.oracle.truffle.compiler to jdk.internal.vm.compiler, com.oracle.graal.graal_enterprise" ], "uses" : [ "com.oracle.truffle.api.TruffleRuntimeAccess", @@ -1139,6 +1178,7 @@ "com.oracle.truffle.polyglot", "com.oracle.truffle.host", "com.oracle.truffle.api.staticobject", + "com.oracle.truffle.compiler", ], "distDependencies" : [ "sdk:GRAAL_SDK" From bc04f8b788ef93006966070e0439168e11773c3d Mon Sep 17 00:00:00 2001 From: Christian Humer Date: Sun, 18 Jun 2023 22:40:39 +0200 Subject: [PATCH 02/43] Move Truffle libgraal processor to Truffle until migration to native-bridge is concluded. --- compiler/mx.compiler/suite.py | 2 + .../javax.annotation.processing.Processor | 1 - truffle/mx.truffle/suite.py | 23 ++ .../javax.annotation.processing.Processor | 1 + .../libgraal/processor/AbstractProcessor.java | 370 ++++++++++++++++++ .../TruffleFromLibGraalProcessor.java | 72 ++-- 6 files changed, 439 insertions(+), 30 deletions(-) create mode 100644 truffle/src/com.oracle.truffle.libgraal.processor/src/META-INF/services/javax.annotation.processing.Processor create mode 100644 truffle/src/com.oracle.truffle.libgraal.processor/src/com/oracle/truffle/libgraal/processor/AbstractProcessor.java rename {compiler/src/jdk.internal.vm.compiler.processor/src/org/graalvm/compiler/truffle/compiler/hotspot => truffle/src/com.oracle.truffle.libgraal.processor/src/com/oracle/truffle}/libgraal/processor/TruffleFromLibGraalProcessor.java (84%) diff --git a/compiler/mx.compiler/suite.py b/compiler/mx.compiler/suite.py index b000c64bf1c2..ff4e3195629e 100644 --- a/compiler/mx.compiler/suite.py +++ b/compiler/mx.compiler/suite.py @@ -197,6 +197,7 @@ ], "annotationProcessors" : [ "truffle:TRUFFLE_DSL_PROCESSOR", + "truffle:TRUFFLE_LIBGRAAL_PROCESSOR", "GRAAL_PROCESSOR" ], "checkPackagePrefix": "false", @@ -455,6 +456,7 @@ "javaCompliance" : "17+", "annotationProcessors" : [ "GRAAL_PROCESSOR", + "truffle:TRUFFLE_LIBGRAAL_PROCESSOR", ], }, diff --git a/compiler/src/jdk.internal.vm.compiler.processor/src/META-INF/services/javax.annotation.processing.Processor b/compiler/src/jdk.internal.vm.compiler.processor/src/META-INF/services/javax.annotation.processing.Processor index 36e6d452cdfb..3bdbb17e6012 100644 --- a/compiler/src/jdk.internal.vm.compiler.processor/src/META-INF/services/javax.annotation.processing.Processor +++ b/compiler/src/jdk.internal.vm.compiler.processor/src/META-INF/services/javax.annotation.processing.Processor @@ -2,7 +2,6 @@ org.graalvm.compiler.replacements.processor.ReplacementsAnnotationProcessor org.graalvm.compiler.nodeinfo.processor.GraphNodeProcessor org.graalvm.compiler.lir.processor.IntrinsicStubProcessor org.graalvm.compiler.lir.processor.StubPortProcessor -org.graalvm.compiler.truffle.compiler.hotspot.libgraal.processor.TruffleFromLibGraalProcessor org.graalvm.compiler.core.match.processor.MatchProcessor org.graalvm.compiler.options.processor.OptionProcessor org.graalvm.compiler.serviceprovider.processor.ServiceProviderProcessor diff --git a/truffle/mx.truffle/suite.py b/truffle/mx.truffle/suite.py index 5049429e6e77..07edf0bdf026 100644 --- a/truffle/mx.truffle/suite.py +++ b/truffle/mx.truffle/suite.py @@ -447,6 +447,21 @@ "workingSets" : "Truffle,Codegen", }, + "com.oracle.truffle.libgraal.processor" : { + "subDir" : "src", + "sourceDirs" : ["src"], + "dependencies" : [ + "truffle:ANTLR4" + ], + "requires" : [ + "java.compiler", + "jdk.management" + ], + "checkstyle" : "com.oracle.truffle.api", + "javaCompliance" : "17+", + "workingSets" : "Truffle,Codegen", + }, + "com.oracle.truffle.api.interop" : { "subDir" : "src", "sourceDirs" : ["src"], @@ -1338,6 +1353,14 @@ "description" : "The Truffle DSL Processor generates source code for nodes that are declared using the DSL.", "allowsJavadocWarnings": True, }, + + "TRUFFLE_LIBGRAAL_PROCESSOR" : { + "subDir" : "src", + "dependencies" : ["com.oracle.truffle.libgraal.processor"], + "distDependencies" : [], + "description" : "The Truffle libgraal processor is shared across Truffle and the compiler to generate code for the compiler bridge.", + "allowsJavadocWarnings": True, + }, "TRUFFLE_SL" : { "subDir" : "src", diff --git a/truffle/src/com.oracle.truffle.libgraal.processor/src/META-INF/services/javax.annotation.processing.Processor b/truffle/src/com.oracle.truffle.libgraal.processor/src/META-INF/services/javax.annotation.processing.Processor new file mode 100644 index 000000000000..e1769605c8e4 --- /dev/null +++ b/truffle/src/com.oracle.truffle.libgraal.processor/src/META-INF/services/javax.annotation.processing.Processor @@ -0,0 +1 @@ +com.oracle.truffle.libgraal.processor.TruffleFromLibGraalProcessor diff --git a/truffle/src/com.oracle.truffle.libgraal.processor/src/com/oracle/truffle/libgraal/processor/AbstractProcessor.java b/truffle/src/com.oracle.truffle.libgraal.processor/src/com/oracle/truffle/libgraal/processor/AbstractProcessor.java new file mode 100644 index 000000000000..72e0cf198d5b --- /dev/null +++ b/truffle/src/com.oracle.truffle.libgraal.processor/src/com/oracle/truffle/libgraal/processor/AbstractProcessor.java @@ -0,0 +1,370 @@ +/* + * Copyright (c) 2018, 2023, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * The Universal Permissive License (UPL), Version 1.0 + * + * Subject to the condition set forth below, permission is hereby granted to any + * person obtaining a copy of this software, associated documentation and/or + * data (collectively the "Software"), free of charge and under any and all + * copyright rights in the Software, and any and all patent rights owned or + * freely licensable by each licensor hereunder covering either (i) the + * unmodified Software as contributed to or provided by such licensor, or (ii) + * the Larger Works (as defined below), to deal in both + * + * (a) the Software, and + * + * (b) any piece of software and/or hardware listed in the lrgrwrks.txt file if + * one is included with the Software each a "Larger Work" to which the Software + * is contributed by such licensors), + * + * without restriction, including without limitation the rights to copy, create + * derivative works of, display, perform, and distribute the Software and make, + * use, sell, offer for sale, import, export, have made, and have sold the + * Software and the Larger Work(s), and to sublicense the foregoing rights on + * either these or other terms. + * + * This license is subject to the following condition: + * + * The above copyright notice and either this complete permission notice or at a + * minimum a reference to the UPL must be included in all copies or substantial + * portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ +package com.oracle.truffle.libgraal.processor; + +import java.io.IOException; +import java.io.OutputStreamWriter; +import java.io.PrintWriter; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.NoSuchElementException; +import java.util.Set; +import java.util.regex.Matcher; +import java.util.regex.Pattern; + +import javax.annotation.processing.Filer; +import javax.annotation.processing.FilerException; +import javax.annotation.processing.ProcessingEnvironment; +import javax.annotation.processing.RoundEnvironment; +import javax.lang.model.SourceVersion; +import javax.lang.model.element.AnnotationMirror; +import javax.lang.model.element.AnnotationValue; +import javax.lang.model.element.Element; +import javax.lang.model.element.ElementKind; +import javax.lang.model.element.ExecutableElement; +import javax.lang.model.element.PackageElement; +import javax.lang.model.element.TypeElement; +import javax.lang.model.type.TypeKind; +import javax.lang.model.type.TypeMirror; +import javax.lang.model.util.ElementFilter; +import javax.tools.Diagnostic.Kind; +import javax.tools.FileObject; +import javax.tools.JavaFileObject; +import javax.tools.StandardLocation; + +/** + * {@link javax.annotation.processing.AbstractProcessor} subclass that provides extra functionality. + */ +public abstract class AbstractProcessor extends javax.annotation.processing.AbstractProcessor { + + /** + * Gets the processing environment available to this processor. + */ + public ProcessingEnvironment env() { + return processingEnv; + } + + @Override + public final SourceVersion getSupportedSourceVersion() { + return SourceVersion.latest(); + } + + @Override + public boolean process(Set annotations, RoundEnvironment roundEnv) { + return doProcess(annotations, roundEnv); + } + + protected abstract boolean doProcess(Set annotations, RoundEnvironment roundEnv); + + private final Map types = new HashMap<>(); + + /** + * Gets the {@link TypeMirror} for a given class name. + * + * @throws NoClassDefFoundError if the class cannot be resolved + */ + public TypeMirror getType(String className) { + return getTypeElement(className).asType(); + } + + public TypeMirror getType(Class element) { + if (element.isArray()) { + return processingEnv.getTypeUtils().getArrayType(getType(element.getComponentType())); + } + if (element.isPrimitive()) { + if (element == void.class) { + return processingEnv.getTypeUtils().getNoType(TypeKind.VOID); + } + TypeKind typeKind; + if (element == boolean.class) { + typeKind = TypeKind.BOOLEAN; + } else if (element == byte.class) { + typeKind = TypeKind.BYTE; + } else if (element == short.class) { + typeKind = TypeKind.SHORT; + } else if (element == char.class) { + typeKind = TypeKind.CHAR; + } else if (element == int.class) { + typeKind = TypeKind.INT; + } else if (element == long.class) { + typeKind = TypeKind.LONG; + } else if (element == float.class) { + typeKind = TypeKind.FLOAT; + } else if (element == double.class) { + typeKind = TypeKind.DOUBLE; + } else { + assert false; + return null; + } + return processingEnv.getTypeUtils().getPrimitiveType(typeKind); + } else { + TypeElement typeElement = getTypeElement(element.getCanonicalName()); + if (typeElement == null) { + return null; + } + return processingEnv.getTypeUtils().erasure(typeElement.asType()); + } + } + + /** + * Gets the {@link TypeMirror} for a given class name. + * + * @return {@code null} if the class cannot be resolved + */ + public TypeMirror getTypeOrNull(String className) { + TypeElement element = getTypeElementOrNull(className); + if (element == null) { + return null; + } + return element.asType(); + } + + /** + * Gets the {@link TypeElement} for a given class name. + * + * @throws NoClassDefFoundError if the class cannot be resolved + */ + public TypeElement getTypeElement(String className) { + TypeElement type = getTypeElementOrNull(className); + if (type == null) { + throw new NoClassDefFoundError(className); + } + return type; + } + + /** + * Gets the {@link TypeElement} for a given class name. + * + * @returns {@code null} if the class cannot be resolved + */ + public TypeElement getTypeElementOrNull(String className) { + TypeElement type = types.get(className); + if (type == null) { + type = processingEnv.getElementUtils().getTypeElement(className); + if (type == null) { + return null; + } + types.put(className, type); + } + return type; + } + + /** + * Converts a given {@link TypeMirror} to a {@link TypeElement}. + * + * @throws ClassCastException if type cannot be converted to a {@link TypeElement} + */ + public TypeElement asTypeElement(TypeMirror type) { + Element element = processingEnv.getTypeUtils().asElement(type); + if (element == null) { + throw new ClassCastException(type + " cannot be converted to a " + TypeElement.class.getName()); + } + return (TypeElement) element; + } + + /** + * Regular expression for a qualified class name that assumes package names start with lowercase + * and non-package components start with uppercase. + */ + private static final Pattern QUALIFIED_CLASS_NAME_RE = Pattern.compile("(?:[a-z]\\w*\\.)+([A-Z].*)"); + + /** + * Gets the non-package component of a qualified class name. + * + * @throws IllegalArgumentException if {@code className} does not match + * {@link #QUALIFIED_CLASS_NAME_RE} + */ + public static String getSimpleName(String className) { + Matcher m = QUALIFIED_CLASS_NAME_RE.matcher(className); + if (m.matches()) { + return m.group(1); + } + throw new IllegalArgumentException("Class name \"" + className + "\" does not match pattern " + QUALIFIED_CLASS_NAME_RE); + } + + /** + * Gets the package component of a qualified class name. + * + * @throws IllegalArgumentException if {@code className} does not match + * {@link #QUALIFIED_CLASS_NAME_RE} + */ + public static String getPackageName(String className) { + String simpleName = getSimpleName(className); + return className.substring(0, className.length() - simpleName.length() - 1); + } + + /** + * Gets the annotation of type {@code annotationType} directly present on {@code element}. + * + * @return {@code null} if an annotation of type {@code annotationType} is not on + * {@code element} + */ + public AnnotationMirror getAnnotation(Element element, TypeMirror annotationType) { + List mirrors = getAnnotations(element, annotationType); + return mirrors.isEmpty() ? null : mirrors.get(0); + } + + /** + * Gets all annotations directly present on {@code element}. + */ + public List getAnnotations(Element element, TypeMirror typeMirror) { + List result = new ArrayList<>(); + for (AnnotationMirror mirror : element.getAnnotationMirrors()) { + if (processingEnv.getTypeUtils().isSameType(mirror.getAnnotationType(), typeMirror)) { + result.add(mirror); + } + } + return result; + } + + /** + * Gets the value of the {@code name} element of {@code annotation} and converts it to a value + * of type {@code type}. + * + * @param type the expected type of the element value. This must be a subclass of one of the + * types described by {@link AnnotationValue}. + * @throws NoSuchElementException if {@code annotation} has no element named {@code name} + * @throws ClassCastException if the value of the specified element cannot be converted to + * {@code type} + */ + public static T getAnnotationValue(AnnotationMirror annotation, String name, Class type) { + ExecutableElement valueMethod = null; + for (ExecutableElement method : ElementFilter.methodsIn(annotation.getAnnotationType().asElement().getEnclosedElements())) { + if (method.getSimpleName().toString().equals(name)) { + valueMethod = method; + break; + } + } + + if (valueMethod == null) { + return null; + } + + AnnotationValue value = annotation.getElementValues().get(valueMethod); + if (value == null) { + value = valueMethod.getDefaultValue(); + } + + return type.cast(value.getValue()); + } + + /** + * Gets the value of the {@code name} array-typed element of {@code annotation} and converts it + * to list of values of type {@code type}. + * + * @param componentType the expected component type of the element value. This must be a + * subclass of one of the types described by {@link AnnotationValue}. + * @throws NoSuchElementException if {@code annotation} has no element named {@code name} + * @throws ClassCastException if the value of the specified element is not an array whose + * components cannot be converted to {@code componentType} + */ + @SuppressWarnings("unchecked") + public static List getAnnotationValueList(AnnotationMirror annotation, String name, Class componentType) { + List values = getAnnotationValue(annotation, name, List.class); + List result = new ArrayList<>(); + + if (values != null) { + for (AnnotationValue value : values) { + result.add(componentType.cast(value.getValue())); + } + } + return result; + } + + public static PackageElement getPackage(Element element) { + Element e = element.getEnclosingElement(); + while (e != null && e.getKind() != ElementKind.PACKAGE) { + e = e.getEnclosingElement(); + } + return (PackageElement) e; + } + + public static PrintWriter createSourceFile(String pkg, String relativeName, Filer filer, Element... originatingElements) { + try { + /* Ensure Unix line endings to comply with code style guide checked by Checkstyle. */ + String className = pkg + "." + relativeName; + JavaFileObject sourceFile = filer.createSourceFile(className, originatingElements); + return new PrintWriter(sourceFile.openWriter()) { + @Override + public void println() { + print("\n"); + } + }; + } catch (IOException e) { + throw new RuntimeException(e); + } + } + + /** + * Creates a {@code META-INF/providers/} file whose contents are a single + * line containing {@code serviceClassName}. + */ + public void createProviderFile(String providerClassName, String serviceClassName, Element... originatingElements) { + assert originatingElements.length > 0; + String filename = "META-INF/providers/" + providerClassName; + try { + FileObject file = processingEnv.getFiler().createResource(StandardLocation.CLASS_OUTPUT, "", filename, originatingElements); + PrintWriter writer = new PrintWriter(new OutputStreamWriter(file.openOutputStream(), "UTF-8")); + writer.println(serviceClassName); + writer.close(); + } catch (IOException e) { + processingEnv.getMessager().printMessage(isBug367599(e) ? Kind.NOTE : Kind.ERROR, e.getMessage(), originatingElements[0]); + } + } + + /** + * Determines if a given exception is (most likely) caused by + * Bug 367599. + */ + private static boolean isBug367599(Throwable t) { + if (t instanceof FilerException) { + for (StackTraceElement ste : t.getStackTrace()) { + if (ste.toString().contains("org.eclipse.jdt.internal.apt.pluggable.core.filer.IdeFilerImpl.create")) { + // See: https://bugs.eclipse.org/bugs/show_bug.cgi?id=367599 + return true; + } + } + } + return t.getCause() != null && isBug367599(t.getCause()); + } +} diff --git a/compiler/src/jdk.internal.vm.compiler.processor/src/org/graalvm/compiler/truffle/compiler/hotspot/libgraal/processor/TruffleFromLibGraalProcessor.java b/truffle/src/com.oracle.truffle.libgraal.processor/src/com/oracle/truffle/libgraal/processor/TruffleFromLibGraalProcessor.java similarity index 84% rename from compiler/src/jdk.internal.vm.compiler.processor/src/org/graalvm/compiler/truffle/compiler/hotspot/libgraal/processor/TruffleFromLibGraalProcessor.java rename to truffle/src/com.oracle.truffle.libgraal.processor/src/com/oracle/truffle/libgraal/processor/TruffleFromLibGraalProcessor.java index 98bf3cd16ff9..11c7d67fc74f 100644 --- a/compiler/src/jdk.internal.vm.compiler.processor/src/org/graalvm/compiler/truffle/compiler/hotspot/libgraal/processor/TruffleFromLibGraalProcessor.java +++ b/truffle/src/com.oracle.truffle.libgraal.processor/src/com/oracle/truffle/libgraal/processor/TruffleFromLibGraalProcessor.java @@ -1,28 +1,53 @@ /* - * Copyright (c) 2018, 2020, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2018, 2023, 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. Oracle designates this - * particular file as subject to the "Classpath" exception as provided - * by Oracle in the LICENSE file that accompanied this code. + * The Universal Permissive License (UPL), Version 1.0 * - * 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). + * Subject to the condition set forth below, permission is hereby granted to any + * person obtaining a copy of this software, associated documentation and/or + * data (collectively the "Software"), free of charge and under any and all + * copyright rights in the Software, and any and all patent rights owned or + * freely licensable by each licensor hereunder covering either (i) the + * unmodified Software as contributed to or provided by such licensor, or (ii) + * the Larger Works (as defined below), to deal in both * - * 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. + * (a) the Software, and * - * 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. + * (b) any piece of software and/or hardware listed in the lrgrwrks.txt file if + * one is included with the Software each a "Larger Work" to which the Software + * is contributed by such licensors), + * + * without restriction, including without limitation the rights to copy, create + * derivative works of, display, perform, and distribute the Software and make, + * use, sell, offer for sale, import, export, have made, and have sold the + * Software and the Larger Work(s), and to sublicense the foregoing rights on + * either these or other terms. + * + * This license is subject to the following condition: + * + * The above copyright notice and either this complete permission notice or at a + * minimum a reference to the UPL must be included in all copies or substantial + * portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. */ -package org.graalvm.compiler.truffle.compiler.hotspot.libgraal.processor; +package com.oracle.truffle.libgraal.processor; + +import java.io.PrintWriter; +import java.util.ArrayList; +import java.util.Collections; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; import javax.annotation.processing.Filer; import javax.annotation.processing.RoundEnvironment; @@ -41,17 +66,6 @@ import javax.lang.model.type.TypeMirror; import javax.lang.model.util.ElementFilter; -import org.graalvm.compiler.processor.AbstractProcessor; - -import java.io.PrintWriter; -import java.util.ArrayList; -import java.util.Collections; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - /** * Processor for the * {@code org.graalvm.compiler.truffle.common.hotspot.libgraal.TruffleFromLibGraal} annotation that From 3a9bbf93b8f4e51c2237c2edd0ea978ddab77a10 Mon Sep 17 00:00:00 2001 From: Christian Humer Date: Mon, 19 Jun 2023 16:44:46 +0200 Subject: [PATCH 03/43] Move Truffle runtime and compiler interfaces from compiler to truffle suite. --- .../libgraal/jni/FromLibGraalCalls.java | 4 +- .../graalvm/libgraal/jni/FromLibGraalId.java | 39 +++++++++++++++++++ .../truffle/common/ConstantFieldInfo.java | 0 .../truffle/common/HostMethodInfo.java | 0 .../common/OptimizedAssumptionDependency.java | 0 .../common/PartialEvaluationMethodInfo.java | 0 .../truffle/common/TruffleCompilable.java | 0 .../common/TruffleCompilationSupport.java | 0 .../common/TruffleCompilationTask.java | 0 .../truffle/common/TruffleCompiler.java | 0 .../TruffleCompilerAssumptionDependency.java | 0 .../common/TruffleCompilerListener.java | 0 .../TruffleCompilerOptionDescriptor.java | 0 .../common/TruffleCompilerRuntime.java | 0 .../common/TruffleSourceLanguagePosition.java | 0 .../hotspot/HotSpotTruffleCompiler.java | 0 .../FromLibGraalEntryPointsResolver.java | 0 .../hotspot/libgraal}/FromLibGraalId.java | 0 .../hotspot/libgraal/TruffleFromLibGraal.java | 0 .../libgraal/TruffleFromLibGraalRepeated.java | 0 .../hotspot/libgraal/TruffleToLibGraal.java | 0 .../common/hotspot/libgraal}/Utilities.java | 0 ...compiler.truffle.jfr.EventFactory$Provider | 0 .../truffle/jfr/CompilationEvent.java | 0 .../jfr/CompilationStatisticsEvent.java | 0 .../truffle/jfr/DeoptimizationEvent.java | 0 .../graalvm/compiler/truffle/jfr/Event.java | 0 .../compiler/truffle/jfr/EventFactory.java | 0 .../truffle/jfr/InvalidationEvent.java | 0 .../truffle/jfr/RootFunctionEvent.java | 0 .../jfr/impl/CompilationEventImpl.java | 0 .../jfr/impl/CompilationFailureEventImpl.java | 0 .../impl/CompilationStatisticsEventImpl.java | 0 .../jfr/impl/DeoptimizationEventImpl.java | 0 .../truffle/jfr/impl/EventFactoryImpl.java | 0 .../jfr/impl/InvalidationEventImpl.java | 0 .../truffle/jfr/impl/ProviderImpl.java | 0 .../jfr/impl/RootFunctionEventImpl.java | 0 .../runtime/AbstractCompilationTask.java | 0 .../AbstractGraalTruffleRuntimeListener.java | 0 .../runtime/AbstractOptimizedLoopNode.java | 0 .../runtime/BackgroundCompileQueue.java | 0 .../truffle/runtime/BaseOSRRootNode.java | 0 .../truffle/runtime/BytecodeOSRMetadata.java | 0 .../truffle/runtime/BytecodeOSRRootNode.java | 0 .../truffle/runtime/CompilationState.java | 0 .../truffle/runtime/CompilationTask.java | 0 .../runtime/DefaultLoopNodeFactory.java | 0 .../runtime/DynamicThresholdsQueue.java | 0 .../truffle/runtime/EngineCacheSupport.java | 0 .../compiler/truffle/runtime/EngineData.java | 0 .../truffle/runtime/FixedPointMath.java | 0 .../truffle/runtime/FloodControlHandler.java | 0 .../truffle/runtime/GraalFastThreadLocal.java | 0 .../truffle/runtime/GraalFrameInstance.java | 0 .../runtime/GraalOSRFrameInstance.java | 0 .../truffle/runtime/GraalRuntimeAccessor.java | 0 .../runtime/GraalRuntimeServiceProvider.java | 0 .../truffle/runtime/GraalRuntimeSupport.java | 0 .../compiler/truffle/runtime/GraalTVMCI.java | 0 .../truffle/runtime/GraalTestTVMCI.java | 0 .../truffle/runtime/GraalTruffleRuntime.java | 0 .../runtime/GraalTruffleRuntimeListener.java | 0 ...GraalTruffleRuntimeListenerDispatcher.java | 0 .../truffle/runtime/InlineDecision.java | 0 .../truffle/runtime/LoopNodeFactory.java | 0 .../compiler/truffle/runtime/ModuleUtil.java | 0 .../truffle/runtime/OptimizedAssumption.java | 0 .../truffle/runtime/OptimizedBlockNode.java | 0 .../truffle/runtime/OptimizedCallTarget.java | 0 .../runtime/OptimizedDirectCallNode.java | 0 .../runtime/OptimizedIndirectCallNode.java | 0 .../truffle/runtime/OptimizedLoopNode.java | 0 .../truffle/runtime/OptimizedOSRLoopNode.java | 0 .../runtime/OptimizedRuntimeOptions.java | 0 .../truffle/runtime/SuppressFBWarnings.java | 0 .../runtime/TraversingBlockingQueue.java | 0 .../truffle/runtime/TruffleCallBoundary.java | 0 .../truffle/runtime/TruffleInlining.java | 0 .../runtime/TruffleSplittingStrategy.java | 0 .../truffle/runtime/TruffleTypes.java | 0 .../runtime/collection/ArrayQueue.java | 0 .../runtime/collection/BTreeQueue.java | 0 .../collection/DelegatingBlockingQueue.java | 0 .../runtime/collection/SerialQueue.java | 0 .../truffle/runtime/debug/JFRListener.java | 0 .../runtime/debug/StatisticsListener.java | 0 .../debug/TraceASTCompilationListener.java | 0 .../debug/TraceCompilationListener.java | 0 .../TraceCompilationPolymorphismListener.java | 0 .../runtime/debug/TraceSplittingListener.java | 0 .../AbstractHotSpotTruffleRuntimeAccess.java | 0 .../hotspot/HotSpotFastThreadLocal.java | 0 .../hotspot/HotSpotOptimizedCallTarget.java | 0 .../hotspot/HotSpotThreadLocalHandshake.java | 0 .../hotspot/HotSpotTruffleRuntime.java | 0 .../HotSpotTruffleRuntimeServices.java | 0 .../runtime/hotspot/JVMCIOpenSupport.java | 0 .../java/HotSpotTruffleRuntimeAccess.java | 0 .../LibGraalCompilationResultInfo.java | 0 .../hotspot/libgraal/LibGraalGraphInfo.java | 0 .../LibGraalHotSpotTruffleCompiler.java | 0 .../libgraal/LibGraalScopedHandle.java | 0 .../libgraal/LibGraalStringSupplier.java | 0 .../LibGraalTruffleCompilationSupport.java | 0 .../LibGraalTruffleRuntimeAccess.java | 0 .../TruffleFromLibGraalEntryPoints.java | 0 .../libgraal/TruffleToLibGraalCalls.java | 0 .../TruffleRuntimeServices.java | 0 .../libgraal/DestroyedIsolateException.java | 0 .../src/org/graalvm/libgraal/LibGraal.java | 0 .../org/graalvm/libgraal/LibGraalIsolate.java | 0 .../org/graalvm/libgraal/LibGraalObject.java | 0 .../org/graalvm/libgraal/LibGraalScope.java | 0 114 files changed, 40 insertions(+), 3 deletions(-) create mode 100644 compiler/src/jdk.internal.vm.compiler/src/org/graalvm/libgraal/jni/FromLibGraalId.java rename {compiler/src/jdk.internal.vm.compiler => truffle/src/com.oracle.truffle.compiler}/src/org/graalvm/compiler/truffle/common/ConstantFieldInfo.java (100%) rename {compiler/src/jdk.internal.vm.compiler => truffle/src/com.oracle.truffle.compiler}/src/org/graalvm/compiler/truffle/common/HostMethodInfo.java (100%) rename {compiler/src/jdk.internal.vm.compiler => truffle/src/com.oracle.truffle.compiler}/src/org/graalvm/compiler/truffle/common/OptimizedAssumptionDependency.java (100%) rename {compiler/src/jdk.internal.vm.compiler => truffle/src/com.oracle.truffle.compiler}/src/org/graalvm/compiler/truffle/common/PartialEvaluationMethodInfo.java (100%) rename {compiler/src/jdk.internal.vm.compiler => truffle/src/com.oracle.truffle.compiler}/src/org/graalvm/compiler/truffle/common/TruffleCompilable.java (100%) rename {compiler/src/jdk.internal.vm.compiler => truffle/src/com.oracle.truffle.compiler}/src/org/graalvm/compiler/truffle/common/TruffleCompilationSupport.java (100%) rename {compiler/src/jdk.internal.vm.compiler => truffle/src/com.oracle.truffle.compiler}/src/org/graalvm/compiler/truffle/common/TruffleCompilationTask.java (100%) rename {compiler/src/jdk.internal.vm.compiler => truffle/src/com.oracle.truffle.compiler}/src/org/graalvm/compiler/truffle/common/TruffleCompiler.java (100%) rename {compiler/src/jdk.internal.vm.compiler => truffle/src/com.oracle.truffle.compiler}/src/org/graalvm/compiler/truffle/common/TruffleCompilerAssumptionDependency.java (100%) rename {compiler/src/jdk.internal.vm.compiler => truffle/src/com.oracle.truffle.compiler}/src/org/graalvm/compiler/truffle/common/TruffleCompilerListener.java (100%) rename {compiler/src/jdk.internal.vm.compiler => truffle/src/com.oracle.truffle.compiler}/src/org/graalvm/compiler/truffle/common/TruffleCompilerOptionDescriptor.java (100%) rename {compiler/src/jdk.internal.vm.compiler => truffle/src/com.oracle.truffle.compiler}/src/org/graalvm/compiler/truffle/common/TruffleCompilerRuntime.java (100%) rename {compiler/src/jdk.internal.vm.compiler => truffle/src/com.oracle.truffle.compiler}/src/org/graalvm/compiler/truffle/common/TruffleSourceLanguagePosition.java (100%) rename {compiler/src/jdk.internal.vm.compiler => truffle/src/com.oracle.truffle.compiler}/src/org/graalvm/compiler/truffle/common/hotspot/HotSpotTruffleCompiler.java (100%) rename {compiler/src/jdk.internal.vm.compiler/src/org/graalvm/libgraal/jni/annotation => truffle/src/com.oracle.truffle.compiler/src/org/graalvm/compiler/truffle/common/hotspot/libgraal}/FromLibGraalEntryPointsResolver.java (100%) rename {compiler/src/jdk.internal.vm.compiler/src/org/graalvm/libgraal/jni/annotation => truffle/src/com.oracle.truffle.compiler/src/org/graalvm/compiler/truffle/common/hotspot/libgraal}/FromLibGraalId.java (100%) rename {compiler/src/jdk.internal.vm.compiler => truffle/src/com.oracle.truffle.compiler}/src/org/graalvm/compiler/truffle/common/hotspot/libgraal/TruffleFromLibGraal.java (100%) rename {compiler/src/jdk.internal.vm.compiler => truffle/src/com.oracle.truffle.compiler}/src/org/graalvm/compiler/truffle/common/hotspot/libgraal/TruffleFromLibGraalRepeated.java (100%) rename {compiler/src/jdk.internal.vm.compiler => truffle/src/com.oracle.truffle.compiler}/src/org/graalvm/compiler/truffle/common/hotspot/libgraal/TruffleToLibGraal.java (100%) rename {compiler/src/jdk.internal.vm.compiler/src/org/graalvm/libgraal/jni/annotation => truffle/src/com.oracle.truffle.compiler/src/org/graalvm/compiler/truffle/common/hotspot/libgraal}/Utilities.java (100%) rename {compiler/src/jdk.internal.vm.compiler.truffle.jfr/src => truffle/src/com.oracle.truffle.runtime}/META-INF/services/org.graalvm.compiler.truffle.jfr.EventFactory$Provider (100%) rename {compiler/src/jdk.internal.vm.compiler => truffle/src/com.oracle.truffle.runtime}/src/org/graalvm/compiler/truffle/jfr/CompilationEvent.java (100%) rename {compiler/src/jdk.internal.vm.compiler => truffle/src/com.oracle.truffle.runtime}/src/org/graalvm/compiler/truffle/jfr/CompilationStatisticsEvent.java (100%) rename {compiler/src/jdk.internal.vm.compiler => truffle/src/com.oracle.truffle.runtime}/src/org/graalvm/compiler/truffle/jfr/DeoptimizationEvent.java (100%) rename {compiler/src/jdk.internal.vm.compiler => truffle/src/com.oracle.truffle.runtime}/src/org/graalvm/compiler/truffle/jfr/Event.java (100%) rename {compiler/src/jdk.internal.vm.compiler => truffle/src/com.oracle.truffle.runtime}/src/org/graalvm/compiler/truffle/jfr/EventFactory.java (100%) rename {compiler/src/jdk.internal.vm.compiler => truffle/src/com.oracle.truffle.runtime}/src/org/graalvm/compiler/truffle/jfr/InvalidationEvent.java (100%) rename {compiler/src/jdk.internal.vm.compiler => truffle/src/com.oracle.truffle.runtime}/src/org/graalvm/compiler/truffle/jfr/RootFunctionEvent.java (100%) rename {compiler/src/jdk.internal.vm.compiler.truffle.jfr => truffle/src/com.oracle.truffle.runtime}/src/org/graalvm/compiler/truffle/jfr/impl/CompilationEventImpl.java (100%) rename {compiler/src/jdk.internal.vm.compiler.truffle.jfr => truffle/src/com.oracle.truffle.runtime}/src/org/graalvm/compiler/truffle/jfr/impl/CompilationFailureEventImpl.java (100%) rename {compiler/src/jdk.internal.vm.compiler.truffle.jfr => truffle/src/com.oracle.truffle.runtime}/src/org/graalvm/compiler/truffle/jfr/impl/CompilationStatisticsEventImpl.java (100%) rename {compiler/src/jdk.internal.vm.compiler.truffle.jfr => truffle/src/com.oracle.truffle.runtime}/src/org/graalvm/compiler/truffle/jfr/impl/DeoptimizationEventImpl.java (100%) rename {compiler/src/jdk.internal.vm.compiler.truffle.jfr => truffle/src/com.oracle.truffle.runtime}/src/org/graalvm/compiler/truffle/jfr/impl/EventFactoryImpl.java (100%) rename {compiler/src/jdk.internal.vm.compiler.truffle.jfr => truffle/src/com.oracle.truffle.runtime}/src/org/graalvm/compiler/truffle/jfr/impl/InvalidationEventImpl.java (100%) rename {compiler/src/jdk.internal.vm.compiler.truffle.jfr => truffle/src/com.oracle.truffle.runtime}/src/org/graalvm/compiler/truffle/jfr/impl/ProviderImpl.java (100%) rename {compiler/src/jdk.internal.vm.compiler.truffle.jfr => truffle/src/com.oracle.truffle.runtime}/src/org/graalvm/compiler/truffle/jfr/impl/RootFunctionEventImpl.java (100%) rename {compiler/src/jdk.internal.vm.compiler => truffle/src/com.oracle.truffle.runtime}/src/org/graalvm/compiler/truffle/runtime/AbstractCompilationTask.java (100%) rename {compiler/src/jdk.internal.vm.compiler => truffle/src/com.oracle.truffle.runtime}/src/org/graalvm/compiler/truffle/runtime/AbstractGraalTruffleRuntimeListener.java (100%) rename {compiler/src/jdk.internal.vm.compiler => truffle/src/com.oracle.truffle.runtime}/src/org/graalvm/compiler/truffle/runtime/AbstractOptimizedLoopNode.java (100%) rename {compiler/src/jdk.internal.vm.compiler => truffle/src/com.oracle.truffle.runtime}/src/org/graalvm/compiler/truffle/runtime/BackgroundCompileQueue.java (100%) rename {compiler/src/jdk.internal.vm.compiler => truffle/src/com.oracle.truffle.runtime}/src/org/graalvm/compiler/truffle/runtime/BaseOSRRootNode.java (100%) rename {compiler/src/jdk.internal.vm.compiler => truffle/src/com.oracle.truffle.runtime}/src/org/graalvm/compiler/truffle/runtime/BytecodeOSRMetadata.java (100%) rename {compiler/src/jdk.internal.vm.compiler => truffle/src/com.oracle.truffle.runtime}/src/org/graalvm/compiler/truffle/runtime/BytecodeOSRRootNode.java (100%) rename {compiler/src/jdk.internal.vm.compiler => truffle/src/com.oracle.truffle.runtime}/src/org/graalvm/compiler/truffle/runtime/CompilationState.java (100%) rename {compiler/src/jdk.internal.vm.compiler => truffle/src/com.oracle.truffle.runtime}/src/org/graalvm/compiler/truffle/runtime/CompilationTask.java (100%) rename {compiler/src/jdk.internal.vm.compiler => truffle/src/com.oracle.truffle.runtime}/src/org/graalvm/compiler/truffle/runtime/DefaultLoopNodeFactory.java (100%) rename {compiler/src/jdk.internal.vm.compiler => truffle/src/com.oracle.truffle.runtime}/src/org/graalvm/compiler/truffle/runtime/DynamicThresholdsQueue.java (100%) rename {compiler/src/jdk.internal.vm.compiler => truffle/src/com.oracle.truffle.runtime}/src/org/graalvm/compiler/truffle/runtime/EngineCacheSupport.java (100%) rename {compiler/src/jdk.internal.vm.compiler => truffle/src/com.oracle.truffle.runtime}/src/org/graalvm/compiler/truffle/runtime/EngineData.java (100%) rename {compiler/src/jdk.internal.vm.compiler => truffle/src/com.oracle.truffle.runtime}/src/org/graalvm/compiler/truffle/runtime/FixedPointMath.java (100%) rename {compiler/src/jdk.internal.vm.compiler => truffle/src/com.oracle.truffle.runtime}/src/org/graalvm/compiler/truffle/runtime/FloodControlHandler.java (100%) rename {compiler/src/jdk.internal.vm.compiler => truffle/src/com.oracle.truffle.runtime}/src/org/graalvm/compiler/truffle/runtime/GraalFastThreadLocal.java (100%) rename {compiler/src/jdk.internal.vm.compiler => truffle/src/com.oracle.truffle.runtime}/src/org/graalvm/compiler/truffle/runtime/GraalFrameInstance.java (100%) rename {compiler/src/jdk.internal.vm.compiler => truffle/src/com.oracle.truffle.runtime}/src/org/graalvm/compiler/truffle/runtime/GraalOSRFrameInstance.java (100%) rename {compiler/src/jdk.internal.vm.compiler => truffle/src/com.oracle.truffle.runtime}/src/org/graalvm/compiler/truffle/runtime/GraalRuntimeAccessor.java (100%) rename {compiler/src/jdk.internal.vm.compiler => truffle/src/com.oracle.truffle.runtime}/src/org/graalvm/compiler/truffle/runtime/GraalRuntimeServiceProvider.java (100%) rename {compiler/src/jdk.internal.vm.compiler => truffle/src/com.oracle.truffle.runtime}/src/org/graalvm/compiler/truffle/runtime/GraalRuntimeSupport.java (100%) rename {compiler/src/jdk.internal.vm.compiler => truffle/src/com.oracle.truffle.runtime}/src/org/graalvm/compiler/truffle/runtime/GraalTVMCI.java (100%) rename {compiler/src/jdk.internal.vm.compiler => truffle/src/com.oracle.truffle.runtime}/src/org/graalvm/compiler/truffle/runtime/GraalTestTVMCI.java (100%) rename {compiler/src/jdk.internal.vm.compiler => truffle/src/com.oracle.truffle.runtime}/src/org/graalvm/compiler/truffle/runtime/GraalTruffleRuntime.java (100%) rename {compiler/src/jdk.internal.vm.compiler => truffle/src/com.oracle.truffle.runtime}/src/org/graalvm/compiler/truffle/runtime/GraalTruffleRuntimeListener.java (100%) rename {compiler/src/jdk.internal.vm.compiler => truffle/src/com.oracle.truffle.runtime}/src/org/graalvm/compiler/truffle/runtime/GraalTruffleRuntimeListenerDispatcher.java (100%) rename {compiler/src/jdk.internal.vm.compiler => truffle/src/com.oracle.truffle.runtime}/src/org/graalvm/compiler/truffle/runtime/InlineDecision.java (100%) rename {compiler/src/jdk.internal.vm.compiler => truffle/src/com.oracle.truffle.runtime}/src/org/graalvm/compiler/truffle/runtime/LoopNodeFactory.java (100%) rename {compiler/src/jdk.internal.vm.compiler => truffle/src/com.oracle.truffle.runtime}/src/org/graalvm/compiler/truffle/runtime/ModuleUtil.java (100%) rename {compiler/src/jdk.internal.vm.compiler => truffle/src/com.oracle.truffle.runtime}/src/org/graalvm/compiler/truffle/runtime/OptimizedAssumption.java (100%) rename {compiler/src/jdk.internal.vm.compiler => truffle/src/com.oracle.truffle.runtime}/src/org/graalvm/compiler/truffle/runtime/OptimizedBlockNode.java (100%) rename {compiler/src/jdk.internal.vm.compiler => truffle/src/com.oracle.truffle.runtime}/src/org/graalvm/compiler/truffle/runtime/OptimizedCallTarget.java (100%) rename {compiler/src/jdk.internal.vm.compiler => truffle/src/com.oracle.truffle.runtime}/src/org/graalvm/compiler/truffle/runtime/OptimizedDirectCallNode.java (100%) rename {compiler/src/jdk.internal.vm.compiler => truffle/src/com.oracle.truffle.runtime}/src/org/graalvm/compiler/truffle/runtime/OptimizedIndirectCallNode.java (100%) rename {compiler/src/jdk.internal.vm.compiler => truffle/src/com.oracle.truffle.runtime}/src/org/graalvm/compiler/truffle/runtime/OptimizedLoopNode.java (100%) rename {compiler/src/jdk.internal.vm.compiler => truffle/src/com.oracle.truffle.runtime}/src/org/graalvm/compiler/truffle/runtime/OptimizedOSRLoopNode.java (100%) rename {compiler/src/jdk.internal.vm.compiler => truffle/src/com.oracle.truffle.runtime}/src/org/graalvm/compiler/truffle/runtime/OptimizedRuntimeOptions.java (100%) rename {compiler/src/jdk.internal.vm.compiler => truffle/src/com.oracle.truffle.runtime}/src/org/graalvm/compiler/truffle/runtime/SuppressFBWarnings.java (100%) rename {compiler/src/jdk.internal.vm.compiler => truffle/src/com.oracle.truffle.runtime}/src/org/graalvm/compiler/truffle/runtime/TraversingBlockingQueue.java (100%) rename {compiler/src/jdk.internal.vm.compiler => truffle/src/com.oracle.truffle.runtime}/src/org/graalvm/compiler/truffle/runtime/TruffleCallBoundary.java (100%) rename {compiler/src/jdk.internal.vm.compiler => truffle/src/com.oracle.truffle.runtime}/src/org/graalvm/compiler/truffle/runtime/TruffleInlining.java (100%) rename {compiler/src/jdk.internal.vm.compiler => truffle/src/com.oracle.truffle.runtime}/src/org/graalvm/compiler/truffle/runtime/TruffleSplittingStrategy.java (100%) rename {compiler/src/jdk.internal.vm.compiler => truffle/src/com.oracle.truffle.runtime}/src/org/graalvm/compiler/truffle/runtime/TruffleTypes.java (100%) rename {compiler/src/jdk.internal.vm.compiler => truffle/src/com.oracle.truffle.runtime}/src/org/graalvm/compiler/truffle/runtime/collection/ArrayQueue.java (100%) rename {compiler/src/jdk.internal.vm.compiler => truffle/src/com.oracle.truffle.runtime}/src/org/graalvm/compiler/truffle/runtime/collection/BTreeQueue.java (100%) rename {compiler/src/jdk.internal.vm.compiler => truffle/src/com.oracle.truffle.runtime}/src/org/graalvm/compiler/truffle/runtime/collection/DelegatingBlockingQueue.java (100%) rename {compiler/src/jdk.internal.vm.compiler => truffle/src/com.oracle.truffle.runtime}/src/org/graalvm/compiler/truffle/runtime/collection/SerialQueue.java (100%) rename {compiler/src/jdk.internal.vm.compiler => truffle/src/com.oracle.truffle.runtime}/src/org/graalvm/compiler/truffle/runtime/debug/JFRListener.java (100%) rename {compiler/src/jdk.internal.vm.compiler => truffle/src/com.oracle.truffle.runtime}/src/org/graalvm/compiler/truffle/runtime/debug/StatisticsListener.java (100%) rename {compiler/src/jdk.internal.vm.compiler => truffle/src/com.oracle.truffle.runtime}/src/org/graalvm/compiler/truffle/runtime/debug/TraceASTCompilationListener.java (100%) rename {compiler/src/jdk.internal.vm.compiler => truffle/src/com.oracle.truffle.runtime}/src/org/graalvm/compiler/truffle/runtime/debug/TraceCompilationListener.java (100%) rename {compiler/src/jdk.internal.vm.compiler => truffle/src/com.oracle.truffle.runtime}/src/org/graalvm/compiler/truffle/runtime/debug/TraceCompilationPolymorphismListener.java (100%) rename {compiler/src/jdk.internal.vm.compiler => truffle/src/com.oracle.truffle.runtime}/src/org/graalvm/compiler/truffle/runtime/debug/TraceSplittingListener.java (100%) rename {compiler/src/jdk.internal.vm.compiler => truffle/src/com.oracle.truffle.runtime}/src/org/graalvm/compiler/truffle/runtime/hotspot/AbstractHotSpotTruffleRuntimeAccess.java (100%) rename {compiler/src/jdk.internal.vm.compiler => truffle/src/com.oracle.truffle.runtime}/src/org/graalvm/compiler/truffle/runtime/hotspot/HotSpotFastThreadLocal.java (100%) rename {compiler/src/jdk.internal.vm.compiler => truffle/src/com.oracle.truffle.runtime}/src/org/graalvm/compiler/truffle/runtime/hotspot/HotSpotOptimizedCallTarget.java (100%) rename {compiler/src/jdk.internal.vm.compiler => truffle/src/com.oracle.truffle.runtime}/src/org/graalvm/compiler/truffle/runtime/hotspot/HotSpotThreadLocalHandshake.java (100%) rename {compiler/src/jdk.internal.vm.compiler => truffle/src/com.oracle.truffle.runtime}/src/org/graalvm/compiler/truffle/runtime/hotspot/HotSpotTruffleRuntime.java (100%) rename {compiler/src/jdk.internal.vm.compiler => truffle/src/com.oracle.truffle.runtime}/src/org/graalvm/compiler/truffle/runtime/hotspot/HotSpotTruffleRuntimeServices.java (100%) rename {compiler/src/jdk.internal.vm.compiler => truffle/src/com.oracle.truffle.runtime}/src/org/graalvm/compiler/truffle/runtime/hotspot/JVMCIOpenSupport.java (100%) rename {compiler/src/jdk.internal.vm.compiler => truffle/src/com.oracle.truffle.runtime}/src/org/graalvm/compiler/truffle/runtime/hotspot/java/HotSpotTruffleRuntimeAccess.java (100%) rename {compiler/src/jdk.internal.vm.compiler => truffle/src/com.oracle.truffle.runtime}/src/org/graalvm/compiler/truffle/runtime/hotspot/libgraal/LibGraalCompilationResultInfo.java (100%) rename {compiler/src/jdk.internal.vm.compiler => truffle/src/com.oracle.truffle.runtime}/src/org/graalvm/compiler/truffle/runtime/hotspot/libgraal/LibGraalGraphInfo.java (100%) rename {compiler/src/jdk.internal.vm.compiler => truffle/src/com.oracle.truffle.runtime}/src/org/graalvm/compiler/truffle/runtime/hotspot/libgraal/LibGraalHotSpotTruffleCompiler.java (100%) rename {compiler/src/jdk.internal.vm.compiler => truffle/src/com.oracle.truffle.runtime}/src/org/graalvm/compiler/truffle/runtime/hotspot/libgraal/LibGraalScopedHandle.java (100%) rename {compiler/src/jdk.internal.vm.compiler => truffle/src/com.oracle.truffle.runtime}/src/org/graalvm/compiler/truffle/runtime/hotspot/libgraal/LibGraalStringSupplier.java (100%) rename {compiler/src/jdk.internal.vm.compiler => truffle/src/com.oracle.truffle.runtime}/src/org/graalvm/compiler/truffle/runtime/hotspot/libgraal/LibGraalTruffleCompilationSupport.java (100%) rename {compiler/src/jdk.internal.vm.compiler => truffle/src/com.oracle.truffle.runtime}/src/org/graalvm/compiler/truffle/runtime/hotspot/libgraal/LibGraalTruffleRuntimeAccess.java (100%) rename {compiler/src/jdk.internal.vm.compiler => truffle/src/com.oracle.truffle.runtime}/src/org/graalvm/compiler/truffle/runtime/hotspot/libgraal/TruffleFromLibGraalEntryPoints.java (100%) rename {compiler/src/jdk.internal.vm.compiler => truffle/src/com.oracle.truffle.runtime}/src/org/graalvm/compiler/truffle/runtime/hotspot/libgraal/TruffleToLibGraalCalls.java (100%) rename {compiler/src/jdk.internal.vm.compiler => truffle/src/com.oracle.truffle.runtime}/src/org/graalvm/compiler/truffle/runtime/serviceprovider/TruffleRuntimeServices.java (100%) rename {compiler/src/jdk.internal.vm.compiler => truffle/src/com.oracle.truffle.runtime}/src/org/graalvm/libgraal/DestroyedIsolateException.java (100%) rename {compiler/src/jdk.internal.vm.compiler => truffle/src/com.oracle.truffle.runtime}/src/org/graalvm/libgraal/LibGraal.java (100%) rename {compiler/src/jdk.internal.vm.compiler => truffle/src/com.oracle.truffle.runtime}/src/org/graalvm/libgraal/LibGraalIsolate.java (100%) rename {compiler/src/jdk.internal.vm.compiler => truffle/src/com.oracle.truffle.runtime}/src/org/graalvm/libgraal/LibGraalObject.java (100%) rename {compiler/src/jdk.internal.vm.compiler => truffle/src/com.oracle.truffle.runtime}/src/org/graalvm/libgraal/LibGraalScope.java (100%) diff --git a/compiler/src/jdk.internal.vm.compiler/src/org/graalvm/libgraal/jni/FromLibGraalCalls.java b/compiler/src/jdk.internal.vm.compiler/src/org/graalvm/libgraal/jni/FromLibGraalCalls.java index 4169edf42e57..1d7610c375cb 100644 --- a/compiler/src/jdk.internal.vm.compiler/src/org/graalvm/libgraal/jni/FromLibGraalCalls.java +++ b/compiler/src/jdk.internal.vm.compiler/src/org/graalvm/libgraal/jni/FromLibGraalCalls.java @@ -25,9 +25,6 @@ package org.graalvm.libgraal.jni; import static org.graalvm.jniutils.JNIExceptionWrapper.wrapAndThrowPendingJNIException; - -import org.graalvm.jniutils.JNICalls; -import org.graalvm.libgraal.jni.annotation.FromLibGraalId; import static org.graalvm.jniutils.JNIUtil.GetStaticMethodID; import static org.graalvm.jniutils.JNIUtil.NewGlobalRef; import static org.graalvm.jniutils.JNIUtil.getBinaryName; @@ -44,6 +41,7 @@ import org.graalvm.jniutils.JNI.JNIEnv; import org.graalvm.jniutils.JNI.JObject; import org.graalvm.jniutils.JNI.JValue; +import org.graalvm.jniutils.JNICalls; import org.graalvm.jniutils.JNIUtil; import org.graalvm.nativeimage.c.type.CTypeConversion.CCharPointerHolder; diff --git a/compiler/src/jdk.internal.vm.compiler/src/org/graalvm/libgraal/jni/FromLibGraalId.java b/compiler/src/jdk.internal.vm.compiler/src/org/graalvm/libgraal/jni/FromLibGraalId.java new file mode 100644 index 000000000000..71054451fb4a --- /dev/null +++ b/compiler/src/jdk.internal.vm.compiler/src/org/graalvm/libgraal/jni/FromLibGraalId.java @@ -0,0 +1,39 @@ +/* + * Copyright (c) 2020, 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. Oracle designates this + * particular file as subject to the "Classpath" exception as provided + * by Oracle in the LICENSE file that accompanied this code. + * + * 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 org.graalvm.libgraal.jni; + +public interface FromLibGraalId { + + String getName(); + + String getSignature(); + + String getMethodName(); + + Class[] getParameterTypes(); + + Class getReturnType(); + +} diff --git a/compiler/src/jdk.internal.vm.compiler/src/org/graalvm/compiler/truffle/common/ConstantFieldInfo.java b/truffle/src/com.oracle.truffle.compiler/src/org/graalvm/compiler/truffle/common/ConstantFieldInfo.java similarity index 100% rename from compiler/src/jdk.internal.vm.compiler/src/org/graalvm/compiler/truffle/common/ConstantFieldInfo.java rename to truffle/src/com.oracle.truffle.compiler/src/org/graalvm/compiler/truffle/common/ConstantFieldInfo.java diff --git a/compiler/src/jdk.internal.vm.compiler/src/org/graalvm/compiler/truffle/common/HostMethodInfo.java b/truffle/src/com.oracle.truffle.compiler/src/org/graalvm/compiler/truffle/common/HostMethodInfo.java similarity index 100% rename from compiler/src/jdk.internal.vm.compiler/src/org/graalvm/compiler/truffle/common/HostMethodInfo.java rename to truffle/src/com.oracle.truffle.compiler/src/org/graalvm/compiler/truffle/common/HostMethodInfo.java diff --git a/compiler/src/jdk.internal.vm.compiler/src/org/graalvm/compiler/truffle/common/OptimizedAssumptionDependency.java b/truffle/src/com.oracle.truffle.compiler/src/org/graalvm/compiler/truffle/common/OptimizedAssumptionDependency.java similarity index 100% rename from compiler/src/jdk.internal.vm.compiler/src/org/graalvm/compiler/truffle/common/OptimizedAssumptionDependency.java rename to truffle/src/com.oracle.truffle.compiler/src/org/graalvm/compiler/truffle/common/OptimizedAssumptionDependency.java diff --git a/compiler/src/jdk.internal.vm.compiler/src/org/graalvm/compiler/truffle/common/PartialEvaluationMethodInfo.java b/truffle/src/com.oracle.truffle.compiler/src/org/graalvm/compiler/truffle/common/PartialEvaluationMethodInfo.java similarity index 100% rename from compiler/src/jdk.internal.vm.compiler/src/org/graalvm/compiler/truffle/common/PartialEvaluationMethodInfo.java rename to truffle/src/com.oracle.truffle.compiler/src/org/graalvm/compiler/truffle/common/PartialEvaluationMethodInfo.java diff --git a/compiler/src/jdk.internal.vm.compiler/src/org/graalvm/compiler/truffle/common/TruffleCompilable.java b/truffle/src/com.oracle.truffle.compiler/src/org/graalvm/compiler/truffle/common/TruffleCompilable.java similarity index 100% rename from compiler/src/jdk.internal.vm.compiler/src/org/graalvm/compiler/truffle/common/TruffleCompilable.java rename to truffle/src/com.oracle.truffle.compiler/src/org/graalvm/compiler/truffle/common/TruffleCompilable.java diff --git a/compiler/src/jdk.internal.vm.compiler/src/org/graalvm/compiler/truffle/common/TruffleCompilationSupport.java b/truffle/src/com.oracle.truffle.compiler/src/org/graalvm/compiler/truffle/common/TruffleCompilationSupport.java similarity index 100% rename from compiler/src/jdk.internal.vm.compiler/src/org/graalvm/compiler/truffle/common/TruffleCompilationSupport.java rename to truffle/src/com.oracle.truffle.compiler/src/org/graalvm/compiler/truffle/common/TruffleCompilationSupport.java diff --git a/compiler/src/jdk.internal.vm.compiler/src/org/graalvm/compiler/truffle/common/TruffleCompilationTask.java b/truffle/src/com.oracle.truffle.compiler/src/org/graalvm/compiler/truffle/common/TruffleCompilationTask.java similarity index 100% rename from compiler/src/jdk.internal.vm.compiler/src/org/graalvm/compiler/truffle/common/TruffleCompilationTask.java rename to truffle/src/com.oracle.truffle.compiler/src/org/graalvm/compiler/truffle/common/TruffleCompilationTask.java diff --git a/compiler/src/jdk.internal.vm.compiler/src/org/graalvm/compiler/truffle/common/TruffleCompiler.java b/truffle/src/com.oracle.truffle.compiler/src/org/graalvm/compiler/truffle/common/TruffleCompiler.java similarity index 100% rename from compiler/src/jdk.internal.vm.compiler/src/org/graalvm/compiler/truffle/common/TruffleCompiler.java rename to truffle/src/com.oracle.truffle.compiler/src/org/graalvm/compiler/truffle/common/TruffleCompiler.java diff --git a/compiler/src/jdk.internal.vm.compiler/src/org/graalvm/compiler/truffle/common/TruffleCompilerAssumptionDependency.java b/truffle/src/com.oracle.truffle.compiler/src/org/graalvm/compiler/truffle/common/TruffleCompilerAssumptionDependency.java similarity index 100% rename from compiler/src/jdk.internal.vm.compiler/src/org/graalvm/compiler/truffle/common/TruffleCompilerAssumptionDependency.java rename to truffle/src/com.oracle.truffle.compiler/src/org/graalvm/compiler/truffle/common/TruffleCompilerAssumptionDependency.java diff --git a/compiler/src/jdk.internal.vm.compiler/src/org/graalvm/compiler/truffle/common/TruffleCompilerListener.java b/truffle/src/com.oracle.truffle.compiler/src/org/graalvm/compiler/truffle/common/TruffleCompilerListener.java similarity index 100% rename from compiler/src/jdk.internal.vm.compiler/src/org/graalvm/compiler/truffle/common/TruffleCompilerListener.java rename to truffle/src/com.oracle.truffle.compiler/src/org/graalvm/compiler/truffle/common/TruffleCompilerListener.java diff --git a/compiler/src/jdk.internal.vm.compiler/src/org/graalvm/compiler/truffle/common/TruffleCompilerOptionDescriptor.java b/truffle/src/com.oracle.truffle.compiler/src/org/graalvm/compiler/truffle/common/TruffleCompilerOptionDescriptor.java similarity index 100% rename from compiler/src/jdk.internal.vm.compiler/src/org/graalvm/compiler/truffle/common/TruffleCompilerOptionDescriptor.java rename to truffle/src/com.oracle.truffle.compiler/src/org/graalvm/compiler/truffle/common/TruffleCompilerOptionDescriptor.java diff --git a/compiler/src/jdk.internal.vm.compiler/src/org/graalvm/compiler/truffle/common/TruffleCompilerRuntime.java b/truffle/src/com.oracle.truffle.compiler/src/org/graalvm/compiler/truffle/common/TruffleCompilerRuntime.java similarity index 100% rename from compiler/src/jdk.internal.vm.compiler/src/org/graalvm/compiler/truffle/common/TruffleCompilerRuntime.java rename to truffle/src/com.oracle.truffle.compiler/src/org/graalvm/compiler/truffle/common/TruffleCompilerRuntime.java diff --git a/compiler/src/jdk.internal.vm.compiler/src/org/graalvm/compiler/truffle/common/TruffleSourceLanguagePosition.java b/truffle/src/com.oracle.truffle.compiler/src/org/graalvm/compiler/truffle/common/TruffleSourceLanguagePosition.java similarity index 100% rename from compiler/src/jdk.internal.vm.compiler/src/org/graalvm/compiler/truffle/common/TruffleSourceLanguagePosition.java rename to truffle/src/com.oracle.truffle.compiler/src/org/graalvm/compiler/truffle/common/TruffleSourceLanguagePosition.java diff --git a/compiler/src/jdk.internal.vm.compiler/src/org/graalvm/compiler/truffle/common/hotspot/HotSpotTruffleCompiler.java b/truffle/src/com.oracle.truffle.compiler/src/org/graalvm/compiler/truffle/common/hotspot/HotSpotTruffleCompiler.java similarity index 100% rename from compiler/src/jdk.internal.vm.compiler/src/org/graalvm/compiler/truffle/common/hotspot/HotSpotTruffleCompiler.java rename to truffle/src/com.oracle.truffle.compiler/src/org/graalvm/compiler/truffle/common/hotspot/HotSpotTruffleCompiler.java diff --git a/compiler/src/jdk.internal.vm.compiler/src/org/graalvm/libgraal/jni/annotation/FromLibGraalEntryPointsResolver.java b/truffle/src/com.oracle.truffle.compiler/src/org/graalvm/compiler/truffle/common/hotspot/libgraal/FromLibGraalEntryPointsResolver.java similarity index 100% rename from compiler/src/jdk.internal.vm.compiler/src/org/graalvm/libgraal/jni/annotation/FromLibGraalEntryPointsResolver.java rename to truffle/src/com.oracle.truffle.compiler/src/org/graalvm/compiler/truffle/common/hotspot/libgraal/FromLibGraalEntryPointsResolver.java diff --git a/compiler/src/jdk.internal.vm.compiler/src/org/graalvm/libgraal/jni/annotation/FromLibGraalId.java b/truffle/src/com.oracle.truffle.compiler/src/org/graalvm/compiler/truffle/common/hotspot/libgraal/FromLibGraalId.java similarity index 100% rename from compiler/src/jdk.internal.vm.compiler/src/org/graalvm/libgraal/jni/annotation/FromLibGraalId.java rename to truffle/src/com.oracle.truffle.compiler/src/org/graalvm/compiler/truffle/common/hotspot/libgraal/FromLibGraalId.java diff --git a/compiler/src/jdk.internal.vm.compiler/src/org/graalvm/compiler/truffle/common/hotspot/libgraal/TruffleFromLibGraal.java b/truffle/src/com.oracle.truffle.compiler/src/org/graalvm/compiler/truffle/common/hotspot/libgraal/TruffleFromLibGraal.java similarity index 100% rename from compiler/src/jdk.internal.vm.compiler/src/org/graalvm/compiler/truffle/common/hotspot/libgraal/TruffleFromLibGraal.java rename to truffle/src/com.oracle.truffle.compiler/src/org/graalvm/compiler/truffle/common/hotspot/libgraal/TruffleFromLibGraal.java diff --git a/compiler/src/jdk.internal.vm.compiler/src/org/graalvm/compiler/truffle/common/hotspot/libgraal/TruffleFromLibGraalRepeated.java b/truffle/src/com.oracle.truffle.compiler/src/org/graalvm/compiler/truffle/common/hotspot/libgraal/TruffleFromLibGraalRepeated.java similarity index 100% rename from compiler/src/jdk.internal.vm.compiler/src/org/graalvm/compiler/truffle/common/hotspot/libgraal/TruffleFromLibGraalRepeated.java rename to truffle/src/com.oracle.truffle.compiler/src/org/graalvm/compiler/truffle/common/hotspot/libgraal/TruffleFromLibGraalRepeated.java diff --git a/compiler/src/jdk.internal.vm.compiler/src/org/graalvm/compiler/truffle/common/hotspot/libgraal/TruffleToLibGraal.java b/truffle/src/com.oracle.truffle.compiler/src/org/graalvm/compiler/truffle/common/hotspot/libgraal/TruffleToLibGraal.java similarity index 100% rename from compiler/src/jdk.internal.vm.compiler/src/org/graalvm/compiler/truffle/common/hotspot/libgraal/TruffleToLibGraal.java rename to truffle/src/com.oracle.truffle.compiler/src/org/graalvm/compiler/truffle/common/hotspot/libgraal/TruffleToLibGraal.java diff --git a/compiler/src/jdk.internal.vm.compiler/src/org/graalvm/libgraal/jni/annotation/Utilities.java b/truffle/src/com.oracle.truffle.compiler/src/org/graalvm/compiler/truffle/common/hotspot/libgraal/Utilities.java similarity index 100% rename from compiler/src/jdk.internal.vm.compiler/src/org/graalvm/libgraal/jni/annotation/Utilities.java rename to truffle/src/com.oracle.truffle.compiler/src/org/graalvm/compiler/truffle/common/hotspot/libgraal/Utilities.java diff --git a/compiler/src/jdk.internal.vm.compiler.truffle.jfr/src/META-INF/services/org.graalvm.compiler.truffle.jfr.EventFactory$Provider b/truffle/src/com.oracle.truffle.runtime/META-INF/services/org.graalvm.compiler.truffle.jfr.EventFactory$Provider similarity index 100% rename from compiler/src/jdk.internal.vm.compiler.truffle.jfr/src/META-INF/services/org.graalvm.compiler.truffle.jfr.EventFactory$Provider rename to truffle/src/com.oracle.truffle.runtime/META-INF/services/org.graalvm.compiler.truffle.jfr.EventFactory$Provider diff --git a/compiler/src/jdk.internal.vm.compiler/src/org/graalvm/compiler/truffle/jfr/CompilationEvent.java b/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/jfr/CompilationEvent.java similarity index 100% rename from compiler/src/jdk.internal.vm.compiler/src/org/graalvm/compiler/truffle/jfr/CompilationEvent.java rename to truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/jfr/CompilationEvent.java diff --git a/compiler/src/jdk.internal.vm.compiler/src/org/graalvm/compiler/truffle/jfr/CompilationStatisticsEvent.java b/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/jfr/CompilationStatisticsEvent.java similarity index 100% rename from compiler/src/jdk.internal.vm.compiler/src/org/graalvm/compiler/truffle/jfr/CompilationStatisticsEvent.java rename to truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/jfr/CompilationStatisticsEvent.java diff --git a/compiler/src/jdk.internal.vm.compiler/src/org/graalvm/compiler/truffle/jfr/DeoptimizationEvent.java b/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/jfr/DeoptimizationEvent.java similarity index 100% rename from compiler/src/jdk.internal.vm.compiler/src/org/graalvm/compiler/truffle/jfr/DeoptimizationEvent.java rename to truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/jfr/DeoptimizationEvent.java diff --git a/compiler/src/jdk.internal.vm.compiler/src/org/graalvm/compiler/truffle/jfr/Event.java b/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/jfr/Event.java similarity index 100% rename from compiler/src/jdk.internal.vm.compiler/src/org/graalvm/compiler/truffle/jfr/Event.java rename to truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/jfr/Event.java diff --git a/compiler/src/jdk.internal.vm.compiler/src/org/graalvm/compiler/truffle/jfr/EventFactory.java b/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/jfr/EventFactory.java similarity index 100% rename from compiler/src/jdk.internal.vm.compiler/src/org/graalvm/compiler/truffle/jfr/EventFactory.java rename to truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/jfr/EventFactory.java diff --git a/compiler/src/jdk.internal.vm.compiler/src/org/graalvm/compiler/truffle/jfr/InvalidationEvent.java b/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/jfr/InvalidationEvent.java similarity index 100% rename from compiler/src/jdk.internal.vm.compiler/src/org/graalvm/compiler/truffle/jfr/InvalidationEvent.java rename to truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/jfr/InvalidationEvent.java diff --git a/compiler/src/jdk.internal.vm.compiler/src/org/graalvm/compiler/truffle/jfr/RootFunctionEvent.java b/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/jfr/RootFunctionEvent.java similarity index 100% rename from compiler/src/jdk.internal.vm.compiler/src/org/graalvm/compiler/truffle/jfr/RootFunctionEvent.java rename to truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/jfr/RootFunctionEvent.java diff --git a/compiler/src/jdk.internal.vm.compiler.truffle.jfr/src/org/graalvm/compiler/truffle/jfr/impl/CompilationEventImpl.java b/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/jfr/impl/CompilationEventImpl.java similarity index 100% rename from compiler/src/jdk.internal.vm.compiler.truffle.jfr/src/org/graalvm/compiler/truffle/jfr/impl/CompilationEventImpl.java rename to truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/jfr/impl/CompilationEventImpl.java diff --git a/compiler/src/jdk.internal.vm.compiler.truffle.jfr/src/org/graalvm/compiler/truffle/jfr/impl/CompilationFailureEventImpl.java b/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/jfr/impl/CompilationFailureEventImpl.java similarity index 100% rename from compiler/src/jdk.internal.vm.compiler.truffle.jfr/src/org/graalvm/compiler/truffle/jfr/impl/CompilationFailureEventImpl.java rename to truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/jfr/impl/CompilationFailureEventImpl.java diff --git a/compiler/src/jdk.internal.vm.compiler.truffle.jfr/src/org/graalvm/compiler/truffle/jfr/impl/CompilationStatisticsEventImpl.java b/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/jfr/impl/CompilationStatisticsEventImpl.java similarity index 100% rename from compiler/src/jdk.internal.vm.compiler.truffle.jfr/src/org/graalvm/compiler/truffle/jfr/impl/CompilationStatisticsEventImpl.java rename to truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/jfr/impl/CompilationStatisticsEventImpl.java diff --git a/compiler/src/jdk.internal.vm.compiler.truffle.jfr/src/org/graalvm/compiler/truffle/jfr/impl/DeoptimizationEventImpl.java b/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/jfr/impl/DeoptimizationEventImpl.java similarity index 100% rename from compiler/src/jdk.internal.vm.compiler.truffle.jfr/src/org/graalvm/compiler/truffle/jfr/impl/DeoptimizationEventImpl.java rename to truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/jfr/impl/DeoptimizationEventImpl.java diff --git a/compiler/src/jdk.internal.vm.compiler.truffle.jfr/src/org/graalvm/compiler/truffle/jfr/impl/EventFactoryImpl.java b/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/jfr/impl/EventFactoryImpl.java similarity index 100% rename from compiler/src/jdk.internal.vm.compiler.truffle.jfr/src/org/graalvm/compiler/truffle/jfr/impl/EventFactoryImpl.java rename to truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/jfr/impl/EventFactoryImpl.java diff --git a/compiler/src/jdk.internal.vm.compiler.truffle.jfr/src/org/graalvm/compiler/truffle/jfr/impl/InvalidationEventImpl.java b/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/jfr/impl/InvalidationEventImpl.java similarity index 100% rename from compiler/src/jdk.internal.vm.compiler.truffle.jfr/src/org/graalvm/compiler/truffle/jfr/impl/InvalidationEventImpl.java rename to truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/jfr/impl/InvalidationEventImpl.java diff --git a/compiler/src/jdk.internal.vm.compiler.truffle.jfr/src/org/graalvm/compiler/truffle/jfr/impl/ProviderImpl.java b/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/jfr/impl/ProviderImpl.java similarity index 100% rename from compiler/src/jdk.internal.vm.compiler.truffle.jfr/src/org/graalvm/compiler/truffle/jfr/impl/ProviderImpl.java rename to truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/jfr/impl/ProviderImpl.java diff --git a/compiler/src/jdk.internal.vm.compiler.truffle.jfr/src/org/graalvm/compiler/truffle/jfr/impl/RootFunctionEventImpl.java b/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/jfr/impl/RootFunctionEventImpl.java similarity index 100% rename from compiler/src/jdk.internal.vm.compiler.truffle.jfr/src/org/graalvm/compiler/truffle/jfr/impl/RootFunctionEventImpl.java rename to truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/jfr/impl/RootFunctionEventImpl.java diff --git a/compiler/src/jdk.internal.vm.compiler/src/org/graalvm/compiler/truffle/runtime/AbstractCompilationTask.java b/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/AbstractCompilationTask.java similarity index 100% rename from compiler/src/jdk.internal.vm.compiler/src/org/graalvm/compiler/truffle/runtime/AbstractCompilationTask.java rename to truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/AbstractCompilationTask.java diff --git a/compiler/src/jdk.internal.vm.compiler/src/org/graalvm/compiler/truffle/runtime/AbstractGraalTruffleRuntimeListener.java b/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/AbstractGraalTruffleRuntimeListener.java similarity index 100% rename from compiler/src/jdk.internal.vm.compiler/src/org/graalvm/compiler/truffle/runtime/AbstractGraalTruffleRuntimeListener.java rename to truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/AbstractGraalTruffleRuntimeListener.java diff --git a/compiler/src/jdk.internal.vm.compiler/src/org/graalvm/compiler/truffle/runtime/AbstractOptimizedLoopNode.java b/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/AbstractOptimizedLoopNode.java similarity index 100% rename from compiler/src/jdk.internal.vm.compiler/src/org/graalvm/compiler/truffle/runtime/AbstractOptimizedLoopNode.java rename to truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/AbstractOptimizedLoopNode.java diff --git a/compiler/src/jdk.internal.vm.compiler/src/org/graalvm/compiler/truffle/runtime/BackgroundCompileQueue.java b/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/BackgroundCompileQueue.java similarity index 100% rename from compiler/src/jdk.internal.vm.compiler/src/org/graalvm/compiler/truffle/runtime/BackgroundCompileQueue.java rename to truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/BackgroundCompileQueue.java diff --git a/compiler/src/jdk.internal.vm.compiler/src/org/graalvm/compiler/truffle/runtime/BaseOSRRootNode.java b/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/BaseOSRRootNode.java similarity index 100% rename from compiler/src/jdk.internal.vm.compiler/src/org/graalvm/compiler/truffle/runtime/BaseOSRRootNode.java rename to truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/BaseOSRRootNode.java diff --git a/compiler/src/jdk.internal.vm.compiler/src/org/graalvm/compiler/truffle/runtime/BytecodeOSRMetadata.java b/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/BytecodeOSRMetadata.java similarity index 100% rename from compiler/src/jdk.internal.vm.compiler/src/org/graalvm/compiler/truffle/runtime/BytecodeOSRMetadata.java rename to truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/BytecodeOSRMetadata.java diff --git a/compiler/src/jdk.internal.vm.compiler/src/org/graalvm/compiler/truffle/runtime/BytecodeOSRRootNode.java b/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/BytecodeOSRRootNode.java similarity index 100% rename from compiler/src/jdk.internal.vm.compiler/src/org/graalvm/compiler/truffle/runtime/BytecodeOSRRootNode.java rename to truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/BytecodeOSRRootNode.java diff --git a/compiler/src/jdk.internal.vm.compiler/src/org/graalvm/compiler/truffle/runtime/CompilationState.java b/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/CompilationState.java similarity index 100% rename from compiler/src/jdk.internal.vm.compiler/src/org/graalvm/compiler/truffle/runtime/CompilationState.java rename to truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/CompilationState.java diff --git a/compiler/src/jdk.internal.vm.compiler/src/org/graalvm/compiler/truffle/runtime/CompilationTask.java b/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/CompilationTask.java similarity index 100% rename from compiler/src/jdk.internal.vm.compiler/src/org/graalvm/compiler/truffle/runtime/CompilationTask.java rename to truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/CompilationTask.java diff --git a/compiler/src/jdk.internal.vm.compiler/src/org/graalvm/compiler/truffle/runtime/DefaultLoopNodeFactory.java b/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/DefaultLoopNodeFactory.java similarity index 100% rename from compiler/src/jdk.internal.vm.compiler/src/org/graalvm/compiler/truffle/runtime/DefaultLoopNodeFactory.java rename to truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/DefaultLoopNodeFactory.java diff --git a/compiler/src/jdk.internal.vm.compiler/src/org/graalvm/compiler/truffle/runtime/DynamicThresholdsQueue.java b/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/DynamicThresholdsQueue.java similarity index 100% rename from compiler/src/jdk.internal.vm.compiler/src/org/graalvm/compiler/truffle/runtime/DynamicThresholdsQueue.java rename to truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/DynamicThresholdsQueue.java diff --git a/compiler/src/jdk.internal.vm.compiler/src/org/graalvm/compiler/truffle/runtime/EngineCacheSupport.java b/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/EngineCacheSupport.java similarity index 100% rename from compiler/src/jdk.internal.vm.compiler/src/org/graalvm/compiler/truffle/runtime/EngineCacheSupport.java rename to truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/EngineCacheSupport.java diff --git a/compiler/src/jdk.internal.vm.compiler/src/org/graalvm/compiler/truffle/runtime/EngineData.java b/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/EngineData.java similarity index 100% rename from compiler/src/jdk.internal.vm.compiler/src/org/graalvm/compiler/truffle/runtime/EngineData.java rename to truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/EngineData.java diff --git a/compiler/src/jdk.internal.vm.compiler/src/org/graalvm/compiler/truffle/runtime/FixedPointMath.java b/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/FixedPointMath.java similarity index 100% rename from compiler/src/jdk.internal.vm.compiler/src/org/graalvm/compiler/truffle/runtime/FixedPointMath.java rename to truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/FixedPointMath.java diff --git a/compiler/src/jdk.internal.vm.compiler/src/org/graalvm/compiler/truffle/runtime/FloodControlHandler.java b/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/FloodControlHandler.java similarity index 100% rename from compiler/src/jdk.internal.vm.compiler/src/org/graalvm/compiler/truffle/runtime/FloodControlHandler.java rename to truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/FloodControlHandler.java diff --git a/compiler/src/jdk.internal.vm.compiler/src/org/graalvm/compiler/truffle/runtime/GraalFastThreadLocal.java b/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/GraalFastThreadLocal.java similarity index 100% rename from compiler/src/jdk.internal.vm.compiler/src/org/graalvm/compiler/truffle/runtime/GraalFastThreadLocal.java rename to truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/GraalFastThreadLocal.java diff --git a/compiler/src/jdk.internal.vm.compiler/src/org/graalvm/compiler/truffle/runtime/GraalFrameInstance.java b/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/GraalFrameInstance.java similarity index 100% rename from compiler/src/jdk.internal.vm.compiler/src/org/graalvm/compiler/truffle/runtime/GraalFrameInstance.java rename to truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/GraalFrameInstance.java diff --git a/compiler/src/jdk.internal.vm.compiler/src/org/graalvm/compiler/truffle/runtime/GraalOSRFrameInstance.java b/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/GraalOSRFrameInstance.java similarity index 100% rename from compiler/src/jdk.internal.vm.compiler/src/org/graalvm/compiler/truffle/runtime/GraalOSRFrameInstance.java rename to truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/GraalOSRFrameInstance.java diff --git a/compiler/src/jdk.internal.vm.compiler/src/org/graalvm/compiler/truffle/runtime/GraalRuntimeAccessor.java b/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/GraalRuntimeAccessor.java similarity index 100% rename from compiler/src/jdk.internal.vm.compiler/src/org/graalvm/compiler/truffle/runtime/GraalRuntimeAccessor.java rename to truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/GraalRuntimeAccessor.java diff --git a/compiler/src/jdk.internal.vm.compiler/src/org/graalvm/compiler/truffle/runtime/GraalRuntimeServiceProvider.java b/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/GraalRuntimeServiceProvider.java similarity index 100% rename from compiler/src/jdk.internal.vm.compiler/src/org/graalvm/compiler/truffle/runtime/GraalRuntimeServiceProvider.java rename to truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/GraalRuntimeServiceProvider.java diff --git a/compiler/src/jdk.internal.vm.compiler/src/org/graalvm/compiler/truffle/runtime/GraalRuntimeSupport.java b/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/GraalRuntimeSupport.java similarity index 100% rename from compiler/src/jdk.internal.vm.compiler/src/org/graalvm/compiler/truffle/runtime/GraalRuntimeSupport.java rename to truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/GraalRuntimeSupport.java diff --git a/compiler/src/jdk.internal.vm.compiler/src/org/graalvm/compiler/truffle/runtime/GraalTVMCI.java b/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/GraalTVMCI.java similarity index 100% rename from compiler/src/jdk.internal.vm.compiler/src/org/graalvm/compiler/truffle/runtime/GraalTVMCI.java rename to truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/GraalTVMCI.java diff --git a/compiler/src/jdk.internal.vm.compiler/src/org/graalvm/compiler/truffle/runtime/GraalTestTVMCI.java b/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/GraalTestTVMCI.java similarity index 100% rename from compiler/src/jdk.internal.vm.compiler/src/org/graalvm/compiler/truffle/runtime/GraalTestTVMCI.java rename to truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/GraalTestTVMCI.java diff --git a/compiler/src/jdk.internal.vm.compiler/src/org/graalvm/compiler/truffle/runtime/GraalTruffleRuntime.java b/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/GraalTruffleRuntime.java similarity index 100% rename from compiler/src/jdk.internal.vm.compiler/src/org/graalvm/compiler/truffle/runtime/GraalTruffleRuntime.java rename to truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/GraalTruffleRuntime.java diff --git a/compiler/src/jdk.internal.vm.compiler/src/org/graalvm/compiler/truffle/runtime/GraalTruffleRuntimeListener.java b/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/GraalTruffleRuntimeListener.java similarity index 100% rename from compiler/src/jdk.internal.vm.compiler/src/org/graalvm/compiler/truffle/runtime/GraalTruffleRuntimeListener.java rename to truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/GraalTruffleRuntimeListener.java diff --git a/compiler/src/jdk.internal.vm.compiler/src/org/graalvm/compiler/truffle/runtime/GraalTruffleRuntimeListenerDispatcher.java b/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/GraalTruffleRuntimeListenerDispatcher.java similarity index 100% rename from compiler/src/jdk.internal.vm.compiler/src/org/graalvm/compiler/truffle/runtime/GraalTruffleRuntimeListenerDispatcher.java rename to truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/GraalTruffleRuntimeListenerDispatcher.java diff --git a/compiler/src/jdk.internal.vm.compiler/src/org/graalvm/compiler/truffle/runtime/InlineDecision.java b/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/InlineDecision.java similarity index 100% rename from compiler/src/jdk.internal.vm.compiler/src/org/graalvm/compiler/truffle/runtime/InlineDecision.java rename to truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/InlineDecision.java diff --git a/compiler/src/jdk.internal.vm.compiler/src/org/graalvm/compiler/truffle/runtime/LoopNodeFactory.java b/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/LoopNodeFactory.java similarity index 100% rename from compiler/src/jdk.internal.vm.compiler/src/org/graalvm/compiler/truffle/runtime/LoopNodeFactory.java rename to truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/LoopNodeFactory.java diff --git a/compiler/src/jdk.internal.vm.compiler/src/org/graalvm/compiler/truffle/runtime/ModuleUtil.java b/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/ModuleUtil.java similarity index 100% rename from compiler/src/jdk.internal.vm.compiler/src/org/graalvm/compiler/truffle/runtime/ModuleUtil.java rename to truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/ModuleUtil.java diff --git a/compiler/src/jdk.internal.vm.compiler/src/org/graalvm/compiler/truffle/runtime/OptimizedAssumption.java b/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/OptimizedAssumption.java similarity index 100% rename from compiler/src/jdk.internal.vm.compiler/src/org/graalvm/compiler/truffle/runtime/OptimizedAssumption.java rename to truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/OptimizedAssumption.java diff --git a/compiler/src/jdk.internal.vm.compiler/src/org/graalvm/compiler/truffle/runtime/OptimizedBlockNode.java b/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/OptimizedBlockNode.java similarity index 100% rename from compiler/src/jdk.internal.vm.compiler/src/org/graalvm/compiler/truffle/runtime/OptimizedBlockNode.java rename to truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/OptimizedBlockNode.java diff --git a/compiler/src/jdk.internal.vm.compiler/src/org/graalvm/compiler/truffle/runtime/OptimizedCallTarget.java b/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/OptimizedCallTarget.java similarity index 100% rename from compiler/src/jdk.internal.vm.compiler/src/org/graalvm/compiler/truffle/runtime/OptimizedCallTarget.java rename to truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/OptimizedCallTarget.java diff --git a/compiler/src/jdk.internal.vm.compiler/src/org/graalvm/compiler/truffle/runtime/OptimizedDirectCallNode.java b/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/OptimizedDirectCallNode.java similarity index 100% rename from compiler/src/jdk.internal.vm.compiler/src/org/graalvm/compiler/truffle/runtime/OptimizedDirectCallNode.java rename to truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/OptimizedDirectCallNode.java diff --git a/compiler/src/jdk.internal.vm.compiler/src/org/graalvm/compiler/truffle/runtime/OptimizedIndirectCallNode.java b/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/OptimizedIndirectCallNode.java similarity index 100% rename from compiler/src/jdk.internal.vm.compiler/src/org/graalvm/compiler/truffle/runtime/OptimizedIndirectCallNode.java rename to truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/OptimizedIndirectCallNode.java diff --git a/compiler/src/jdk.internal.vm.compiler/src/org/graalvm/compiler/truffle/runtime/OptimizedLoopNode.java b/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/OptimizedLoopNode.java similarity index 100% rename from compiler/src/jdk.internal.vm.compiler/src/org/graalvm/compiler/truffle/runtime/OptimizedLoopNode.java rename to truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/OptimizedLoopNode.java diff --git a/compiler/src/jdk.internal.vm.compiler/src/org/graalvm/compiler/truffle/runtime/OptimizedOSRLoopNode.java b/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/OptimizedOSRLoopNode.java similarity index 100% rename from compiler/src/jdk.internal.vm.compiler/src/org/graalvm/compiler/truffle/runtime/OptimizedOSRLoopNode.java rename to truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/OptimizedOSRLoopNode.java diff --git a/compiler/src/jdk.internal.vm.compiler/src/org/graalvm/compiler/truffle/runtime/OptimizedRuntimeOptions.java b/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/OptimizedRuntimeOptions.java similarity index 100% rename from compiler/src/jdk.internal.vm.compiler/src/org/graalvm/compiler/truffle/runtime/OptimizedRuntimeOptions.java rename to truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/OptimizedRuntimeOptions.java diff --git a/compiler/src/jdk.internal.vm.compiler/src/org/graalvm/compiler/truffle/runtime/SuppressFBWarnings.java b/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/SuppressFBWarnings.java similarity index 100% rename from compiler/src/jdk.internal.vm.compiler/src/org/graalvm/compiler/truffle/runtime/SuppressFBWarnings.java rename to truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/SuppressFBWarnings.java diff --git a/compiler/src/jdk.internal.vm.compiler/src/org/graalvm/compiler/truffle/runtime/TraversingBlockingQueue.java b/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/TraversingBlockingQueue.java similarity index 100% rename from compiler/src/jdk.internal.vm.compiler/src/org/graalvm/compiler/truffle/runtime/TraversingBlockingQueue.java rename to truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/TraversingBlockingQueue.java diff --git a/compiler/src/jdk.internal.vm.compiler/src/org/graalvm/compiler/truffle/runtime/TruffleCallBoundary.java b/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/TruffleCallBoundary.java similarity index 100% rename from compiler/src/jdk.internal.vm.compiler/src/org/graalvm/compiler/truffle/runtime/TruffleCallBoundary.java rename to truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/TruffleCallBoundary.java diff --git a/compiler/src/jdk.internal.vm.compiler/src/org/graalvm/compiler/truffle/runtime/TruffleInlining.java b/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/TruffleInlining.java similarity index 100% rename from compiler/src/jdk.internal.vm.compiler/src/org/graalvm/compiler/truffle/runtime/TruffleInlining.java rename to truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/TruffleInlining.java diff --git a/compiler/src/jdk.internal.vm.compiler/src/org/graalvm/compiler/truffle/runtime/TruffleSplittingStrategy.java b/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/TruffleSplittingStrategy.java similarity index 100% rename from compiler/src/jdk.internal.vm.compiler/src/org/graalvm/compiler/truffle/runtime/TruffleSplittingStrategy.java rename to truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/TruffleSplittingStrategy.java diff --git a/compiler/src/jdk.internal.vm.compiler/src/org/graalvm/compiler/truffle/runtime/TruffleTypes.java b/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/TruffleTypes.java similarity index 100% rename from compiler/src/jdk.internal.vm.compiler/src/org/graalvm/compiler/truffle/runtime/TruffleTypes.java rename to truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/TruffleTypes.java diff --git a/compiler/src/jdk.internal.vm.compiler/src/org/graalvm/compiler/truffle/runtime/collection/ArrayQueue.java b/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/collection/ArrayQueue.java similarity index 100% rename from compiler/src/jdk.internal.vm.compiler/src/org/graalvm/compiler/truffle/runtime/collection/ArrayQueue.java rename to truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/collection/ArrayQueue.java diff --git a/compiler/src/jdk.internal.vm.compiler/src/org/graalvm/compiler/truffle/runtime/collection/BTreeQueue.java b/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/collection/BTreeQueue.java similarity index 100% rename from compiler/src/jdk.internal.vm.compiler/src/org/graalvm/compiler/truffle/runtime/collection/BTreeQueue.java rename to truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/collection/BTreeQueue.java diff --git a/compiler/src/jdk.internal.vm.compiler/src/org/graalvm/compiler/truffle/runtime/collection/DelegatingBlockingQueue.java b/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/collection/DelegatingBlockingQueue.java similarity index 100% rename from compiler/src/jdk.internal.vm.compiler/src/org/graalvm/compiler/truffle/runtime/collection/DelegatingBlockingQueue.java rename to truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/collection/DelegatingBlockingQueue.java diff --git a/compiler/src/jdk.internal.vm.compiler/src/org/graalvm/compiler/truffle/runtime/collection/SerialQueue.java b/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/collection/SerialQueue.java similarity index 100% rename from compiler/src/jdk.internal.vm.compiler/src/org/graalvm/compiler/truffle/runtime/collection/SerialQueue.java rename to truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/collection/SerialQueue.java diff --git a/compiler/src/jdk.internal.vm.compiler/src/org/graalvm/compiler/truffle/runtime/debug/JFRListener.java b/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/debug/JFRListener.java similarity index 100% rename from compiler/src/jdk.internal.vm.compiler/src/org/graalvm/compiler/truffle/runtime/debug/JFRListener.java rename to truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/debug/JFRListener.java diff --git a/compiler/src/jdk.internal.vm.compiler/src/org/graalvm/compiler/truffle/runtime/debug/StatisticsListener.java b/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/debug/StatisticsListener.java similarity index 100% rename from compiler/src/jdk.internal.vm.compiler/src/org/graalvm/compiler/truffle/runtime/debug/StatisticsListener.java rename to truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/debug/StatisticsListener.java diff --git a/compiler/src/jdk.internal.vm.compiler/src/org/graalvm/compiler/truffle/runtime/debug/TraceASTCompilationListener.java b/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/debug/TraceASTCompilationListener.java similarity index 100% rename from compiler/src/jdk.internal.vm.compiler/src/org/graalvm/compiler/truffle/runtime/debug/TraceASTCompilationListener.java rename to truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/debug/TraceASTCompilationListener.java diff --git a/compiler/src/jdk.internal.vm.compiler/src/org/graalvm/compiler/truffle/runtime/debug/TraceCompilationListener.java b/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/debug/TraceCompilationListener.java similarity index 100% rename from compiler/src/jdk.internal.vm.compiler/src/org/graalvm/compiler/truffle/runtime/debug/TraceCompilationListener.java rename to truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/debug/TraceCompilationListener.java diff --git a/compiler/src/jdk.internal.vm.compiler/src/org/graalvm/compiler/truffle/runtime/debug/TraceCompilationPolymorphismListener.java b/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/debug/TraceCompilationPolymorphismListener.java similarity index 100% rename from compiler/src/jdk.internal.vm.compiler/src/org/graalvm/compiler/truffle/runtime/debug/TraceCompilationPolymorphismListener.java rename to truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/debug/TraceCompilationPolymorphismListener.java diff --git a/compiler/src/jdk.internal.vm.compiler/src/org/graalvm/compiler/truffle/runtime/debug/TraceSplittingListener.java b/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/debug/TraceSplittingListener.java similarity index 100% rename from compiler/src/jdk.internal.vm.compiler/src/org/graalvm/compiler/truffle/runtime/debug/TraceSplittingListener.java rename to truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/debug/TraceSplittingListener.java diff --git a/compiler/src/jdk.internal.vm.compiler/src/org/graalvm/compiler/truffle/runtime/hotspot/AbstractHotSpotTruffleRuntimeAccess.java b/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/hotspot/AbstractHotSpotTruffleRuntimeAccess.java similarity index 100% rename from compiler/src/jdk.internal.vm.compiler/src/org/graalvm/compiler/truffle/runtime/hotspot/AbstractHotSpotTruffleRuntimeAccess.java rename to truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/hotspot/AbstractHotSpotTruffleRuntimeAccess.java diff --git a/compiler/src/jdk.internal.vm.compiler/src/org/graalvm/compiler/truffle/runtime/hotspot/HotSpotFastThreadLocal.java b/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/hotspot/HotSpotFastThreadLocal.java similarity index 100% rename from compiler/src/jdk.internal.vm.compiler/src/org/graalvm/compiler/truffle/runtime/hotspot/HotSpotFastThreadLocal.java rename to truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/hotspot/HotSpotFastThreadLocal.java diff --git a/compiler/src/jdk.internal.vm.compiler/src/org/graalvm/compiler/truffle/runtime/hotspot/HotSpotOptimizedCallTarget.java b/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/hotspot/HotSpotOptimizedCallTarget.java similarity index 100% rename from compiler/src/jdk.internal.vm.compiler/src/org/graalvm/compiler/truffle/runtime/hotspot/HotSpotOptimizedCallTarget.java rename to truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/hotspot/HotSpotOptimizedCallTarget.java diff --git a/compiler/src/jdk.internal.vm.compiler/src/org/graalvm/compiler/truffle/runtime/hotspot/HotSpotThreadLocalHandshake.java b/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/hotspot/HotSpotThreadLocalHandshake.java similarity index 100% rename from compiler/src/jdk.internal.vm.compiler/src/org/graalvm/compiler/truffle/runtime/hotspot/HotSpotThreadLocalHandshake.java rename to truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/hotspot/HotSpotThreadLocalHandshake.java diff --git a/compiler/src/jdk.internal.vm.compiler/src/org/graalvm/compiler/truffle/runtime/hotspot/HotSpotTruffleRuntime.java b/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/hotspot/HotSpotTruffleRuntime.java similarity index 100% rename from compiler/src/jdk.internal.vm.compiler/src/org/graalvm/compiler/truffle/runtime/hotspot/HotSpotTruffleRuntime.java rename to truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/hotspot/HotSpotTruffleRuntime.java diff --git a/compiler/src/jdk.internal.vm.compiler/src/org/graalvm/compiler/truffle/runtime/hotspot/HotSpotTruffleRuntimeServices.java b/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/hotspot/HotSpotTruffleRuntimeServices.java similarity index 100% rename from compiler/src/jdk.internal.vm.compiler/src/org/graalvm/compiler/truffle/runtime/hotspot/HotSpotTruffleRuntimeServices.java rename to truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/hotspot/HotSpotTruffleRuntimeServices.java diff --git a/compiler/src/jdk.internal.vm.compiler/src/org/graalvm/compiler/truffle/runtime/hotspot/JVMCIOpenSupport.java b/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/hotspot/JVMCIOpenSupport.java similarity index 100% rename from compiler/src/jdk.internal.vm.compiler/src/org/graalvm/compiler/truffle/runtime/hotspot/JVMCIOpenSupport.java rename to truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/hotspot/JVMCIOpenSupport.java diff --git a/compiler/src/jdk.internal.vm.compiler/src/org/graalvm/compiler/truffle/runtime/hotspot/java/HotSpotTruffleRuntimeAccess.java b/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/hotspot/java/HotSpotTruffleRuntimeAccess.java similarity index 100% rename from compiler/src/jdk.internal.vm.compiler/src/org/graalvm/compiler/truffle/runtime/hotspot/java/HotSpotTruffleRuntimeAccess.java rename to truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/hotspot/java/HotSpotTruffleRuntimeAccess.java diff --git a/compiler/src/jdk.internal.vm.compiler/src/org/graalvm/compiler/truffle/runtime/hotspot/libgraal/LibGraalCompilationResultInfo.java b/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/hotspot/libgraal/LibGraalCompilationResultInfo.java similarity index 100% rename from compiler/src/jdk.internal.vm.compiler/src/org/graalvm/compiler/truffle/runtime/hotspot/libgraal/LibGraalCompilationResultInfo.java rename to truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/hotspot/libgraal/LibGraalCompilationResultInfo.java diff --git a/compiler/src/jdk.internal.vm.compiler/src/org/graalvm/compiler/truffle/runtime/hotspot/libgraal/LibGraalGraphInfo.java b/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/hotspot/libgraal/LibGraalGraphInfo.java similarity index 100% rename from compiler/src/jdk.internal.vm.compiler/src/org/graalvm/compiler/truffle/runtime/hotspot/libgraal/LibGraalGraphInfo.java rename to truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/hotspot/libgraal/LibGraalGraphInfo.java diff --git a/compiler/src/jdk.internal.vm.compiler/src/org/graalvm/compiler/truffle/runtime/hotspot/libgraal/LibGraalHotSpotTruffleCompiler.java b/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/hotspot/libgraal/LibGraalHotSpotTruffleCompiler.java similarity index 100% rename from compiler/src/jdk.internal.vm.compiler/src/org/graalvm/compiler/truffle/runtime/hotspot/libgraal/LibGraalHotSpotTruffleCompiler.java rename to truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/hotspot/libgraal/LibGraalHotSpotTruffleCompiler.java diff --git a/compiler/src/jdk.internal.vm.compiler/src/org/graalvm/compiler/truffle/runtime/hotspot/libgraal/LibGraalScopedHandle.java b/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/hotspot/libgraal/LibGraalScopedHandle.java similarity index 100% rename from compiler/src/jdk.internal.vm.compiler/src/org/graalvm/compiler/truffle/runtime/hotspot/libgraal/LibGraalScopedHandle.java rename to truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/hotspot/libgraal/LibGraalScopedHandle.java diff --git a/compiler/src/jdk.internal.vm.compiler/src/org/graalvm/compiler/truffle/runtime/hotspot/libgraal/LibGraalStringSupplier.java b/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/hotspot/libgraal/LibGraalStringSupplier.java similarity index 100% rename from compiler/src/jdk.internal.vm.compiler/src/org/graalvm/compiler/truffle/runtime/hotspot/libgraal/LibGraalStringSupplier.java rename to truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/hotspot/libgraal/LibGraalStringSupplier.java diff --git a/compiler/src/jdk.internal.vm.compiler/src/org/graalvm/compiler/truffle/runtime/hotspot/libgraal/LibGraalTruffleCompilationSupport.java b/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/hotspot/libgraal/LibGraalTruffleCompilationSupport.java similarity index 100% rename from compiler/src/jdk.internal.vm.compiler/src/org/graalvm/compiler/truffle/runtime/hotspot/libgraal/LibGraalTruffleCompilationSupport.java rename to truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/hotspot/libgraal/LibGraalTruffleCompilationSupport.java diff --git a/compiler/src/jdk.internal.vm.compiler/src/org/graalvm/compiler/truffle/runtime/hotspot/libgraal/LibGraalTruffleRuntimeAccess.java b/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/hotspot/libgraal/LibGraalTruffleRuntimeAccess.java similarity index 100% rename from compiler/src/jdk.internal.vm.compiler/src/org/graalvm/compiler/truffle/runtime/hotspot/libgraal/LibGraalTruffleRuntimeAccess.java rename to truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/hotspot/libgraal/LibGraalTruffleRuntimeAccess.java diff --git a/compiler/src/jdk.internal.vm.compiler/src/org/graalvm/compiler/truffle/runtime/hotspot/libgraal/TruffleFromLibGraalEntryPoints.java b/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/hotspot/libgraal/TruffleFromLibGraalEntryPoints.java similarity index 100% rename from compiler/src/jdk.internal.vm.compiler/src/org/graalvm/compiler/truffle/runtime/hotspot/libgraal/TruffleFromLibGraalEntryPoints.java rename to truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/hotspot/libgraal/TruffleFromLibGraalEntryPoints.java diff --git a/compiler/src/jdk.internal.vm.compiler/src/org/graalvm/compiler/truffle/runtime/hotspot/libgraal/TruffleToLibGraalCalls.java b/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/hotspot/libgraal/TruffleToLibGraalCalls.java similarity index 100% rename from compiler/src/jdk.internal.vm.compiler/src/org/graalvm/compiler/truffle/runtime/hotspot/libgraal/TruffleToLibGraalCalls.java rename to truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/hotspot/libgraal/TruffleToLibGraalCalls.java diff --git a/compiler/src/jdk.internal.vm.compiler/src/org/graalvm/compiler/truffle/runtime/serviceprovider/TruffleRuntimeServices.java b/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/serviceprovider/TruffleRuntimeServices.java similarity index 100% rename from compiler/src/jdk.internal.vm.compiler/src/org/graalvm/compiler/truffle/runtime/serviceprovider/TruffleRuntimeServices.java rename to truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/serviceprovider/TruffleRuntimeServices.java diff --git a/compiler/src/jdk.internal.vm.compiler/src/org/graalvm/libgraal/DestroyedIsolateException.java b/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/libgraal/DestroyedIsolateException.java similarity index 100% rename from compiler/src/jdk.internal.vm.compiler/src/org/graalvm/libgraal/DestroyedIsolateException.java rename to truffle/src/com.oracle.truffle.runtime/src/org/graalvm/libgraal/DestroyedIsolateException.java diff --git a/compiler/src/jdk.internal.vm.compiler/src/org/graalvm/libgraal/LibGraal.java b/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/libgraal/LibGraal.java similarity index 100% rename from compiler/src/jdk.internal.vm.compiler/src/org/graalvm/libgraal/LibGraal.java rename to truffle/src/com.oracle.truffle.runtime/src/org/graalvm/libgraal/LibGraal.java diff --git a/compiler/src/jdk.internal.vm.compiler/src/org/graalvm/libgraal/LibGraalIsolate.java b/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/libgraal/LibGraalIsolate.java similarity index 100% rename from compiler/src/jdk.internal.vm.compiler/src/org/graalvm/libgraal/LibGraalIsolate.java rename to truffle/src/com.oracle.truffle.runtime/src/org/graalvm/libgraal/LibGraalIsolate.java diff --git a/compiler/src/jdk.internal.vm.compiler/src/org/graalvm/libgraal/LibGraalObject.java b/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/libgraal/LibGraalObject.java similarity index 100% rename from compiler/src/jdk.internal.vm.compiler/src/org/graalvm/libgraal/LibGraalObject.java rename to truffle/src/com.oracle.truffle.runtime/src/org/graalvm/libgraal/LibGraalObject.java diff --git a/compiler/src/jdk.internal.vm.compiler/src/org/graalvm/libgraal/LibGraalScope.java b/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/libgraal/LibGraalScope.java similarity index 100% rename from compiler/src/jdk.internal.vm.compiler/src/org/graalvm/libgraal/LibGraalScope.java rename to truffle/src/com.oracle.truffle.runtime/src/org/graalvm/libgraal/LibGraalScope.java From 09a6ef2ae0c6f4d7bef7f80a748f80d44787ab91 Mon Sep 17 00:00:00 2001 From: Christian Humer Date: Mon, 19 Jun 2023 23:23:37 +0200 Subject: [PATCH 04/43] Move truffleattach library to Truffle. --- compiler/mx.compiler/suite.py | 55 ------------------ substratevm/mx.substratevm/mx_substratevm.py | 3 +- truffle/mx.truffle/mx_truffle.py | 1 + truffle/mx.truffle/suite.py | 56 +++++++++++++++++++ .../src/truffle_attach.cc | 0 5 files changed, 58 insertions(+), 57 deletions(-) rename {compiler => truffle}/src/org.graalvm.compiler.truffle.libgraal.truffleattach/src/truffle_attach.cc (100%) diff --git a/compiler/mx.compiler/suite.py b/compiler/mx.compiler/suite.py index ff4e3195629e..65847516efee 100644 --- a/compiler/mx.compiler/suite.py +++ b/compiler/mx.compiler/suite.py @@ -460,34 +460,6 @@ ], }, - "org.graalvm.compiler.truffle.libgraal.truffleattach" : { - "subDir" : "src", - "native" : "shared_lib", - "deliverable" : "truffleattach", - "use_jdk_headers" : True, - "buildDependencies" : [ - ], - "os_arch" : { - "windows" : { - "" : { - "cflags" : ["--std=c++11"] - } - }, - "linux" : { - "" : { - "cflags" : ["--std=c++11", "-g", "-Wall", "-Werror", "-D_GNU_SOURCE"], - "ldlibs" : ["-ldl"], - }, - }, - "" : { - "" : { - "cflags" : ["--std=c++11", "-g", "-Wall", "-Werror"], - "ldlibs" : ["-ldl"], - }, - }, - }, - }, - "org.graalvm.compiler.truffle.test.jdk21" : { "subDir" : "src", "sourceDirs" : ["src"], @@ -742,33 +714,6 @@ }, }, - "TRUFFLE_LIBGRAAL_TRUFFLEATTACH" : { - "native" : True, - "platformDependent" : True, - "platforms" : [ - "linux-amd64", - "linux-aarch64", - "darwin-amd64", - "darwin-aarch64", - "windows-amd64", - ], - "layout" : { - "bin/" : "dependency:org.graalvm.compiler.truffle.libgraal.truffleattach", - }, - "description" : "Contains a library to attach Truffle runtime to jvmci runtime.", - "maven": True, - }, - - "TRUFFLE_LIBGRAAL_TRUFFLEATTACH_GRAALVM_SUPPORT" : { - "native" : True, - "platformDependent" : True, - "layout" : { - "./" : ["dependency:org.graalvm.compiler.truffle.libgraal.truffleattach"], - }, - "description" : "Truffle attach library support distribution for the GraalVM", - "maven" : False, - }, - "GRAAL_PROFDIFF": { "subDir" : "src", "dependencies" : [ diff --git a/substratevm/mx.substratevm/mx_substratevm.py b/substratevm/mx.substratevm/mx_substratevm.py index b664b6e34e0d..d827d0573a33 100644 --- a/substratevm/mx.substratevm/mx_substratevm.py +++ b/substratevm/mx.substratevm/mx_substratevm.py @@ -1239,8 +1239,7 @@ def _native_image_launcher_extra_jvm_args(): headers=False, ), ], - # GR-46611 Temporary solution. When the optimized runtime is moved to the TRUFFLE_API distribution, truffleattach should be moved as well. - support_libraries_distributions=['compiler:TRUFFLE_LIBGRAAL_TRUFFLEATTACH_GRAALVM_SUPPORT'], + support_libraries_distributions=[], stability="supported", jlink=False, ) diff --git a/truffle/mx.truffle/mx_truffle.py b/truffle/mx.truffle/mx_truffle.py index c9ba9daa3de4..4c461ce3c0a7 100644 --- a/truffle/mx.truffle/mx_truffle.py +++ b/truffle/mx.truffle/mx_truffle.py @@ -1145,6 +1145,7 @@ def glob_match(path, pattern): jvmci_parent_jars=[ 'truffle:TRUFFLE_API', ], + support_libraries_distributions=['truffle:TRUFFLE_LIBGRAAL_TRUFFLEATTACH_GRAALVM_SUPPORT'], stability="supported", )) diff --git a/truffle/mx.truffle/suite.py b/truffle/mx.truffle/suite.py index 07edf0bdf026..4bacd9ff7f29 100644 --- a/truffle/mx.truffle/suite.py +++ b/truffle/mx.truffle/suite.py @@ -1090,6 +1090,35 @@ "javac.lint.overrides" : 'none', "jacoco" : "exclude", }, + + "org.graalvm.compiler.truffle.libgraal.truffleattach" : { + "subDir" : "src", + "native" : "shared_lib", + "deliverable" : "truffleattach", + "use_jdk_headers" : True, + "buildDependencies" : [ + ], + "os_arch" : { + "windows" : { + "" : { + "cflags" : ["--std=c++11"] + } + }, + "linux" : { + "" : { + "cflags" : ["--std=c++11", "-g", "-Wall", "-Werror", "-D_GNU_SOURCE"], + "ldlibs" : ["-ldl"], + }, + }, + "" : { + "" : { + "cflags" : ["--std=c++11", "-g", "-Wall", "-Werror"], + "ldlibs" : ["-ldl"], + }, + }, + }, + }, + }, }, "licenses" : { @@ -1207,6 +1236,33 @@ } }, + "TRUFFLE_LIBGRAAL_TRUFFLEATTACH" : { + "native" : True, + "platformDependent" : True, + "platforms" : [ + "linux-amd64", + "linux-aarch64", + "darwin-amd64", + "darwin-aarch64", + "windows-amd64", + ], + "layout" : { + "bin/" : "dependency:org.graalvm.compiler.truffle.libgraal.truffleattach", + }, + "description" : "Contains a library to attach Truffle runtime to jvmci runtime.", + "maven": True, + }, + + "TRUFFLE_LIBGRAAL_TRUFFLEATTACH_GRAALVM_SUPPORT" : { + "native" : True, + "platformDependent" : True, + "layout" : { + "./" : ["dependency:org.graalvm.compiler.truffle.libgraal.truffleattach"], + }, + "description" : "Truffle attach library support distribution for the GraalVM", + "maven" : False, + }, + "TRUFFLE_NFI" : { # This distribution defines a module. "moduleInfo" : { diff --git a/compiler/src/org.graalvm.compiler.truffle.libgraal.truffleattach/src/truffle_attach.cc b/truffle/src/org.graalvm.compiler.truffle.libgraal.truffleattach/src/truffle_attach.cc similarity index 100% rename from compiler/src/org.graalvm.compiler.truffle.libgraal.truffleattach/src/truffle_attach.cc rename to truffle/src/org.graalvm.compiler.truffle.libgraal.truffleattach/src/truffle_attach.cc From 8abacbc0cb9d72a284022eed9e4a6f3757586ef9 Mon Sep 17 00:00:00 2001 From: Christian Humer Date: Mon, 19 Jun 2023 18:53:20 +0200 Subject: [PATCH 05/43] Changes and cleanup after move from compiler to truffle suite. --- compiler/mx.compiler/mx_compiler.py | 3 +- compiler/mx.compiler/suite.py | 49 +- .../compiler/TruffleCompilerOptions.java | 20 +- .../HotSpotTruffleCompilationSupport.java | 3 +- .../HotSpotTruffleHostEnvironment.java | 9 +- .../HotSpotTruffleHostEnvironmentLookup.java | 8 +- .../libgraal/jni/FromLibGraalCalls.java | 1 + .../graalvm/libgraal/jni/FromLibGraalId.java | 39 - .../hotspot/libgraal/HSTruffleCompilable.java | 1 - .../libgraal/HSTruffleCompilationTask.java | 1 - .../libgraal/HSTruffleCompilerRuntime.java | 3 +- .../compiler/hotspot/libgraal/LibGraal.java | 79 ++ .../LibGraalTruffleHostEnvironmentLookup.java | 1 - .../TruffleToLibGraalEntryPoints.java | 1 - substratevm/mx.substratevm/suite.py | 5 +- truffle/mx.truffle/mx_truffle.py | 2 + truffle/mx.truffle/suite.py | 102 ++- .../TruffleCompilerOptionDescriptor.java | 19 - .../FromLibGraalEntryPointsResolver.java | 2 +- .../hotspot/libgraal/FromLibGraalId.java | 2 +- .../hotspot/libgraal/TruffleFromLibGraal.java | 2 - .../common/hotspot/libgraal/Utilities.java | 2 +- .../java/HotSpotTruffleRuntimeAccess.java | 3 - .../runtime/hotspot/libgraal/BinaryInput.java | 640 +++++++++++++++++ .../hotspot/libgraal/BinaryOutput.java | 672 ++++++++++++++++++ .../LibGraalTruffleCompilationSupport.java | 1 - .../TruffleFromLibGraalEntryPoints.java | 3 +- 27 files changed, 1534 insertions(+), 139 deletions(-) delete mode 100644 compiler/src/jdk.internal.vm.compiler/src/org/graalvm/libgraal/jni/FromLibGraalId.java create mode 100644 compiler/src/org.graalvm.compiler.truffle.compiler.hotspot.libgraal/src/org/graalvm/compiler/truffle/compiler/hotspot/libgraal/LibGraal.java create mode 100644 truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/hotspot/libgraal/BinaryInput.java create mode 100644 truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/hotspot/libgraal/BinaryOutput.java diff --git a/compiler/mx.compiler/mx_compiler.py b/compiler/mx.compiler/mx_compiler.py index 1f89925550bf..dfab3cf79425 100644 --- a/compiler/mx.compiler/mx_compiler.py +++ b/compiler/mx.compiler/mx_compiler.py @@ -1312,7 +1312,7 @@ def __init__(self): self.boot_dists.append(d) self.boot_jars.append(d.classpath_repr()) - self.jvmci_parent_dists = [mx.distribution('truffle:TRUFFLE_API')] + self.jvmci_parent_dists = [mx.distribution('truffle:TRUFFLE_API', 'truffle:TRUFFLE_COMPILER', 'truffle:TRUFFLE_RUNTIME')] self.jvmci_parent_jars = [jar.classpath_repr() for jar in self.jvmci_parent_dists] self.dists = self.jvmci_dists + self.jvmci_parent_dists + self.boot_dists @@ -1328,7 +1328,6 @@ def _jvmci_jars(): return [ 'compiler:GRAAL', 'compiler:GRAAL_MANAGEMENT', - 'compiler:GRAAL_TRUFFLE_JFR_IMPL', ] # The community compiler component diff --git a/compiler/mx.compiler/suite.py b/compiler/mx.compiler/suite.py index 65847516efee..63e38003cbae 100644 --- a/compiler/mx.compiler/suite.py +++ b/compiler/mx.compiler/suite.py @@ -163,7 +163,7 @@ "sourceDirs" : ["src"], "dependencies" : [ "sdk:GRAAL_SDK", - "truffle:TRUFFLE_API", + "truffle:TRUFFLE_COMPILER", ], "requires" : [ "jdk.internal.vm.ci", @@ -192,8 +192,6 @@ "org.graalvm.compiler.core.common.CompilerProfiler", "org.graalvm.compiler.truffle.compiler.substitutions.GraphBuilderInvocationPluginProvider", "org.graalvm.compiler.truffle.compiler.phases.inlining.InliningPolicyProvider", - "org.graalvm.compiler.truffle.jfr.EventFactory.Provider", - "org.graalvm.compiler.truffle.runtime.FloodControlHandler", ], "annotationProcessors" : [ "truffle:TRUFFLE_DSL_PROCESSOR", @@ -224,25 +222,10 @@ "org.graalvm.compiler.truffle.jfr.impl", "org.graalvm.compiler.truffle.runtime", "org.graalvm.compiler.truffle.test", - "org.graalvm.compiler.truffle.common.hotspot.libgraal", "org.graalvm.compiler.truffle.compiler.hotspot.libgraal", ], }, - "jdk.internal.vm.compiler.truffle.jfr" : { - "subDir" : "src", - "sourceDirs" : ["src"], - "dependencies" : [ - "jdk.internal.vm.compiler", - ], - "requires" : [ - "jdk.jfr" - ], - "checkPackagePrefix": "false", - "checkstyle" : "jdk.internal.vm.compiler", - "javaCompliance" : "17+", - "jacoco" : "exclude", - }, "jdk.internal.vm.compiler.processor" : { "subDir" : "src", @@ -266,6 +249,7 @@ "JAVA_ALLOCATION_INSTRUMENTER", "truffle:TRUFFLE_SL_TEST", "truffle:TRUFFLE_TEST", + "truffle:TRUFFLE_RUNTIME", ], "requires" : [ "jdk.unsupported", @@ -273,7 +257,7 @@ "java.logging", "java.instrument", "java.management", - "jdk.jfr" + "jdk.jfr", ], "requiresConcealed" : { "java.base" : [ @@ -442,6 +426,7 @@ "sourceDirs" : ["src"], "dependencies" : [ "jdk.internal.vm.compiler", + "truffle:TRUFFLE_COMPILER", ], "requiresConcealed" : { "jdk.internal.vm.ci" : [ @@ -534,6 +519,8 @@ "GRAAL", "truffle:TRUFFLE_SL_TEST", "truffle:TRUFFLE_TEST", + "truffle:TRUFFLE_COMPILER", + "truffle:TRUFFLE_RUNTIME", "regex:TREGEX" ], "exclude" : [ @@ -544,21 +531,6 @@ "maven": False, }, - "GRAAL_TRUFFLE_JFR_IMPL" : { - # This distribution defines a module. - "moduleInfo" : { - "name" : "jdk.internal.vm.compiler.truffle.jfr", - }, - "subDir" : "src", - "dependencies" : [ - "jdk.internal.vm.compiler.truffle.jfr", - ], - "distDependencies" : [ - "GRAAL", - ], - "maven": False, - }, - "GRAAL_TRUFFLE_COMPILER_LIBGRAAL": { "subDir" : "src", "dependencies" : [ @@ -606,12 +578,9 @@ "org.graalvm.compiler.options to org.graalvm.nativeimage.driver,org.graalvm.nativeimage.junitsupport", "org.graalvm.compiler.phases.common to org.graalvm.nativeimage.agent.tracing,org.graalvm.nativeimage.configure", "org.graalvm.compiler.serviceprovider to jdk.internal.vm.compiler.management,org.graalvm.nativeimage.driver,org.graalvm.nativeimage.agent.jvmtibase,org.graalvm.nativeimage.agent.diagnostics", - "org.graalvm.compiler.truffle.jfr to jdk.internal.vm.compiler.truffle.jfr", "org.graalvm.util.json to org.graalvm.nativeimage.librarysupport,org.graalvm.nativeimage.agent.tracing,org.graalvm.nativeimage.configure,org.graalvm.nativeimage.driver", ], "uses" : [ - "com.oracle.truffle.api.impl.TruffleLocator", - "com.oracle.truffle.api.object.LayoutFactory", "org.graalvm.compiler.code.DisassemblerProvider", "org.graalvm.compiler.core.match.MatchStatementSet", "org.graalvm.compiler.debug.DebugHandlersFactory", @@ -625,10 +594,6 @@ "org.graalvm.compiler.serviceprovider.JMXService", "org.graalvm.compiler.truffle.compiler.hotspot.TruffleCallBoundaryInstrumentationFactory", "org.graalvm.compiler.truffle.compiler.substitutions.GraphBuilderInvocationPluginProvider", - "org.graalvm.compiler.truffle.runtime.LoopNodeFactory", - "org.graalvm.compiler.truffle.runtime.TruffleTypes", - "org.graalvm.compiler.truffle.runtime.EngineCacheSupport", - "org.graalvm.home.HomeFinder", ], }, "subDir" : "src", @@ -637,7 +602,7 @@ ], "distDependencies" : [ "sdk:GRAAL_SDK", - "truffle:TRUFFLE_API" + "truffle:TRUFFLE_COMPILER", ], "allowsJavadocWarnings": True, "description": "The GraalVM compiler and the Graal-truffle optimizer.", diff --git a/compiler/src/jdk.internal.vm.compiler/src/org/graalvm/compiler/truffle/compiler/TruffleCompilerOptions.java b/compiler/src/jdk.internal.vm.compiler/src/org/graalvm/compiler/truffle/compiler/TruffleCompilerOptions.java index 9dbac51eeb03..2188c7111ab9 100644 --- a/compiler/src/jdk.internal.vm.compiler/src/org/graalvm/compiler/truffle/compiler/TruffleCompilerOptions.java +++ b/compiler/src/jdk.internal.vm.compiler/src/org/graalvm/compiler/truffle/compiler/TruffleCompilerOptions.java @@ -40,6 +40,7 @@ import org.graalvm.compiler.options.OptionValues; import org.graalvm.compiler.options.OptionsParser; import org.graalvm.compiler.truffle.common.TruffleCompilerOptionDescriptor; +import org.graalvm.compiler.truffle.common.TruffleCompilerOptionDescriptor.Type; /* * Do not refer to any compiler classes here to guarantee lazy class loading. @@ -316,11 +317,28 @@ public static TruffleCompilerOptionDescriptor[] listOptions() { List convertedDescriptors = new ArrayList<>(); for (org.graalvm.compiler.options.OptionDescriptor descriptor : TruffleCompilerImpl.OPTION_DESCRIPTORS) { - convertedDescriptors.add(new TruffleCompilerOptionDescriptor(descriptor)); + convertedDescriptors.add(createCompilerOptionDescriptor(descriptor)); } return convertedDescriptors.toArray(new TruffleCompilerOptionDescriptor[convertedDescriptors.size()]); } + private static TruffleCompilerOptionDescriptor createCompilerOptionDescriptor(OptionDescriptor d) { + return new TruffleCompilerOptionDescriptor(d.getName(), matchGraalOptionType(d), d.isDeprecated(), d.getHelp(), d.getDeprecationMessage()); + } + + private static Type matchGraalOptionType(OptionDescriptor d) { + switch (d.getOptionType()) { + case User: + return Type.USER; + case Expert: + return Type.EXPERT; + case Debug: + return Type.DEBUG; + default: + return Type.DEBUG; + } + } + static Object parseCustom(OptionDescriptor descriptor, String uncheckedValue) { Class type = descriptor.getOptionValueType(); if (type == PerformanceWarnings.class) { diff --git a/compiler/src/jdk.internal.vm.compiler/src/org/graalvm/compiler/truffle/compiler/hotspot/HotSpotTruffleCompilationSupport.java b/compiler/src/jdk.internal.vm.compiler/src/org/graalvm/compiler/truffle/compiler/hotspot/HotSpotTruffleCompilationSupport.java index b1dcf71e31eb..86a7e7a3b80a 100644 --- a/compiler/src/jdk.internal.vm.compiler/src/org/graalvm/compiler/truffle/compiler/hotspot/HotSpotTruffleCompilationSupport.java +++ b/compiler/src/jdk.internal.vm.compiler/src/org/graalvm/compiler/truffle/compiler/hotspot/HotSpotTruffleCompilationSupport.java @@ -31,7 +31,6 @@ import org.graalvm.compiler.truffle.common.TruffleCompilerRuntime; import org.graalvm.compiler.truffle.compiler.AbstractTruffleCompilationSupport; import org.graalvm.compiler.truffle.compiler.hotspot.HotSpotTruffleCompilerImpl.Options; -import org.graalvm.compiler.truffle.runtime.hotspot.HotSpotTruffleRuntime; import jdk.vm.ci.hotspot.HotSpotJVMCIRuntime; @@ -69,7 +68,7 @@ public TruffleCompiler createCompiler(TruffleCompilerRuntime runtime) { @Override public void registerRuntime(TruffleCompilerRuntime runtime) { - HotSpotTruffleHostEnvironmentLookup.registerRuntime((HotSpotTruffleRuntime) runtime); + HotSpotTruffleHostEnvironmentLookup.registerRuntime(runtime); } } diff --git a/compiler/src/jdk.internal.vm.compiler/src/org/graalvm/compiler/truffle/compiler/hotspot/HotSpotTruffleHostEnvironment.java b/compiler/src/jdk.internal.vm.compiler/src/org/graalvm/compiler/truffle/compiler/hotspot/HotSpotTruffleHostEnvironment.java index a5725eecafd9..901c7192755d 100644 --- a/compiler/src/jdk.internal.vm.compiler/src/org/graalvm/compiler/truffle/compiler/hotspot/HotSpotTruffleHostEnvironment.java +++ b/compiler/src/jdk.internal.vm.compiler/src/org/graalvm/compiler/truffle/compiler/hotspot/HotSpotTruffleHostEnvironment.java @@ -24,13 +24,13 @@ */ package org.graalvm.compiler.truffle.compiler.hotspot; +import org.graalvm.compiler.debug.GraalError; import org.graalvm.compiler.truffle.common.HostMethodInfo; import org.graalvm.compiler.truffle.common.TruffleCompilable; import org.graalvm.compiler.truffle.common.TruffleCompilerRuntime; import org.graalvm.compiler.truffle.compiler.TruffleCompilerImpl; import org.graalvm.compiler.truffle.compiler.TruffleElementCache; import org.graalvm.compiler.truffle.compiler.host.TruffleHostEnvironment; -import org.graalvm.compiler.truffle.runtime.hotspot.HotSpotTruffleRuntime; import jdk.vm.ci.meta.MetaAccessProvider; import jdk.vm.ci.meta.ResolvedJavaMethod; @@ -54,7 +54,12 @@ protected TruffleCompilerImpl createCompiler(TruffleCompilable compilable) { /* * If we directly compile in the host, we can just lookup the host compiler. */ - return (TruffleCompilerImpl) ((HotSpotTruffleRuntime) runtime()).getTruffleCompiler(compilable); + TruffleCompilerRuntime runtime = runtime(); + try { + return (TruffleCompilerImpl) runtime.getClass().getMethod("getCompiler", TruffleCompilable.class).invoke(runtime, compilable); + } catch (ReflectiveOperationException e) { + throw GraalError.shouldNotReachHere(e); + } } final class HostMethodInfoCache extends TruffleElementCache { diff --git a/compiler/src/jdk.internal.vm.compiler/src/org/graalvm/compiler/truffle/compiler/hotspot/HotSpotTruffleHostEnvironmentLookup.java b/compiler/src/jdk.internal.vm.compiler/src/org/graalvm/compiler/truffle/compiler/hotspot/HotSpotTruffleHostEnvironmentLookup.java index 9147416e1c36..dffc8ff1bae6 100644 --- a/compiler/src/jdk.internal.vm.compiler/src/org/graalvm/compiler/truffle/compiler/hotspot/HotSpotTruffleHostEnvironmentLookup.java +++ b/compiler/src/jdk.internal.vm.compiler/src/org/graalvm/compiler/truffle/compiler/hotspot/HotSpotTruffleHostEnvironmentLookup.java @@ -27,8 +27,8 @@ import java.util.concurrent.atomic.AtomicReference; import org.graalvm.compiler.serviceprovider.ServiceProvider; +import org.graalvm.compiler.truffle.common.TruffleCompilerRuntime; import org.graalvm.compiler.truffle.compiler.host.TruffleHostEnvironment; -import org.graalvm.compiler.truffle.runtime.hotspot.HotSpotTruffleRuntime; import jdk.vm.ci.hotspot.HotSpotJVMCIRuntime; import jdk.vm.ci.meta.ResolvedJavaType; @@ -41,12 +41,12 @@ @ServiceProvider(TruffleHostEnvironment.Lookup.class) public final class HotSpotTruffleHostEnvironmentLookup implements TruffleHostEnvironment.Lookup { - private static final AtomicReference RUNTIME = new AtomicReference<>(); + private static final AtomicReference RUNTIME = new AtomicReference<>(); private TruffleHostEnvironment environment; @Override public TruffleHostEnvironment lookup(ResolvedJavaType forType) { - HotSpotTruffleRuntime runtime = RUNTIME.get(); + TruffleCompilerRuntime runtime = RUNTIME.get(); if (runtime == null) { // fast-path non truffle return null; @@ -69,7 +69,7 @@ public TruffleHostEnvironment lookup(ResolvedJavaType forType) { return env; } - public static boolean registerRuntime(HotSpotTruffleRuntime runtime) { + public static boolean registerRuntime(TruffleCompilerRuntime runtime) { return RUNTIME.compareAndSet(null, runtime); } diff --git a/compiler/src/jdk.internal.vm.compiler/src/org/graalvm/libgraal/jni/FromLibGraalCalls.java b/compiler/src/jdk.internal.vm.compiler/src/org/graalvm/libgraal/jni/FromLibGraalCalls.java index 1d7610c375cb..a6dd341d8e6c 100644 --- a/compiler/src/jdk.internal.vm.compiler/src/org/graalvm/libgraal/jni/FromLibGraalCalls.java +++ b/compiler/src/jdk.internal.vm.compiler/src/org/graalvm/libgraal/jni/FromLibGraalCalls.java @@ -35,6 +35,7 @@ import java.util.concurrent.ConcurrentHashMap; import java.util.function.Function; +import org.graalvm.compiler.truffle.common.hotspot.libgraal.FromLibGraalId; import org.graalvm.jniutils.JNI; import org.graalvm.jniutils.JNI.JClass; import org.graalvm.jniutils.JNI.JMethodID; diff --git a/compiler/src/jdk.internal.vm.compiler/src/org/graalvm/libgraal/jni/FromLibGraalId.java b/compiler/src/jdk.internal.vm.compiler/src/org/graalvm/libgraal/jni/FromLibGraalId.java deleted file mode 100644 index 71054451fb4a..000000000000 --- a/compiler/src/jdk.internal.vm.compiler/src/org/graalvm/libgraal/jni/FromLibGraalId.java +++ /dev/null @@ -1,39 +0,0 @@ -/* - * Copyright (c) 2020, 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. Oracle designates this - * particular file as subject to the "Classpath" exception as provided - * by Oracle in the LICENSE file that accompanied this code. - * - * 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 org.graalvm.libgraal.jni; - -public interface FromLibGraalId { - - String getName(); - - String getSignature(); - - String getMethodName(); - - Class[] getParameterTypes(); - - Class getReturnType(); - -} diff --git a/compiler/src/org.graalvm.compiler.truffle.compiler.hotspot.libgraal/src/org/graalvm/compiler/truffle/compiler/hotspot/libgraal/HSTruffleCompilable.java b/compiler/src/org.graalvm.compiler.truffle.compiler.hotspot.libgraal/src/org/graalvm/compiler/truffle/compiler/hotspot/libgraal/HSTruffleCompilable.java index 54b3660cd8dc..f445e7ca316a 100644 --- a/compiler/src/org.graalvm.compiler.truffle.compiler.hotspot.libgraal/src/org/graalvm/compiler/truffle/compiler/hotspot/libgraal/HSTruffleCompilable.java +++ b/compiler/src/org.graalvm.compiler.truffle.compiler.hotspot.libgraal/src/org/graalvm/compiler/truffle/compiler/hotspot/libgraal/HSTruffleCompilable.java @@ -69,7 +69,6 @@ import org.graalvm.jniutils.JNI.JString; import org.graalvm.jniutils.JNIMethodScope; import org.graalvm.jniutils.JNIUtil; -import org.graalvm.libgraal.LibGraal; import org.graalvm.nativebridge.BinaryInput; import jdk.vm.ci.meta.JavaConstant; diff --git a/compiler/src/org.graalvm.compiler.truffle.compiler.hotspot.libgraal/src/org/graalvm/compiler/truffle/compiler/hotspot/libgraal/HSTruffleCompilationTask.java b/compiler/src/org.graalvm.compiler.truffle.compiler.hotspot.libgraal/src/org/graalvm/compiler/truffle/compiler/hotspot/libgraal/HSTruffleCompilationTask.java index 10ea33424635..a47f1ca2b1bd 100644 --- a/compiler/src/org.graalvm.compiler.truffle.compiler.hotspot.libgraal/src/org/graalvm/compiler/truffle/compiler/hotspot/libgraal/HSTruffleCompilationTask.java +++ b/compiler/src/org.graalvm.compiler.truffle.compiler.hotspot.libgraal/src/org/graalvm/compiler/truffle/compiler/hotspot/libgraal/HSTruffleCompilationTask.java @@ -74,7 +74,6 @@ import org.graalvm.jniutils.JNI.JString; import org.graalvm.jniutils.JNIMethodScope; import org.graalvm.jniutils.JNIUtil; -import org.graalvm.libgraal.LibGraal; import org.graalvm.nativebridge.BinaryInput; import jdk.vm.ci.meta.JavaConstant; diff --git a/compiler/src/org.graalvm.compiler.truffle.compiler.hotspot.libgraal/src/org/graalvm/compiler/truffle/compiler/hotspot/libgraal/HSTruffleCompilerRuntime.java b/compiler/src/org.graalvm.compiler.truffle.compiler.hotspot.libgraal/src/org/graalvm/compiler/truffle/compiler/hotspot/libgraal/HSTruffleCompilerRuntime.java index 132ff72204e0..72f1fe5f63c2 100644 --- a/compiler/src/org.graalvm.compiler.truffle.compiler.hotspot.libgraal/src/org/graalvm/compiler/truffle/compiler/hotspot/libgraal/HSTruffleCompilerRuntime.java +++ b/compiler/src/org.graalvm.compiler.truffle.compiler.hotspot.libgraal/src/org/graalvm/compiler/truffle/compiler/hotspot/libgraal/HSTruffleCompilerRuntime.java @@ -57,6 +57,7 @@ import org.graalvm.compiler.truffle.common.TruffleCompilable; import org.graalvm.compiler.truffle.common.TruffleCompilerAssumptionDependency; import org.graalvm.compiler.truffle.common.TruffleCompilerRuntime; +import org.graalvm.compiler.truffle.common.hotspot.libgraal.FromLibGraalEntryPointsResolver; import org.graalvm.compiler.truffle.common.hotspot.libgraal.TruffleFromLibGraal; import org.graalvm.compiler.truffle.common.hotspot.libgraal.TruffleFromLibGraal.Id; import org.graalvm.jniutils.HSObject; @@ -66,8 +67,6 @@ import org.graalvm.jniutils.JNI.JString; import org.graalvm.jniutils.JNIMethodScope; import org.graalvm.jniutils.JNIUtil; -import org.graalvm.libgraal.LibGraal; -import org.graalvm.libgraal.jni.annotation.FromLibGraalEntryPointsResolver; import org.graalvm.nativebridge.BinaryInput; import org.graalvm.nativeimage.StackValue; import org.graalvm.nativeimage.c.type.CCharPointer; diff --git a/compiler/src/org.graalvm.compiler.truffle.compiler.hotspot.libgraal/src/org/graalvm/compiler/truffle/compiler/hotspot/libgraal/LibGraal.java b/compiler/src/org.graalvm.compiler.truffle.compiler.hotspot.libgraal/src/org/graalvm/compiler/truffle/compiler/hotspot/libgraal/LibGraal.java new file mode 100644 index 000000000000..30483dff3db7 --- /dev/null +++ b/compiler/src/org.graalvm.compiler.truffle.compiler.hotspot.libgraal/src/org/graalvm/compiler/truffle/compiler/hotspot/libgraal/LibGraal.java @@ -0,0 +1,79 @@ +/* + * Copyright (c) 2019, 2020, 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. Oracle designates this + * particular file as subject to the "Classpath" exception as provided + * by Oracle in the LICENSE file that accompanied this code. + * + * 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 org.graalvm.compiler.truffle.compiler.hotspot.libgraal; + +import org.graalvm.word.PointerBase; +import org.graalvm.word.WordFactory; + +import jdk.vm.ci.hotspot.HotSpotJVMCIRuntime; +import jdk.vm.ci.hotspot.HotSpotObjectConstant; +import jdk.vm.ci.hotspot.HotSpotResolvedJavaType; + +final class LibGraal { + + /** + * Creates or retrieves an object in the peer runtime that mirrors {@code obj}. + * + * This mechanism can be used to pass and return values between the HotSpot and libgraal + * runtimes. In the receiving runtime, the value can be converted back to an object with + * {@link #unhand}. + * + * @param obj an object for which an equivalent instance in the peer runtime is requested + * @return a JNI global reference to the mirror of {@code obj} in the peer runtime + * @throws IllegalArgumentException if {@code obj} is not of a translatable type + */ + static long translate(Object obj) { + return HotSpotJVMCIRuntime.runtime().translate(obj); + } + + /** + * Dereferences and returns the object referred to by the JNI global reference {@code handle}. + * The global reference is deleted prior to returning. Any further use of {@code handle} is + * invalid. + * + * @param handle a JNI global reference to an object in the current runtime + * @return the object referred to by {@code handle} + * @throws ClassCastException if the returned object cannot be cast to {@code type} + */ + @SuppressWarnings("unchecked") + static T unhand(Class type, long handle) { + return HotSpotJVMCIRuntime.runtime().unhand(type, handle); + } + + /** + * @see HotSpotJVMCIRuntime#getJObjectValue(HotSpotObjectConstant) + */ + static T getJObjectValue(HotSpotObjectConstant constant) { + return WordFactory.pointer(HotSpotJVMCIRuntime.runtime().getJObjectValue(constant)); + } + + /** + * @see HotSpotJVMCIRuntime#asResolvedJavaType(long) + */ + static HotSpotResolvedJavaType asResolvedJavaType(PointerBase pointer) { + return HotSpotJVMCIRuntime.runtime().asResolvedJavaType(pointer.rawValue()); + } + +} diff --git a/compiler/src/org.graalvm.compiler.truffle.compiler.hotspot.libgraal/src/org/graalvm/compiler/truffle/compiler/hotspot/libgraal/LibGraalTruffleHostEnvironmentLookup.java b/compiler/src/org.graalvm.compiler.truffle.compiler.hotspot.libgraal/src/org/graalvm/compiler/truffle/compiler/hotspot/libgraal/LibGraalTruffleHostEnvironmentLookup.java index f4d990ee893f..a1aa0ade1a56 100644 --- a/compiler/src/org.graalvm.compiler.truffle.compiler.hotspot.libgraal/src/org/graalvm/compiler/truffle/compiler/hotspot/libgraal/LibGraalTruffleHostEnvironmentLookup.java +++ b/compiler/src/org.graalvm.compiler.truffle.compiler.hotspot.libgraal/src/org/graalvm/compiler/truffle/compiler/hotspot/libgraal/LibGraalTruffleHostEnvironmentLookup.java @@ -32,7 +32,6 @@ import org.graalvm.jniutils.JNI.JWeak; import org.graalvm.jniutils.JNIMethodScope; import org.graalvm.jniutils.JNIUtil; -import org.graalvm.libgraal.LibGraal; import org.graalvm.word.WordFactory; import com.oracle.svm.core.annotate.RecomputeFieldValue; diff --git a/compiler/src/org.graalvm.compiler.truffle.compiler.hotspot.libgraal/src/org/graalvm/compiler/truffle/compiler/hotspot/libgraal/TruffleToLibGraalEntryPoints.java b/compiler/src/org.graalvm.compiler.truffle.compiler.hotspot.libgraal/src/org/graalvm/compiler/truffle/compiler/hotspot/libgraal/TruffleToLibGraalEntryPoints.java index 0fedb969f978..30bd71743a4f 100644 --- a/compiler/src/org.graalvm.compiler.truffle.compiler.hotspot.libgraal/src/org/graalvm/compiler/truffle/compiler/hotspot/libgraal/TruffleToLibGraalEntryPoints.java +++ b/compiler/src/org.graalvm.compiler.truffle.compiler.hotspot.libgraal/src/org/graalvm/compiler/truffle/compiler/hotspot/libgraal/TruffleToLibGraalEntryPoints.java @@ -72,7 +72,6 @@ import org.graalvm.jniutils.JNIExceptionWrapper; import org.graalvm.jniutils.JNIMethodScope; import org.graalvm.jniutils.JNIUtil; -import org.graalvm.libgraal.LibGraal; import org.graalvm.libgraal.jni.FromLibGraalCalls; import org.graalvm.libgraal.jni.LibGraalUtil; import org.graalvm.nativebridge.BinaryOutput; diff --git a/substratevm/mx.substratevm/suite.py b/substratevm/mx.substratevm/suite.py index 813f14b37b8a..d7bbe738846f 100644 --- a/substratevm/mx.substratevm/suite.py +++ b/substratevm/mx.substratevm/suite.py @@ -1002,6 +1002,7 @@ "dependencies": [ "com.oracle.svm.graal", "truffle:TRUFFLE_API", + "truffle:TRUFFLE_RUNTIME", ], "requiresConcealed" : { "java.base" : [ @@ -1248,6 +1249,7 @@ "sourceDirs": ["src"], "dependencies": [ "com.oracle.svm.hosted", + "truffle:TRUFFLE_RUNTIME", ], "requiresConcealed": { "jdk.internal.vm.ci": [ @@ -1304,6 +1306,7 @@ "compiler:GRAAL", "NATIVE_IMAGE_BASE", "truffle:TRUFFLE_API", + "truffle:TRUFFLE_RUNTIME", ], "moduleInfo" : { "name" : "org.graalvm.nativeimage.builder", @@ -1899,7 +1902,7 @@ "subDir" : "src", "description" : "Truffle TCK", "dependencies" : ["com.oracle.svm.truffle.tck"], - "distDependencies" : ["SVM"], + "distDependencies" : ["SVM", "truffle:TRUFFLE_RUNTIME"], "maven" : True, }, }, diff --git a/truffle/mx.truffle/mx_truffle.py b/truffle/mx.truffle/mx_truffle.py index 4c461ce3c0a7..4fce832bccf1 100644 --- a/truffle/mx.truffle/mx_truffle.py +++ b/truffle/mx.truffle/mx_truffle.py @@ -1144,6 +1144,8 @@ def glob_match(path, pattern): jar_distributions=[], jvmci_parent_jars=[ 'truffle:TRUFFLE_API', + 'truffle:TRUFFLE_COMPILER', + 'truffle:TRUFFLE_RUNTIME', ], support_libraries_distributions=['truffle:TRUFFLE_LIBGRAAL_TRUFFLEATTACH_GRAALVM_SUPPORT'], stability="supported", diff --git a/truffle/mx.truffle/suite.py b/truffle/mx.truffle/suite.py index 4bacd9ff7f29..6ad82c8a0f4c 100644 --- a/truffle/mx.truffle/suite.py +++ b/truffle/mx.truffle/suite.py @@ -250,15 +250,23 @@ "sourceDirs" : ["src"], "dependencies" : [ "sdk:GRAAL_SDK", - "com.oracle.truffle.api.instrumentation", - "com.oracle.truffle.api.exception", + "TRUFFLE_API", + "TRUFFLE_COMPILER", ], "requires" : [ "java.logging", "jdk.management", + "jdk.jfr", "jdk.unsupported", # sun.misc.Unsafe ], - "annotationProcessors" : ["TRUFFLE_DSL_PROCESSOR"], + "requiresConcealed" : { + "jdk.internal.vm.ci" : [ + "jdk.vm.ci.meta", + "jdk.vm.ci.code", + "jdk.vm.ci.code.stack", + ], + }, + "annotationProcessors" : ["TRUFFLE_DSL_PROCESSOR", "TRUFFLE_LIBGRAAL_PROCESSOR"], "checkstyle" : "com.oracle.truffle.api", "javaCompliance" : "17+", "workingSets" : "API,Truffle", @@ -268,16 +276,18 @@ "subDir" : "src", "sourceDirs" : ["src"], "dependencies" : [ - "sdk:GRAAL_SDK", - "com.oracle.truffle.api.instrumentation", - "com.oracle.truffle.api.exception", ], "requires" : [ "java.logging", "jdk.management", "jdk.unsupported", # sun.misc.Unsafe ], - "annotationProcessors" : ["TRUFFLE_DSL_PROCESSOR"], + "requiresConcealed" : { + "jdk.internal.vm.ci" : [ + "jdk.vm.ci.meta", + "jdk.vm.ci.code", + ], + }, "checkstyle" : "com.oracle.truffle.api", "javaCompliance" : "17+", "workingSets" : "API,Truffle", @@ -1140,6 +1150,80 @@ } }, + "TRUFFLE_COMPILER" : { + # This distribution defines a module. + "moduleInfo" : { + "name" : "org.graalvm.truffle.compiler", + "requires" : [ + "jdk.unsupported", # sun.misc.Unsafe + "java.logging", + "java.management", + ], + "exports" : [ + # Qualified exports + "com.oracle.truffle.compiler to org.graalvm.truffle.runtime, jdk.internal.vm.compiler, com.oracle.graal.graal_enterprise" + ], + "uses" : [ + ], + }, + "requiresConcealed" : { + "jdk.internal.vm.ci" : [ + "jdk.vm.ci.meta", + "jdk.vm.ci.code", + ], + }, + "subDir" : "src", + "javaCompliance" : "17+", + "dependencies" : [ + "com.oracle.truffle.compiler", + ], + "distDependencies" : [ + ], + "description" : "Truffle compiler API.", + "maven": True, + }, + + "TRUFFLE_RUNTIME" : { + # This distribution defines a module. + "moduleInfo" : { + "name" : "org.graalvm.truffle.runtime", + "requires" : [ + "jdk.unsupported", # sun.misc.Unsafe + "java.logging", + "java.management", + "org.graalvm.truffle", + "org.graalvm.truffle.compiler", + ], + "exports" : [ + # Qualified exports + "org.graalvm.compiler.truffle.runtime to jdk.internal.vm.compiler, com.oracle.graal.graal_enterprise, com.oracle.svm.svm_enterprise" + ], + "uses" : [ + "com.oracle.truffle.api.impl.TruffleLocator", + "com.oracle.truffle.api.object.LayoutFactory", + "org.graalvm.compiler.truffle.runtime.LoopNodeFactory", + "org.graalvm.compiler.truffle.runtime.TruffleTypes", + "org.graalvm.compiler.truffle.runtime.EngineCacheSupport", + "org.graalvm.compiler.truffle.jfr.EventFactory.Provider", + "org.graalvm.compiler.truffle.runtime.FloodControlHandler", + "org.graalvm.home.HomeFinder", + ], + }, + "subDir" : "src", + "javaCompliance" : "17+", + "dependencies" : [ + "com.oracle.truffle.runtime", + ], + "distDependencies" : [ + "sdk:GRAAL_SDK", + "TRUFFLE_API", + "TRUFFLE_COMPILER", + ], + "description" : "Truffle runtime distribution.", + "maven": True, + }, + + "TRUFFLE_API" : { # This distribution defines a module. "moduleInfo" : { @@ -1175,9 +1259,8 @@ "com.oracle.truffle.api.library.provider", # Qualified exports - "com.oracle.truffle.api.impl to jdk.internal.vm.compiler, org.graalvm.locator", + "com.oracle.truffle.api.impl to jdk.internal.vm.compiler, org.graalvm.locator, org.graalvm.truffle.runtime", "com.oracle.truffle.object to jdk.internal.vm.compiler, com.oracle.graal.graal_enterprise", - "com.oracle.truffle.compiler to jdk.internal.vm.compiler, com.oracle.graal.graal_enterprise" ], "uses" : [ "com.oracle.truffle.api.TruffleRuntimeAccess", @@ -1222,7 +1305,6 @@ "com.oracle.truffle.polyglot", "com.oracle.truffle.host", "com.oracle.truffle.api.staticobject", - "com.oracle.truffle.compiler", ], "distDependencies" : [ "sdk:GRAAL_SDK" diff --git a/truffle/src/com.oracle.truffle.compiler/src/org/graalvm/compiler/truffle/common/TruffleCompilerOptionDescriptor.java b/truffle/src/com.oracle.truffle.compiler/src/org/graalvm/compiler/truffle/common/TruffleCompilerOptionDescriptor.java index 4e19fab2e63b..1c468cebdaa3 100644 --- a/truffle/src/com.oracle.truffle.compiler/src/org/graalvm/compiler/truffle/common/TruffleCompilerOptionDescriptor.java +++ b/truffle/src/com.oracle.truffle.compiler/src/org/graalvm/compiler/truffle/common/TruffleCompilerOptionDescriptor.java @@ -24,30 +24,11 @@ */ package org.graalvm.compiler.truffle.common; -import org.graalvm.compiler.options.OptionDescriptor; - /** * Represents the description of a Truffle compiler options. */ public record TruffleCompilerOptionDescriptor(String name, Type type, boolean deprecated, String help, String deprecationMessage) { - public TruffleCompilerOptionDescriptor(OptionDescriptor d) { - this(d.getName(), matchGraalOptionType(d), d.isDeprecated(), d.getHelp(), d.getDeprecationMessage()); - } - - static Type matchGraalOptionType(OptionDescriptor d) { - switch (d.getOptionType()) { - case User: - return Type.USER; - case Expert: - return Type.EXPERT; - case Debug: - return Type.DEBUG; - default: - return Type.DEBUG; - } - } - public enum Type { /** * An option common for users to apply. diff --git a/truffle/src/com.oracle.truffle.compiler/src/org/graalvm/compiler/truffle/common/hotspot/libgraal/FromLibGraalEntryPointsResolver.java b/truffle/src/com.oracle.truffle.compiler/src/org/graalvm/compiler/truffle/common/hotspot/libgraal/FromLibGraalEntryPointsResolver.java index b7e766b72438..3d3ad8e3d2ec 100644 --- a/truffle/src/com.oracle.truffle.compiler/src/org/graalvm/compiler/truffle/common/hotspot/libgraal/FromLibGraalEntryPointsResolver.java +++ b/truffle/src/com.oracle.truffle.compiler/src/org/graalvm/compiler/truffle/common/hotspot/libgraal/FromLibGraalEntryPointsResolver.java @@ -22,7 +22,7 @@ * or visit www.oracle.com if you need additional information or have any * questions. */ -package org.graalvm.libgraal.jni.annotation; +package org.graalvm.compiler.truffle.common.hotspot.libgraal; import static java.lang.annotation.ElementType.TYPE; import static java.lang.annotation.ElementType.METHOD; diff --git a/truffle/src/com.oracle.truffle.compiler/src/org/graalvm/compiler/truffle/common/hotspot/libgraal/FromLibGraalId.java b/truffle/src/com.oracle.truffle.compiler/src/org/graalvm/compiler/truffle/common/hotspot/libgraal/FromLibGraalId.java index c7dda824a9c4..1f54e03a3c31 100644 --- a/truffle/src/com.oracle.truffle.compiler/src/org/graalvm/compiler/truffle/common/hotspot/libgraal/FromLibGraalId.java +++ b/truffle/src/com.oracle.truffle.compiler/src/org/graalvm/compiler/truffle/common/hotspot/libgraal/FromLibGraalId.java @@ -22,7 +22,7 @@ * or visit www.oracle.com if you need additional information or have any * questions. */ -package org.graalvm.libgraal.jni.annotation; +package org.graalvm.compiler.truffle.common.hotspot.libgraal; public interface FromLibGraalId { diff --git a/truffle/src/com.oracle.truffle.compiler/src/org/graalvm/compiler/truffle/common/hotspot/libgraal/TruffleFromLibGraal.java b/truffle/src/com.oracle.truffle.compiler/src/org/graalvm/compiler/truffle/common/hotspot/libgraal/TruffleFromLibGraal.java index 978b84b0f215..a0d2a8490990 100644 --- a/truffle/src/com.oracle.truffle.compiler/src/org/graalvm/compiler/truffle/common/hotspot/libgraal/TruffleFromLibGraal.java +++ b/truffle/src/com.oracle.truffle.compiler/src/org/graalvm/compiler/truffle/common/hotspot/libgraal/TruffleFromLibGraal.java @@ -33,8 +33,6 @@ import java.util.function.Consumer; import java.util.function.Supplier; -import org.graalvm.libgraal.jni.annotation.FromLibGraalId; - /** * Annotates methods associated with both ends of a libgraal to HotSpot call. This annotation * simplifies navigating between these methods in an IDE. diff --git a/truffle/src/com.oracle.truffle.compiler/src/org/graalvm/compiler/truffle/common/hotspot/libgraal/Utilities.java b/truffle/src/com.oracle.truffle.compiler/src/org/graalvm/compiler/truffle/common/hotspot/libgraal/Utilities.java index af6ce4a20137..61f007d470e2 100644 --- a/truffle/src/com.oracle.truffle.compiler/src/org/graalvm/compiler/truffle/common/hotspot/libgraal/Utilities.java +++ b/truffle/src/com.oracle.truffle.compiler/src/org/graalvm/compiler/truffle/common/hotspot/libgraal/Utilities.java @@ -22,7 +22,7 @@ * or visit www.oracle.com if you need additional information or have any * questions. */ -package org.graalvm.libgraal.jni.annotation; +package org.graalvm.compiler.truffle.common.hotspot.libgraal; final class Utilities { diff --git a/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/hotspot/java/HotSpotTruffleRuntimeAccess.java b/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/hotspot/java/HotSpotTruffleRuntimeAccess.java index 6f32c4cd11ba..194002e0606d 100644 --- a/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/hotspot/java/HotSpotTruffleRuntimeAccess.java +++ b/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/hotspot/java/HotSpotTruffleRuntimeAccess.java @@ -24,15 +24,12 @@ */ package org.graalvm.compiler.truffle.runtime.hotspot.java; -import org.graalvm.compiler.serviceprovider.ServiceProvider; import org.graalvm.compiler.truffle.common.TruffleCompilationSupport; import org.graalvm.compiler.truffle.runtime.hotspot.AbstractHotSpotTruffleRuntimeAccess; import org.graalvm.compiler.truffle.runtime.hotspot.HotSpotTruffleRuntime; import com.oracle.truffle.api.TruffleRuntime; -import com.oracle.truffle.api.TruffleRuntimeAccess; -@ServiceProvider(TruffleRuntimeAccess.class) public final class HotSpotTruffleRuntimeAccess extends AbstractHotSpotTruffleRuntimeAccess { @Override diff --git a/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/hotspot/libgraal/BinaryInput.java b/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/hotspot/libgraal/BinaryInput.java new file mode 100644 index 000000000000..dbba6e2debbb --- /dev/null +++ b/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/hotspot/libgraal/BinaryInput.java @@ -0,0 +1,640 @@ +/* + * Copyright (c) 2021, 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. Oracle designates this + * particular file as subject to the "Classpath" exception as provided + * by Oracle in the LICENSE file that accompanied this code. + * + * 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 org.graalvm.compiler.truffle.runtime.hotspot.libgraal; + +import static org.graalvm.compiler.truffle.runtime.hotspot.libgraal.BinaryOutput.ARRAY; +import static org.graalvm.compiler.truffle.runtime.hotspot.libgraal.BinaryOutput.BOOLEAN; +import static org.graalvm.compiler.truffle.runtime.hotspot.libgraal.BinaryOutput.BYTE; +import static org.graalvm.compiler.truffle.runtime.hotspot.libgraal.BinaryOutput.CHAR; +import static org.graalvm.compiler.truffle.runtime.hotspot.libgraal.BinaryOutput.DOUBLE; +import static org.graalvm.compiler.truffle.runtime.hotspot.libgraal.BinaryOutput.FLOAT; +import static org.graalvm.compiler.truffle.runtime.hotspot.libgraal.BinaryOutput.INT; +import static org.graalvm.compiler.truffle.runtime.hotspot.libgraal.BinaryOutput.LARGE_STRING_TAG; +import static org.graalvm.compiler.truffle.runtime.hotspot.libgraal.BinaryOutput.LONG; +import static org.graalvm.compiler.truffle.runtime.hotspot.libgraal.BinaryOutput.NULL; +import static org.graalvm.compiler.truffle.runtime.hotspot.libgraal.BinaryOutput.SHORT; +import static org.graalvm.compiler.truffle.runtime.hotspot.libgraal.BinaryOutput.STRING; +import static org.graalvm.compiler.truffle.runtime.hotspot.libgraal.BinaryOutput.bufferSize; + +import java.nio.ByteBuffer; +import java.nio.ByteOrder; + +import org.graalvm.nativeimage.c.type.CCharPointer; +import org.graalvm.nativeimage.c.type.CTypeConversion; + +/** + * A buffer used by the {@link BinaryMarshaller} to unmarshal parameters and results passed by + * value. + * + * @see BinaryOutput + * @see BinaryMarshaller + * @see JNIConfig.Builder#registerMarshaller(Class, BinaryMarshaller) + */ +abstract class BinaryInput { + + private static final int EOF = -1; + + private byte[] tempEncodingByteBuffer; + private char[] tempEncodingCharBuffer; + protected final int length; + protected int pos; + + private BinaryInput(int length) { + this.length = length; + } + + /** + * Reads a single byte and returns {@code true} if that byte is non-zero, {@code false} if that + * byte is zero. + * + * @throws IndexOutOfBoundsException if there are not enough bytes to read. + */ + public final boolean readBoolean() throws IndexOutOfBoundsException { + int b = read(); + if (b < 0) { + throw new IndexOutOfBoundsException(); + } + return b != 0; + } + + /** + * Reads and returns a single byte. + * + * @throws IndexOutOfBoundsException if there are not enough bytes to read. + */ + public final byte readByte() throws IndexOutOfBoundsException { + int b = read(); + if (b < 0) { + throw new IndexOutOfBoundsException(); + } + return (byte) b; + } + + /** + * Reads two bytes and returns a {@code short} value. + * + * @throws IndexOutOfBoundsException if there are not enough bytes to read. + */ + public final short readShort() throws IndexOutOfBoundsException { + int b1 = read(); + int b2 = read(); + if ((b1 | b2) < 0) { + throw new IndexOutOfBoundsException(); + } + return packShort(b1, b2); + } + + /** + * Creates a Java {@code short} from given unsigned bytes, where {@code b1} is the most + * significant byte {@code byte} and {@code b2} is the least significant {@code byte}. + */ + private static short packShort(int b1, int b2) { + return (short) ((b1 << 8) + b2); + } + + /** + * Reads two bytes and returns a {@code char} value. + * + * @throws IndexOutOfBoundsException if there are not enough bytes to read. + */ + public final char readChar() throws IndexOutOfBoundsException { + int b1 = read(); + int b2 = read(); + if ((b1 | b2) < 0) { + throw new IndexOutOfBoundsException(); + } + return packChar(b1, b2); + } + + /** + * Creates a Java {@code char} from given unsigned bytes, where {@code b1} is the most + * significant byte {@code byte} and {@code b2} is the least significant {@code byte}. + */ + private static char packChar(int b1, int b2) { + return (char) ((b1 << 8) + b2); + } + + /** + * Reads four bytes and returns an {@code int} value. + * + * @throws IndexOutOfBoundsException if there are not enough bytes to read. + */ + public final int readInt() throws IndexOutOfBoundsException { + int b1 = read(); + int b2 = read(); + int b3 = read(); + int b4 = read(); + if ((b1 | b2 | b3 | b4) < 0) { + throw new IndexOutOfBoundsException(); + } + return packInt(b1, b2, b3, b4); + } + + /** + * Creates a Java {@code int} from given unsigned bytes, where {@code b1} is the most + * significant byte {@code byte} and {@code b4} is the least significant {@code byte}. + */ + private static int packInt(int b1, int b2, int b3, int b4) { + return (b1 << 24) + (b2 << 16) + (b3 << 8) + b4; + } + + /** + * Reads eight bytes and returns a {@code long} value. + * + * @throws IndexOutOfBoundsException if there are not enough bytes to read. + */ + public final long readLong() throws IndexOutOfBoundsException { + int b1 = read(); + int b2 = read(); + int b3 = read(); + int b4 = read(); + int b5 = read(); + int b6 = read(); + int b7 = read(); + int b8 = read(); + if ((b1 | b2 | b3 | b4 | b5 | b6 | b7 | b8) < 0) { + throw new IndexOutOfBoundsException(); + } + return packLong(b1, b2, b3, b4, b5, b6, b7, b8); + } + + /** + * Creates a Java {@code long} from given unsigned bytes, where {@code b1} is the most + * significant byte {@code byte} and {@code b8} is the least significant {@code byte}. + */ + private static long packLong(int b1, int b2, int b3, int b4, int b5, int b6, int b7, int b8) { + return ((long) b1 << 56) + ((long) b2 << 48) + ((long) b3 << 40) + ((long) b4 << 32) + + ((long) b5 << 24) + ((long) b6 << 16) + ((long) b7 << 8) + b8; + } + + /** + * Reads four bytes and returns a {@code float} value. It does this by reading an {@code int} + * value and converting the {@code int} value to a {@code float} using + * {@link Float#intBitsToFloat(int)}. + * + * @throws IndexOutOfBoundsException if there are not enough bytes to read. + */ + public final float readFloat() throws IndexOutOfBoundsException { + return Float.intBitsToFloat(readInt()); + } + + /** + * Reads eight bytes and returns a {@code double} value. It does this by reading a {@code long} + * value and converting the {@code long} value to a {@code double} using + * {@link Double#longBitsToDouble(long)}. + * + * @throws IndexOutOfBoundsException if there are not enough bytes to read. + */ + public final double readDouble() throws IndexOutOfBoundsException { + return Double.longBitsToDouble(readLong()); + } + + /** + * Reads a single byte. The byte value is returned as an {@code int} in the range {@code 0} to + * {@code 255}. If no byte is available because the end of the stream has been reached, the + * value {@code -1} is returned. + */ + public abstract int read(); + + /** + * Reads {@code len} bytes into a byte array starting at offset {@code off}. + * + * @throws IndexOutOfBoundsException if there are not enough bytes to read + */ + public abstract void read(byte[] b, int off, int len) throws IndexOutOfBoundsException; + + /** + * Reads a string using a modified UTF-8 encoding in a machine-independent manner. + * + * @throws IndexOutOfBoundsException if there are not enough bytes to read. + * @throws IllegalArgumentException if the bytes do not represent a valid modified UTF-8 + * encoding of a string. + */ + public final String readUTF() throws IndexOutOfBoundsException, IllegalArgumentException { + int len; + int b1 = read(); + int b2 = read(); + if ((b1 | b2) < 0) { + throw new IndexOutOfBoundsException(); + } + if ((b1 & LARGE_STRING_TAG) == LARGE_STRING_TAG) { + int b3 = read(); + int b4 = read(); + if ((b3 | b4) < 0) { + throw new IndexOutOfBoundsException(); + } + len = ((b1 & ~LARGE_STRING_TAG) << 24) + (b2 << 16) + (b3 << 8) + b4; + } else { + len = (b1 << 8) + b2; + } + ensureBufferSize(len); + if (tempEncodingCharBuffer == null || tempEncodingCharBuffer.length < len) { + tempEncodingCharBuffer = new char[Math.max(bufferSize(0, len), 80)]; + } + + int c1; + int c2; + int c3; + int byteCount = 0; + int charCount = 0; + + read(tempEncodingByteBuffer, 0, len); + + while (byteCount < len) { + c1 = tempEncodingByteBuffer[byteCount] & 0xff; + if (c1 > 127) { + break; + } + byteCount++; + tempEncodingCharBuffer[charCount++] = (char) c1; + } + + while (byteCount < len) { + c1 = tempEncodingByteBuffer[byteCount] & 0xff; + switch (c1 >> 4) { + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + case 7: + /* 0xxxxxxx */ + byteCount++; + tempEncodingCharBuffer[charCount++] = (char) c1; + break; + case 12: + case 13: + /* 110x xxxx 10xx xxxx */ + byteCount += 2; + if (byteCount > len) { + throw new IllegalArgumentException("Partial character at end"); + } + c2 = tempEncodingByteBuffer[byteCount - 1]; + if ((c2 & 0xC0) != 0x80) { + throw new IllegalArgumentException("malformed input around byte " + byteCount); + } + tempEncodingCharBuffer[charCount++] = (char) (((c1 & 0x1F) << 6) | (c2 & 0x3F)); + break; + case 14: + /* 1110 xxxx 10xx xxxx 10xx xxxx */ + byteCount += 3; + if (byteCount > len) { + throw new IllegalArgumentException("malformed input: partial character at end"); + } + c2 = tempEncodingByteBuffer[byteCount - 2]; + c3 = tempEncodingByteBuffer[byteCount - 1]; + if (((c2 & 0xC0) != 0x80) || ((c3 & 0xC0) != 0x80)) { + throw new IllegalArgumentException("malformed input around byte " + (byteCount - 1)); + } + tempEncodingCharBuffer[charCount++] = (char) (((c1 & 0x0F) << 12) | ((c2 & 0x3F) << 6) | (c3 & 0x3F)); + break; + default: + /* 10xx xxxx, 1111 xxxx */ + throw new IllegalArgumentException("malformed input around byte " + byteCount); + } + } + // The number of chars produced may be less than len + return new String(tempEncodingCharBuffer, 0, charCount); + } + + /** + * Reads a single value, using the data type encoded in the marshalled data. + * + * @return The read value, such as a boxed Java primitive, a {@link String}, a {@code null}, or + * an array of these types. + * @throws IndexOutOfBoundsException if there are not enough bytes to read. + * @throws IllegalArgumentException when the marshaled type is not supported or if the bytes do + * not represent a valid modified UTF-8 encoding of a string. + */ + public final Object readTypedValue() throws IndexOutOfBoundsException, IllegalArgumentException { + byte tag = readByte(); + switch (tag) { + case ARRAY: + int len = readInt(); + Object[] arr = new Object[len]; + for (int i = 0; i < len; i++) { + arr[i] = readTypedValue(); + } + return arr; + case NULL: + return null; + case BOOLEAN: + return readBoolean(); + case BYTE: + return readByte(); + case SHORT: + return readShort(); + case CHAR: + return readChar(); + case INT: + return readInt(); + case LONG: + return readLong(); + case FLOAT: + return readFloat(); + case DOUBLE: + return readDouble(); + case STRING: + return readUTF(); + default: + throw new IllegalArgumentException(String.format("Unknown tag %d", tag)); + } + } + + /** + * Reads {@code len} bytes into a boolean array starting at offset {@code off}. + * + * @throws IndexOutOfBoundsException if there are not enough bytes to read + */ + public final void read(boolean[] b, int off, int len) { + ensureBufferSize(len); + read(tempEncodingByteBuffer, 0, len); + int limit = off + len; + for (int i = off, j = 0; i < limit; i++) { + b[i] = tempEncodingByteBuffer[j++] != 0; + } + } + + /** + * Reads {@code len} shorts into a short array starting at offset {@code off}. + * + * @throws IndexOutOfBoundsException if there are not enough bytes to read + */ + public final void read(short[] b, int off, int len) { + int size = len * Short.BYTES; + ensureBufferSize(size); + read(tempEncodingByteBuffer, 0, size); + int limit = off + len; + for (int i = off, j = 0; i < limit; i++) { + int b1 = (tempEncodingByteBuffer[j++] & 0xff); + int b2 = (tempEncodingByteBuffer[j++] & 0xff); + b[i] = packShort(b1, b2); + } + } + + /** + * Reads {@code len} chars into a char array starting at offset {@code off}. + * + * @throws IndexOutOfBoundsException if there are not enough bytes to read + */ + public final void read(char[] b, int off, int len) { + int size = len * Character.BYTES; + ensureBufferSize(size); + read(tempEncodingByteBuffer, 0, size); + int limit = off + len; + for (int i = off, j = 0; i < limit; i++) { + int b1 = (tempEncodingByteBuffer[j++] & 0xff); + int b2 = (tempEncodingByteBuffer[j++] & 0xff); + b[i] = packChar(b1, b2); + } + } + + /** + * Reads {@code len} ints into an int array starting at offset {@code off}. + * + * @throws IndexOutOfBoundsException if there are not enough bytes to read + */ + public final void read(int[] b, int off, int len) { + int size = len * Integer.BYTES; + ensureBufferSize(size); + read(tempEncodingByteBuffer, 0, size); + int limit = off + len; + for (int i = off, j = 0; i < limit; i++) { + int b1 = (tempEncodingByteBuffer[j++] & 0xff); + int b2 = (tempEncodingByteBuffer[j++] & 0xff); + int b3 = (tempEncodingByteBuffer[j++] & 0xff); + int b4 = (tempEncodingByteBuffer[j++] & 0xff); + b[i] = packInt(b1, b2, b3, b4); + } + } + + /** + * Reads {@code len} longs into a long array starting at offset {@code off}. + * + * @throws IndexOutOfBoundsException if there are not enough bytes to read + */ + public final void read(long[] b, int off, int len) { + int size = len * Long.BYTES; + ensureBufferSize(size); + read(tempEncodingByteBuffer, 0, size); + int limit = off + len; + for (int i = off, j = 0; i < limit; i++) { + int b1 = (tempEncodingByteBuffer[j++] & 0xff); + int b2 = (tempEncodingByteBuffer[j++] & 0xff); + int b3 = (tempEncodingByteBuffer[j++] & 0xff); + int b4 = (tempEncodingByteBuffer[j++] & 0xff); + int b5 = (tempEncodingByteBuffer[j++] & 0xff); + int b6 = (tempEncodingByteBuffer[j++] & 0xff); + int b7 = (tempEncodingByteBuffer[j++] & 0xff); + int b8 = (tempEncodingByteBuffer[j++] & 0xff); + b[i] = packLong(b1, b2, b3, b4, b5, b6, b7, b8); + } + } + + /** + * Reads {@code len} floats into a float array starting at offset {@code off}. + * + * @throws IndexOutOfBoundsException if there are not enough bytes to read + */ + public final void read(float[] b, int off, int len) { + int size = len * Float.BYTES; + ensureBufferSize(size); + read(tempEncodingByteBuffer, 0, size); + int limit = off + len; + for (int i = off, j = 0; i < limit; i++) { + int b1 = (tempEncodingByteBuffer[j++] & 0xff); + int b2 = (tempEncodingByteBuffer[j++] & 0xff); + int b3 = (tempEncodingByteBuffer[j++] & 0xff); + int b4 = (tempEncodingByteBuffer[j++] & 0xff); + b[i] = Float.intBitsToFloat(packInt(b1, b2, b3, b4)); + } + } + + /** + * Reads {@code len} doubles into a double array starting at offset {@code off}. + * + * @throws IndexOutOfBoundsException if there are not enough bytes to read + */ + public final void read(double[] b, int off, int len) { + int size = len * Double.BYTES; + ensureBufferSize(size); + read(tempEncodingByteBuffer, 0, size); + int limit = off + len; + for (int i = off, j = 0; i < limit; i++) { + int b1 = (tempEncodingByteBuffer[j++] & 0xff); + int b2 = (tempEncodingByteBuffer[j++] & 0xff); + int b3 = (tempEncodingByteBuffer[j++] & 0xff); + int b4 = (tempEncodingByteBuffer[j++] & 0xff); + int b5 = (tempEncodingByteBuffer[j++] & 0xff); + int b6 = (tempEncodingByteBuffer[j++] & 0xff); + int b7 = (tempEncodingByteBuffer[j++] & 0xff); + int b8 = (tempEncodingByteBuffer[j++] & 0xff); + b[i] = Double.longBitsToDouble(packLong(b1, b2, b3, b4, b5, b6, b7, b8)); + } + } + + /** + * Returns a read only {@link ByteBuffer} backed by the {@link BinaryInput} internal buffer. The + * content of the buffer will start at the {@link BinaryInput}'s current position. The buffer's + * capacity and limit will be {@code len}, its position will be zero, its mark will be + * undefined, and its byte order will be {@link ByteOrder#BIG_ENDIAN BIG_ENDIAN}. After a + * successful call, the {@link BinaryInput}'s current position is incremented by the + * {@code len}. + * + * @throws IndexOutOfBoundsException if the BinaryInput has not enough remaining bytes. + */ + public abstract ByteBuffer asByteBuffer(int len); + + /** + * Creates a new buffer backed by a byte array. + */ + public static BinaryInput create(byte[] buffer) { + return new ByteArrayBinaryInput(buffer); + } + + /** + * Creates a new buffer backed by a byte array only up to a given length. + */ + public static BinaryInput create(byte[] buffer, int length) { + return new ByteArrayBinaryInput(buffer, length); + } + + /** + * Creates a new buffer wrapping an off-heap memory segment starting at an {@code address} + * having {@code length} bytes. + */ + public static BinaryInput create(CCharPointer address, int length) { + return new CCharPointerInput(address, length); + } + + private void ensureBufferSize(int len) { + if (tempEncodingByteBuffer == null || tempEncodingByteBuffer.length < len) { + tempEncodingByteBuffer = new byte[Math.max(bufferSize(0, len), 80)]; + } + } + + private static final class ByteArrayBinaryInput extends BinaryInput { + + private final byte[] buffer; + + ByteArrayBinaryInput(byte[] buffer) { + super(buffer.length); + this.buffer = buffer; + } + + ByteArrayBinaryInput(byte[] buffer, int length) { + super(length); + this.buffer = buffer; + } + + @Override + public int read() { + if (pos >= length) { + return EOF; + } + return (buffer[pos++] & 0xff); + } + + @Override + public void read(byte[] b, int off, int len) { + if (len < 0) { + throw new IllegalArgumentException(String.format("Len must be non negative but was %d", len)); + } + if (pos + len > length) { + throw new IndexOutOfBoundsException(); + } + System.arraycopy(buffer, pos, b, off, len); + pos += len; + } + + @Override + public ByteBuffer asByteBuffer(int len) { + ByteBuffer result = ByteBuffer.wrap(buffer, pos, len).slice().asReadOnlyBuffer(); + pos += len; + return result; + } + } + + private static final class CCharPointerInput extends BinaryInput { + + /** + * Represents the point at which the average cost of a JNI call exceeds the expense of an + * element by element copy. See {@code java.nio.Bits#JNI_COPY_TO_ARRAY_THRESHOLD}. + */ + private static final int BYTEBUFFER_COPY_TO_ARRAY_THRESHOLD = 6; + + private final CCharPointer address; + /** + * ByteBuffer view of this {@link CCharPointerInput} direct memory. The ByteBuffer is used + * for bulk data transfers, where the bulk ByteBuffer operations outperform element by + * element copying by an order of magnitude. + */ + private ByteBuffer byteBufferView; + + CCharPointerInput(CCharPointer address, int length) { + super(length); + this.address = address; + } + + @Override + public int read() { + if (pos >= length) { + return EOF; + } + return (address.read(pos++) & 0xff); + } + + @Override + public void read(byte[] b, int off, int len) { + if (len < 0) { + throw new IllegalArgumentException(String.format("Len must be non negative but was %d", len)); + } + if (pos + len > length) { + throw new IndexOutOfBoundsException(); + } + if (len > BYTEBUFFER_COPY_TO_ARRAY_THRESHOLD) { + if (byteBufferView == null) { + byteBufferView = CTypeConversion.asByteBuffer(address, length); + } + byteBufferView.position(pos); + byteBufferView.get(b, off, len); + } else { + for (int i = 0, j = pos; i < len; i++, j++) { + b[off + i] = address.read(j); + } + } + pos += len; + } + + @Override + public ByteBuffer asByteBuffer(int len) { + ByteBuffer result = CTypeConversion.asByteBuffer(address.addressOf(pos), len).order(ByteOrder.BIG_ENDIAN).asReadOnlyBuffer(); + pos += len; + return result; + } + } +} diff --git a/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/hotspot/libgraal/BinaryOutput.java b/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/hotspot/libgraal/BinaryOutput.java new file mode 100644 index 000000000000..0c42ae95c723 --- /dev/null +++ b/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/hotspot/libgraal/BinaryOutput.java @@ -0,0 +1,672 @@ +/* + * Copyright (c) 2021, 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. Oracle designates this + * particular file as subject to the "Classpath" exception as provided + * by Oracle in the LICENSE file that accompanied this code. + * + * 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 org.graalvm.compiler.truffle.runtime.hotspot.libgraal; + +import org.graalvm.nativeimage.UnmanagedMemory; +import org.graalvm.nativeimage.c.type.CCharPointer; +import org.graalvm.nativeimage.c.type.CTypeConversion; +import org.graalvm.word.WordFactory; + +import java.io.Closeable; +import java.nio.ByteBuffer; +import java.util.Arrays; +import java.util.Objects; + +/** + * A buffer used by the {@link BinaryMarshaller} to marshall parameters and results passed by value. + * + * @see BinaryInput + * @see BinaryMarshaller + * @see Builder#registerMarshaller(Class, BinaryMarshaller) + */ +abstract class BinaryOutput { + + /** + * Maximum string length for string encoded by 4 bytes length followed be content. + */ + private static final int MAX_LENGTH = Integer.MAX_VALUE - Integer.BYTES; + /** + * Maximum string length for string encoded by 2 bytes length followed be content. + */ + private static final int MAX_SHORT_LENGTH = Short.MAX_VALUE; + /** + * Tag to distinguish between long and short string. The tag is set in the first string length + * byte. + */ + static final int LARGE_STRING_TAG = 1 << 7; + + // Type tags used by writeTypedValue + static final byte NULL = 0; + static final byte BOOLEAN = NULL + 1; + static final byte BYTE = BOOLEAN + 1; + static final byte SHORT = BYTE + 1; + static final byte CHAR = SHORT + 1; + static final byte INT = CHAR + 1; + static final byte LONG = INT + 1; + static final byte FLOAT = LONG + 1; + static final byte DOUBLE = FLOAT + 1; + static final byte STRING = DOUBLE + 1; + static final byte ARRAY = STRING + 1; + + private byte[] tempDecodingBuffer; + protected int pos; + + private BinaryOutput() { + } + + /** + * Writes a {@code boolean} as a single byte value. The value {@code true} is written as the + * value {@code (byte)1}, the value {@code false} is written as the value {@code (byte)0}. The + * buffer position is incremented by {@code 1}. + */ + public final void writeBoolean(boolean value) { + write(value ? 1 : 0); + } + + /** + * Writes a {@code byte} as a single byte value. The buffer position is incremented by + * {@code 1}. + */ + public final void writeByte(int value) { + write(value); + } + + /** + * Writes a {@code short} as two bytes, high byte first. The buffer position is incremented by + * {@code 2}. + */ + public final void writeShort(int value) { + write((value >>> 8) & 0xff); + write(value & 0xff); + } + + /** + * Writes a {@code char} as two bytes, high byte first. The buffer position is incremented by + * {@code 2}. + */ + public final void writeChar(int value) { + write((value >>> 8) & 0xff); + write(value & 0xff); + } + + /** + * Writes an {@code int} as four bytes, high byte first. The buffer position is incremented by + * {@code 4}. + */ + public final void writeInt(int value) { + write((value >>> 24) & 0xff); + write((value >>> 16) & 0xff); + write((value >>> 8) & 0xff); + write(value & 0xff); + } + + /** + * Writes a {@code long} as eight bytes, high byte first. The buffer position is incremented by + * {@code 8}. + */ + public final void writeLong(long value) { + write((int) ((value >>> 56) & 0xff)); + write((int) ((value >>> 48) & 0xff)); + write((int) ((value >>> 40) & 0xff)); + write((int) ((value >>> 32) & 0xff)); + write((int) ((value >>> 24) & 0xff)); + write((int) ((value >>> 16) & 0xff)); + write((int) ((value >>> 8) & 0xff)); + write((int) (value & 0xff)); + } + + /** + * Converts a {@code float} value to an {@code int} using the + * {@link Float#floatToIntBits(float)}, and then writes that {@code int} as four bytes, high + * byte first. The buffer position is incremented by {@code 4}. + */ + public final void writeFloat(float value) { + writeInt(Float.floatToIntBits(value)); + } + + /** + * Converts a {@code double} value to a {@code long} using the + * {@link Double#doubleToLongBits(double)}, and then writes that {@code long} as eight bytes, + * high byte first. The buffer position is incremented by {@code 8}. + */ + public final void writeDouble(double value) { + writeLong(Double.doubleToLongBits(value)); + } + + /** + * Writes the lowest byte of the argument as a single byte value. The buffer position is + * incremented by {@code 1}. + */ + public abstract void write(int b); + + /** + * Writes {@code len} bytes from the byte {@code array} starting at offset {@code off}. The + * buffer position is incremented by {@code len}. + */ + public abstract void write(byte[] array, int off, int len); + + /** + * Reserves a buffer space. The reserved space can be used for out parameters. + * + * @param numberOfBytes number of bytes to reserve. + */ + public abstract void skip(int numberOfBytes); + + /** + * Writes a string using a modified UTF-8 encoding in a machine-independent manner. + * + * @throws IllegalArgumentException if the {@code string} cannot be encoded using modified UTF-8 + * encoding. + */ + public final void writeUTF(String string) throws IllegalArgumentException { + int len = string.length(); + int utfLen = 0; + int c; + int count = 0; + + for (int i = 0; i < len; i++) { + c = string.charAt(i); + if ((c >= 0x0001) && (c <= 0x007F)) { + utfLen++; + } else if (c > 0x07FF) { + utfLen += 3; + } else { + utfLen += 2; + } + } + + if (utfLen > MAX_LENGTH) { + throw new IllegalArgumentException("String too long to encode, " + utfLen + " bytes"); + } + int headerSize; + if (utfLen > MAX_SHORT_LENGTH) { + headerSize = Integer.BYTES; + ensureBufferSize(headerSize, utfLen); + tempDecodingBuffer[count++] = (byte) ((LARGE_STRING_TAG | (utfLen >>> 24)) & 0xff); + tempDecodingBuffer[count++] = (byte) ((utfLen >>> 16) & 0xFF); + } else { + headerSize = Short.BYTES; + ensureBufferSize(headerSize, utfLen); + } + tempDecodingBuffer[count++] = (byte) ((utfLen >>> 8) & 0xFF); + tempDecodingBuffer[count++] = (byte) (utfLen & 0xFF); + + int i = 0; + for (; i < len; i++) { + c = string.charAt(i); + if (!((c >= 0x0001) && (c <= 0x007F))) { + break; + } + tempDecodingBuffer[count++] = (byte) c; + } + + for (; i < len; i++) { + c = string.charAt(i); + if ((c >= 0x0001) && (c <= 0x007F)) { + tempDecodingBuffer[count++] = (byte) c; + } else if (c > 0x07FF) { + tempDecodingBuffer[count++] = (byte) (0xE0 | ((c >> 12) & 0x0F)); + tempDecodingBuffer[count++] = (byte) (0x80 | ((c >> 6) & 0x3F)); + tempDecodingBuffer[count++] = (byte) (0x80 | (c & 0x3F)); + } else { + tempDecodingBuffer[count++] = (byte) (0xC0 | ((c >> 6) & 0x1F)); + tempDecodingBuffer[count++] = (byte) (0x80 | (c & 0x3F)); + } + } + write(tempDecodingBuffer, 0, headerSize + utfLen); + } + + /** + * Returns this buffer's position. + */ + public int getPosition() { + return pos; + } + + /** + * Returns true if a value is a typed value writable using + * {@link #writeTypedValue(Object)}, else false. + */ + public static boolean isTypedValue(Object value) { + if (value == null) { + return true; + } + return value instanceof Object[] || value == null || value instanceof Boolean || value instanceof Byte || + value instanceof Short || value instanceof Character || value instanceof Integer || + value instanceof Long || value instanceof Float || value instanceof Double || value instanceof String; + } + + /** + * Writes the value that is represented by the given object, together with information on the + * value's data type. Supported types are boxed Java primitive types, {@link String}, + * {@code null}, and arrays of these types. + * + * @throws IllegalArgumentException when the {@code value} type is not supported or the + * {@code value} is a string which cannot be encoded using modified UTF-8 encoding. + * @see #isTypedValue(Object) to find out whether a value can be serialized. + */ + public final void writeTypedValue(Object value) throws IllegalArgumentException { + if (value instanceof Object[]) { + Object[] arr = (Object[]) value; + writeByte(ARRAY); + writeInt(arr.length); + for (Object arrElement : arr) { + writeTypedValue(arrElement); + } + } else if (value == null) { + writeByte(NULL); + } else if (value instanceof Boolean) { + writeByte(BOOLEAN); + writeBoolean((boolean) value); + } else if (value instanceof Byte) { + writeByte(BYTE); + writeByte((byte) value); + } else if (value instanceof Short) { + writeByte(SHORT); + writeShort((short) value); + } else if (value instanceof Character) { + writeByte(CHAR); + writeChar((char) value); + } else if (value instanceof Integer) { + writeByte(INT); + writeInt((int) value); + } else if (value instanceof Long) { + writeByte(LONG); + writeLong((long) value); + } else if (value instanceof Float) { + writeByte(FLOAT); + writeFloat((float) value); + } else if (value instanceof Double) { + writeByte(DOUBLE); + writeDouble((double) value); + } else if (value instanceof String) { + writeByte(STRING); + writeUTF((String) value); + } else { + throw new IllegalArgumentException(String.format("Unsupported type %s", value.getClass())); + } + } + + /** + * Writes {@code len} bytes from the boolean {@code array} starting at offset {@code off}. The + * value {@code true} is written as the value {@code (byte)1}, the value {@code false} is + * written as the value {@code (byte)0}. The buffer position is incremented by {@code len}. + */ + public final void write(boolean[] array, int off, int len) { + ensureBufferSize(0, len); + for (int i = 0, j = 0; i < len; i++, j++) { + tempDecodingBuffer[j] = (byte) (array[off + i] ? 1 : 0); + } + write(tempDecodingBuffer, 0, len); + } + + /** + * Writes {@code len} shorts from the {@code array} starting at offset {@code off}. The buffer + * position is incremented by {@code 2 * len}. + */ + public final void write(short[] array, int off, int len) { + int size = len * Short.BYTES; + ensureBufferSize(0, size); + for (int i = 0, j = 0; i < len; i++) { + tempDecodingBuffer[j++] = (byte) ((array[off + i] >>> 8) & 0xff); + tempDecodingBuffer[j++] = (byte) (array[off + i] & 0xff); + } + write(tempDecodingBuffer, 0, size); + } + + /** + * Writes {@code len} chars from the {@code array} starting at offset {@code off}. The buffer + * position is incremented by {@code 2 * len}. + */ + public final void write(char[] array, int off, int len) { + int size = len * Character.BYTES; + ensureBufferSize(0, size); + for (int i = 0, j = 0; i < len; i++) { + tempDecodingBuffer[j++] = (byte) ((array[off + i] >>> 8) & 0xff); + tempDecodingBuffer[j++] = (byte) (array[off + i] & 0xff); + } + write(tempDecodingBuffer, 0, size); + } + + /** + * Writes {@code len} ints from the {@code array} starting at offset {@code off}. The buffer + * position is incremented by {@code 4 * len}. + */ + public final void write(int[] array, int off, int len) { + int size = len * Integer.BYTES; + ensureBufferSize(0, size); + for (int i = 0, j = 0; i < len; i++) { + tempDecodingBuffer[j++] = (byte) ((array[off + i] >>> 24) & 0xff); + tempDecodingBuffer[j++] = (byte) ((array[off + i] >>> 16) & 0xff); + tempDecodingBuffer[j++] = (byte) ((array[off + i] >>> 8) & 0xff); + tempDecodingBuffer[j++] = (byte) (array[off + i] & 0xff); + } + write(tempDecodingBuffer, 0, size); + } + + /** + * Writes {@code len} longs from the {@code array} starting at offset {@code off}. The buffer + * position is incremented by {@code 8 * len}. + */ + public final void write(long[] array, int off, int len) { + int size = len * Long.BYTES; + ensureBufferSize(0, size); + for (int i = 0, j = 0; i < len; i++) { + tempDecodingBuffer[j++] = (byte) ((array[off + i] >>> 56) & 0xff); + tempDecodingBuffer[j++] = (byte) ((array[off + i] >>> 48) & 0xff); + tempDecodingBuffer[j++] = (byte) ((array[off + i] >>> 40) & 0xff); + tempDecodingBuffer[j++] = (byte) ((array[off + i] >>> 32) & 0xff); + tempDecodingBuffer[j++] = (byte) ((array[off + i] >>> 24) & 0xff); + tempDecodingBuffer[j++] = (byte) ((array[off + i] >>> 16) & 0xff); + tempDecodingBuffer[j++] = (byte) ((array[off + i] >>> 8) & 0xff); + tempDecodingBuffer[j++] = (byte) (array[off + i] & 0xff); + } + write(tempDecodingBuffer, 0, size); + } + + /** + * Writes {@code len} floats from the {@code array} starting at offset {@code off}. Each + * {@code float} value is converted to an {@code int} using the + * {@link Float#floatToIntBits(float)} and written as an int. The buffer position is incremented + * by {@code 4 * len}. + */ + public final void write(float[] array, int off, int len) { + int size = len * Float.BYTES; + ensureBufferSize(0, size); + for (int i = 0, j = 0; i < len; i++) { + int bits = Float.floatToIntBits(array[off + i]); + tempDecodingBuffer[j++] = (byte) ((bits >>> 24) & 0xff); + tempDecodingBuffer[j++] = (byte) ((bits >>> 16) & 0xff); + tempDecodingBuffer[j++] = (byte) ((bits >>> 8) & 0xff); + tempDecodingBuffer[j++] = (byte) (bits & 0xff); + } + write(tempDecodingBuffer, 0, size); + } + + /** + * Writes {@code len} doubles from the {@code array} starting at offset {@code off}. Each + * {@code double} value is converted to an {@code lang} using the + * {@link Double#doubleToLongBits(double)} and written as a long. The buffer position is + * incremented by {@code 8 * len}. + */ + public final void write(double[] array, int off, int len) { + int size = len * Double.BYTES; + ensureBufferSize(Integer.BYTES, size); + for (int i = 0, j = 0; i < len; i++) { + long bits = Double.doubleToLongBits(array[off + i]); + tempDecodingBuffer[j++] = (byte) ((bits >>> 56) & 0xff); + tempDecodingBuffer[j++] = (byte) ((bits >>> 48) & 0xff); + tempDecodingBuffer[j++] = (byte) ((bits >>> 40) & 0xff); + tempDecodingBuffer[j++] = (byte) ((bits >>> 32) & 0xff); + tempDecodingBuffer[j++] = (byte) ((bits >>> 24) & 0xff); + tempDecodingBuffer[j++] = (byte) ((bits >>> 16) & 0xff); + tempDecodingBuffer[j++] = (byte) ((bits >>> 8) & 0xff); + tempDecodingBuffer[j++] = (byte) (bits & 0xff); + } + write(tempDecodingBuffer, 0, size); + } + + private void ensureBufferSize(int headerSize, int dataSize) { + if (tempDecodingBuffer == null || tempDecodingBuffer.length < (headerSize + dataSize)) { + tempDecodingBuffer = new byte[bufferSize(headerSize, dataSize)]; + } + } + + /** + * Creates a new buffer backed by a byte array. + */ + public static ByteArrayBinaryOutput create() { + return new ByteArrayBinaryOutput(ByteArrayBinaryOutput.INITIAL_SIZE); + } + + /** + * Creates a new buffer wrapping the {@code initialBuffer}. If the {@code initialBuffer} + * capacity is not sufficient for writing the data, a new array is allocated. Always use + * {@link ByteArrayBinaryOutput#getArray()} to obtain the marshaled data. + */ + public static ByteArrayBinaryOutput create(byte[] initialBuffer) { + Objects.requireNonNull(initialBuffer, "InitialBuffer must be non null."); + return new ByteArrayBinaryOutput(initialBuffer); + } + + /** + * Creates a new buffer wrapping an off-heap memory segment starting at {@code address} having + * {@code length} bytes. If the capacity of an off-heap memory segment is not sufficient for + * writing the data, a new off-heap memory is allocated. Always use + * {@link CCharPointerBinaryOutput#getAddress()} to obtain the marshaled data. + * + * @param address the off-heap memory address + * @param length the off-heap memory size + * @param dynamicallyAllocated {@code true} if the memory was dynamically allocated and should + * be freed when the buffer is closed; {@code false} for the stack allocated memory. + */ + public static CCharPointerBinaryOutput create(CCharPointer address, int length, boolean dynamicallyAllocated) { + return new CCharPointerBinaryOutput(address, length, dynamicallyAllocated); + } + + static int bufferSize(int headerSize, int dataSize) { + return headerSize + (dataSize <= MAX_SHORT_LENGTH ? dataSize << 1 : dataSize); + } + + /** + * A {@link BinaryOutput} backed by a byte array. + */ + public static final class ByteArrayBinaryOutput extends BinaryOutput { + + private static final int MAX_ARRAY_SIZE = Integer.MAX_VALUE - 8; + static final int INITIAL_SIZE = 32; + + private byte[] buffer; + + private ByteArrayBinaryOutput(int size) { + buffer = new byte[size]; + } + + private ByteArrayBinaryOutput(byte[] initialBuffer) { + buffer = initialBuffer; + } + + @Override + public void write(int b) { + ensureCapacity(pos + 1); + buffer[pos] = (byte) b; + pos += 1; + } + + @Override + public void write(byte[] b, int off, int len) { + ensureCapacity(pos + len); + System.arraycopy(b, off, buffer, pos, len); + pos += len; + } + + @Override + public void skip(int numberOfBytes) { + ensureCapacity(pos + numberOfBytes); + pos += numberOfBytes; + } + + /** + * Returns the byte array containing the marshalled data. + */ + public byte[] getArray() { + return buffer; + } + + private void ensureCapacity(int neededCapacity) { + if (neededCapacity - buffer.length > 0) { + int newCapacity = buffer.length << 1; + if (newCapacity - neededCapacity < 0) { + newCapacity = neededCapacity; + } + if (newCapacity - MAX_ARRAY_SIZE > 0) { + throw new OutOfMemoryError(); + } + buffer = Arrays.copyOf(buffer, newCapacity); + } + } + + /** + * Creates a new buffer backed by a byte array. The buffer initial size is + * {@code initialSize}. + */ + public static ByteArrayBinaryOutput create(int initialSize) { + return new ByteArrayBinaryOutput(initialSize); + } + } + + /** + * A {@link BinaryOutput} backed by an off-heap memory. + */ + public static final class CCharPointerBinaryOutput extends BinaryOutput implements Closeable { + + /** + * Represents the point at which the average cost of a JNI call exceeds the expense of an + * element by element copy. See {@code java.nio.Bits#JNI_COPY_FROM_ARRAY_THRESHOLD}. + */ + private static final int BYTEBUFFER_COPY_FROM_ARRAY_THRESHOLD = 6; + + private CCharPointer address; + private int length; + private boolean unmanaged; + /** + * ByteBuffer view of this {@link CCharPointerBinaryOutput} direct memory. The ByteBuffer is + * used for bulk data transfers, where the bulk ByteBuffer operations outperform element by + * element copying by an order of magnitude. + */ + private ByteBuffer byteBufferView; + + private CCharPointerBinaryOutput(CCharPointer address, int length, boolean unmanaged) { + this.address = address; + this.length = length; + this.unmanaged = unmanaged; + } + + @Override + public int getPosition() { + checkClosed(); + return super.getPosition(); + } + + /** + * Returns an address of an off-heap memory segment containing the marshalled data. + */ + public CCharPointer getAddress() { + checkClosed(); + return address; + } + + @Override + public void write(int b) { + checkClosed(); + ensureCapacity(pos + 1); + address.write(pos++, (byte) b); + } + + @Override + public void write(byte[] b, int off, int len) { + checkClosed(); + if ((off | len | b.length) < 0 || b.length - off < len) { + throw new IndexOutOfBoundsException("offset: " + off + ", length: " + len + ", array length: " + b.length); + } + ensureCapacity(pos + len); + if (len > BYTEBUFFER_COPY_FROM_ARRAY_THRESHOLD) { + if (byteBufferView == null) { + byteBufferView = CTypeConversion.asByteBuffer(address, length); + } + byteBufferView.position(pos); + byteBufferView.put(b, off, len); + } else { + for (int i = 0; i < len; i++) { + address.write(pos + i, b[off + i]); + } + } + pos += len; + } + + @Override + public void skip(int numberOfBytes) { + ensureCapacity(pos + numberOfBytes); + pos += numberOfBytes; + } + + /** + * Closes the buffer and frees off-heap allocated resources. + */ + @Override + public void close() { + if (unmanaged) { + UnmanagedMemory.free(address); + byteBufferView = null; + address = WordFactory.nullPointer(); + length = 0; + unmanaged = false; + pos = Integer.MIN_VALUE; + } + } + + private void checkClosed() { + if (pos == Integer.MIN_VALUE) { + throw new IllegalStateException("Already closed"); + } + } + + private void ensureCapacity(int neededCapacity) { + if (neededCapacity - length > 0) { + byteBufferView = null; + int newCapacity = length << 1; + if (newCapacity - neededCapacity < 0) { + newCapacity = neededCapacity; + } + if (newCapacity - Integer.MAX_VALUE > 0) { + throw new OutOfMemoryError(); + } + if (unmanaged) { + address = UnmanagedMemory.realloc(address, WordFactory.unsigned(newCapacity)); + } else { + CCharPointer newAddress = UnmanagedMemory.malloc(newCapacity); + memcpy(newAddress, address, pos); + address = newAddress; + } + length = newCapacity; + unmanaged = true; + } + } + + private static void memcpy(CCharPointer dst, CCharPointer src, int len) { + for (int i = 0; i < len; i++) { + dst.write(i, src.read(i)); + } + } + + /** + * Creates a new buffer backed by an off-heap memory segment. The buffer initial size is + * {@code initialSize}. + */ + public static CCharPointerBinaryOutput create(int initialSize) { + return new CCharPointerBinaryOutput(UnmanagedMemory.malloc(initialSize), initialSize, true); + } + } +} diff --git a/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/hotspot/libgraal/LibGraalTruffleCompilationSupport.java b/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/hotspot/libgraal/LibGraalTruffleCompilationSupport.java index 23312542339e..d2f48b0c7618 100644 --- a/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/hotspot/libgraal/LibGraalTruffleCompilationSupport.java +++ b/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/hotspot/libgraal/LibGraalTruffleCompilationSupport.java @@ -37,7 +37,6 @@ import org.graalvm.libgraal.LibGraalObject; import org.graalvm.libgraal.LibGraalScope; import org.graalvm.libgraal.LibGraalScope.DetachAction; -import org.graalvm.nativebridge.BinaryInput; /** * Represents a truffle compilation bundling compilable and task into a single object. Also installs diff --git a/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/hotspot/libgraal/TruffleFromLibGraalEntryPoints.java b/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/hotspot/libgraal/TruffleFromLibGraalEntryPoints.java index c6058b37ce64..2a4bd626747e 100644 --- a/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/hotspot/libgraal/TruffleFromLibGraalEntryPoints.java +++ b/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/hotspot/libgraal/TruffleFromLibGraalEntryPoints.java @@ -94,9 +94,8 @@ import org.graalvm.compiler.truffle.common.hotspot.libgraal.TruffleFromLibGraal; import org.graalvm.compiler.truffle.common.hotspot.libgraal.TruffleFromLibGraal.Id; import org.graalvm.compiler.truffle.runtime.OptimizedCallTarget; +import org.graalvm.compiler.truffle.runtime.hotspot.libgraal.BinaryOutput.ByteArrayBinaryOutput; import org.graalvm.libgraal.LibGraal; -import org.graalvm.nativebridge.BinaryOutput; -import org.graalvm.nativebridge.BinaryOutput.ByteArrayBinaryOutput; import jdk.vm.ci.code.InstalledCode; import jdk.vm.ci.hotspot.HotSpotSpeculationLog; From 5924c6b0eea9ede3816dbb387b1a794fad4d43f6 Mon Sep 17 00:00:00 2001 From: Christian Humer Date: Mon, 19 Jun 2023 20:03:56 +0200 Subject: [PATCH 06/43] Update license headers to new license UPL. --- .../truffle/common/ConstantFieldInfo.java | 50 ++++++++---- .../truffle/common/HostMethodInfo.java | 56 +++++++++----- .../common/OptimizedAssumptionDependency.java | 56 +++++++++----- .../common/PartialEvaluationMethodInfo.java | 56 +++++++++----- .../truffle/common/TruffleCompilable.java | 50 ++++++++---- .../common/TruffleCompilationSupport.java | 50 ++++++++---- .../common/TruffleCompilationTask.java | 50 ++++++++---- .../truffle/common/TruffleCompiler.java | 56 +++++++++----- .../TruffleCompilerAssumptionDependency.java | 50 ++++++++---- .../common/TruffleCompilerListener.java | 50 ++++++++---- .../TruffleCompilerOptionDescriptor.java | 56 +++++++++----- .../common/TruffleCompilerRuntime.java | 50 ++++++++---- .../common/TruffleSourceLanguagePosition.java | 56 +++++++++----- .../hotspot/HotSpotTruffleCompiler.java | 56 +++++++++----- .../FromLibGraalEntryPointsResolver.java | 56 +++++++++----- .../hotspot/libgraal/FromLibGraalId.java | 56 +++++++++----- .../hotspot/libgraal/TruffleFromLibGraal.java | 50 ++++++++---- .../libgraal/TruffleFromLibGraalRepeated.java | 56 +++++++++----- .../hotspot/libgraal/TruffleToLibGraal.java | 50 ++++++++---- .../common/hotspot/libgraal/Utilities.java | 56 +++++++++----- .../truffle/jfr/CompilationEvent.java | 56 +++++++++----- .../jfr/CompilationStatisticsEvent.java | 56 +++++++++----- .../truffle/jfr/DeoptimizationEvent.java | 56 +++++++++----- .../graalvm/compiler/truffle/jfr/Event.java | 56 +++++++++----- .../compiler/truffle/jfr/EventFactory.java | 56 +++++++++----- .../truffle/jfr/InvalidationEvent.java | 56 +++++++++----- .../truffle/jfr/RootFunctionEvent.java | 56 +++++++++----- .../jfr/impl/CompilationEventImpl.java | 50 ++++++++---- .../jfr/impl/CompilationFailureEventImpl.java | 56 +++++++++----- .../impl/CompilationStatisticsEventImpl.java | 50 ++++++++---- .../jfr/impl/DeoptimizationEventImpl.java | 56 +++++++++----- .../truffle/jfr/impl/EventFactoryImpl.java | 50 ++++++++---- .../jfr/impl/InvalidationEventImpl.java | 56 +++++++++----- .../truffle/jfr/impl/ProviderImpl.java | 56 +++++++++----- .../jfr/impl/RootFunctionEventImpl.java | 50 ++++++++---- .../runtime/AbstractCompilationTask.java | 50 ++++++++---- .../AbstractGraalTruffleRuntimeListener.java | 56 +++++++++----- .../runtime/AbstractOptimizedLoopNode.java | 50 ++++++++---- .../runtime/BackgroundCompileQueue.java | 50 ++++++++---- .../truffle/runtime/BaseOSRRootNode.java | 50 ++++++++---- .../truffle/runtime/BytecodeOSRMetadata.java | 50 ++++++++---- .../truffle/runtime/BytecodeOSRRootNode.java | 50 ++++++++---- .../truffle/runtime/CompilationState.java | 56 +++++++++----- .../truffle/runtime/CompilationTask.java | 50 ++++++++---- .../runtime/DefaultLoopNodeFactory.java | 56 +++++++++----- .../runtime/DynamicThresholdsQueue.java | 50 ++++++++---- .../truffle/runtime/EngineCacheSupport.java | 50 ++++++++---- .../compiler/truffle/runtime/EngineData.java | 50 ++++++++---- .../truffle/runtime/FixedPointMath.java | 56 +++++++++----- .../truffle/runtime/FloodControlHandler.java | 56 +++++++++----- .../truffle/runtime/GraalFastThreadLocal.java | 50 ++++++++---- .../truffle/runtime/GraalFrameInstance.java | 50 ++++++++---- .../runtime/GraalOSRFrameInstance.java | 50 ++++++++---- .../truffle/runtime/GraalRuntimeAccessor.java | 56 +++++++++----- .../runtime/GraalRuntimeServiceProvider.java | 56 +++++++++----- .../truffle/runtime/GraalRuntimeSupport.java | 48 ++++++++---- .../compiler/truffle/runtime/GraalTVMCI.java | 56 +++++++++----- .../truffle/runtime/GraalTestTVMCI.java | 56 +++++++++----- .../truffle/runtime/GraalTruffleRuntime.java | 77 +++++++++++-------- .../runtime/GraalTruffleRuntimeListener.java | 50 ++++++++---- ...GraalTruffleRuntimeListenerDispatcher.java | 50 ++++++++---- .../truffle/runtime/InlineDecision.java | 50 ++++++++---- .../truffle/runtime/LoopNodeFactory.java | 56 +++++++++----- .../compiler/truffle/runtime/ModuleUtil.java | 56 +++++++++----- .../truffle/runtime/OptimizedAssumption.java | 50 ++++++++---- .../truffle/runtime/OptimizedBlockNode.java | 50 ++++++++---- .../truffle/runtime/OptimizedCallTarget.java | 50 ++++++++---- .../runtime/OptimizedDirectCallNode.java | 50 ++++++++---- .../runtime/OptimizedIndirectCallNode.java | 50 ++++++++---- .../truffle/runtime/OptimizedLoopNode.java | 56 +++++++++----- .../truffle/runtime/OptimizedOSRLoopNode.java | 50 ++++++++---- .../runtime/OptimizedRuntimeOptions.java | 50 ++++++++---- .../truffle/runtime/SuppressFBWarnings.java | 56 +++++++++----- .../runtime/TraversingBlockingQueue.java | 50 ++++++++---- .../truffle/runtime/TruffleCallBoundary.java | 56 +++++++++----- .../truffle/runtime/TruffleInlining.java | 50 ++++++++---- .../runtime/TruffleSplittingStrategy.java | 50 ++++++++---- .../truffle/runtime/TruffleTypes.java | 56 +++++++++----- .../runtime/collection/ArrayQueue.java | 50 ++++++++---- .../runtime/collection/BTreeQueue.java | 50 ++++++++---- .../collection/DelegatingBlockingQueue.java | 50 ++++++++---- .../runtime/collection/SerialQueue.java | 56 +++++++++----- .../truffle/runtime/debug/JFRListener.java | 50 ++++++++---- .../runtime/debug/StatisticsListener.java | 50 ++++++++---- .../debug/TraceASTCompilationListener.java | 50 ++++++++---- .../debug/TraceCompilationListener.java | 50 ++++++++---- .../TraceCompilationPolymorphismListener.java | 50 ++++++++---- .../runtime/debug/TraceSplittingListener.java | 54 ++++++++----- .../AbstractHotSpotTruffleRuntimeAccess.java | 50 ++++++++---- .../hotspot/HotSpotFastThreadLocal.java | 50 ++++++++---- .../hotspot/HotSpotOptimizedCallTarget.java | 50 ++++++++---- .../hotspot/HotSpotThreadLocalHandshake.java | 50 ++++++++---- .../hotspot/HotSpotTruffleRuntime.java | 50 ++++++++---- .../HotSpotTruffleRuntimeServices.java | 48 ++++++++---- .../runtime/hotspot/JVMCIOpenSupport.java | 50 ++++++++---- .../java/HotSpotTruffleRuntimeAccess.java | 56 +++++++++----- .../runtime/hotspot/libgraal/BinaryInput.java | 50 ++++++++---- .../hotspot/libgraal/BinaryOutput.java | 50 ++++++++---- .../LibGraalCompilationResultInfo.java | 50 ++++++++---- .../hotspot/libgraal/LibGraalGraphInfo.java | 56 +++++++++----- .../LibGraalHotSpotTruffleCompiler.java | 50 ++++++++---- .../libgraal/LibGraalScopedHandle.java | 50 ++++++++---- .../libgraal/LibGraalStringSupplier.java | 56 +++++++++----- .../LibGraalTruffleCompilationSupport.java | 50 ++++++++---- .../LibGraalTruffleRuntimeAccess.java | 56 +++++++++----- .../TruffleFromLibGraalEntryPoints.java | 56 +++++++++----- .../libgraal/TruffleToLibGraalCalls.java | 50 ++++++++---- .../TruffleRuntimeServices.java | 56 +++++++++----- .../libgraal/DestroyedIsolateException.java | 56 +++++++++----- .../src/org/graalvm/libgraal/LibGraal.java | 50 ++++++++---- .../org/graalvm/libgraal/LibGraalIsolate.java | 50 ++++++++---- .../org/graalvm/libgraal/LibGraalObject.java | 50 ++++++++---- .../org/graalvm/libgraal/LibGraalScope.java | 50 ++++++++---- 113 files changed, 3875 insertions(+), 2072 deletions(-) diff --git a/truffle/src/com.oracle.truffle.compiler/src/org/graalvm/compiler/truffle/common/ConstantFieldInfo.java b/truffle/src/com.oracle.truffle.compiler/src/org/graalvm/compiler/truffle/common/ConstantFieldInfo.java index 9479c7948333..139478f5f4ac 100644 --- a/truffle/src/com.oracle.truffle.compiler/src/org/graalvm/compiler/truffle/common/ConstantFieldInfo.java +++ b/truffle/src/com.oracle.truffle.compiler/src/org/graalvm/compiler/truffle/common/ConstantFieldInfo.java @@ -1,26 +1,42 @@ /* - * Copyright (c) 2023, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2023, 2023, 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. Oracle designates this - * particular file as subject to the "Classpath" exception as provided - * by Oracle in the LICENSE file that accompanied this code. + * The Universal Permissive License (UPL), Version 1.0 * - * 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). + * Subject to the condition set forth below, permission is hereby granted to any + * person obtaining a copy of this software, associated documentation and/or + * data (collectively the "Software"), free of charge and under any and all + * copyright rights in the Software, and any and all patent rights owned or + * freely licensable by each licensor hereunder covering either (i) the + * unmodified Software as contributed to or provided by such licensor, or (ii) + * the Larger Works (as defined below), to deal in both * - * 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. + * (a) the Software, and * - * 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. + * (b) any piece of software and/or hardware listed in the lrgrwrks.txt file if + * one is included with the Software each a "Larger Work" to which the Software + * is contributed by such licensors), + * + * without restriction, including without limitation the rights to copy, create + * derivative works of, display, perform, and distribute the Software and make, + * use, sell, offer for sale, import, export, have made, and have sold the + * Software and the Larger Work(s), and to sublicense the foregoing rights on + * either these or other terms. + * + * This license is subject to the following condition: + * + * The above copyright notice and either this complete permission notice or at a + * minimum a reference to the UPL must be included in all copies or substantial + * portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. */ package org.graalvm.compiler.truffle.common; diff --git a/truffle/src/com.oracle.truffle.compiler/src/org/graalvm/compiler/truffle/common/HostMethodInfo.java b/truffle/src/com.oracle.truffle.compiler/src/org/graalvm/compiler/truffle/common/HostMethodInfo.java index da9582480586..4f302848ac39 100644 --- a/truffle/src/com.oracle.truffle.compiler/src/org/graalvm/compiler/truffle/common/HostMethodInfo.java +++ b/truffle/src/com.oracle.truffle.compiler/src/org/graalvm/compiler/truffle/common/HostMethodInfo.java @@ -1,26 +1,42 @@ /* - * Copyright (c) 2023, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2023, 2023, 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. Oracle designates this - * particular file as subject to the "Classpath" exception as provided - * by Oracle in the LICENSE file that accompanied this code. - * - * 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. + * The Universal Permissive License (UPL), Version 1.0 + * + * Subject to the condition set forth below, permission is hereby granted to any + * person obtaining a copy of this software, associated documentation and/or + * data (collectively the "Software"), free of charge and under any and all + * copyright rights in the Software, and any and all patent rights owned or + * freely licensable by each licensor hereunder covering either (i) the + * unmodified Software as contributed to or provided by such licensor, or (ii) + * the Larger Works (as defined below), to deal in both + * + * (a) the Software, and + * + * (b) any piece of software and/or hardware listed in the lrgrwrks.txt file if + * one is included with the Software each a "Larger Work" to which the Software + * is contributed by such licensors), + * + * without restriction, including without limitation the rights to copy, create + * derivative works of, display, perform, and distribute the Software and make, + * use, sell, offer for sale, import, export, have made, and have sold the + * Software and the Larger Work(s), and to sublicense the foregoing rights on + * either these or other terms. + * + * This license is subject to the following condition: + * + * The above copyright notice and either this complete permission notice or at a + * minimum a reference to the UPL must be included in all copies or substantial + * portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. */ package org.graalvm.compiler.truffle.common; diff --git a/truffle/src/com.oracle.truffle.compiler/src/org/graalvm/compiler/truffle/common/OptimizedAssumptionDependency.java b/truffle/src/com.oracle.truffle.compiler/src/org/graalvm/compiler/truffle/common/OptimizedAssumptionDependency.java index 026cd0e2c106..a6b6ee4e0f32 100644 --- a/truffle/src/com.oracle.truffle.compiler/src/org/graalvm/compiler/truffle/common/OptimizedAssumptionDependency.java +++ b/truffle/src/com.oracle.truffle.compiler/src/org/graalvm/compiler/truffle/common/OptimizedAssumptionDependency.java @@ -1,26 +1,42 @@ /* - * Copyright (c) 2018, 2021, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2018, 2023, 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. Oracle designates this - * particular file as subject to the "Classpath" exception as provided - * by Oracle in the LICENSE file that accompanied this code. - * - * 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. + * The Universal Permissive License (UPL), Version 1.0 + * + * Subject to the condition set forth below, permission is hereby granted to any + * person obtaining a copy of this software, associated documentation and/or + * data (collectively the "Software"), free of charge and under any and all + * copyright rights in the Software, and any and all patent rights owned or + * freely licensable by each licensor hereunder covering either (i) the + * unmodified Software as contributed to or provided by such licensor, or (ii) + * the Larger Works (as defined below), to deal in both + * + * (a) the Software, and + * + * (b) any piece of software and/or hardware listed in the lrgrwrks.txt file if + * one is included with the Software each a "Larger Work" to which the Software + * is contributed by such licensors), + * + * without restriction, including without limitation the rights to copy, create + * derivative works of, display, perform, and distribute the Software and make, + * use, sell, offer for sale, import, export, have made, and have sold the + * Software and the Larger Work(s), and to sublicense the foregoing rights on + * either these or other terms. + * + * This license is subject to the following condition: + * + * The above copyright notice and either this complete permission notice or at a + * minimum a reference to the UPL must be included in all copies or substantial + * portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. */ package org.graalvm.compiler.truffle.common; diff --git a/truffle/src/com.oracle.truffle.compiler/src/org/graalvm/compiler/truffle/common/PartialEvaluationMethodInfo.java b/truffle/src/com.oracle.truffle.compiler/src/org/graalvm/compiler/truffle/common/PartialEvaluationMethodInfo.java index 31082cbf61ac..bb6bfe9c93de 100644 --- a/truffle/src/com.oracle.truffle.compiler/src/org/graalvm/compiler/truffle/common/PartialEvaluationMethodInfo.java +++ b/truffle/src/com.oracle.truffle.compiler/src/org/graalvm/compiler/truffle/common/PartialEvaluationMethodInfo.java @@ -1,26 +1,42 @@ /* - * Copyright (c) 2023, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2023, 2023, 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. Oracle designates this - * particular file as subject to the "Classpath" exception as provided - * by Oracle in the LICENSE file that accompanied this code. - * - * 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. + * The Universal Permissive License (UPL), Version 1.0 + * + * Subject to the condition set forth below, permission is hereby granted to any + * person obtaining a copy of this software, associated documentation and/or + * data (collectively the "Software"), free of charge and under any and all + * copyright rights in the Software, and any and all patent rights owned or + * freely licensable by each licensor hereunder covering either (i) the + * unmodified Software as contributed to or provided by such licensor, or (ii) + * the Larger Works (as defined below), to deal in both + * + * (a) the Software, and + * + * (b) any piece of software and/or hardware listed in the lrgrwrks.txt file if + * one is included with the Software each a "Larger Work" to which the Software + * is contributed by such licensors), + * + * without restriction, including without limitation the rights to copy, create + * derivative works of, display, perform, and distribute the Software and make, + * use, sell, offer for sale, import, export, have made, and have sold the + * Software and the Larger Work(s), and to sublicense the foregoing rights on + * either these or other terms. + * + * This license is subject to the following condition: + * + * The above copyright notice and either this complete permission notice or at a + * minimum a reference to the UPL must be included in all copies or substantial + * portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. */ package org.graalvm.compiler.truffle.common; diff --git a/truffle/src/com.oracle.truffle.compiler/src/org/graalvm/compiler/truffle/common/TruffleCompilable.java b/truffle/src/com.oracle.truffle.compiler/src/org/graalvm/compiler/truffle/common/TruffleCompilable.java index 33677e308656..7f3362f5b65b 100644 --- a/truffle/src/com.oracle.truffle.compiler/src/org/graalvm/compiler/truffle/common/TruffleCompilable.java +++ b/truffle/src/com.oracle.truffle.compiler/src/org/graalvm/compiler/truffle/common/TruffleCompilable.java @@ -1,26 +1,42 @@ /* - * Copyright (c) 2018, 2020, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2018, 2023, 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. Oracle designates this - * particular file as subject to the "Classpath" exception as provided - * by Oracle in the LICENSE file that accompanied this code. + * The Universal Permissive License (UPL), Version 1.0 * - * 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). + * Subject to the condition set forth below, permission is hereby granted to any + * person obtaining a copy of this software, associated documentation and/or + * data (collectively the "Software"), free of charge and under any and all + * copyright rights in the Software, and any and all patent rights owned or + * freely licensable by each licensor hereunder covering either (i) the + * unmodified Software as contributed to or provided by such licensor, or (ii) + * the Larger Works (as defined below), to deal in both * - * 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. + * (a) the Software, and * - * 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. + * (b) any piece of software and/or hardware listed in the lrgrwrks.txt file if + * one is included with the Software each a "Larger Work" to which the Software + * is contributed by such licensors), + * + * without restriction, including without limitation the rights to copy, create + * derivative works of, display, perform, and distribute the Software and make, + * use, sell, offer for sale, import, export, have made, and have sold the + * Software and the Larger Work(s), and to sublicense the foregoing rights on + * either these or other terms. + * + * This license is subject to the following condition: + * + * The above copyright notice and either this complete permission notice or at a + * minimum a reference to the UPL must be included in all copies or substantial + * portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. */ package org.graalvm.compiler.truffle.common; diff --git a/truffle/src/com.oracle.truffle.compiler/src/org/graalvm/compiler/truffle/common/TruffleCompilationSupport.java b/truffle/src/com.oracle.truffle.compiler/src/org/graalvm/compiler/truffle/common/TruffleCompilationSupport.java index 5210938b8f97..1f1064e7b71e 100644 --- a/truffle/src/com.oracle.truffle.compiler/src/org/graalvm/compiler/truffle/common/TruffleCompilationSupport.java +++ b/truffle/src/com.oracle.truffle.compiler/src/org/graalvm/compiler/truffle/common/TruffleCompilationSupport.java @@ -1,26 +1,42 @@ /* - * Copyright (c) 2023, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2023, 2023, 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. Oracle designates this - * particular file as subject to the "Classpath" exception as provided - * by Oracle in the LICENSE file that accompanied this code. + * The Universal Permissive License (UPL), Version 1.0 * - * 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). + * Subject to the condition set forth below, permission is hereby granted to any + * person obtaining a copy of this software, associated documentation and/or + * data (collectively the "Software"), free of charge and under any and all + * copyright rights in the Software, and any and all patent rights owned or + * freely licensable by each licensor hereunder covering either (i) the + * unmodified Software as contributed to or provided by such licensor, or (ii) + * the Larger Works (as defined below), to deal in both * - * 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. + * (a) the Software, and * - * 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. + * (b) any piece of software and/or hardware listed in the lrgrwrks.txt file if + * one is included with the Software each a "Larger Work" to which the Software + * is contributed by such licensors), + * + * without restriction, including without limitation the rights to copy, create + * derivative works of, display, perform, and distribute the Software and make, + * use, sell, offer for sale, import, export, have made, and have sold the + * Software and the Larger Work(s), and to sublicense the foregoing rights on + * either these or other terms. + * + * This license is subject to the following condition: + * + * The above copyright notice and either this complete permission notice or at a + * minimum a reference to the UPL must be included in all copies or substantial + * portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. */ package org.graalvm.compiler.truffle.common; diff --git a/truffle/src/com.oracle.truffle.compiler/src/org/graalvm/compiler/truffle/common/TruffleCompilationTask.java b/truffle/src/com.oracle.truffle.compiler/src/org/graalvm/compiler/truffle/common/TruffleCompilationTask.java index cd98cd5aa739..f4b92464db65 100644 --- a/truffle/src/com.oracle.truffle.compiler/src/org/graalvm/compiler/truffle/common/TruffleCompilationTask.java +++ b/truffle/src/com.oracle.truffle.compiler/src/org/graalvm/compiler/truffle/common/TruffleCompilationTask.java @@ -1,26 +1,42 @@ /* - * Copyright (c) 2018, 2021, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2018, 2023, 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. Oracle designates this - * particular file as subject to the "Classpath" exception as provided - * by Oracle in the LICENSE file that accompanied this code. + * The Universal Permissive License (UPL), Version 1.0 * - * 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). + * Subject to the condition set forth below, permission is hereby granted to any + * person obtaining a copy of this software, associated documentation and/or + * data (collectively the "Software"), free of charge and under any and all + * copyright rights in the Software, and any and all patent rights owned or + * freely licensable by each licensor hereunder covering either (i) the + * unmodified Software as contributed to or provided by such licensor, or (ii) + * the Larger Works (as defined below), to deal in both * - * 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. + * (a) the Software, and * - * 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. + * (b) any piece of software and/or hardware listed in the lrgrwrks.txt file if + * one is included with the Software each a "Larger Work" to which the Software + * is contributed by such licensors), + * + * without restriction, including without limitation the rights to copy, create + * derivative works of, display, perform, and distribute the Software and make, + * use, sell, offer for sale, import, export, have made, and have sold the + * Software and the Larger Work(s), and to sublicense the foregoing rights on + * either these or other terms. + * + * This license is subject to the following condition: + * + * The above copyright notice and either this complete permission notice or at a + * minimum a reference to the UPL must be included in all copies or substantial + * portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. */ package org.graalvm.compiler.truffle.common; diff --git a/truffle/src/com.oracle.truffle.compiler/src/org/graalvm/compiler/truffle/common/TruffleCompiler.java b/truffle/src/com.oracle.truffle.compiler/src/org/graalvm/compiler/truffle/common/TruffleCompiler.java index f8221f08b7a4..6f2fdaf8063c 100644 --- a/truffle/src/com.oracle.truffle.compiler/src/org/graalvm/compiler/truffle/common/TruffleCompiler.java +++ b/truffle/src/com.oracle.truffle.compiler/src/org/graalvm/compiler/truffle/common/TruffleCompiler.java @@ -1,26 +1,42 @@ /* - * Copyright (c) 2018, 2022, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2018, 2023, 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. Oracle designates this - * particular file as subject to the "Classpath" exception as provided - * by Oracle in the LICENSE file that accompanied this code. - * - * 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. + * The Universal Permissive License (UPL), Version 1.0 + * + * Subject to the condition set forth below, permission is hereby granted to any + * person obtaining a copy of this software, associated documentation and/or + * data (collectively the "Software"), free of charge and under any and all + * copyright rights in the Software, and any and all patent rights owned or + * freely licensable by each licensor hereunder covering either (i) the + * unmodified Software as contributed to or provided by such licensor, or (ii) + * the Larger Works (as defined below), to deal in both + * + * (a) the Software, and + * + * (b) any piece of software and/or hardware listed in the lrgrwrks.txt file if + * one is included with the Software each a "Larger Work" to which the Software + * is contributed by such licensors), + * + * without restriction, including without limitation the rights to copy, create + * derivative works of, display, perform, and distribute the Software and make, + * use, sell, offer for sale, import, export, have made, and have sold the + * Software and the Larger Work(s), and to sublicense the foregoing rights on + * either these or other terms. + * + * This license is subject to the following condition: + * + * The above copyright notice and either this complete permission notice or at a + * minimum a reference to the UPL must be included in all copies or substantial + * portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. */ package org.graalvm.compiler.truffle.common; diff --git a/truffle/src/com.oracle.truffle.compiler/src/org/graalvm/compiler/truffle/common/TruffleCompilerAssumptionDependency.java b/truffle/src/com.oracle.truffle.compiler/src/org/graalvm/compiler/truffle/common/TruffleCompilerAssumptionDependency.java index b718b170e607..20cbc272d159 100644 --- a/truffle/src/com.oracle.truffle.compiler/src/org/graalvm/compiler/truffle/common/TruffleCompilerAssumptionDependency.java +++ b/truffle/src/com.oracle.truffle.compiler/src/org/graalvm/compiler/truffle/common/TruffleCompilerAssumptionDependency.java @@ -1,26 +1,42 @@ /* - * Copyright (c) 2022, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2022, 2023, 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. Oracle designates this - * particular file as subject to the "Classpath" exception as provided - * by Oracle in the LICENSE file that accompanied this code. + * The Universal Permissive License (UPL), Version 1.0 * - * 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). + * Subject to the condition set forth below, permission is hereby granted to any + * person obtaining a copy of this software, associated documentation and/or + * data (collectively the "Software"), free of charge and under any and all + * copyright rights in the Software, and any and all patent rights owned or + * freely licensable by each licensor hereunder covering either (i) the + * unmodified Software as contributed to or provided by such licensor, or (ii) + * the Larger Works (as defined below), to deal in both * - * 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. + * (a) the Software, and * - * 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. + * (b) any piece of software and/or hardware listed in the lrgrwrks.txt file if + * one is included with the Software each a "Larger Work" to which the Software + * is contributed by such licensors), + * + * without restriction, including without limitation the rights to copy, create + * derivative works of, display, perform, and distribute the Software and make, + * use, sell, offer for sale, import, export, have made, and have sold the + * Software and the Larger Work(s), and to sublicense the foregoing rights on + * either these or other terms. + * + * This license is subject to the following condition: + * + * The above copyright notice and either this complete permission notice or at a + * minimum a reference to the UPL must be included in all copies or substantial + * portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. */ package org.graalvm.compiler.truffle.common; diff --git a/truffle/src/com.oracle.truffle.compiler/src/org/graalvm/compiler/truffle/common/TruffleCompilerListener.java b/truffle/src/com.oracle.truffle.compiler/src/org/graalvm/compiler/truffle/common/TruffleCompilerListener.java index 4bb31aaaf138..d8dddf0ba82d 100644 --- a/truffle/src/com.oracle.truffle.compiler/src/org/graalvm/compiler/truffle/common/TruffleCompilerListener.java +++ b/truffle/src/com.oracle.truffle.compiler/src/org/graalvm/compiler/truffle/common/TruffleCompilerListener.java @@ -1,26 +1,42 @@ /* - * Copyright (c) 2018, 2022, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2018, 2023, 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. Oracle designates this - * particular file as subject to the "Classpath" exception as provided - * by Oracle in the LICENSE file that accompanied this code. + * The Universal Permissive License (UPL), Version 1.0 * - * 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). + * Subject to the condition set forth below, permission is hereby granted to any + * person obtaining a copy of this software, associated documentation and/or + * data (collectively the "Software"), free of charge and under any and all + * copyright rights in the Software, and any and all patent rights owned or + * freely licensable by each licensor hereunder covering either (i) the + * unmodified Software as contributed to or provided by such licensor, or (ii) + * the Larger Works (as defined below), to deal in both * - * 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. + * (a) the Software, and * - * 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. + * (b) any piece of software and/or hardware listed in the lrgrwrks.txt file if + * one is included with the Software each a "Larger Work" to which the Software + * is contributed by such licensors), + * + * without restriction, including without limitation the rights to copy, create + * derivative works of, display, perform, and distribute the Software and make, + * use, sell, offer for sale, import, export, have made, and have sold the + * Software and the Larger Work(s), and to sublicense the foregoing rights on + * either these or other terms. + * + * This license is subject to the following condition: + * + * The above copyright notice and either this complete permission notice or at a + * minimum a reference to the UPL must be included in all copies or substantial + * portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. */ package org.graalvm.compiler.truffle.common; diff --git a/truffle/src/com.oracle.truffle.compiler/src/org/graalvm/compiler/truffle/common/TruffleCompilerOptionDescriptor.java b/truffle/src/com.oracle.truffle.compiler/src/org/graalvm/compiler/truffle/common/TruffleCompilerOptionDescriptor.java index 1c468cebdaa3..e813e244f0a6 100644 --- a/truffle/src/com.oracle.truffle.compiler/src/org/graalvm/compiler/truffle/common/TruffleCompilerOptionDescriptor.java +++ b/truffle/src/com.oracle.truffle.compiler/src/org/graalvm/compiler/truffle/common/TruffleCompilerOptionDescriptor.java @@ -1,26 +1,42 @@ /* - * Copyright (c) 2018, 2022, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2018, 2023, 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. Oracle designates this - * particular file as subject to the "Classpath" exception as provided - * by Oracle in the LICENSE file that accompanied this code. - * - * 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. + * The Universal Permissive License (UPL), Version 1.0 + * + * Subject to the condition set forth below, permission is hereby granted to any + * person obtaining a copy of this software, associated documentation and/or + * data (collectively the "Software"), free of charge and under any and all + * copyright rights in the Software, and any and all patent rights owned or + * freely licensable by each licensor hereunder covering either (i) the + * unmodified Software as contributed to or provided by such licensor, or (ii) + * the Larger Works (as defined below), to deal in both + * + * (a) the Software, and + * + * (b) any piece of software and/or hardware listed in the lrgrwrks.txt file if + * one is included with the Software each a "Larger Work" to which the Software + * is contributed by such licensors), + * + * without restriction, including without limitation the rights to copy, create + * derivative works of, display, perform, and distribute the Software and make, + * use, sell, offer for sale, import, export, have made, and have sold the + * Software and the Larger Work(s), and to sublicense the foregoing rights on + * either these or other terms. + * + * This license is subject to the following condition: + * + * The above copyright notice and either this complete permission notice or at a + * minimum a reference to the UPL must be included in all copies or substantial + * portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. */ package org.graalvm.compiler.truffle.common; diff --git a/truffle/src/com.oracle.truffle.compiler/src/org/graalvm/compiler/truffle/common/TruffleCompilerRuntime.java b/truffle/src/com.oracle.truffle.compiler/src/org/graalvm/compiler/truffle/common/TruffleCompilerRuntime.java index 8f70d9dc954d..5a350144f4bb 100644 --- a/truffle/src/com.oracle.truffle.compiler/src/org/graalvm/compiler/truffle/common/TruffleCompilerRuntime.java +++ b/truffle/src/com.oracle.truffle.compiler/src/org/graalvm/compiler/truffle/common/TruffleCompilerRuntime.java @@ -1,26 +1,42 @@ /* - * Copyright (c) 2018, 2022, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2018, 2023, 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. Oracle designates this - * particular file as subject to the "Classpath" exception as provided - * by Oracle in the LICENSE file that accompanied this code. + * The Universal Permissive License (UPL), Version 1.0 * - * 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). + * Subject to the condition set forth below, permission is hereby granted to any + * person obtaining a copy of this software, associated documentation and/or + * data (collectively the "Software"), free of charge and under any and all + * copyright rights in the Software, and any and all patent rights owned or + * freely licensable by each licensor hereunder covering either (i) the + * unmodified Software as contributed to or provided by such licensor, or (ii) + * the Larger Works (as defined below), to deal in both * - * 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. + * (a) the Software, and * - * 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. + * (b) any piece of software and/or hardware listed in the lrgrwrks.txt file if + * one is included with the Software each a "Larger Work" to which the Software + * is contributed by such licensors), + * + * without restriction, including without limitation the rights to copy, create + * derivative works of, display, perform, and distribute the Software and make, + * use, sell, offer for sale, import, export, have made, and have sold the + * Software and the Larger Work(s), and to sublicense the foregoing rights on + * either these or other terms. + * + * This license is subject to the following condition: + * + * The above copyright notice and either this complete permission notice or at a + * minimum a reference to the UPL must be included in all copies or substantial + * portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. */ package org.graalvm.compiler.truffle.common; diff --git a/truffle/src/com.oracle.truffle.compiler/src/org/graalvm/compiler/truffle/common/TruffleSourceLanguagePosition.java b/truffle/src/com.oracle.truffle.compiler/src/org/graalvm/compiler/truffle/common/TruffleSourceLanguagePosition.java index 8f66e0ea0f39..d2a1888edd43 100644 --- a/truffle/src/com.oracle.truffle.compiler/src/org/graalvm/compiler/truffle/common/TruffleSourceLanguagePosition.java +++ b/truffle/src/com.oracle.truffle.compiler/src/org/graalvm/compiler/truffle/common/TruffleSourceLanguagePosition.java @@ -1,26 +1,42 @@ /* - * Copyright (c) 2018, 2021, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2018, 2023, 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. Oracle designates this - * particular file as subject to the "Classpath" exception as provided - * by Oracle in the LICENSE file that accompanied this code. - * - * 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. + * The Universal Permissive License (UPL), Version 1.0 + * + * Subject to the condition set forth below, permission is hereby granted to any + * person obtaining a copy of this software, associated documentation and/or + * data (collectively the "Software"), free of charge and under any and all + * copyright rights in the Software, and any and all patent rights owned or + * freely licensable by each licensor hereunder covering either (i) the + * unmodified Software as contributed to or provided by such licensor, or (ii) + * the Larger Works (as defined below), to deal in both + * + * (a) the Software, and + * + * (b) any piece of software and/or hardware listed in the lrgrwrks.txt file if + * one is included with the Software each a "Larger Work" to which the Software + * is contributed by such licensors), + * + * without restriction, including without limitation the rights to copy, create + * derivative works of, display, perform, and distribute the Software and make, + * use, sell, offer for sale, import, export, have made, and have sold the + * Software and the Larger Work(s), and to sublicense the foregoing rights on + * either these or other terms. + * + * This license is subject to the following condition: + * + * The above copyright notice and either this complete permission notice or at a + * minimum a reference to the UPL must be included in all copies or substantial + * portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. */ package org.graalvm.compiler.truffle.common; diff --git a/truffle/src/com.oracle.truffle.compiler/src/org/graalvm/compiler/truffle/common/hotspot/HotSpotTruffleCompiler.java b/truffle/src/com.oracle.truffle.compiler/src/org/graalvm/compiler/truffle/common/hotspot/HotSpotTruffleCompiler.java index 0c3264f03c59..7582ef9b530a 100644 --- a/truffle/src/com.oracle.truffle.compiler/src/org/graalvm/compiler/truffle/common/hotspot/HotSpotTruffleCompiler.java +++ b/truffle/src/com.oracle.truffle.compiler/src/org/graalvm/compiler/truffle/common/hotspot/HotSpotTruffleCompiler.java @@ -1,26 +1,42 @@ /* - * Copyright (c) 2013, 2022, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2013, 2023, 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. Oracle designates this - * particular file as subject to the "Classpath" exception as provided - * by Oracle in the LICENSE file that accompanied this code. - * - * 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. + * The Universal Permissive License (UPL), Version 1.0 + * + * Subject to the condition set forth below, permission is hereby granted to any + * person obtaining a copy of this software, associated documentation and/or + * data (collectively the "Software"), free of charge and under any and all + * copyright rights in the Software, and any and all patent rights owned or + * freely licensable by each licensor hereunder covering either (i) the + * unmodified Software as contributed to or provided by such licensor, or (ii) + * the Larger Works (as defined below), to deal in both + * + * (a) the Software, and + * + * (b) any piece of software and/or hardware listed in the lrgrwrks.txt file if + * one is included with the Software each a "Larger Work" to which the Software + * is contributed by such licensors), + * + * without restriction, including without limitation the rights to copy, create + * derivative works of, display, perform, and distribute the Software and make, + * use, sell, offer for sale, import, export, have made, and have sold the + * Software and the Larger Work(s), and to sublicense the foregoing rights on + * either these or other terms. + * + * This license is subject to the following condition: + * + * The above copyright notice and either this complete permission notice or at a + * minimum a reference to the UPL must be included in all copies or substantial + * portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. */ package org.graalvm.compiler.truffle.common.hotspot; diff --git a/truffle/src/com.oracle.truffle.compiler/src/org/graalvm/compiler/truffle/common/hotspot/libgraal/FromLibGraalEntryPointsResolver.java b/truffle/src/com.oracle.truffle.compiler/src/org/graalvm/compiler/truffle/common/hotspot/libgraal/FromLibGraalEntryPointsResolver.java index 3d3ad8e3d2ec..c25863bd7239 100644 --- a/truffle/src/com.oracle.truffle.compiler/src/org/graalvm/compiler/truffle/common/hotspot/libgraal/FromLibGraalEntryPointsResolver.java +++ b/truffle/src/com.oracle.truffle.compiler/src/org/graalvm/compiler/truffle/common/hotspot/libgraal/FromLibGraalEntryPointsResolver.java @@ -1,26 +1,42 @@ /* - * Copyright (c) 2020, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2018, 2023, 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. Oracle designates this - * particular file as subject to the "Classpath" exception as provided - * by Oracle in the LICENSE file that accompanied this code. - * - * 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. + * The Universal Permissive License (UPL), Version 1.0 + * + * Subject to the condition set forth below, permission is hereby granted to any + * person obtaining a copy of this software, associated documentation and/or + * data (collectively the "Software"), free of charge and under any and all + * copyright rights in the Software, and any and all patent rights owned or + * freely licensable by each licensor hereunder covering either (i) the + * unmodified Software as contributed to or provided by such licensor, or (ii) + * the Larger Works (as defined below), to deal in both + * + * (a) the Software, and + * + * (b) any piece of software and/or hardware listed in the lrgrwrks.txt file if + * one is included with the Software each a "Larger Work" to which the Software + * is contributed by such licensors), + * + * without restriction, including without limitation the rights to copy, create + * derivative works of, display, perform, and distribute the Software and make, + * use, sell, offer for sale, import, export, have made, and have sold the + * Software and the Larger Work(s), and to sublicense the foregoing rights on + * either these or other terms. + * + * This license is subject to the following condition: + * + * The above copyright notice and either this complete permission notice or at a + * minimum a reference to the UPL must be included in all copies or substantial + * portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. */ package org.graalvm.compiler.truffle.common.hotspot.libgraal; diff --git a/truffle/src/com.oracle.truffle.compiler/src/org/graalvm/compiler/truffle/common/hotspot/libgraal/FromLibGraalId.java b/truffle/src/com.oracle.truffle.compiler/src/org/graalvm/compiler/truffle/common/hotspot/libgraal/FromLibGraalId.java index 1f54e03a3c31..f02fa0da4b51 100644 --- a/truffle/src/com.oracle.truffle.compiler/src/org/graalvm/compiler/truffle/common/hotspot/libgraal/FromLibGraalId.java +++ b/truffle/src/com.oracle.truffle.compiler/src/org/graalvm/compiler/truffle/common/hotspot/libgraal/FromLibGraalId.java @@ -1,26 +1,42 @@ /* - * Copyright (c) 2020, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2020, 2023, 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. Oracle designates this - * particular file as subject to the "Classpath" exception as provided - * by Oracle in the LICENSE file that accompanied this code. - * - * 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. + * The Universal Permissive License (UPL), Version 1.0 + * + * Subject to the condition set forth below, permission is hereby granted to any + * person obtaining a copy of this software, associated documentation and/or + * data (collectively the "Software"), free of charge and under any and all + * copyright rights in the Software, and any and all patent rights owned or + * freely licensable by each licensor hereunder covering either (i) the + * unmodified Software as contributed to or provided by such licensor, or (ii) + * the Larger Works (as defined below), to deal in both + * + * (a) the Software, and + * + * (b) any piece of software and/or hardware listed in the lrgrwrks.txt file if + * one is included with the Software each a "Larger Work" to which the Software + * is contributed by such licensors), + * + * without restriction, including without limitation the rights to copy, create + * derivative works of, display, perform, and distribute the Software and make, + * use, sell, offer for sale, import, export, have made, and have sold the + * Software and the Larger Work(s), and to sublicense the foregoing rights on + * either these or other terms. + * + * This license is subject to the following condition: + * + * The above copyright notice and either this complete permission notice or at a + * minimum a reference to the UPL must be included in all copies or substantial + * portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. */ package org.graalvm.compiler.truffle.common.hotspot.libgraal; diff --git a/truffle/src/com.oracle.truffle.compiler/src/org/graalvm/compiler/truffle/common/hotspot/libgraal/TruffleFromLibGraal.java b/truffle/src/com.oracle.truffle.compiler/src/org/graalvm/compiler/truffle/common/hotspot/libgraal/TruffleFromLibGraal.java index a0d2a8490990..d6504a3308e3 100644 --- a/truffle/src/com.oracle.truffle.compiler/src/org/graalvm/compiler/truffle/common/hotspot/libgraal/TruffleFromLibGraal.java +++ b/truffle/src/com.oracle.truffle.compiler/src/org/graalvm/compiler/truffle/common/hotspot/libgraal/TruffleFromLibGraal.java @@ -1,26 +1,42 @@ /* - * Copyright (c) 2018, 2021, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2018, 2023, 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. Oracle designates this - * particular file as subject to the "Classpath" exception as provided - * by Oracle in the LICENSE file that accompanied this code. + * The Universal Permissive License (UPL), Version 1.0 * - * 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). + * Subject to the condition set forth below, permission is hereby granted to any + * person obtaining a copy of this software, associated documentation and/or + * data (collectively the "Software"), free of charge and under any and all + * copyright rights in the Software, and any and all patent rights owned or + * freely licensable by each licensor hereunder covering either (i) the + * unmodified Software as contributed to or provided by such licensor, or (ii) + * the Larger Works (as defined below), to deal in both * - * 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. + * (a) the Software, and * - * 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. + * (b) any piece of software and/or hardware listed in the lrgrwrks.txt file if + * one is included with the Software each a "Larger Work" to which the Software + * is contributed by such licensors), + * + * without restriction, including without limitation the rights to copy, create + * derivative works of, display, perform, and distribute the Software and make, + * use, sell, offer for sale, import, export, have made, and have sold the + * Software and the Larger Work(s), and to sublicense the foregoing rights on + * either these or other terms. + * + * This license is subject to the following condition: + * + * The above copyright notice and either this complete permission notice or at a + * minimum a reference to the UPL must be included in all copies or substantial + * portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. */ package org.graalvm.compiler.truffle.common.hotspot.libgraal; diff --git a/truffle/src/com.oracle.truffle.compiler/src/org/graalvm/compiler/truffle/common/hotspot/libgraal/TruffleFromLibGraalRepeated.java b/truffle/src/com.oracle.truffle.compiler/src/org/graalvm/compiler/truffle/common/hotspot/libgraal/TruffleFromLibGraalRepeated.java index d260df1897dc..620100dac574 100644 --- a/truffle/src/com.oracle.truffle.compiler/src/org/graalvm/compiler/truffle/common/hotspot/libgraal/TruffleFromLibGraalRepeated.java +++ b/truffle/src/com.oracle.truffle.compiler/src/org/graalvm/compiler/truffle/common/hotspot/libgraal/TruffleFromLibGraalRepeated.java @@ -1,26 +1,42 @@ /* - * Copyright (c) 2018, 2021, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2018, 2023, 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. Oracle designates this - * particular file as subject to the "Classpath" exception as provided - * by Oracle in the LICENSE file that accompanied this code. - * - * 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. + * The Universal Permissive License (UPL), Version 1.0 + * + * Subject to the condition set forth below, permission is hereby granted to any + * person obtaining a copy of this software, associated documentation and/or + * data (collectively the "Software"), free of charge and under any and all + * copyright rights in the Software, and any and all patent rights owned or + * freely licensable by each licensor hereunder covering either (i) the + * unmodified Software as contributed to or provided by such licensor, or (ii) + * the Larger Works (as defined below), to deal in both + * + * (a) the Software, and + * + * (b) any piece of software and/or hardware listed in the lrgrwrks.txt file if + * one is included with the Software each a "Larger Work" to which the Software + * is contributed by such licensors), + * + * without restriction, including without limitation the rights to copy, create + * derivative works of, display, perform, and distribute the Software and make, + * use, sell, offer for sale, import, export, have made, and have sold the + * Software and the Larger Work(s), and to sublicense the foregoing rights on + * either these or other terms. + * + * This license is subject to the following condition: + * + * The above copyright notice and either this complete permission notice or at a + * minimum a reference to the UPL must be included in all copies or substantial + * portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. */ package org.graalvm.compiler.truffle.common.hotspot.libgraal; diff --git a/truffle/src/com.oracle.truffle.compiler/src/org/graalvm/compiler/truffle/common/hotspot/libgraal/TruffleToLibGraal.java b/truffle/src/com.oracle.truffle.compiler/src/org/graalvm/compiler/truffle/common/hotspot/libgraal/TruffleToLibGraal.java index 18e338eacde0..6d833d285189 100644 --- a/truffle/src/com.oracle.truffle.compiler/src/org/graalvm/compiler/truffle/common/hotspot/libgraal/TruffleToLibGraal.java +++ b/truffle/src/com.oracle.truffle.compiler/src/org/graalvm/compiler/truffle/common/hotspot/libgraal/TruffleToLibGraal.java @@ -1,26 +1,42 @@ /* - * Copyright (c) 2013, 2022, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2018, 2023, 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. Oracle designates this - * particular file as subject to the "Classpath" exception as provided - * by Oracle in the LICENSE file that accompanied this code. + * The Universal Permissive License (UPL), Version 1.0 * - * 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). + * Subject to the condition set forth below, permission is hereby granted to any + * person obtaining a copy of this software, associated documentation and/or + * data (collectively the "Software"), free of charge and under any and all + * copyright rights in the Software, and any and all patent rights owned or + * freely licensable by each licensor hereunder covering either (i) the + * unmodified Software as contributed to or provided by such licensor, or (ii) + * the Larger Works (as defined below), to deal in both * - * 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. + * (a) the Software, and * - * 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. + * (b) any piece of software and/or hardware listed in the lrgrwrks.txt file if + * one is included with the Software each a "Larger Work" to which the Software + * is contributed by such licensors), + * + * without restriction, including without limitation the rights to copy, create + * derivative works of, display, perform, and distribute the Software and make, + * use, sell, offer for sale, import, export, have made, and have sold the + * Software and the Larger Work(s), and to sublicense the foregoing rights on + * either these or other terms. + * + * This license is subject to the following condition: + * + * The above copyright notice and either this complete permission notice or at a + * minimum a reference to the UPL must be included in all copies or substantial + * portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. */ package org.graalvm.compiler.truffle.common.hotspot.libgraal; diff --git a/truffle/src/com.oracle.truffle.compiler/src/org/graalvm/compiler/truffle/common/hotspot/libgraal/Utilities.java b/truffle/src/com.oracle.truffle.compiler/src/org/graalvm/compiler/truffle/common/hotspot/libgraal/Utilities.java index 61f007d470e2..b7f73e5718af 100644 --- a/truffle/src/com.oracle.truffle.compiler/src/org/graalvm/compiler/truffle/common/hotspot/libgraal/Utilities.java +++ b/truffle/src/com.oracle.truffle.compiler/src/org/graalvm/compiler/truffle/common/hotspot/libgraal/Utilities.java @@ -1,26 +1,42 @@ /* - * Copyright (c) 2020, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2018, 2023, 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. Oracle designates this - * particular file as subject to the "Classpath" exception as provided - * by Oracle in the LICENSE file that accompanied this code. - * - * 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. + * The Universal Permissive License (UPL), Version 1.0 + * + * Subject to the condition set forth below, permission is hereby granted to any + * person obtaining a copy of this software, associated documentation and/or + * data (collectively the "Software"), free of charge and under any and all + * copyright rights in the Software, and any and all patent rights owned or + * freely licensable by each licensor hereunder covering either (i) the + * unmodified Software as contributed to or provided by such licensor, or (ii) + * the Larger Works (as defined below), to deal in both + * + * (a) the Software, and + * + * (b) any piece of software and/or hardware listed in the lrgrwrks.txt file if + * one is included with the Software each a "Larger Work" to which the Software + * is contributed by such licensors), + * + * without restriction, including without limitation the rights to copy, create + * derivative works of, display, perform, and distribute the Software and make, + * use, sell, offer for sale, import, export, have made, and have sold the + * Software and the Larger Work(s), and to sublicense the foregoing rights on + * either these or other terms. + * + * This license is subject to the following condition: + * + * The above copyright notice and either this complete permission notice or at a + * minimum a reference to the UPL must be included in all copies or substantial + * portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. */ package org.graalvm.compiler.truffle.common.hotspot.libgraal; diff --git a/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/jfr/CompilationEvent.java b/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/jfr/CompilationEvent.java index 072ff73a23b4..d5cbed5fff3b 100644 --- a/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/jfr/CompilationEvent.java +++ b/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/jfr/CompilationEvent.java @@ -1,26 +1,42 @@ /* - * Copyright (c) 2020, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2020, 2023, 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. Oracle designates this - * particular file as subject to the "Classpath" exception as provided - * by Oracle in the LICENSE file that accompanied this code. - * - * 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. + * The Universal Permissive License (UPL), Version 1.0 + * + * Subject to the condition set forth below, permission is hereby granted to any + * person obtaining a copy of this software, associated documentation and/or + * data (collectively the "Software"), free of charge and under any and all + * copyright rights in the Software, and any and all patent rights owned or + * freely licensable by each licensor hereunder covering either (i) the + * unmodified Software as contributed to or provided by such licensor, or (ii) + * the Larger Works (as defined below), to deal in both + * + * (a) the Software, and + * + * (b) any piece of software and/or hardware listed in the lrgrwrks.txt file if + * one is included with the Software each a "Larger Work" to which the Software + * is contributed by such licensors), + * + * without restriction, including without limitation the rights to copy, create + * derivative works of, display, perform, and distribute the Software and make, + * use, sell, offer for sale, import, export, have made, and have sold the + * Software and the Larger Work(s), and to sublicense the foregoing rights on + * either these or other terms. + * + * This license is subject to the following condition: + * + * The above copyright notice and either this complete permission notice or at a + * minimum a reference to the UPL must be included in all copies or substantial + * portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. */ package org.graalvm.compiler.truffle.jfr; diff --git a/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/jfr/CompilationStatisticsEvent.java b/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/jfr/CompilationStatisticsEvent.java index 675f453c7afb..0b5431c37109 100644 --- a/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/jfr/CompilationStatisticsEvent.java +++ b/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/jfr/CompilationStatisticsEvent.java @@ -1,26 +1,42 @@ /* - * Copyright (c) 2020, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2020, 2023, 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. Oracle designates this - * particular file as subject to the "Classpath" exception as provided - * by Oracle in the LICENSE file that accompanied this code. - * - * 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. + * The Universal Permissive License (UPL), Version 1.0 + * + * Subject to the condition set forth below, permission is hereby granted to any + * person obtaining a copy of this software, associated documentation and/or + * data (collectively the "Software"), free of charge and under any and all + * copyright rights in the Software, and any and all patent rights owned or + * freely licensable by each licensor hereunder covering either (i) the + * unmodified Software as contributed to or provided by such licensor, or (ii) + * the Larger Works (as defined below), to deal in both + * + * (a) the Software, and + * + * (b) any piece of software and/or hardware listed in the lrgrwrks.txt file if + * one is included with the Software each a "Larger Work" to which the Software + * is contributed by such licensors), + * + * without restriction, including without limitation the rights to copy, create + * derivative works of, display, perform, and distribute the Software and make, + * use, sell, offer for sale, import, export, have made, and have sold the + * Software and the Larger Work(s), and to sublicense the foregoing rights on + * either these or other terms. + * + * This license is subject to the following condition: + * + * The above copyright notice and either this complete permission notice or at a + * minimum a reference to the UPL must be included in all copies or substantial + * portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. */ package org.graalvm.compiler.truffle.jfr; diff --git a/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/jfr/DeoptimizationEvent.java b/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/jfr/DeoptimizationEvent.java index 3819a7e7297e..471d6dc6c1ac 100644 --- a/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/jfr/DeoptimizationEvent.java +++ b/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/jfr/DeoptimizationEvent.java @@ -1,26 +1,42 @@ /* - * Copyright (c) 2020, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2020, 2023, 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. Oracle designates this - * particular file as subject to the "Classpath" exception as provided - * by Oracle in the LICENSE file that accompanied this code. - * - * 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. + * The Universal Permissive License (UPL), Version 1.0 + * + * Subject to the condition set forth below, permission is hereby granted to any + * person obtaining a copy of this software, associated documentation and/or + * data (collectively the "Software"), free of charge and under any and all + * copyright rights in the Software, and any and all patent rights owned or + * freely licensable by each licensor hereunder covering either (i) the + * unmodified Software as contributed to or provided by such licensor, or (ii) + * the Larger Works (as defined below), to deal in both + * + * (a) the Software, and + * + * (b) any piece of software and/or hardware listed in the lrgrwrks.txt file if + * one is included with the Software each a "Larger Work" to which the Software + * is contributed by such licensors), + * + * without restriction, including without limitation the rights to copy, create + * derivative works of, display, perform, and distribute the Software and make, + * use, sell, offer for sale, import, export, have made, and have sold the + * Software and the Larger Work(s), and to sublicense the foregoing rights on + * either these or other terms. + * + * This license is subject to the following condition: + * + * The above copyright notice and either this complete permission notice or at a + * minimum a reference to the UPL must be included in all copies or substantial + * portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. */ package org.graalvm.compiler.truffle.jfr; diff --git a/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/jfr/Event.java b/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/jfr/Event.java index 71ed6d802d77..0b65f17c20ed 100644 --- a/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/jfr/Event.java +++ b/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/jfr/Event.java @@ -1,26 +1,42 @@ /* - * Copyright (c) 2020, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2020, 2023, 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. Oracle designates this - * particular file as subject to the "Classpath" exception as provided - * by Oracle in the LICENSE file that accompanied this code. - * - * 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. + * The Universal Permissive License (UPL), Version 1.0 + * + * Subject to the condition set forth below, permission is hereby granted to any + * person obtaining a copy of this software, associated documentation and/or + * data (collectively the "Software"), free of charge and under any and all + * copyright rights in the Software, and any and all patent rights owned or + * freely licensable by each licensor hereunder covering either (i) the + * unmodified Software as contributed to or provided by such licensor, or (ii) + * the Larger Works (as defined below), to deal in both + * + * (a) the Software, and + * + * (b) any piece of software and/or hardware listed in the lrgrwrks.txt file if + * one is included with the Software each a "Larger Work" to which the Software + * is contributed by such licensors), + * + * without restriction, including without limitation the rights to copy, create + * derivative works of, display, perform, and distribute the Software and make, + * use, sell, offer for sale, import, export, have made, and have sold the + * Software and the Larger Work(s), and to sublicense the foregoing rights on + * either these or other terms. + * + * This license is subject to the following condition: + * + * The above copyright notice and either this complete permission notice or at a + * minimum a reference to the UPL must be included in all copies or substantial + * portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. */ package org.graalvm.compiler.truffle.jfr; diff --git a/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/jfr/EventFactory.java b/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/jfr/EventFactory.java index 1a7d2b3f2f4f..82adcdf5aa14 100644 --- a/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/jfr/EventFactory.java +++ b/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/jfr/EventFactory.java @@ -1,26 +1,42 @@ /* - * Copyright (c) 2020, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2020, 2023, 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. Oracle designates this - * particular file as subject to the "Classpath" exception as provided - * by Oracle in the LICENSE file that accompanied this code. - * - * 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. + * The Universal Permissive License (UPL), Version 1.0 + * + * Subject to the condition set forth below, permission is hereby granted to any + * person obtaining a copy of this software, associated documentation and/or + * data (collectively the "Software"), free of charge and under any and all + * copyright rights in the Software, and any and all patent rights owned or + * freely licensable by each licensor hereunder covering either (i) the + * unmodified Software as contributed to or provided by such licensor, or (ii) + * the Larger Works (as defined below), to deal in both + * + * (a) the Software, and + * + * (b) any piece of software and/or hardware listed in the lrgrwrks.txt file if + * one is included with the Software each a "Larger Work" to which the Software + * is contributed by such licensors), + * + * without restriction, including without limitation the rights to copy, create + * derivative works of, display, perform, and distribute the Software and make, + * use, sell, offer for sale, import, export, have made, and have sold the + * Software and the Larger Work(s), and to sublicense the foregoing rights on + * either these or other terms. + * + * This license is subject to the following condition: + * + * The above copyright notice and either this complete permission notice or at a + * minimum a reference to the UPL must be included in all copies or substantial + * portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. */ package org.graalvm.compiler.truffle.jfr; diff --git a/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/jfr/InvalidationEvent.java b/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/jfr/InvalidationEvent.java index 621980e75cef..9041810361bf 100644 --- a/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/jfr/InvalidationEvent.java +++ b/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/jfr/InvalidationEvent.java @@ -1,26 +1,42 @@ /* - * Copyright (c) 2020, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2020, 2023, 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. Oracle designates this - * particular file as subject to the "Classpath" exception as provided - * by Oracle in the LICENSE file that accompanied this code. - * - * 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. + * The Universal Permissive License (UPL), Version 1.0 + * + * Subject to the condition set forth below, permission is hereby granted to any + * person obtaining a copy of this software, associated documentation and/or + * data (collectively the "Software"), free of charge and under any and all + * copyright rights in the Software, and any and all patent rights owned or + * freely licensable by each licensor hereunder covering either (i) the + * unmodified Software as contributed to or provided by such licensor, or (ii) + * the Larger Works (as defined below), to deal in both + * + * (a) the Software, and + * + * (b) any piece of software and/or hardware listed in the lrgrwrks.txt file if + * one is included with the Software each a "Larger Work" to which the Software + * is contributed by such licensors), + * + * without restriction, including without limitation the rights to copy, create + * derivative works of, display, perform, and distribute the Software and make, + * use, sell, offer for sale, import, export, have made, and have sold the + * Software and the Larger Work(s), and to sublicense the foregoing rights on + * either these or other terms. + * + * This license is subject to the following condition: + * + * The above copyright notice and either this complete permission notice or at a + * minimum a reference to the UPL must be included in all copies or substantial + * portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. */ package org.graalvm.compiler.truffle.jfr; diff --git a/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/jfr/RootFunctionEvent.java b/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/jfr/RootFunctionEvent.java index 9edf3a9ad643..b9e95590668a 100644 --- a/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/jfr/RootFunctionEvent.java +++ b/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/jfr/RootFunctionEvent.java @@ -1,26 +1,42 @@ /* - * Copyright (c) 2020, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2020, 2023, 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. Oracle designates this - * particular file as subject to the "Classpath" exception as provided - * by Oracle in the LICENSE file that accompanied this code. - * - * 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. + * The Universal Permissive License (UPL), Version 1.0 + * + * Subject to the condition set forth below, permission is hereby granted to any + * person obtaining a copy of this software, associated documentation and/or + * data (collectively the "Software"), free of charge and under any and all + * copyright rights in the Software, and any and all patent rights owned or + * freely licensable by each licensor hereunder covering either (i) the + * unmodified Software as contributed to or provided by such licensor, or (ii) + * the Larger Works (as defined below), to deal in both + * + * (a) the Software, and + * + * (b) any piece of software and/or hardware listed in the lrgrwrks.txt file if + * one is included with the Software each a "Larger Work" to which the Software + * is contributed by such licensors), + * + * without restriction, including without limitation the rights to copy, create + * derivative works of, display, perform, and distribute the Software and make, + * use, sell, offer for sale, import, export, have made, and have sold the + * Software and the Larger Work(s), and to sublicense the foregoing rights on + * either these or other terms. + * + * This license is subject to the following condition: + * + * The above copyright notice and either this complete permission notice or at a + * minimum a reference to the UPL must be included in all copies or substantial + * portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. */ package org.graalvm.compiler.truffle.jfr; diff --git a/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/jfr/impl/CompilationEventImpl.java b/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/jfr/impl/CompilationEventImpl.java index bfd079930e5c..fd1418866021 100644 --- a/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/jfr/impl/CompilationEventImpl.java +++ b/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/jfr/impl/CompilationEventImpl.java @@ -1,26 +1,42 @@ /* - * Copyright (c) 2020, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2020, 2023, 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. Oracle designates this - * particular file as subject to the "Classpath" exception as provided - * by Oracle in the LICENSE file that accompanied this code. + * The Universal Permissive License (UPL), Version 1.0 * - * 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). + * Subject to the condition set forth below, permission is hereby granted to any + * person obtaining a copy of this software, associated documentation and/or + * data (collectively the "Software"), free of charge and under any and all + * copyright rights in the Software, and any and all patent rights owned or + * freely licensable by each licensor hereunder covering either (i) the + * unmodified Software as contributed to or provided by such licensor, or (ii) + * the Larger Works (as defined below), to deal in both * - * 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. + * (a) the Software, and * - * 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. + * (b) any piece of software and/or hardware listed in the lrgrwrks.txt file if + * one is included with the Software each a "Larger Work" to which the Software + * is contributed by such licensors), + * + * without restriction, including without limitation the rights to copy, create + * derivative works of, display, perform, and distribute the Software and make, + * use, sell, offer for sale, import, export, have made, and have sold the + * Software and the Larger Work(s), and to sublicense the foregoing rights on + * either these or other terms. + * + * This license is subject to the following condition: + * + * The above copyright notice and either this complete permission notice or at a + * minimum a reference to the UPL must be included in all copies or substantial + * portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. */ package org.graalvm.compiler.truffle.jfr.impl; diff --git a/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/jfr/impl/CompilationFailureEventImpl.java b/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/jfr/impl/CompilationFailureEventImpl.java index 2653c351a510..5c5549b3a27d 100644 --- a/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/jfr/impl/CompilationFailureEventImpl.java +++ b/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/jfr/impl/CompilationFailureEventImpl.java @@ -1,26 +1,42 @@ /* - * Copyright (c) 2020, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2020, 2023, 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. Oracle designates this - * particular file as subject to the "Classpath" exception as provided - * by Oracle in the LICENSE file that accompanied this code. - * - * 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. + * The Universal Permissive License (UPL), Version 1.0 + * + * Subject to the condition set forth below, permission is hereby granted to any + * person obtaining a copy of this software, associated documentation and/or + * data (collectively the "Software"), free of charge and under any and all + * copyright rights in the Software, and any and all patent rights owned or + * freely licensable by each licensor hereunder covering either (i) the + * unmodified Software as contributed to or provided by such licensor, or (ii) + * the Larger Works (as defined below), to deal in both + * + * (a) the Software, and + * + * (b) any piece of software and/or hardware listed in the lrgrwrks.txt file if + * one is included with the Software each a "Larger Work" to which the Software + * is contributed by such licensors), + * + * without restriction, including without limitation the rights to copy, create + * derivative works of, display, perform, and distribute the Software and make, + * use, sell, offer for sale, import, export, have made, and have sold the + * Software and the Larger Work(s), and to sublicense the foregoing rights on + * either these or other terms. + * + * This license is subject to the following condition: + * + * The above copyright notice and either this complete permission notice or at a + * minimum a reference to the UPL must be included in all copies or substantial + * portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. */ package org.graalvm.compiler.truffle.jfr.impl; diff --git a/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/jfr/impl/CompilationStatisticsEventImpl.java b/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/jfr/impl/CompilationStatisticsEventImpl.java index 6e42229b61e7..7c91b937c4df 100644 --- a/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/jfr/impl/CompilationStatisticsEventImpl.java +++ b/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/jfr/impl/CompilationStatisticsEventImpl.java @@ -1,26 +1,42 @@ /* - * Copyright (c) 2020, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2020, 2023, 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. Oracle designates this - * particular file as subject to the "Classpath" exception as provided - * by Oracle in the LICENSE file that accompanied this code. + * The Universal Permissive License (UPL), Version 1.0 * - * 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). + * Subject to the condition set forth below, permission is hereby granted to any + * person obtaining a copy of this software, associated documentation and/or + * data (collectively the "Software"), free of charge and under any and all + * copyright rights in the Software, and any and all patent rights owned or + * freely licensable by each licensor hereunder covering either (i) the + * unmodified Software as contributed to or provided by such licensor, or (ii) + * the Larger Works (as defined below), to deal in both * - * 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. + * (a) the Software, and * - * 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. + * (b) any piece of software and/or hardware listed in the lrgrwrks.txt file if + * one is included with the Software each a "Larger Work" to which the Software + * is contributed by such licensors), + * + * without restriction, including without limitation the rights to copy, create + * derivative works of, display, perform, and distribute the Software and make, + * use, sell, offer for sale, import, export, have made, and have sold the + * Software and the Larger Work(s), and to sublicense the foregoing rights on + * either these or other terms. + * + * This license is subject to the following condition: + * + * The above copyright notice and either this complete permission notice or at a + * minimum a reference to the UPL must be included in all copies or substantial + * portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. */ package org.graalvm.compiler.truffle.jfr.impl; diff --git a/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/jfr/impl/DeoptimizationEventImpl.java b/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/jfr/impl/DeoptimizationEventImpl.java index 2cd90ec367cd..26f9180b4451 100644 --- a/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/jfr/impl/DeoptimizationEventImpl.java +++ b/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/jfr/impl/DeoptimizationEventImpl.java @@ -1,26 +1,42 @@ /* - * Copyright (c) 2020, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2020, 2023, 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. Oracle designates this - * particular file as subject to the "Classpath" exception as provided - * by Oracle in the LICENSE file that accompanied this code. - * - * 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. + * The Universal Permissive License (UPL), Version 1.0 + * + * Subject to the condition set forth below, permission is hereby granted to any + * person obtaining a copy of this software, associated documentation and/or + * data (collectively the "Software"), free of charge and under any and all + * copyright rights in the Software, and any and all patent rights owned or + * freely licensable by each licensor hereunder covering either (i) the + * unmodified Software as contributed to or provided by such licensor, or (ii) + * the Larger Works (as defined below), to deal in both + * + * (a) the Software, and + * + * (b) any piece of software and/or hardware listed in the lrgrwrks.txt file if + * one is included with the Software each a "Larger Work" to which the Software + * is contributed by such licensors), + * + * without restriction, including without limitation the rights to copy, create + * derivative works of, display, perform, and distribute the Software and make, + * use, sell, offer for sale, import, export, have made, and have sold the + * Software and the Larger Work(s), and to sublicense the foregoing rights on + * either these or other terms. + * + * This license is subject to the following condition: + * + * The above copyright notice and either this complete permission notice or at a + * minimum a reference to the UPL must be included in all copies or substantial + * portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. */ package org.graalvm.compiler.truffle.jfr.impl; diff --git a/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/jfr/impl/EventFactoryImpl.java b/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/jfr/impl/EventFactoryImpl.java index 9d751d357827..7fa2d188c9d6 100644 --- a/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/jfr/impl/EventFactoryImpl.java +++ b/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/jfr/impl/EventFactoryImpl.java @@ -1,26 +1,42 @@ /* - * Copyright (c) 2020, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2020, 2023, 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. Oracle designates this - * particular file as subject to the "Classpath" exception as provided - * by Oracle in the LICENSE file that accompanied this code. + * The Universal Permissive License (UPL), Version 1.0 * - * 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). + * Subject to the condition set forth below, permission is hereby granted to any + * person obtaining a copy of this software, associated documentation and/or + * data (collectively the "Software"), free of charge and under any and all + * copyright rights in the Software, and any and all patent rights owned or + * freely licensable by each licensor hereunder covering either (i) the + * unmodified Software as contributed to or provided by such licensor, or (ii) + * the Larger Works (as defined below), to deal in both * - * 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. + * (a) the Software, and * - * 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. + * (b) any piece of software and/or hardware listed in the lrgrwrks.txt file if + * one is included with the Software each a "Larger Work" to which the Software + * is contributed by such licensors), + * + * without restriction, including without limitation the rights to copy, create + * derivative works of, display, perform, and distribute the Software and make, + * use, sell, offer for sale, import, export, have made, and have sold the + * Software and the Larger Work(s), and to sublicense the foregoing rights on + * either these or other terms. + * + * This license is subject to the following condition: + * + * The above copyright notice and either this complete permission notice or at a + * minimum a reference to the UPL must be included in all copies or substantial + * portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. */ package org.graalvm.compiler.truffle.jfr.impl; diff --git a/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/jfr/impl/InvalidationEventImpl.java b/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/jfr/impl/InvalidationEventImpl.java index 081612d3cf73..48d3490cb616 100644 --- a/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/jfr/impl/InvalidationEventImpl.java +++ b/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/jfr/impl/InvalidationEventImpl.java @@ -1,26 +1,42 @@ /* - * Copyright (c) 2020, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2020, 2023, 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. Oracle designates this - * particular file as subject to the "Classpath" exception as provided - * by Oracle in the LICENSE file that accompanied this code. - * - * 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. + * The Universal Permissive License (UPL), Version 1.0 + * + * Subject to the condition set forth below, permission is hereby granted to any + * person obtaining a copy of this software, associated documentation and/or + * data (collectively the "Software"), free of charge and under any and all + * copyright rights in the Software, and any and all patent rights owned or + * freely licensable by each licensor hereunder covering either (i) the + * unmodified Software as contributed to or provided by such licensor, or (ii) + * the Larger Works (as defined below), to deal in both + * + * (a) the Software, and + * + * (b) any piece of software and/or hardware listed in the lrgrwrks.txt file if + * one is included with the Software each a "Larger Work" to which the Software + * is contributed by such licensors), + * + * without restriction, including without limitation the rights to copy, create + * derivative works of, display, perform, and distribute the Software and make, + * use, sell, offer for sale, import, export, have made, and have sold the + * Software and the Larger Work(s), and to sublicense the foregoing rights on + * either these or other terms. + * + * This license is subject to the following condition: + * + * The above copyright notice and either this complete permission notice or at a + * minimum a reference to the UPL must be included in all copies or substantial + * portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. */ package org.graalvm.compiler.truffle.jfr.impl; diff --git a/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/jfr/impl/ProviderImpl.java b/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/jfr/impl/ProviderImpl.java index b08b59fc50c9..f33031bcaa6d 100644 --- a/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/jfr/impl/ProviderImpl.java +++ b/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/jfr/impl/ProviderImpl.java @@ -1,26 +1,42 @@ /* - * Copyright (c) 2020, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2020, 2023, 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. Oracle designates this - * particular file as subject to the "Classpath" exception as provided - * by Oracle in the LICENSE file that accompanied this code. - * - * 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. + * The Universal Permissive License (UPL), Version 1.0 + * + * Subject to the condition set forth below, permission is hereby granted to any + * person obtaining a copy of this software, associated documentation and/or + * data (collectively the "Software"), free of charge and under any and all + * copyright rights in the Software, and any and all patent rights owned or + * freely licensable by each licensor hereunder covering either (i) the + * unmodified Software as contributed to or provided by such licensor, or (ii) + * the Larger Works (as defined below), to deal in both + * + * (a) the Software, and + * + * (b) any piece of software and/or hardware listed in the lrgrwrks.txt file if + * one is included with the Software each a "Larger Work" to which the Software + * is contributed by such licensors), + * + * without restriction, including without limitation the rights to copy, create + * derivative works of, display, perform, and distribute the Software and make, + * use, sell, offer for sale, import, export, have made, and have sold the + * Software and the Larger Work(s), and to sublicense the foregoing rights on + * either these or other terms. + * + * This license is subject to the following condition: + * + * The above copyright notice and either this complete permission notice or at a + * minimum a reference to the UPL must be included in all copies or substantial + * portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. */ package org.graalvm.compiler.truffle.jfr.impl; diff --git a/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/jfr/impl/RootFunctionEventImpl.java b/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/jfr/impl/RootFunctionEventImpl.java index 2c2d998d5d52..108ac48bfbd0 100644 --- a/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/jfr/impl/RootFunctionEventImpl.java +++ b/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/jfr/impl/RootFunctionEventImpl.java @@ -1,26 +1,42 @@ /* - * Copyright (c) 2020, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2020, 2023, 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. Oracle designates this - * particular file as subject to the "Classpath" exception as provided - * by Oracle in the LICENSE file that accompanied this code. + * The Universal Permissive License (UPL), Version 1.0 * - * 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). + * Subject to the condition set forth below, permission is hereby granted to any + * person obtaining a copy of this software, associated documentation and/or + * data (collectively the "Software"), free of charge and under any and all + * copyright rights in the Software, and any and all patent rights owned or + * freely licensable by each licensor hereunder covering either (i) the + * unmodified Software as contributed to or provided by such licensor, or (ii) + * the Larger Works (as defined below), to deal in both * - * 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. + * (a) the Software, and * - * 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. + * (b) any piece of software and/or hardware listed in the lrgrwrks.txt file if + * one is included with the Software each a "Larger Work" to which the Software + * is contributed by such licensors), + * + * without restriction, including without limitation the rights to copy, create + * derivative works of, display, perform, and distribute the Software and make, + * use, sell, offer for sale, import, export, have made, and have sold the + * Software and the Larger Work(s), and to sublicense the foregoing rights on + * either these or other terms. + * + * This license is subject to the following condition: + * + * The above copyright notice and either this complete permission notice or at a + * minimum a reference to the UPL must be included in all copies or substantial + * portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. */ package org.graalvm.compiler.truffle.jfr.impl; diff --git a/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/AbstractCompilationTask.java b/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/AbstractCompilationTask.java index 5534b2d7a5a9..0b7478e1b121 100644 --- a/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/AbstractCompilationTask.java +++ b/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/AbstractCompilationTask.java @@ -1,26 +1,42 @@ /* - * Copyright (c) 2023, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2023, 2023, 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. Oracle designates this - * particular file as subject to the "Classpath" exception as provided - * by Oracle in the LICENSE file that accompanied this code. + * The Universal Permissive License (UPL), Version 1.0 * - * 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). + * Subject to the condition set forth below, permission is hereby granted to any + * person obtaining a copy of this software, associated documentation and/or + * data (collectively the "Software"), free of charge and under any and all + * copyright rights in the Software, and any and all patent rights owned or + * freely licensable by each licensor hereunder covering either (i) the + * unmodified Software as contributed to or provided by such licensor, or (ii) + * the Larger Works (as defined below), to deal in both * - * 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. + * (a) the Software, and * - * 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. + * (b) any piece of software and/or hardware listed in the lrgrwrks.txt file if + * one is included with the Software each a "Larger Work" to which the Software + * is contributed by such licensors), + * + * without restriction, including without limitation the rights to copy, create + * derivative works of, display, perform, and distribute the Software and make, + * use, sell, offer for sale, import, export, have made, and have sold the + * Software and the Larger Work(s), and to sublicense the foregoing rights on + * either these or other terms. + * + * This license is subject to the following condition: + * + * The above copyright notice and either this complete permission notice or at a + * minimum a reference to the UPL must be included in all copies or substantial + * portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. */ package org.graalvm.compiler.truffle.runtime; diff --git a/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/AbstractGraalTruffleRuntimeListener.java b/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/AbstractGraalTruffleRuntimeListener.java index bd8132b8b91c..846921e12ef9 100644 --- a/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/AbstractGraalTruffleRuntimeListener.java +++ b/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/AbstractGraalTruffleRuntimeListener.java @@ -1,26 +1,42 @@ /* - * Copyright (c) 2018, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2018, 2023, 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. Oracle designates this - * particular file as subject to the "Classpath" exception as provided - * by Oracle in the LICENSE file that accompanied this code. - * - * 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. + * The Universal Permissive License (UPL), Version 1.0 + * + * Subject to the condition set forth below, permission is hereby granted to any + * person obtaining a copy of this software, associated documentation and/or + * data (collectively the "Software"), free of charge and under any and all + * copyright rights in the Software, and any and all patent rights owned or + * freely licensable by each licensor hereunder covering either (i) the + * unmodified Software as contributed to or provided by such licensor, or (ii) + * the Larger Works (as defined below), to deal in both + * + * (a) the Software, and + * + * (b) any piece of software and/or hardware listed in the lrgrwrks.txt file if + * one is included with the Software each a "Larger Work" to which the Software + * is contributed by such licensors), + * + * without restriction, including without limitation the rights to copy, create + * derivative works of, display, perform, and distribute the Software and make, + * use, sell, offer for sale, import, export, have made, and have sold the + * Software and the Larger Work(s), and to sublicense the foregoing rights on + * either these or other terms. + * + * This license is subject to the following condition: + * + * The above copyright notice and either this complete permission notice or at a + * minimum a reference to the UPL must be included in all copies or substantial + * portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. */ package org.graalvm.compiler.truffle.runtime; diff --git a/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/AbstractOptimizedLoopNode.java b/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/AbstractOptimizedLoopNode.java index b45b1f05378c..a712200cc70a 100644 --- a/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/AbstractOptimizedLoopNode.java +++ b/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/AbstractOptimizedLoopNode.java @@ -1,26 +1,42 @@ /* - * Copyright (c) 2021, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2021, 2023, 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. Oracle designates this - * particular file as subject to the "Classpath" exception as provided - * by Oracle in the LICENSE file that accompanied this code. + * The Universal Permissive License (UPL), Version 1.0 * - * 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). + * Subject to the condition set forth below, permission is hereby granted to any + * person obtaining a copy of this software, associated documentation and/or + * data (collectively the "Software"), free of charge and under any and all + * copyright rights in the Software, and any and all patent rights owned or + * freely licensable by each licensor hereunder covering either (i) the + * unmodified Software as contributed to or provided by such licensor, or (ii) + * the Larger Works (as defined below), to deal in both * - * 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. + * (a) the Software, and * - * 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. + * (b) any piece of software and/or hardware listed in the lrgrwrks.txt file if + * one is included with the Software each a "Larger Work" to which the Software + * is contributed by such licensors), + * + * without restriction, including without limitation the rights to copy, create + * derivative works of, display, perform, and distribute the Software and make, + * use, sell, offer for sale, import, export, have made, and have sold the + * Software and the Larger Work(s), and to sublicense the foregoing rights on + * either these or other terms. + * + * This license is subject to the following condition: + * + * The above copyright notice and either this complete permission notice or at a + * minimum a reference to the UPL must be included in all copies or substantial + * portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. */ package org.graalvm.compiler.truffle.runtime; diff --git a/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/BackgroundCompileQueue.java b/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/BackgroundCompileQueue.java index 98adc24a97a2..cbe4281baf7f 100644 --- a/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/BackgroundCompileQueue.java +++ b/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/BackgroundCompileQueue.java @@ -1,26 +1,42 @@ /* - * Copyright (c) 2018, 2021, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2018, 2023, 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. Oracle designates this - * particular file as subject to the "Classpath" exception as provided - * by Oracle in the LICENSE file that accompanied this code. + * The Universal Permissive License (UPL), Version 1.0 * - * 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). + * Subject to the condition set forth below, permission is hereby granted to any + * person obtaining a copy of this software, associated documentation and/or + * data (collectively the "Software"), free of charge and under any and all + * copyright rights in the Software, and any and all patent rights owned or + * freely licensable by each licensor hereunder covering either (i) the + * unmodified Software as contributed to or provided by such licensor, or (ii) + * the Larger Works (as defined below), to deal in both * - * 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. + * (a) the Software, and * - * 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. + * (b) any piece of software and/or hardware listed in the lrgrwrks.txt file if + * one is included with the Software each a "Larger Work" to which the Software + * is contributed by such licensors), + * + * without restriction, including without limitation the rights to copy, create + * derivative works of, display, perform, and distribute the Software and make, + * use, sell, offer for sale, import, export, have made, and have sold the + * Software and the Larger Work(s), and to sublicense the foregoing rights on + * either these or other terms. + * + * This license is subject to the following condition: + * + * The above copyright notice and either this complete permission notice or at a + * minimum a reference to the UPL must be included in all copies or substantial + * portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. */ package org.graalvm.compiler.truffle.runtime; diff --git a/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/BaseOSRRootNode.java b/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/BaseOSRRootNode.java index d13e34f9db99..d2f6783bb662 100644 --- a/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/BaseOSRRootNode.java +++ b/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/BaseOSRRootNode.java @@ -1,26 +1,42 @@ /* - * Copyright (c) 2015, 2022, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2015, 2023, 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. Oracle designates this - * particular file as subject to the "Classpath" exception as provided - * by Oracle in the LICENSE file that accompanied this code. + * The Universal Permissive License (UPL), Version 1.0 * - * 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). + * Subject to the condition set forth below, permission is hereby granted to any + * person obtaining a copy of this software, associated documentation and/or + * data (collectively the "Software"), free of charge and under any and all + * copyright rights in the Software, and any and all patent rights owned or + * freely licensable by each licensor hereunder covering either (i) the + * unmodified Software as contributed to or provided by such licensor, or (ii) + * the Larger Works (as defined below), to deal in both * - * 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. + * (a) the Software, and * - * 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. + * (b) any piece of software and/or hardware listed in the lrgrwrks.txt file if + * one is included with the Software each a "Larger Work" to which the Software + * is contributed by such licensors), + * + * without restriction, including without limitation the rights to copy, create + * derivative works of, display, perform, and distribute the Software and make, + * use, sell, offer for sale, import, export, have made, and have sold the + * Software and the Larger Work(s), and to sublicense the foregoing rights on + * either these or other terms. + * + * This license is subject to the following condition: + * + * The above copyright notice and either this complete permission notice or at a + * minimum a reference to the UPL must be included in all copies or substantial + * portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. */ package org.graalvm.compiler.truffle.runtime; diff --git a/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/BytecodeOSRMetadata.java b/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/BytecodeOSRMetadata.java index 625a2af57897..27762e3394f0 100644 --- a/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/BytecodeOSRMetadata.java +++ b/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/BytecodeOSRMetadata.java @@ -1,26 +1,42 @@ /* - * Copyright (c) 2021, 2022, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2021, 2023, 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. Oracle designates this - * particular file as subject to the "Classpath" exception as provided - * by Oracle in the LICENSE file that accompanied this code. + * The Universal Permissive License (UPL), Version 1.0 * - * 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). + * Subject to the condition set forth below, permission is hereby granted to any + * person obtaining a copy of this software, associated documentation and/or + * data (collectively the "Software"), free of charge and under any and all + * copyright rights in the Software, and any and all patent rights owned or + * freely licensable by each licensor hereunder covering either (i) the + * unmodified Software as contributed to or provided by such licensor, or (ii) + * the Larger Works (as defined below), to deal in both * - * 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. + * (a) the Software, and * - * 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. + * (b) any piece of software and/or hardware listed in the lrgrwrks.txt file if + * one is included with the Software each a "Larger Work" to which the Software + * is contributed by such licensors), + * + * without restriction, including without limitation the rights to copy, create + * derivative works of, display, perform, and distribute the Software and make, + * use, sell, offer for sale, import, export, have made, and have sold the + * Software and the Larger Work(s), and to sublicense the foregoing rights on + * either these or other terms. + * + * This license is subject to the following condition: + * + * The above copyright notice and either this complete permission notice or at a + * minimum a reference to the UPL must be included in all copies or substantial + * portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. */ package org.graalvm.compiler.truffle.runtime; diff --git a/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/BytecodeOSRRootNode.java b/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/BytecodeOSRRootNode.java index 7d3b6722e744..28a36ab7c7d3 100644 --- a/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/BytecodeOSRRootNode.java +++ b/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/BytecodeOSRRootNode.java @@ -1,26 +1,42 @@ /* - * Copyright (c) 2021, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2021, 2023, 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. Oracle designates this - * particular file as subject to the "Classpath" exception as provided - * by Oracle in the LICENSE file that accompanied this code. + * The Universal Permissive License (UPL), Version 1.0 * - * 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). + * Subject to the condition set forth below, permission is hereby granted to any + * person obtaining a copy of this software, associated documentation and/or + * data (collectively the "Software"), free of charge and under any and all + * copyright rights in the Software, and any and all patent rights owned or + * freely licensable by each licensor hereunder covering either (i) the + * unmodified Software as contributed to or provided by such licensor, or (ii) + * the Larger Works (as defined below), to deal in both * - * 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. + * (a) the Software, and * - * 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. + * (b) any piece of software and/or hardware listed in the lrgrwrks.txt file if + * one is included with the Software each a "Larger Work" to which the Software + * is contributed by such licensors), + * + * without restriction, including without limitation the rights to copy, create + * derivative works of, display, perform, and distribute the Software and make, + * use, sell, offer for sale, import, export, have made, and have sold the + * Software and the Larger Work(s), and to sublicense the foregoing rights on + * either these or other terms. + * + * This license is subject to the following condition: + * + * The above copyright notice and either this complete permission notice or at a + * minimum a reference to the UPL must be included in all copies or substantial + * portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. */ package org.graalvm.compiler.truffle.runtime; diff --git a/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/CompilationState.java b/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/CompilationState.java index 161b4e168853..11159434940f 100644 --- a/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/CompilationState.java +++ b/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/CompilationState.java @@ -1,26 +1,42 @@ /* - * Copyright (c) 2021, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2021, 2023, 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. Oracle designates this - * particular file as subject to the "Classpath" exception as provided - * by Oracle in the LICENSE file that accompanied this code. - * - * 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. + * The Universal Permissive License (UPL), Version 1.0 + * + * Subject to the condition set forth below, permission is hereby granted to any + * person obtaining a copy of this software, associated documentation and/or + * data (collectively the "Software"), free of charge and under any and all + * copyright rights in the Software, and any and all patent rights owned or + * freely licensable by each licensor hereunder covering either (i) the + * unmodified Software as contributed to or provided by such licensor, or (ii) + * the Larger Works (as defined below), to deal in both + * + * (a) the Software, and + * + * (b) any piece of software and/or hardware listed in the lrgrwrks.txt file if + * one is included with the Software each a "Larger Work" to which the Software + * is contributed by such licensors), + * + * without restriction, including without limitation the rights to copy, create + * derivative works of, display, perform, and distribute the Software and make, + * use, sell, offer for sale, import, export, have made, and have sold the + * Software and the Larger Work(s), and to sublicense the foregoing rights on + * either these or other terms. + * + * This license is subject to the following condition: + * + * The above copyright notice and either this complete permission notice or at a + * minimum a reference to the UPL must be included in all copies or substantial + * portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. */ package org.graalvm.compiler.truffle.runtime; diff --git a/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/CompilationTask.java b/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/CompilationTask.java index 85b166f9bc17..875a765a534d 100644 --- a/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/CompilationTask.java +++ b/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/CompilationTask.java @@ -1,26 +1,42 @@ /* - * Copyright (c) 2013, 2021, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2013, 2023, 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. Oracle designates this - * particular file as subject to the "Classpath" exception as provided - * by Oracle in the LICENSE file that accompanied this code. + * The Universal Permissive License (UPL), Version 1.0 * - * 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). + * Subject to the condition set forth below, permission is hereby granted to any + * person obtaining a copy of this software, associated documentation and/or + * data (collectively the "Software"), free of charge and under any and all + * copyright rights in the Software, and any and all patent rights owned or + * freely licensable by each licensor hereunder covering either (i) the + * unmodified Software as contributed to or provided by such licensor, or (ii) + * the Larger Works (as defined below), to deal in both * - * 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. + * (a) the Software, and * - * 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. + * (b) any piece of software and/or hardware listed in the lrgrwrks.txt file if + * one is included with the Software each a "Larger Work" to which the Software + * is contributed by such licensors), + * + * without restriction, including without limitation the rights to copy, create + * derivative works of, display, perform, and distribute the Software and make, + * use, sell, offer for sale, import, export, have made, and have sold the + * Software and the Larger Work(s), and to sublicense the foregoing rights on + * either these or other terms. + * + * This license is subject to the following condition: + * + * The above copyright notice and either this complete permission notice or at a + * minimum a reference to the UPL must be included in all copies or substantial + * portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. */ package org.graalvm.compiler.truffle.runtime; diff --git a/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/DefaultLoopNodeFactory.java b/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/DefaultLoopNodeFactory.java index 0956e81f3de4..82ecec9f4b3d 100644 --- a/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/DefaultLoopNodeFactory.java +++ b/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/DefaultLoopNodeFactory.java @@ -1,26 +1,42 @@ /* - * Copyright (c) 2015, 2018, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2015, 2023, 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. Oracle designates this - * particular file as subject to the "Classpath" exception as provided - * by Oracle in the LICENSE file that accompanied this code. - * - * 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. + * The Universal Permissive License (UPL), Version 1.0 + * + * Subject to the condition set forth below, permission is hereby granted to any + * person obtaining a copy of this software, associated documentation and/or + * data (collectively the "Software"), free of charge and under any and all + * copyright rights in the Software, and any and all patent rights owned or + * freely licensable by each licensor hereunder covering either (i) the + * unmodified Software as contributed to or provided by such licensor, or (ii) + * the Larger Works (as defined below), to deal in both + * + * (a) the Software, and + * + * (b) any piece of software and/or hardware listed in the lrgrwrks.txt file if + * one is included with the Software each a "Larger Work" to which the Software + * is contributed by such licensors), + * + * without restriction, including without limitation the rights to copy, create + * derivative works of, display, perform, and distribute the Software and make, + * use, sell, offer for sale, import, export, have made, and have sold the + * Software and the Larger Work(s), and to sublicense the foregoing rights on + * either these or other terms. + * + * This license is subject to the following condition: + * + * The above copyright notice and either this complete permission notice or at a + * minimum a reference to the UPL must be included in all copies or substantial + * portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. */ package org.graalvm.compiler.truffle.runtime; diff --git a/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/DynamicThresholdsQueue.java b/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/DynamicThresholdsQueue.java index 9b5ead3b7cbb..abfc50a5bed4 100644 --- a/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/DynamicThresholdsQueue.java +++ b/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/DynamicThresholdsQueue.java @@ -1,26 +1,42 @@ /* - * Copyright (c) 2021, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2021, 2023, 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. Oracle designates this - * particular file as subject to the "Classpath" exception as provided - * by Oracle in the LICENSE file that accompanied this code. + * The Universal Permissive License (UPL), Version 1.0 * - * 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). + * Subject to the condition set forth below, permission is hereby granted to any + * person obtaining a copy of this software, associated documentation and/or + * data (collectively the "Software"), free of charge and under any and all + * copyright rights in the Software, and any and all patent rights owned or + * freely licensable by each licensor hereunder covering either (i) the + * unmodified Software as contributed to or provided by such licensor, or (ii) + * the Larger Works (as defined below), to deal in both * - * 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. + * (a) the Software, and * - * 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. + * (b) any piece of software and/or hardware listed in the lrgrwrks.txt file if + * one is included with the Software each a "Larger Work" to which the Software + * is contributed by such licensors), + * + * without restriction, including without limitation the rights to copy, create + * derivative works of, display, perform, and distribute the Software and make, + * use, sell, offer for sale, import, export, have made, and have sold the + * Software and the Larger Work(s), and to sublicense the foregoing rights on + * either these or other terms. + * + * This license is subject to the following condition: + * + * The above copyright notice and either this complete permission notice or at a + * minimum a reference to the UPL must be included in all copies or substantial + * portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. */ package org.graalvm.compiler.truffle.runtime; diff --git a/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/EngineCacheSupport.java b/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/EngineCacheSupport.java index 6d1bddec934b..790ea6b3000f 100644 --- a/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/EngineCacheSupport.java +++ b/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/EngineCacheSupport.java @@ -1,26 +1,42 @@ /* - * Copyright (c) 2020, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2020, 2023, 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. Oracle designates this - * particular file as subject to the "Classpath" exception as provided - * by Oracle in the LICENSE file that accompanied this code. + * The Universal Permissive License (UPL), Version 1.0 * - * 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). + * Subject to the condition set forth below, permission is hereby granted to any + * person obtaining a copy of this software, associated documentation and/or + * data (collectively the "Software"), free of charge and under any and all + * copyright rights in the Software, and any and all patent rights owned or + * freely licensable by each licensor hereunder covering either (i) the + * unmodified Software as contributed to or provided by such licensor, or (ii) + * the Larger Works (as defined below), to deal in both * - * 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. + * (a) the Software, and * - * 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. + * (b) any piece of software and/or hardware listed in the lrgrwrks.txt file if + * one is included with the Software each a "Larger Work" to which the Software + * is contributed by such licensors), + * + * without restriction, including without limitation the rights to copy, create + * derivative works of, display, perform, and distribute the Software and make, + * use, sell, offer for sale, import, export, have made, and have sold the + * Software and the Larger Work(s), and to sublicense the foregoing rights on + * either these or other terms. + * + * This license is subject to the following condition: + * + * The above copyright notice and either this complete permission notice or at a + * minimum a reference to the UPL must be included in all copies or substantial + * portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. */ package org.graalvm.compiler.truffle.runtime; diff --git a/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/EngineData.java b/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/EngineData.java index 62a845fcd4fe..8366f22fac09 100644 --- a/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/EngineData.java +++ b/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/EngineData.java @@ -1,26 +1,42 @@ /* - * Copyright (c) 2015, 2021, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2015, 2023, 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. Oracle designates this - * particular file as subject to the "Classpath" exception as provided - * by Oracle in the LICENSE file that accompanied this code. + * The Universal Permissive License (UPL), Version 1.0 * - * 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). + * Subject to the condition set forth below, permission is hereby granted to any + * person obtaining a copy of this software, associated documentation and/or + * data (collectively the "Software"), free of charge and under any and all + * copyright rights in the Software, and any and all patent rights owned or + * freely licensable by each licensor hereunder covering either (i) the + * unmodified Software as contributed to or provided by such licensor, or (ii) + * the Larger Works (as defined below), to deal in both * - * 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. + * (a) the Software, and * - * 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. + * (b) any piece of software and/or hardware listed in the lrgrwrks.txt file if + * one is included with the Software each a "Larger Work" to which the Software + * is contributed by such licensors), + * + * without restriction, including without limitation the rights to copy, create + * derivative works of, display, perform, and distribute the Software and make, + * use, sell, offer for sale, import, export, have made, and have sold the + * Software and the Larger Work(s), and to sublicense the foregoing rights on + * either these or other terms. + * + * This license is subject to the following condition: + * + * The above copyright notice and either this complete permission notice or at a + * minimum a reference to the UPL must be included in all copies or substantial + * portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. */ package org.graalvm.compiler.truffle.runtime; diff --git a/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/FixedPointMath.java b/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/FixedPointMath.java index cf012173dbeb..a8d42332cb1a 100644 --- a/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/FixedPointMath.java +++ b/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/FixedPointMath.java @@ -1,26 +1,42 @@ /* - * Copyright (c) 2013, 2021, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2013, 2023, 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. Oracle designates this - * particular file as subject to the "Classpath" exception as provided - * by Oracle in the LICENSE file that accompanied this code. - * - * 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. + * The Universal Permissive License (UPL), Version 1.0 + * + * Subject to the condition set forth below, permission is hereby granted to any + * person obtaining a copy of this software, associated documentation and/or + * data (collectively the "Software"), free of charge and under any and all + * copyright rights in the Software, and any and all patent rights owned or + * freely licensable by each licensor hereunder covering either (i) the + * unmodified Software as contributed to or provided by such licensor, or (ii) + * the Larger Works (as defined below), to deal in both + * + * (a) the Software, and + * + * (b) any piece of software and/or hardware listed in the lrgrwrks.txt file if + * one is included with the Software each a "Larger Work" to which the Software + * is contributed by such licensors), + * + * without restriction, including without limitation the rights to copy, create + * derivative works of, display, perform, and distribute the Software and make, + * use, sell, offer for sale, import, export, have made, and have sold the + * Software and the Larger Work(s), and to sublicense the foregoing rights on + * either these or other terms. + * + * This license is subject to the following condition: + * + * The above copyright notice and either this complete permission notice or at a + * minimum a reference to the UPL must be included in all copies or substantial + * portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. */ package org.graalvm.compiler.truffle.runtime; diff --git a/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/FloodControlHandler.java b/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/FloodControlHandler.java index aee11df1e110..575a28bb9e78 100644 --- a/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/FloodControlHandler.java +++ b/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/FloodControlHandler.java @@ -1,26 +1,42 @@ /* - * Copyright (c) 2020, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2020, 2023, 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. Oracle designates this - * particular file as subject to the "Classpath" exception as provided - * by Oracle in the LICENSE file that accompanied this code. - * - * 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. + * The Universal Permissive License (UPL), Version 1.0 + * + * Subject to the condition set forth below, permission is hereby granted to any + * person obtaining a copy of this software, associated documentation and/or + * data (collectively the "Software"), free of charge and under any and all + * copyright rights in the Software, and any and all patent rights owned or + * freely licensable by each licensor hereunder covering either (i) the + * unmodified Software as contributed to or provided by such licensor, or (ii) + * the Larger Works (as defined below), to deal in both + * + * (a) the Software, and + * + * (b) any piece of software and/or hardware listed in the lrgrwrks.txt file if + * one is included with the Software each a "Larger Work" to which the Software + * is contributed by such licensors), + * + * without restriction, including without limitation the rights to copy, create + * derivative works of, display, perform, and distribute the Software and make, + * use, sell, offer for sale, import, export, have made, and have sold the + * Software and the Larger Work(s), and to sublicense the foregoing rights on + * either these or other terms. + * + * This license is subject to the following condition: + * + * The above copyright notice and either this complete permission notice or at a + * minimum a reference to the UPL must be included in all copies or substantial + * portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. */ package org.graalvm.compiler.truffle.runtime; diff --git a/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/GraalFastThreadLocal.java b/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/GraalFastThreadLocal.java index 75f5fe09b0a3..5dab2902ffea 100644 --- a/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/GraalFastThreadLocal.java +++ b/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/GraalFastThreadLocal.java @@ -1,26 +1,42 @@ /* - * Copyright (c) 2021, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2021, 2023, 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. Oracle designates this - * particular file as subject to the "Classpath" exception as provided - * by Oracle in the LICENSE file that accompanied this code. + * The Universal Permissive License (UPL), Version 1.0 * - * 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). + * Subject to the condition set forth below, permission is hereby granted to any + * person obtaining a copy of this software, associated documentation and/or + * data (collectively the "Software"), free of charge and under any and all + * copyright rights in the Software, and any and all patent rights owned or + * freely licensable by each licensor hereunder covering either (i) the + * unmodified Software as contributed to or provided by such licensor, or (ii) + * the Larger Works (as defined below), to deal in both * - * 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. + * (a) the Software, and * - * 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. + * (b) any piece of software and/or hardware listed in the lrgrwrks.txt file if + * one is included with the Software each a "Larger Work" to which the Software + * is contributed by such licensors), + * + * without restriction, including without limitation the rights to copy, create + * derivative works of, display, perform, and distribute the Software and make, + * use, sell, offer for sale, import, export, have made, and have sold the + * Software and the Larger Work(s), and to sublicense the foregoing rights on + * either these or other terms. + * + * This license is subject to the following condition: + * + * The above copyright notice and either this complete permission notice or at a + * minimum a reference to the UPL must be included in all copies or substantial + * portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. */ package org.graalvm.compiler.truffle.runtime; diff --git a/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/GraalFrameInstance.java b/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/GraalFrameInstance.java index 0cd277794331..7aee5d866f0d 100644 --- a/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/GraalFrameInstance.java +++ b/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/GraalFrameInstance.java @@ -1,26 +1,42 @@ /* - * Copyright (c) 2014, 2021, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2014, 2023, 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. Oracle designates this - * particular file as subject to the "Classpath" exception as provided - * by Oracle in the LICENSE file that accompanied this code. + * The Universal Permissive License (UPL), Version 1.0 * - * 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). + * Subject to the condition set forth below, permission is hereby granted to any + * person obtaining a copy of this software, associated documentation and/or + * data (collectively the "Software"), free of charge and under any and all + * copyright rights in the Software, and any and all patent rights owned or + * freely licensable by each licensor hereunder covering either (i) the + * unmodified Software as contributed to or provided by such licensor, or (ii) + * the Larger Works (as defined below), to deal in both * - * 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. + * (a) the Software, and * - * 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. + * (b) any piece of software and/or hardware listed in the lrgrwrks.txt file if + * one is included with the Software each a "Larger Work" to which the Software + * is contributed by such licensors), + * + * without restriction, including without limitation the rights to copy, create + * derivative works of, display, perform, and distribute the Software and make, + * use, sell, offer for sale, import, export, have made, and have sold the + * Software and the Larger Work(s), and to sublicense the foregoing rights on + * either these or other terms. + * + * This license is subject to the following condition: + * + * The above copyright notice and either this complete permission notice or at a + * minimum a reference to the UPL must be included in all copies or substantial + * portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. */ package org.graalvm.compiler.truffle.runtime; diff --git a/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/GraalOSRFrameInstance.java b/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/GraalOSRFrameInstance.java index d597132758eb..d14f8ba108eb 100644 --- a/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/GraalOSRFrameInstance.java +++ b/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/GraalOSRFrameInstance.java @@ -1,26 +1,42 @@ /* - * Copyright (c) 2021, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2021, 2023, 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. Oracle designates this - * particular file as subject to the "Classpath" exception as provided - * by Oracle in the LICENSE file that accompanied this code. + * The Universal Permissive License (UPL), Version 1.0 * - * 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). + * Subject to the condition set forth below, permission is hereby granted to any + * person obtaining a copy of this software, associated documentation and/or + * data (collectively the "Software"), free of charge and under any and all + * copyright rights in the Software, and any and all patent rights owned or + * freely licensable by each licensor hereunder covering either (i) the + * unmodified Software as contributed to or provided by such licensor, or (ii) + * the Larger Works (as defined below), to deal in both * - * 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. + * (a) the Software, and * - * 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. + * (b) any piece of software and/or hardware listed in the lrgrwrks.txt file if + * one is included with the Software each a "Larger Work" to which the Software + * is contributed by such licensors), + * + * without restriction, including without limitation the rights to copy, create + * derivative works of, display, perform, and distribute the Software and make, + * use, sell, offer for sale, import, export, have made, and have sold the + * Software and the Larger Work(s), and to sublicense the foregoing rights on + * either these or other terms. + * + * This license is subject to the following condition: + * + * The above copyright notice and either this complete permission notice or at a + * minimum a reference to the UPL must be included in all copies or substantial + * portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. */ package org.graalvm.compiler.truffle.runtime; diff --git a/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/GraalRuntimeAccessor.java b/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/GraalRuntimeAccessor.java index 5dd3cf7b4503..5766d7a911b3 100644 --- a/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/GraalRuntimeAccessor.java +++ b/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/GraalRuntimeAccessor.java @@ -1,26 +1,42 @@ /* - * Copyright (c) 2019, 2022, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2019, 2023, 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. Oracle designates this - * particular file as subject to the "Classpath" exception as provided - * by Oracle in the LICENSE file that accompanied this code. - * - * 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. + * The Universal Permissive License (UPL), Version 1.0 + * + * Subject to the condition set forth below, permission is hereby granted to any + * person obtaining a copy of this software, associated documentation and/or + * data (collectively the "Software"), free of charge and under any and all + * copyright rights in the Software, and any and all patent rights owned or + * freely licensable by each licensor hereunder covering either (i) the + * unmodified Software as contributed to or provided by such licensor, or (ii) + * the Larger Works (as defined below), to deal in both + * + * (a) the Software, and + * + * (b) any piece of software and/or hardware listed in the lrgrwrks.txt file if + * one is included with the Software each a "Larger Work" to which the Software + * is contributed by such licensors), + * + * without restriction, including without limitation the rights to copy, create + * derivative works of, display, perform, and distribute the Software and make, + * use, sell, offer for sale, import, export, have made, and have sold the + * Software and the Larger Work(s), and to sublicense the foregoing rights on + * either these or other terms. + * + * This license is subject to the following condition: + * + * The above copyright notice and either this complete permission notice or at a + * minimum a reference to the UPL must be included in all copies or substantial + * portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. */ package org.graalvm.compiler.truffle.runtime; diff --git a/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/GraalRuntimeServiceProvider.java b/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/GraalRuntimeServiceProvider.java index 2c2108d0b308..0716f3c8cbfd 100644 --- a/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/GraalRuntimeServiceProvider.java +++ b/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/GraalRuntimeServiceProvider.java @@ -1,26 +1,42 @@ /* - * Copyright (c) 2015, 2021, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2015, 2023, 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. Oracle designates this - * particular file as subject to the "Classpath" exception as provided - * by Oracle in the LICENSE file that accompanied this code. - * - * 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. + * The Universal Permissive License (UPL), Version 1.0 + * + * Subject to the condition set forth below, permission is hereby granted to any + * person obtaining a copy of this software, associated documentation and/or + * data (collectively the "Software"), free of charge and under any and all + * copyright rights in the Software, and any and all patent rights owned or + * freely licensable by each licensor hereunder covering either (i) the + * unmodified Software as contributed to or provided by such licensor, or (ii) + * the Larger Works (as defined below), to deal in both + * + * (a) the Software, and + * + * (b) any piece of software and/or hardware listed in the lrgrwrks.txt file if + * one is included with the Software each a "Larger Work" to which the Software + * is contributed by such licensors), + * + * without restriction, including without limitation the rights to copy, create + * derivative works of, display, perform, and distribute the Software and make, + * use, sell, offer for sale, import, export, have made, and have sold the + * Software and the Larger Work(s), and to sublicense the foregoing rights on + * either these or other terms. + * + * This license is subject to the following condition: + * + * The above copyright notice and either this complete permission notice or at a + * minimum a reference to the UPL must be included in all copies or substantial + * portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. */ package org.graalvm.compiler.truffle.runtime; diff --git a/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/GraalRuntimeSupport.java b/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/GraalRuntimeSupport.java index 31868745fbd8..e09e1f20d041 100644 --- a/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/GraalRuntimeSupport.java +++ b/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/GraalRuntimeSupport.java @@ -2,25 +2,41 @@ * Copyright (c) 2020, 2023, 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. Oracle designates this - * particular file as subject to the "Classpath" exception as provided - * by Oracle in the LICENSE file that accompanied this code. + * The Universal Permissive License (UPL), Version 1.0 * - * 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). + * Subject to the condition set forth below, permission is hereby granted to any + * person obtaining a copy of this software, associated documentation and/or + * data (collectively the "Software"), free of charge and under any and all + * copyright rights in the Software, and any and all patent rights owned or + * freely licensable by each licensor hereunder covering either (i) the + * unmodified Software as contributed to or provided by such licensor, or (ii) + * the Larger Works (as defined below), to deal in both * - * 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. + * (a) the Software, and * - * 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. + * (b) any piece of software and/or hardware listed in the lrgrwrks.txt file if + * one is included with the Software each a "Larger Work" to which the Software + * is contributed by such licensors), + * + * without restriction, including without limitation the rights to copy, create + * derivative works of, display, perform, and distribute the Software and make, + * use, sell, offer for sale, import, export, have made, and have sold the + * Software and the Larger Work(s), and to sublicense the foregoing rights on + * either these or other terms. + * + * This license is subject to the following condition: + * + * The above copyright notice and either this complete permission notice or at a + * minimum a reference to the UPL must be included in all copies or substantial + * portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. */ package org.graalvm.compiler.truffle.runtime; diff --git a/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/GraalTVMCI.java b/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/GraalTVMCI.java index 95b55e78d0ee..541b1d6a9492 100644 --- a/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/GraalTVMCI.java +++ b/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/GraalTVMCI.java @@ -1,26 +1,42 @@ /* - * Copyright (c) 2014, 2022, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2014, 2023, 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. Oracle designates this - * particular file as subject to the "Classpath" exception as provided - * by Oracle in the LICENSE file that accompanied this code. - * - * 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. + * The Universal Permissive License (UPL), Version 1.0 + * + * Subject to the condition set forth below, permission is hereby granted to any + * person obtaining a copy of this software, associated documentation and/or + * data (collectively the "Software"), free of charge and under any and all + * copyright rights in the Software, and any and all patent rights owned or + * freely licensable by each licensor hereunder covering either (i) the + * unmodified Software as contributed to or provided by such licensor, or (ii) + * the Larger Works (as defined below), to deal in both + * + * (a) the Software, and + * + * (b) any piece of software and/or hardware listed in the lrgrwrks.txt file if + * one is included with the Software each a "Larger Work" to which the Software + * is contributed by such licensors), + * + * without restriction, including without limitation the rights to copy, create + * derivative works of, display, perform, and distribute the Software and make, + * use, sell, offer for sale, import, export, have made, and have sold the + * Software and the Larger Work(s), and to sublicense the foregoing rights on + * either these or other terms. + * + * This license is subject to the following condition: + * + * The above copyright notice and either this complete permission notice or at a + * minimum a reference to the UPL must be included in all copies or substantial + * portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. */ package org.graalvm.compiler.truffle.runtime; diff --git a/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/GraalTestTVMCI.java b/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/GraalTestTVMCI.java index a0fd1e0e90f4..3c690cfb1e42 100644 --- a/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/GraalTestTVMCI.java +++ b/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/GraalTestTVMCI.java @@ -1,26 +1,42 @@ /* - * Copyright (c) 2017, 2022, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2017, 2023, 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. Oracle designates this - * particular file as subject to the "Classpath" exception as provided - * by Oracle in the LICENSE file that accompanied this code. - * - * 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. + * The Universal Permissive License (UPL), Version 1.0 + * + * Subject to the condition set forth below, permission is hereby granted to any + * person obtaining a copy of this software, associated documentation and/or + * data (collectively the "Software"), free of charge and under any and all + * copyright rights in the Software, and any and all patent rights owned or + * freely licensable by each licensor hereunder covering either (i) the + * unmodified Software as contributed to or provided by such licensor, or (ii) + * the Larger Works (as defined below), to deal in both + * + * (a) the Software, and + * + * (b) any piece of software and/or hardware listed in the lrgrwrks.txt file if + * one is included with the Software each a "Larger Work" to which the Software + * is contributed by such licensors), + * + * without restriction, including without limitation the rights to copy, create + * derivative works of, display, perform, and distribute the Software and make, + * use, sell, offer for sale, import, export, have made, and have sold the + * Software and the Larger Work(s), and to sublicense the foregoing rights on + * either these or other terms. + * + * This license is subject to the following condition: + * + * The above copyright notice and either this complete permission notice or at a + * minimum a reference to the UPL must be included in all copies or substantial + * portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. */ package org.graalvm.compiler.truffle.runtime; diff --git a/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/GraalTruffleRuntime.java b/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/GraalTruffleRuntime.java index 4dd3fa8c52cf..5478df2dad4a 100644 --- a/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/GraalTruffleRuntime.java +++ b/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/GraalTruffleRuntime.java @@ -2,25 +2,41 @@ * Copyright (c) 2013, 2023, 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. Oracle designates this - * particular file as subject to the "Classpath" exception as provided - * by Oracle in the LICENSE file that accompanied this code. + * The Universal Permissive License (UPL), Version 1.0 * - * 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). + * Subject to the condition set forth below, permission is hereby granted to any + * person obtaining a copy of this software, associated documentation and/or + * data (collectively the "Software"), free of charge and under any and all + * copyright rights in the Software, and any and all patent rights owned or + * freely licensable by each licensor hereunder covering either (i) the + * unmodified Software as contributed to or provided by such licensor, or (ii) + * the Larger Works (as defined below), to deal in both * - * 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. + * (a) the Software, and * - * 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. + * (b) any piece of software and/or hardware listed in the lrgrwrks.txt file if + * one is included with the Software each a "Larger Work" to which the Software + * is contributed by such licensors), + * + * without restriction, including without limitation the rights to copy, create + * derivative works of, display, perform, and distribute the Software and make, + * use, sell, offer for sale, import, export, have made, and have sold the + * Software and the Larger Work(s), and to sublicense the foregoing rights on + * either these or other terms. + * + * This license is subject to the following condition: + * + * The above copyright notice and either this complete permission notice or at a + * minimum a reference to the UPL must be included in all copies or substantial + * portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. */ package org.graalvm.compiler.truffle.runtime; @@ -51,7 +67,6 @@ import java.util.logging.Level; import java.util.stream.Collectors; -import com.oracle.truffle.api.TruffleLogger; import org.graalvm.collections.EconomicMap; import org.graalvm.collections.UnmodifiableEconomicMap; import org.graalvm.compiler.truffle.common.ConstantFieldInfo; @@ -95,6 +110,7 @@ import com.oracle.truffle.api.OptimizationFailedException; import com.oracle.truffle.api.RootCallTarget; import com.oracle.truffle.api.Truffle; +import com.oracle.truffle.api.TruffleLogger; import com.oracle.truffle.api.TruffleOptions; import com.oracle.truffle.api.TruffleRuntime; import com.oracle.truffle.api.TruffleSafepoint; @@ -1389,26 +1405,21 @@ public Iterator iterator() { static OptionDescriptor convertDescriptorLegacy(TruffleCompilerOptionDescriptor d) { String name = convertToLegacyOptionName(d.name()); - return OptionDescriptor.newBuilder(getOrCreateOptionKey(name), name) // - .help(d.help()) // - // we do not have stable compiler options yet. - // maybe this needs to be extended in the future. - .stability(OptionStability.EXPERIMENTAL) // - .category(matchCategory(d)) // - .deprecated(true) // - .deprecationMessage(String.format("The option %s is now deprecated. Please use the new option name '%s' instead to resolve this.", name, d.name())).build(); + return OptionDescriptor.newBuilder(getOrCreateOptionKey(name), name).help(d.help()).// + stability(OptionStability.EXPERIMENTAL).// + category(matchCategory(d)).// + deprecated(true).// + deprecationMessage(String.format("The option %s is now deprecated. Please use the new option name '%s' instead to resolve this.", name, d.name())).build(); } static OptionDescriptor convertDescriptor(TruffleCompilerOptionDescriptor d) { String name = d.name(); - return OptionDescriptor.newBuilder(getOrCreateOptionKey(name), name) // - .help(d.help()) // - // we do not have stable compiler options yet. - // maybe this needs to be extended in the future. - .stability(OptionStability.EXPERIMENTAL) // - .category(matchCategory(d)) // - .deprecated(d.deprecated()) // - .deprecationMessage(d.deprecationMessage()).build(); + return OptionDescriptor.newBuilder(getOrCreateOptionKey(name), name).// + help(d.help()).// + stability(OptionStability.EXPERIMENTAL).// + category(matchCategory(d)).// + deprecated(d.deprecated()).// + deprecationMessage(d.deprecationMessage()).build(); } static Map extractOptions(OptionValues values) { diff --git a/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/GraalTruffleRuntimeListener.java b/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/GraalTruffleRuntimeListener.java index f722bbc0ef96..723f145fa8d5 100644 --- a/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/GraalTruffleRuntimeListener.java +++ b/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/GraalTruffleRuntimeListener.java @@ -1,26 +1,42 @@ /* - * Copyright (c) 2014, 2022, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2014, 2023, 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. Oracle designates this - * particular file as subject to the "Classpath" exception as provided - * by Oracle in the LICENSE file that accompanied this code. + * The Universal Permissive License (UPL), Version 1.0 * - * 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). + * Subject to the condition set forth below, permission is hereby granted to any + * person obtaining a copy of this software, associated documentation and/or + * data (collectively the "Software"), free of charge and under any and all + * copyright rights in the Software, and any and all patent rights owned or + * freely licensable by each licensor hereunder covering either (i) the + * unmodified Software as contributed to or provided by such licensor, or (ii) + * the Larger Works (as defined below), to deal in both * - * 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. + * (a) the Software, and * - * 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. + * (b) any piece of software and/or hardware listed in the lrgrwrks.txt file if + * one is included with the Software each a "Larger Work" to which the Software + * is contributed by such licensors), + * + * without restriction, including without limitation the rights to copy, create + * derivative works of, display, perform, and distribute the Software and make, + * use, sell, offer for sale, import, export, have made, and have sold the + * Software and the Larger Work(s), and to sublicense the foregoing rights on + * either these or other terms. + * + * This license is subject to the following condition: + * + * The above copyright notice and either this complete permission notice or at a + * minimum a reference to the UPL must be included in all copies or substantial + * portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. */ package org.graalvm.compiler.truffle.runtime; diff --git a/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/GraalTruffleRuntimeListenerDispatcher.java b/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/GraalTruffleRuntimeListenerDispatcher.java index c9b1367d8767..0315e0d9b674 100644 --- a/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/GraalTruffleRuntimeListenerDispatcher.java +++ b/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/GraalTruffleRuntimeListenerDispatcher.java @@ -1,26 +1,42 @@ /* - * Copyright (c) 2018, 2022, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2018, 2023, 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. Oracle designates this - * particular file as subject to the "Classpath" exception as provided - * by Oracle in the LICENSE file that accompanied this code. + * The Universal Permissive License (UPL), Version 1.0 * - * 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). + * Subject to the condition set forth below, permission is hereby granted to any + * person obtaining a copy of this software, associated documentation and/or + * data (collectively the "Software"), free of charge and under any and all + * copyright rights in the Software, and any and all patent rights owned or + * freely licensable by each licensor hereunder covering either (i) the + * unmodified Software as contributed to or provided by such licensor, or (ii) + * the Larger Works (as defined below), to deal in both * - * 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. + * (a) the Software, and * - * 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. + * (b) any piece of software and/or hardware listed in the lrgrwrks.txt file if + * one is included with the Software each a "Larger Work" to which the Software + * is contributed by such licensors), + * + * without restriction, including without limitation the rights to copy, create + * derivative works of, display, perform, and distribute the Software and make, + * use, sell, offer for sale, import, export, have made, and have sold the + * Software and the Larger Work(s), and to sublicense the foregoing rights on + * either these or other terms. + * + * This license is subject to the following condition: + * + * The above copyright notice and either this complete permission notice or at a + * minimum a reference to the UPL must be included in all copies or substantial + * portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. */ package org.graalvm.compiler.truffle.runtime; diff --git a/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/InlineDecision.java b/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/InlineDecision.java index 3c05af24b840..fcfa52785c79 100644 --- a/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/InlineDecision.java +++ b/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/InlineDecision.java @@ -1,26 +1,42 @@ /* - * Copyright (c) 2019, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2019, 2023, 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. Oracle designates this - * particular file as subject to the "Classpath" exception as provided - * by Oracle in the LICENSE file that accompanied this code. + * The Universal Permissive License (UPL), Version 1.0 * - * 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). + * Subject to the condition set forth below, permission is hereby granted to any + * person obtaining a copy of this software, associated documentation and/or + * data (collectively the "Software"), free of charge and under any and all + * copyright rights in the Software, and any and all patent rights owned or + * freely licensable by each licensor hereunder covering either (i) the + * unmodified Software as contributed to or provided by such licensor, or (ii) + * the Larger Works (as defined below), to deal in both * - * 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. + * (a) the Software, and * - * 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. + * (b) any piece of software and/or hardware listed in the lrgrwrks.txt file if + * one is included with the Software each a "Larger Work" to which the Software + * is contributed by such licensors), + * + * without restriction, including without limitation the rights to copy, create + * derivative works of, display, perform, and distribute the Software and make, + * use, sell, offer for sale, import, export, have made, and have sold the + * Software and the Larger Work(s), and to sublicense the foregoing rights on + * either these or other terms. + * + * This license is subject to the following condition: + * + * The above copyright notice and either this complete permission notice or at a + * minimum a reference to the UPL must be included in all copies or substantial + * portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. */ package org.graalvm.compiler.truffle.runtime; diff --git a/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/LoopNodeFactory.java b/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/LoopNodeFactory.java index 56f72b63a7ec..665b69252cff 100644 --- a/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/LoopNodeFactory.java +++ b/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/LoopNodeFactory.java @@ -1,26 +1,42 @@ /* - * Copyright (c) 2015, 2021, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2015, 2023, 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. Oracle designates this - * particular file as subject to the "Classpath" exception as provided - * by Oracle in the LICENSE file that accompanied this code. - * - * 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. + * The Universal Permissive License (UPL), Version 1.0 + * + * Subject to the condition set forth below, permission is hereby granted to any + * person obtaining a copy of this software, associated documentation and/or + * data (collectively the "Software"), free of charge and under any and all + * copyright rights in the Software, and any and all patent rights owned or + * freely licensable by each licensor hereunder covering either (i) the + * unmodified Software as contributed to or provided by such licensor, or (ii) + * the Larger Works (as defined below), to deal in both + * + * (a) the Software, and + * + * (b) any piece of software and/or hardware listed in the lrgrwrks.txt file if + * one is included with the Software each a "Larger Work" to which the Software + * is contributed by such licensors), + * + * without restriction, including without limitation the rights to copy, create + * derivative works of, display, perform, and distribute the Software and make, + * use, sell, offer for sale, import, export, have made, and have sold the + * Software and the Larger Work(s), and to sublicense the foregoing rights on + * either these or other terms. + * + * This license is subject to the following condition: + * + * The above copyright notice and either this complete permission notice or at a + * minimum a reference to the UPL must be included in all copies or substantial + * portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. */ package org.graalvm.compiler.truffle.runtime; diff --git a/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/ModuleUtil.java b/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/ModuleUtil.java index b8f84b6acdb7..12f385b8ac2b 100644 --- a/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/ModuleUtil.java +++ b/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/ModuleUtil.java @@ -1,26 +1,42 @@ /* - * Copyright (c) 2022, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2022, 2023, 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. Oracle designates this - * particular file as subject to the "Classpath" exception as provided - * by Oracle in the LICENSE file that accompanied this code. - * - * 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. + * The Universal Permissive License (UPL), Version 1.0 + * + * Subject to the condition set forth below, permission is hereby granted to any + * person obtaining a copy of this software, associated documentation and/or + * data (collectively the "Software"), free of charge and under any and all + * copyright rights in the Software, and any and all patent rights owned or + * freely licensable by each licensor hereunder covering either (i) the + * unmodified Software as contributed to or provided by such licensor, or (ii) + * the Larger Works (as defined below), to deal in both + * + * (a) the Software, and + * + * (b) any piece of software and/or hardware listed in the lrgrwrks.txt file if + * one is included with the Software each a "Larger Work" to which the Software + * is contributed by such licensors), + * + * without restriction, including without limitation the rights to copy, create + * derivative works of, display, perform, and distribute the Software and make, + * use, sell, offer for sale, import, export, have made, and have sold the + * Software and the Larger Work(s), and to sublicense the foregoing rights on + * either these or other terms. + * + * This license is subject to the following condition: + * + * The above copyright notice and either this complete permission notice or at a + * minimum a reference to the UPL must be included in all copies or substantial + * portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. */ package org.graalvm.compiler.truffle.runtime; diff --git a/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/OptimizedAssumption.java b/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/OptimizedAssumption.java index 899889055f7f..31a5afe4945e 100644 --- a/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/OptimizedAssumption.java +++ b/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/OptimizedAssumption.java @@ -1,26 +1,42 @@ /* - * Copyright (c) 2013, 2021, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2013, 2023, 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. Oracle designates this - * particular file as subject to the "Classpath" exception as provided - * by Oracle in the LICENSE file that accompanied this code. + * The Universal Permissive License (UPL), Version 1.0 * - * 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). + * Subject to the condition set forth below, permission is hereby granted to any + * person obtaining a copy of this software, associated documentation and/or + * data (collectively the "Software"), free of charge and under any and all + * copyright rights in the Software, and any and all patent rights owned or + * freely licensable by each licensor hereunder covering either (i) the + * unmodified Software as contributed to or provided by such licensor, or (ii) + * the Larger Works (as defined below), to deal in both * - * 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. + * (a) the Software, and * - * 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. + * (b) any piece of software and/or hardware listed in the lrgrwrks.txt file if + * one is included with the Software each a "Larger Work" to which the Software + * is contributed by such licensors), + * + * without restriction, including without limitation the rights to copy, create + * derivative works of, display, perform, and distribute the Software and make, + * use, sell, offer for sale, import, export, have made, and have sold the + * Software and the Larger Work(s), and to sublicense the foregoing rights on + * either these or other terms. + * + * This license is subject to the following condition: + * + * The above copyright notice and either this complete permission notice or at a + * minimum a reference to the UPL must be included in all copies or substantial + * portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. */ package org.graalvm.compiler.truffle.runtime; diff --git a/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/OptimizedBlockNode.java b/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/OptimizedBlockNode.java index 6d55dc242999..6d3ae4c7ecb5 100644 --- a/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/OptimizedBlockNode.java +++ b/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/OptimizedBlockNode.java @@ -1,26 +1,42 @@ /* - * Copyright (c) 2019, 2021, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2019, 2023, 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. Oracle designates this - * particular file as subject to the "Classpath" exception as provided - * by Oracle in the LICENSE file that accompanied this code. + * The Universal Permissive License (UPL), Version 1.0 * - * 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). + * Subject to the condition set forth below, permission is hereby granted to any + * person obtaining a copy of this software, associated documentation and/or + * data (collectively the "Software"), free of charge and under any and all + * copyright rights in the Software, and any and all patent rights owned or + * freely licensable by each licensor hereunder covering either (i) the + * unmodified Software as contributed to or provided by such licensor, or (ii) + * the Larger Works (as defined below), to deal in both * - * 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. + * (a) the Software, and * - * 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. + * (b) any piece of software and/or hardware listed in the lrgrwrks.txt file if + * one is included with the Software each a "Larger Work" to which the Software + * is contributed by such licensors), + * + * without restriction, including without limitation the rights to copy, create + * derivative works of, display, perform, and distribute the Software and make, + * use, sell, offer for sale, import, export, have made, and have sold the + * Software and the Larger Work(s), and to sublicense the foregoing rights on + * either these or other terms. + * + * This license is subject to the following condition: + * + * The above copyright notice and either this complete permission notice or at a + * minimum a reference to the UPL must be included in all copies or substantial + * portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. */ package org.graalvm.compiler.truffle.runtime; diff --git a/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/OptimizedCallTarget.java b/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/OptimizedCallTarget.java index 2f89398e8de9..7fa4dd2c3967 100644 --- a/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/OptimizedCallTarget.java +++ b/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/OptimizedCallTarget.java @@ -1,26 +1,42 @@ /* - * Copyright (c) 2013, 2022, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2013, 2023, 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. Oracle designates this - * particular file as subject to the "Classpath" exception as provided - * by Oracle in the LICENSE file that accompanied this code. + * The Universal Permissive License (UPL), Version 1.0 * - * 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). + * Subject to the condition set forth below, permission is hereby granted to any + * person obtaining a copy of this software, associated documentation and/or + * data (collectively the "Software"), free of charge and under any and all + * copyright rights in the Software, and any and all patent rights owned or + * freely licensable by each licensor hereunder covering either (i) the + * unmodified Software as contributed to or provided by such licensor, or (ii) + * the Larger Works (as defined below), to deal in both * - * 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. + * (a) the Software, and * - * 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. + * (b) any piece of software and/or hardware listed in the lrgrwrks.txt file if + * one is included with the Software each a "Larger Work" to which the Software + * is contributed by such licensors), + * + * without restriction, including without limitation the rights to copy, create + * derivative works of, display, perform, and distribute the Software and make, + * use, sell, offer for sale, import, export, have made, and have sold the + * Software and the Larger Work(s), and to sublicense the foregoing rights on + * either these or other terms. + * + * This license is subject to the following condition: + * + * The above copyright notice and either this complete permission notice or at a + * minimum a reference to the UPL must be included in all copies or substantial + * portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. */ package org.graalvm.compiler.truffle.runtime; diff --git a/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/OptimizedDirectCallNode.java b/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/OptimizedDirectCallNode.java index 176bb462f00e..f9c00367410d 100644 --- a/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/OptimizedDirectCallNode.java +++ b/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/OptimizedDirectCallNode.java @@ -1,26 +1,42 @@ /* - * Copyright (c) 2013, 2022, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2013, 2023, 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. Oracle designates this - * particular file as subject to the "Classpath" exception as provided - * by Oracle in the LICENSE file that accompanied this code. + * The Universal Permissive License (UPL), Version 1.0 * - * 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). + * Subject to the condition set forth below, permission is hereby granted to any + * person obtaining a copy of this software, associated documentation and/or + * data (collectively the "Software"), free of charge and under any and all + * copyright rights in the Software, and any and all patent rights owned or + * freely licensable by each licensor hereunder covering either (i) the + * unmodified Software as contributed to or provided by such licensor, or (ii) + * the Larger Works (as defined below), to deal in both * - * 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. + * (a) the Software, and * - * 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. + * (b) any piece of software and/or hardware listed in the lrgrwrks.txt file if + * one is included with the Software each a "Larger Work" to which the Software + * is contributed by such licensors), + * + * without restriction, including without limitation the rights to copy, create + * derivative works of, display, perform, and distribute the Software and make, + * use, sell, offer for sale, import, export, have made, and have sold the + * Software and the Larger Work(s), and to sublicense the foregoing rights on + * either these or other terms. + * + * This license is subject to the following condition: + * + * The above copyright notice and either this complete permission notice or at a + * minimum a reference to the UPL must be included in all copies or substantial + * portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. */ package org.graalvm.compiler.truffle.runtime; diff --git a/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/OptimizedIndirectCallNode.java b/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/OptimizedIndirectCallNode.java index 3ac4530fc388..fab558673d71 100644 --- a/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/OptimizedIndirectCallNode.java +++ b/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/OptimizedIndirectCallNode.java @@ -1,26 +1,42 @@ /* - * Copyright (c) 2013, 2021, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2013, 2023, 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. Oracle designates this - * particular file as subject to the "Classpath" exception as provided - * by Oracle in the LICENSE file that accompanied this code. + * The Universal Permissive License (UPL), Version 1.0 * - * 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). + * Subject to the condition set forth below, permission is hereby granted to any + * person obtaining a copy of this software, associated documentation and/or + * data (collectively the "Software"), free of charge and under any and all + * copyright rights in the Software, and any and all patent rights owned or + * freely licensable by each licensor hereunder covering either (i) the + * unmodified Software as contributed to or provided by such licensor, or (ii) + * the Larger Works (as defined below), to deal in both * - * 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. + * (a) the Software, and * - * 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. + * (b) any piece of software and/or hardware listed in the lrgrwrks.txt file if + * one is included with the Software each a "Larger Work" to which the Software + * is contributed by such licensors), + * + * without restriction, including without limitation the rights to copy, create + * derivative works of, display, perform, and distribute the Software and make, + * use, sell, offer for sale, import, export, have made, and have sold the + * Software and the Larger Work(s), and to sublicense the foregoing rights on + * either these or other terms. + * + * This license is subject to the following condition: + * + * The above copyright notice and either this complete permission notice or at a + * minimum a reference to the UPL must be included in all copies or substantial + * portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. */ package org.graalvm.compiler.truffle.runtime; diff --git a/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/OptimizedLoopNode.java b/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/OptimizedLoopNode.java index c2ff38144a7c..b1adeea85c8d 100644 --- a/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/OptimizedLoopNode.java +++ b/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/OptimizedLoopNode.java @@ -1,26 +1,42 @@ /* - * Copyright (c) 2014, 2021, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2014, 2023, 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. Oracle designates this - * particular file as subject to the "Classpath" exception as provided - * by Oracle in the LICENSE file that accompanied this code. - * - * 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. + * The Universal Permissive License (UPL), Version 1.0 + * + * Subject to the condition set forth below, permission is hereby granted to any + * person obtaining a copy of this software, associated documentation and/or + * data (collectively the "Software"), free of charge and under any and all + * copyright rights in the Software, and any and all patent rights owned or + * freely licensable by each licensor hereunder covering either (i) the + * unmodified Software as contributed to or provided by such licensor, or (ii) + * the Larger Works (as defined below), to deal in both + * + * (a) the Software, and + * + * (b) any piece of software and/or hardware listed in the lrgrwrks.txt file if + * one is included with the Software each a "Larger Work" to which the Software + * is contributed by such licensors), + * + * without restriction, including without limitation the rights to copy, create + * derivative works of, display, perform, and distribute the Software and make, + * use, sell, offer for sale, import, export, have made, and have sold the + * Software and the Larger Work(s), and to sublicense the foregoing rights on + * either these or other terms. + * + * This license is subject to the following condition: + * + * The above copyright notice and either this complete permission notice or at a + * minimum a reference to the UPL must be included in all copies or substantial + * portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. */ package org.graalvm.compiler.truffle.runtime; diff --git a/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/OptimizedOSRLoopNode.java b/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/OptimizedOSRLoopNode.java index c44ac6e5c9ef..0a4135f9c838 100644 --- a/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/OptimizedOSRLoopNode.java +++ b/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/OptimizedOSRLoopNode.java @@ -1,26 +1,42 @@ /* - * Copyright (c) 2015, 2022, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2015, 2023, 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. Oracle designates this - * particular file as subject to the "Classpath" exception as provided - * by Oracle in the LICENSE file that accompanied this code. + * The Universal Permissive License (UPL), Version 1.0 * - * 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). + * Subject to the condition set forth below, permission is hereby granted to any + * person obtaining a copy of this software, associated documentation and/or + * data (collectively the "Software"), free of charge and under any and all + * copyright rights in the Software, and any and all patent rights owned or + * freely licensable by each licensor hereunder covering either (i) the + * unmodified Software as contributed to or provided by such licensor, or (ii) + * the Larger Works (as defined below), to deal in both * - * 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. + * (a) the Software, and * - * 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. + * (b) any piece of software and/or hardware listed in the lrgrwrks.txt file if + * one is included with the Software each a "Larger Work" to which the Software + * is contributed by such licensors), + * + * without restriction, including without limitation the rights to copy, create + * derivative works of, display, perform, and distribute the Software and make, + * use, sell, offer for sale, import, export, have made, and have sold the + * Software and the Larger Work(s), and to sublicense the foregoing rights on + * either these or other terms. + * + * This license is subject to the following condition: + * + * The above copyright notice and either this complete permission notice or at a + * minimum a reference to the UPL must be included in all copies or substantial + * portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. */ package org.graalvm.compiler.truffle.runtime; diff --git a/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/OptimizedRuntimeOptions.java b/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/OptimizedRuntimeOptions.java index 798a81ffb3f2..61ce592443d3 100644 --- a/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/OptimizedRuntimeOptions.java +++ b/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/OptimizedRuntimeOptions.java @@ -1,26 +1,42 @@ /* - * Copyright (c) 2017, 2022, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2017, 2023, 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. Oracle designates this - * particular file as subject to the "Classpath" exception as provided - * by Oracle in the LICENSE file that accompanied this code. + * The Universal Permissive License (UPL), Version 1.0 * - * 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). + * Subject to the condition set forth below, permission is hereby granted to any + * person obtaining a copy of this software, associated documentation and/or + * data (collectively the "Software"), free of charge and under any and all + * copyright rights in the Software, and any and all patent rights owned or + * freely licensable by each licensor hereunder covering either (i) the + * unmodified Software as contributed to or provided by such licensor, or (ii) + * the Larger Works (as defined below), to deal in both * - * 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. + * (a) the Software, and * - * 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. + * (b) any piece of software and/or hardware listed in the lrgrwrks.txt file if + * one is included with the Software each a "Larger Work" to which the Software + * is contributed by such licensors), + * + * without restriction, including without limitation the rights to copy, create + * derivative works of, display, perform, and distribute the Software and make, + * use, sell, offer for sale, import, export, have made, and have sold the + * Software and the Larger Work(s), and to sublicense the foregoing rights on + * either these or other terms. + * + * This license is subject to the following condition: + * + * The above copyright notice and either this complete permission notice or at a + * minimum a reference to the UPL must be included in all copies or substantial + * portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. */ package org.graalvm.compiler.truffle.runtime; diff --git a/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/SuppressFBWarnings.java b/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/SuppressFBWarnings.java index 4052161953e2..5c36842e92e8 100644 --- a/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/SuppressFBWarnings.java +++ b/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/SuppressFBWarnings.java @@ -1,26 +1,42 @@ /* - * Copyright (c) 2016, 2021, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2016, 2023, 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. Oracle designates this - * particular file as subject to the "Classpath" exception as provided - * by Oracle in the LICENSE file that accompanied this code. - * - * 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. + * The Universal Permissive License (UPL), Version 1.0 + * + * Subject to the condition set forth below, permission is hereby granted to any + * person obtaining a copy of this software, associated documentation and/or + * data (collectively the "Software"), free of charge and under any and all + * copyright rights in the Software, and any and all patent rights owned or + * freely licensable by each licensor hereunder covering either (i) the + * unmodified Software as contributed to or provided by such licensor, or (ii) + * the Larger Works (as defined below), to deal in both + * + * (a) the Software, and + * + * (b) any piece of software and/or hardware listed in the lrgrwrks.txt file if + * one is included with the Software each a "Larger Work" to which the Software + * is contributed by such licensors), + * + * without restriction, including without limitation the rights to copy, create + * derivative works of, display, perform, and distribute the Software and make, + * use, sell, offer for sale, import, export, have made, and have sold the + * Software and the Larger Work(s), and to sublicense the foregoing rights on + * either these or other terms. + * + * This license is subject to the following condition: + * + * The above copyright notice and either this complete permission notice or at a + * minimum a reference to the UPL must be included in all copies or substantial + * portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. */ package org.graalvm.compiler.truffle.runtime; diff --git a/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/TraversingBlockingQueue.java b/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/TraversingBlockingQueue.java index 344066650bd4..84b2b4961637 100644 --- a/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/TraversingBlockingQueue.java +++ b/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/TraversingBlockingQueue.java @@ -1,26 +1,42 @@ /* - * Copyright (c) 2021, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2021, 2023, 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. Oracle designates this - * particular file as subject to the "Classpath" exception as provided - * by Oracle in the LICENSE file that accompanied this code. + * The Universal Permissive License (UPL), Version 1.0 * - * 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). + * Subject to the condition set forth below, permission is hereby granted to any + * person obtaining a copy of this software, associated documentation and/or + * data (collectively the "Software"), free of charge and under any and all + * copyright rights in the Software, and any and all patent rights owned or + * freely licensable by each licensor hereunder covering either (i) the + * unmodified Software as contributed to or provided by such licensor, or (ii) + * the Larger Works (as defined below), to deal in both * - * 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. + * (a) the Software, and * - * 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. + * (b) any piece of software and/or hardware listed in the lrgrwrks.txt file if + * one is included with the Software each a "Larger Work" to which the Software + * is contributed by such licensors), + * + * without restriction, including without limitation the rights to copy, create + * derivative works of, display, perform, and distribute the Software and make, + * use, sell, offer for sale, import, export, have made, and have sold the + * Software and the Larger Work(s), and to sublicense the foregoing rights on + * either these or other terms. + * + * This license is subject to the following condition: + * + * The above copyright notice and either this complete permission notice or at a + * minimum a reference to the UPL must be included in all copies or substantial + * portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. */ package org.graalvm.compiler.truffle.runtime; diff --git a/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/TruffleCallBoundary.java b/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/TruffleCallBoundary.java index fad539de8274..fb7e352208c7 100644 --- a/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/TruffleCallBoundary.java +++ b/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/TruffleCallBoundary.java @@ -1,26 +1,42 @@ /* - * Copyright (c) 2014, 2018, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2014, 2023, 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. Oracle designates this - * particular file as subject to the "Classpath" exception as provided - * by Oracle in the LICENSE file that accompanied this code. - * - * 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. + * The Universal Permissive License (UPL), Version 1.0 + * + * Subject to the condition set forth below, permission is hereby granted to any + * person obtaining a copy of this software, associated documentation and/or + * data (collectively the "Software"), free of charge and under any and all + * copyright rights in the Software, and any and all patent rights owned or + * freely licensable by each licensor hereunder covering either (i) the + * unmodified Software as contributed to or provided by such licensor, or (ii) + * the Larger Works (as defined below), to deal in both + * + * (a) the Software, and + * + * (b) any piece of software and/or hardware listed in the lrgrwrks.txt file if + * one is included with the Software each a "Larger Work" to which the Software + * is contributed by such licensors), + * + * without restriction, including without limitation the rights to copy, create + * derivative works of, display, perform, and distribute the Software and make, + * use, sell, offer for sale, import, export, have made, and have sold the + * Software and the Larger Work(s), and to sublicense the foregoing rights on + * either these or other terms. + * + * This license is subject to the following condition: + * + * The above copyright notice and either this complete permission notice or at a + * minimum a reference to the UPL must be included in all copies or substantial + * portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. */ package org.graalvm.compiler.truffle.runtime; diff --git a/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/TruffleInlining.java b/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/TruffleInlining.java index 17f20c9c9fce..f34c4f12f703 100644 --- a/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/TruffleInlining.java +++ b/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/TruffleInlining.java @@ -1,26 +1,42 @@ /* - * Copyright (c) 2013, 2021, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2013, 2023, 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. Oracle designates this - * particular file as subject to the "Classpath" exception as provided - * by Oracle in the LICENSE file that accompanied this code. + * The Universal Permissive License (UPL), Version 1.0 * - * 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). + * Subject to the condition set forth below, permission is hereby granted to any + * person obtaining a copy of this software, associated documentation and/or + * data (collectively the "Software"), free of charge and under any and all + * copyright rights in the Software, and any and all patent rights owned or + * freely licensable by each licensor hereunder covering either (i) the + * unmodified Software as contributed to or provided by such licensor, or (ii) + * the Larger Works (as defined below), to deal in both * - * 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. + * (a) the Software, and * - * 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. + * (b) any piece of software and/or hardware listed in the lrgrwrks.txt file if + * one is included with the Software each a "Larger Work" to which the Software + * is contributed by such licensors), + * + * without restriction, including without limitation the rights to copy, create + * derivative works of, display, perform, and distribute the Software and make, + * use, sell, offer for sale, import, export, have made, and have sold the + * Software and the Larger Work(s), and to sublicense the foregoing rights on + * either these or other terms. + * + * This license is subject to the following condition: + * + * The above copyright notice and either this complete permission notice or at a + * minimum a reference to the UPL must be included in all copies or substantial + * portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. */ package org.graalvm.compiler.truffle.runtime; diff --git a/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/TruffleSplittingStrategy.java b/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/TruffleSplittingStrategy.java index 178a83e42600..bfec1bc68de5 100644 --- a/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/TruffleSplittingStrategy.java +++ b/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/TruffleSplittingStrategy.java @@ -1,26 +1,42 @@ /* - * Copyright (c) 2013, 2022, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2013, 2023, 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. Oracle designates this - * particular file as subject to the "Classpath" exception as provided - * by Oracle in the LICENSE file that accompanied this code. + * The Universal Permissive License (UPL), Version 1.0 * - * 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). + * Subject to the condition set forth below, permission is hereby granted to any + * person obtaining a copy of this software, associated documentation and/or + * data (collectively the "Software"), free of charge and under any and all + * copyright rights in the Software, and any and all patent rights owned or + * freely licensable by each licensor hereunder covering either (i) the + * unmodified Software as contributed to or provided by such licensor, or (ii) + * the Larger Works (as defined below), to deal in both * - * 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. + * (a) the Software, and * - * 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. + * (b) any piece of software and/or hardware listed in the lrgrwrks.txt file if + * one is included with the Software each a "Larger Work" to which the Software + * is contributed by such licensors), + * + * without restriction, including without limitation the rights to copy, create + * derivative works of, display, perform, and distribute the Software and make, + * use, sell, offer for sale, import, export, have made, and have sold the + * Software and the Larger Work(s), and to sublicense the foregoing rights on + * either these or other terms. + * + * This license is subject to the following condition: + * + * The above copyright notice and either this complete permission notice or at a + * minimum a reference to the UPL must be included in all copies or substantial + * portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. */ package org.graalvm.compiler.truffle.runtime; diff --git a/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/TruffleTypes.java b/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/TruffleTypes.java index eb09694160ff..43b48403b1f4 100644 --- a/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/TruffleTypes.java +++ b/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/TruffleTypes.java @@ -1,26 +1,42 @@ /* - * Copyright (c) 2015, 2018, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2015, 2023, 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. Oracle designates this - * particular file as subject to the "Classpath" exception as provided - * by Oracle in the LICENSE file that accompanied this code. - * - * 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. + * The Universal Permissive License (UPL), Version 1.0 + * + * Subject to the condition set forth below, permission is hereby granted to any + * person obtaining a copy of this software, associated documentation and/or + * data (collectively the "Software"), free of charge and under any and all + * copyright rights in the Software, and any and all patent rights owned or + * freely licensable by each licensor hereunder covering either (i) the + * unmodified Software as contributed to or provided by such licensor, or (ii) + * the Larger Works (as defined below), to deal in both + * + * (a) the Software, and + * + * (b) any piece of software and/or hardware listed in the lrgrwrks.txt file if + * one is included with the Software each a "Larger Work" to which the Software + * is contributed by such licensors), + * + * without restriction, including without limitation the rights to copy, create + * derivative works of, display, perform, and distribute the Software and make, + * use, sell, offer for sale, import, export, have made, and have sold the + * Software and the Larger Work(s), and to sublicense the foregoing rights on + * either these or other terms. + * + * This license is subject to the following condition: + * + * The above copyright notice and either this complete permission notice or at a + * minimum a reference to the UPL must be included in all copies or substantial + * portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. */ package org.graalvm.compiler.truffle.runtime; diff --git a/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/collection/ArrayQueue.java b/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/collection/ArrayQueue.java index 3f47886cc8c7..ccab33d73751 100644 --- a/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/collection/ArrayQueue.java +++ b/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/collection/ArrayQueue.java @@ -1,26 +1,42 @@ /* - * Copyright (c) 2021, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2021, 2023, 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. Oracle designates this - * particular file as subject to the "Classpath" exception as provided - * by Oracle in the LICENSE file that accompanied this code. + * The Universal Permissive License (UPL), Version 1.0 * - * 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). + * Subject to the condition set forth below, permission is hereby granted to any + * person obtaining a copy of this software, associated documentation and/or + * data (collectively the "Software"), free of charge and under any and all + * copyright rights in the Software, and any and all patent rights owned or + * freely licensable by each licensor hereunder covering either (i) the + * unmodified Software as contributed to or provided by such licensor, or (ii) + * the Larger Works (as defined below), to deal in both * - * 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. + * (a) the Software, and * - * 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. + * (b) any piece of software and/or hardware listed in the lrgrwrks.txt file if + * one is included with the Software each a "Larger Work" to which the Software + * is contributed by such licensors), + * + * without restriction, including without limitation the rights to copy, create + * derivative works of, display, perform, and distribute the Software and make, + * use, sell, offer for sale, import, export, have made, and have sold the + * Software and the Larger Work(s), and to sublicense the foregoing rights on + * either these or other terms. + * + * This license is subject to the following condition: + * + * The above copyright notice and either this complete permission notice or at a + * minimum a reference to the UPL must be included in all copies or substantial + * portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. */ package org.graalvm.compiler.truffle.runtime.collection; diff --git a/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/collection/BTreeQueue.java b/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/collection/BTreeQueue.java index 3da7c089ffbd..c98774e8a4a7 100644 --- a/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/collection/BTreeQueue.java +++ b/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/collection/BTreeQueue.java @@ -1,26 +1,42 @@ /* - * Copyright (c) 2021, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2021, 2023, 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. Oracle designates this - * particular file as subject to the "Classpath" exception as provided - * by Oracle in the LICENSE file that accompanied this code. + * The Universal Permissive License (UPL), Version 1.0 * - * 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). + * Subject to the condition set forth below, permission is hereby granted to any + * person obtaining a copy of this software, associated documentation and/or + * data (collectively the "Software"), free of charge and under any and all + * copyright rights in the Software, and any and all patent rights owned or + * freely licensable by each licensor hereunder covering either (i) the + * unmodified Software as contributed to or provided by such licensor, or (ii) + * the Larger Works (as defined below), to deal in both * - * 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. + * (a) the Software, and * - * 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. + * (b) any piece of software and/or hardware listed in the lrgrwrks.txt file if + * one is included with the Software each a "Larger Work" to which the Software + * is contributed by such licensors), + * + * without restriction, including without limitation the rights to copy, create + * derivative works of, display, perform, and distribute the Software and make, + * use, sell, offer for sale, import, export, have made, and have sold the + * Software and the Larger Work(s), and to sublicense the foregoing rights on + * either these or other terms. + * + * This license is subject to the following condition: + * + * The above copyright notice and either this complete permission notice or at a + * minimum a reference to the UPL must be included in all copies or substantial + * portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. */ package org.graalvm.compiler.truffle.runtime.collection; diff --git a/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/collection/DelegatingBlockingQueue.java b/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/collection/DelegatingBlockingQueue.java index db570d58f362..49ba292dce3b 100644 --- a/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/collection/DelegatingBlockingQueue.java +++ b/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/collection/DelegatingBlockingQueue.java @@ -1,26 +1,42 @@ /* - * Copyright (c) 2021, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2021, 2023, 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. Oracle designates this - * particular file as subject to the "Classpath" exception as provided - * by Oracle in the LICENSE file that accompanied this code. + * The Universal Permissive License (UPL), Version 1.0 * - * 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). + * Subject to the condition set forth below, permission is hereby granted to any + * person obtaining a copy of this software, associated documentation and/or + * data (collectively the "Software"), free of charge and under any and all + * copyright rights in the Software, and any and all patent rights owned or + * freely licensable by each licensor hereunder covering either (i) the + * unmodified Software as contributed to or provided by such licensor, or (ii) + * the Larger Works (as defined below), to deal in both * - * 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. + * (a) the Software, and * - * 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. + * (b) any piece of software and/or hardware listed in the lrgrwrks.txt file if + * one is included with the Software each a "Larger Work" to which the Software + * is contributed by such licensors), + * + * without restriction, including without limitation the rights to copy, create + * derivative works of, display, perform, and distribute the Software and make, + * use, sell, offer for sale, import, export, have made, and have sold the + * Software and the Larger Work(s), and to sublicense the foregoing rights on + * either these or other terms. + * + * This license is subject to the following condition: + * + * The above copyright notice and either this complete permission notice or at a + * minimum a reference to the UPL must be included in all copies or substantial + * portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. */ package org.graalvm.compiler.truffle.runtime.collection; diff --git a/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/collection/SerialQueue.java b/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/collection/SerialQueue.java index ad9b1b7e6018..acb0b51d6b76 100644 --- a/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/collection/SerialQueue.java +++ b/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/collection/SerialQueue.java @@ -1,26 +1,42 @@ /* - * Copyright (c) 2021, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2021, 2023, 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. Oracle designates this - * particular file as subject to the "Classpath" exception as provided - * by Oracle in the LICENSE file that accompanied this code. - * - * 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. + * The Universal Permissive License (UPL), Version 1.0 + * + * Subject to the condition set forth below, permission is hereby granted to any + * person obtaining a copy of this software, associated documentation and/or + * data (collectively the "Software"), free of charge and under any and all + * copyright rights in the Software, and any and all patent rights owned or + * freely licensable by each licensor hereunder covering either (i) the + * unmodified Software as contributed to or provided by such licensor, or (ii) + * the Larger Works (as defined below), to deal in both + * + * (a) the Software, and + * + * (b) any piece of software and/or hardware listed in the lrgrwrks.txt file if + * one is included with the Software each a "Larger Work" to which the Software + * is contributed by such licensors), + * + * without restriction, including without limitation the rights to copy, create + * derivative works of, display, perform, and distribute the Software and make, + * use, sell, offer for sale, import, export, have made, and have sold the + * Software and the Larger Work(s), and to sublicense the foregoing rights on + * either these or other terms. + * + * This license is subject to the following condition: + * + * The above copyright notice and either this complete permission notice or at a + * minimum a reference to the UPL must be included in all copies or substantial + * portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. */ package org.graalvm.compiler.truffle.runtime.collection; diff --git a/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/debug/JFRListener.java b/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/debug/JFRListener.java index 930076a3bb4c..761771bdee7b 100644 --- a/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/debug/JFRListener.java +++ b/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/debug/JFRListener.java @@ -1,26 +1,42 @@ /* - * Copyright (c) 2020, 2022, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2020, 2023, 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. Oracle designates this - * particular file as subject to the "Classpath" exception as provided - * by Oracle in the LICENSE file that accompanied this code. + * The Universal Permissive License (UPL), Version 1.0 * - * 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). + * Subject to the condition set forth below, permission is hereby granted to any + * person obtaining a copy of this software, associated documentation and/or + * data (collectively the "Software"), free of charge and under any and all + * copyright rights in the Software, and any and all patent rights owned or + * freely licensable by each licensor hereunder covering either (i) the + * unmodified Software as contributed to or provided by such licensor, or (ii) + * the Larger Works (as defined below), to deal in both * - * 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. + * (a) the Software, and * - * 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. + * (b) any piece of software and/or hardware listed in the lrgrwrks.txt file if + * one is included with the Software each a "Larger Work" to which the Software + * is contributed by such licensors), + * + * without restriction, including without limitation the rights to copy, create + * derivative works of, display, perform, and distribute the Software and make, + * use, sell, offer for sale, import, export, have made, and have sold the + * Software and the Larger Work(s), and to sublicense the foregoing rights on + * either these or other terms. + * + * This license is subject to the following condition: + * + * The above copyright notice and either this complete permission notice or at a + * minimum a reference to the UPL must be included in all copies or substantial + * portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. */ package org.graalvm.compiler.truffle.runtime.debug; diff --git a/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/debug/StatisticsListener.java b/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/debug/StatisticsListener.java index 32107b8cf77b..6facabdfec19 100644 --- a/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/debug/StatisticsListener.java +++ b/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/debug/StatisticsListener.java @@ -1,26 +1,42 @@ /* - * Copyright (c) 2014, 2022, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2014, 2023, 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. Oracle designates this - * particular file as subject to the "Classpath" exception as provided - * by Oracle in the LICENSE file that accompanied this code. + * The Universal Permissive License (UPL), Version 1.0 * - * 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). + * Subject to the condition set forth below, permission is hereby granted to any + * person obtaining a copy of this software, associated documentation and/or + * data (collectively the "Software"), free of charge and under any and all + * copyright rights in the Software, and any and all patent rights owned or + * freely licensable by each licensor hereunder covering either (i) the + * unmodified Software as contributed to or provided by such licensor, or (ii) + * the Larger Works (as defined below), to deal in both * - * 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. + * (a) the Software, and * - * 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. + * (b) any piece of software and/or hardware listed in the lrgrwrks.txt file if + * one is included with the Software each a "Larger Work" to which the Software + * is contributed by such licensors), + * + * without restriction, including without limitation the rights to copy, create + * derivative works of, display, perform, and distribute the Software and make, + * use, sell, offer for sale, import, export, have made, and have sold the + * Software and the Larger Work(s), and to sublicense the foregoing rights on + * either these or other terms. + * + * This license is subject to the following condition: + * + * The above copyright notice and either this complete permission notice or at a + * minimum a reference to the UPL must be included in all copies or substantial + * portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. */ package org.graalvm.compiler.truffle.runtime.debug; diff --git a/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/debug/TraceASTCompilationListener.java b/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/debug/TraceASTCompilationListener.java index 7b36473fa58b..e7686dbd02d6 100644 --- a/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/debug/TraceASTCompilationListener.java +++ b/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/debug/TraceASTCompilationListener.java @@ -1,26 +1,42 @@ /* - * Copyright (c) 2014, 2020, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2014, 2023, 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. Oracle designates this - * particular file as subject to the "Classpath" exception as provided - * by Oracle in the LICENSE file that accompanied this code. + * The Universal Permissive License (UPL), Version 1.0 * - * 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). + * Subject to the condition set forth below, permission is hereby granted to any + * person obtaining a copy of this software, associated documentation and/or + * data (collectively the "Software"), free of charge and under any and all + * copyright rights in the Software, and any and all patent rights owned or + * freely licensable by each licensor hereunder covering either (i) the + * unmodified Software as contributed to or provided by such licensor, or (ii) + * the Larger Works (as defined below), to deal in both * - * 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. + * (a) the Software, and * - * 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. + * (b) any piece of software and/or hardware listed in the lrgrwrks.txt file if + * one is included with the Software each a "Larger Work" to which the Software + * is contributed by such licensors), + * + * without restriction, including without limitation the rights to copy, create + * derivative works of, display, perform, and distribute the Software and make, + * use, sell, offer for sale, import, export, have made, and have sold the + * Software and the Larger Work(s), and to sublicense the foregoing rights on + * either these or other terms. + * + * This license is subject to the following condition: + * + * The above copyright notice and either this complete permission notice or at a + * minimum a reference to the UPL must be included in all copies or substantial + * portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. */ package org.graalvm.compiler.truffle.runtime.debug; diff --git a/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/debug/TraceCompilationListener.java b/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/debug/TraceCompilationListener.java index a00e8eebc9c2..b5303cbde9d0 100644 --- a/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/debug/TraceCompilationListener.java +++ b/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/debug/TraceCompilationListener.java @@ -1,26 +1,42 @@ /* - * Copyright (c) 2014, 2021, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2014, 2023, 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. Oracle designates this - * particular file as subject to the "Classpath" exception as provided - * by Oracle in the LICENSE file that accompanied this code. + * The Universal Permissive License (UPL), Version 1.0 * - * 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). + * Subject to the condition set forth below, permission is hereby granted to any + * person obtaining a copy of this software, associated documentation and/or + * data (collectively the "Software"), free of charge and under any and all + * copyright rights in the Software, and any and all patent rights owned or + * freely licensable by each licensor hereunder covering either (i) the + * unmodified Software as contributed to or provided by such licensor, or (ii) + * the Larger Works (as defined below), to deal in both * - * 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. + * (a) the Software, and * - * 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. + * (b) any piece of software and/or hardware listed in the lrgrwrks.txt file if + * one is included with the Software each a "Larger Work" to which the Software + * is contributed by such licensors), + * + * without restriction, including without limitation the rights to copy, create + * derivative works of, display, perform, and distribute the Software and make, + * use, sell, offer for sale, import, export, have made, and have sold the + * Software and the Larger Work(s), and to sublicense the foregoing rights on + * either these or other terms. + * + * This license is subject to the following condition: + * + * The above copyright notice and either this complete permission notice or at a + * minimum a reference to the UPL must be included in all copies or substantial + * portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. */ package org.graalvm.compiler.truffle.runtime.debug; diff --git a/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/debug/TraceCompilationPolymorphismListener.java b/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/debug/TraceCompilationPolymorphismListener.java index eef40afec3f6..c0b6cea67747 100644 --- a/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/debug/TraceCompilationPolymorphismListener.java +++ b/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/debug/TraceCompilationPolymorphismListener.java @@ -1,26 +1,42 @@ /* - * Copyright (c) 2014, 2020, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2014, 2023, 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. Oracle designates this - * particular file as subject to the "Classpath" exception as provided - * by Oracle in the LICENSE file that accompanied this code. + * The Universal Permissive License (UPL), Version 1.0 * - * 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). + * Subject to the condition set forth below, permission is hereby granted to any + * person obtaining a copy of this software, associated documentation and/or + * data (collectively the "Software"), free of charge and under any and all + * copyright rights in the Software, and any and all patent rights owned or + * freely licensable by each licensor hereunder covering either (i) the + * unmodified Software as contributed to or provided by such licensor, or (ii) + * the Larger Works (as defined below), to deal in both * - * 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. + * (a) the Software, and * - * 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. + * (b) any piece of software and/or hardware listed in the lrgrwrks.txt file if + * one is included with the Software each a "Larger Work" to which the Software + * is contributed by such licensors), + * + * without restriction, including without limitation the rights to copy, create + * derivative works of, display, perform, and distribute the Software and make, + * use, sell, offer for sale, import, export, have made, and have sold the + * Software and the Larger Work(s), and to sublicense the foregoing rights on + * either these or other terms. + * + * This license is subject to the following condition: + * + * The above copyright notice and either this complete permission notice or at a + * minimum a reference to the UPL must be included in all copies or substantial + * portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. */ package org.graalvm.compiler.truffle.runtime.debug; diff --git a/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/debug/TraceSplittingListener.java b/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/debug/TraceSplittingListener.java index 65519a586cb6..c5df622c25ae 100644 --- a/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/debug/TraceSplittingListener.java +++ b/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/debug/TraceSplittingListener.java @@ -1,26 +1,42 @@ /* - * Copyright (c) 2014, 2020, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2014, 2023, 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. Oracle designates this - * particular file as subject to the "Classpath" exception as provided - * by Oracle in the LICENSE file that accompanied this code. + * The Universal Permissive License (UPL), Version 1.0 * - * 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). + * Subject to the condition set forth below, permission is hereby granted to any + * person obtaining a copy of this software, associated documentation and/or + * data (collectively the "Software"), free of charge and under any and all + * copyright rights in the Software, and any and all patent rights owned or + * freely licensable by each licensor hereunder covering either (i) the + * unmodified Software as contributed to or provided by such licensor, or (ii) + * the Larger Works (as defined below), to deal in both * - * 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. + * (a) the Software, and * - * 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. + * (b) any piece of software and/or hardware listed in the lrgrwrks.txt file if + * one is included with the Software each a "Larger Work" to which the Software + * is contributed by such licensors), + * + * without restriction, including without limitation the rights to copy, create + * derivative works of, display, perform, and distribute the Software and make, + * use, sell, offer for sale, import, export, have made, and have sold the + * Software and the Larger Work(s), and to sublicense the foregoing rights on + * either these or other terms. + * + * This license is subject to the following condition: + * + * The above copyright notice and either this complete permission notice or at a + * minimum a reference to the UPL must be included in all copies or substantial + * portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. */ package org.graalvm.compiler.truffle.runtime.debug; @@ -81,9 +97,7 @@ private static String extractSourceSection(OptimizedDirectCallNode node) { } static String getShortDescription(SourceSection sourceSection) { - if (sourceSection == null || sourceSection.getSource() == null) { - // TODO the source == null branch can be removed if the deprecated - // SourceSection#createUnavailable has be removed. + if (sourceSection == null) { return ""; } StringBuilder b = new StringBuilder(); diff --git a/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/hotspot/AbstractHotSpotTruffleRuntimeAccess.java b/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/hotspot/AbstractHotSpotTruffleRuntimeAccess.java index d80ab7ebddf7..83ac0e900c78 100644 --- a/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/hotspot/AbstractHotSpotTruffleRuntimeAccess.java +++ b/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/hotspot/AbstractHotSpotTruffleRuntimeAccess.java @@ -1,26 +1,42 @@ /* - * Copyright (c) 2013, 2018, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2013, 2023, 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. Oracle designates this - * particular file as subject to the "Classpath" exception as provided - * by Oracle in the LICENSE file that accompanied this code. + * The Universal Permissive License (UPL), Version 1.0 * - * 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). + * Subject to the condition set forth below, permission is hereby granted to any + * person obtaining a copy of this software, associated documentation and/or + * data (collectively the "Software"), free of charge and under any and all + * copyright rights in the Software, and any and all patent rights owned or + * freely licensable by each licensor hereunder covering either (i) the + * unmodified Software as contributed to or provided by such licensor, or (ii) + * the Larger Works (as defined below), to deal in both * - * 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. + * (a) the Software, and * - * 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. + * (b) any piece of software and/or hardware listed in the lrgrwrks.txt file if + * one is included with the Software each a "Larger Work" to which the Software + * is contributed by such licensors), + * + * without restriction, including without limitation the rights to copy, create + * derivative works of, display, perform, and distribute the Software and make, + * use, sell, offer for sale, import, export, have made, and have sold the + * Software and the Larger Work(s), and to sublicense the foregoing rights on + * either these or other terms. + * + * This license is subject to the following condition: + * + * The above copyright notice and either this complete permission notice or at a + * minimum a reference to the UPL must be included in all copies or substantial + * portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. */ package org.graalvm.compiler.truffle.runtime.hotspot; diff --git a/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/hotspot/HotSpotFastThreadLocal.java b/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/hotspot/HotSpotFastThreadLocal.java index 778c558adec5..3f0fdd046a3d 100644 --- a/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/hotspot/HotSpotFastThreadLocal.java +++ b/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/hotspot/HotSpotFastThreadLocal.java @@ -1,26 +1,42 @@ /* - * Copyright (c) 2021, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2021, 2023, 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. Oracle designates this - * particular file as subject to the "Classpath" exception as provided - * by Oracle in the LICENSE file that accompanied this code. + * The Universal Permissive License (UPL), Version 1.0 * - * 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). + * Subject to the condition set forth below, permission is hereby granted to any + * person obtaining a copy of this software, associated documentation and/or + * data (collectively the "Software"), free of charge and under any and all + * copyright rights in the Software, and any and all patent rights owned or + * freely licensable by each licensor hereunder covering either (i) the + * unmodified Software as contributed to or provided by such licensor, or (ii) + * the Larger Works (as defined below), to deal in both * - * 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. + * (a) the Software, and * - * 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. + * (b) any piece of software and/or hardware listed in the lrgrwrks.txt file if + * one is included with the Software each a "Larger Work" to which the Software + * is contributed by such licensors), + * + * without restriction, including without limitation the rights to copy, create + * derivative works of, display, perform, and distribute the Software and make, + * use, sell, offer for sale, import, export, have made, and have sold the + * Software and the Larger Work(s), and to sublicense the foregoing rights on + * either these or other terms. + * + * This license is subject to the following condition: + * + * The above copyright notice and either this complete permission notice or at a + * minimum a reference to the UPL must be included in all copies or substantial + * portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. */ package org.graalvm.compiler.truffle.runtime.hotspot; diff --git a/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/hotspot/HotSpotOptimizedCallTarget.java b/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/hotspot/HotSpotOptimizedCallTarget.java index 52b0b01fff3a..26fcc247e351 100644 --- a/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/hotspot/HotSpotOptimizedCallTarget.java +++ b/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/hotspot/HotSpotOptimizedCallTarget.java @@ -1,26 +1,42 @@ /* - * Copyright (c) 2018, 2021, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2018, 2023, 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. Oracle designates this - * particular file as subject to the "Classpath" exception as provided - * by Oracle in the LICENSE file that accompanied this code. + * The Universal Permissive License (UPL), Version 1.0 * - * 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). + * Subject to the condition set forth below, permission is hereby granted to any + * person obtaining a copy of this software, associated documentation and/or + * data (collectively the "Software"), free of charge and under any and all + * copyright rights in the Software, and any and all patent rights owned or + * freely licensable by each licensor hereunder covering either (i) the + * unmodified Software as contributed to or provided by such licensor, or (ii) + * the Larger Works (as defined below), to deal in both * - * 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. + * (a) the Software, and * - * 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. + * (b) any piece of software and/or hardware listed in the lrgrwrks.txt file if + * one is included with the Software each a "Larger Work" to which the Software + * is contributed by such licensors), + * + * without restriction, including without limitation the rights to copy, create + * derivative works of, display, perform, and distribute the Software and make, + * use, sell, offer for sale, import, export, have made, and have sold the + * Software and the Larger Work(s), and to sublicense the foregoing rights on + * either these or other terms. + * + * This license is subject to the following condition: + * + * The above copyright notice and either this complete permission notice or at a + * minimum a reference to the UPL must be included in all copies or substantial + * portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. */ package org.graalvm.compiler.truffle.runtime.hotspot; diff --git a/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/hotspot/HotSpotThreadLocalHandshake.java b/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/hotspot/HotSpotThreadLocalHandshake.java index 368897262953..760d03693b67 100644 --- a/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/hotspot/HotSpotThreadLocalHandshake.java +++ b/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/hotspot/HotSpotThreadLocalHandshake.java @@ -1,26 +1,42 @@ /* - * Copyright (c) 2021, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2021, 2023, 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. Oracle designates this - * particular file as subject to the "Classpath" exception as provided - * by Oracle in the LICENSE file that accompanied this code. + * The Universal Permissive License (UPL), Version 1.0 * - * 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). + * Subject to the condition set forth below, permission is hereby granted to any + * person obtaining a copy of this software, associated documentation and/or + * data (collectively the "Software"), free of charge and under any and all + * copyright rights in the Software, and any and all patent rights owned or + * freely licensable by each licensor hereunder covering either (i) the + * unmodified Software as contributed to or provided by such licensor, or (ii) + * the Larger Works (as defined below), to deal in both * - * 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. + * (a) the Software, and * - * 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. + * (b) any piece of software and/or hardware listed in the lrgrwrks.txt file if + * one is included with the Software each a "Larger Work" to which the Software + * is contributed by such licensors), + * + * without restriction, including without limitation the rights to copy, create + * derivative works of, display, perform, and distribute the Software and make, + * use, sell, offer for sale, import, export, have made, and have sold the + * Software and the Larger Work(s), and to sublicense the foregoing rights on + * either these or other terms. + * + * This license is subject to the following condition: + * + * The above copyright notice and either this complete permission notice or at a + * minimum a reference to the UPL must be included in all copies or substantial + * portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. */ package org.graalvm.compiler.truffle.runtime.hotspot; diff --git a/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/hotspot/HotSpotTruffleRuntime.java b/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/hotspot/HotSpotTruffleRuntime.java index 350ebdd7e26b..b479aa69800f 100644 --- a/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/hotspot/HotSpotTruffleRuntime.java +++ b/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/hotspot/HotSpotTruffleRuntime.java @@ -1,26 +1,42 @@ /* - * Copyright (c) 2013, 2021, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2013, 2023, 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. Oracle designates this - * particular file as subject to the "Classpath" exception as provided - * by Oracle in the LICENSE file that accompanied this code. + * The Universal Permissive License (UPL), Version 1.0 * - * 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). + * Subject to the condition set forth below, permission is hereby granted to any + * person obtaining a copy of this software, associated documentation and/or + * data (collectively the "Software"), free of charge and under any and all + * copyright rights in the Software, and any and all patent rights owned or + * freely licensable by each licensor hereunder covering either (i) the + * unmodified Software as contributed to or provided by such licensor, or (ii) + * the Larger Works (as defined below), to deal in both * - * 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. + * (a) the Software, and * - * 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. + * (b) any piece of software and/or hardware listed in the lrgrwrks.txt file if + * one is included with the Software each a "Larger Work" to which the Software + * is contributed by such licensors), + * + * without restriction, including without limitation the rights to copy, create + * derivative works of, display, perform, and distribute the Software and make, + * use, sell, offer for sale, import, export, have made, and have sold the + * Software and the Larger Work(s), and to sublicense the foregoing rights on + * either these or other terms. + * + * This license is subject to the following condition: + * + * The above copyright notice and either this complete permission notice or at a + * minimum a reference to the UPL must be included in all copies or substantial + * portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. */ package org.graalvm.compiler.truffle.runtime.hotspot; diff --git a/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/hotspot/HotSpotTruffleRuntimeServices.java b/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/hotspot/HotSpotTruffleRuntimeServices.java index 5bd664cb7b73..31945aec9765 100644 --- a/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/hotspot/HotSpotTruffleRuntimeServices.java +++ b/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/hotspot/HotSpotTruffleRuntimeServices.java @@ -2,25 +2,41 @@ * Copyright (c) 2019, 2023, 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. Oracle designates this - * particular file as subject to the "Classpath" exception as provided - * by Oracle in the LICENSE file that accompanied this code. + * The Universal Permissive License (UPL), Version 1.0 * - * 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). + * Subject to the condition set forth below, permission is hereby granted to any + * person obtaining a copy of this software, associated documentation and/or + * data (collectively the "Software"), free of charge and under any and all + * copyright rights in the Software, and any and all patent rights owned or + * freely licensable by each licensor hereunder covering either (i) the + * unmodified Software as contributed to or provided by such licensor, or (ii) + * the Larger Works (as defined below), to deal in both * - * 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. + * (a) the Software, and * - * 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. + * (b) any piece of software and/or hardware listed in the lrgrwrks.txt file if + * one is included with the Software each a "Larger Work" to which the Software + * is contributed by such licensors), + * + * without restriction, including without limitation the rights to copy, create + * derivative works of, display, perform, and distribute the Software and make, + * use, sell, offer for sale, import, export, have made, and have sold the + * Software and the Larger Work(s), and to sublicense the foregoing rights on + * either these or other terms. + * + * This license is subject to the following condition: + * + * The above copyright notice and either this complete permission notice or at a + * minimum a reference to the UPL must be included in all copies or substantial + * portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. */ package org.graalvm.compiler.truffle.runtime.hotspot; diff --git a/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/hotspot/JVMCIOpenSupport.java b/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/hotspot/JVMCIOpenSupport.java index 72ae35bd43a8..6986b3e7f0b4 100644 --- a/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/hotspot/JVMCIOpenSupport.java +++ b/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/hotspot/JVMCIOpenSupport.java @@ -1,26 +1,42 @@ /* - * Copyright (c) 2023, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2023, 2023, 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. Oracle designates this - * particular file as subject to the "Classpath" exception as provided - * by Oracle in the LICENSE file that accompanied this code. + * The Universal Permissive License (UPL), Version 1.0 * - * 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). + * Subject to the condition set forth below, permission is hereby granted to any + * person obtaining a copy of this software, associated documentation and/or + * data (collectively the "Software"), free of charge and under any and all + * copyright rights in the Software, and any and all patent rights owned or + * freely licensable by each licensor hereunder covering either (i) the + * unmodified Software as contributed to or provided by such licensor, or (ii) + * the Larger Works (as defined below), to deal in both * - * 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. + * (a) the Software, and * - * 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. + * (b) any piece of software and/or hardware listed in the lrgrwrks.txt file if + * one is included with the Software each a "Larger Work" to which the Software + * is contributed by such licensors), + * + * without restriction, including without limitation the rights to copy, create + * derivative works of, display, perform, and distribute the Software and make, + * use, sell, offer for sale, import, export, have made, and have sold the + * Software and the Larger Work(s), and to sublicense the foregoing rights on + * either these or other terms. + * + * This license is subject to the following condition: + * + * The above copyright notice and either this complete permission notice or at a + * minimum a reference to the UPL must be included in all copies or substantial + * portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. */ package org.graalvm.compiler.truffle.runtime.hotspot; diff --git a/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/hotspot/java/HotSpotTruffleRuntimeAccess.java b/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/hotspot/java/HotSpotTruffleRuntimeAccess.java index 194002e0606d..6ae54da2d9ee 100644 --- a/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/hotspot/java/HotSpotTruffleRuntimeAccess.java +++ b/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/hotspot/java/HotSpotTruffleRuntimeAccess.java @@ -1,26 +1,42 @@ /* - * Copyright (c) 2015, 2018, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2015, 2023, 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. Oracle designates this - * particular file as subject to the "Classpath" exception as provided - * by Oracle in the LICENSE file that accompanied this code. - * - * 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. + * The Universal Permissive License (UPL), Version 1.0 + * + * Subject to the condition set forth below, permission is hereby granted to any + * person obtaining a copy of this software, associated documentation and/or + * data (collectively the "Software"), free of charge and under any and all + * copyright rights in the Software, and any and all patent rights owned or + * freely licensable by each licensor hereunder covering either (i) the + * unmodified Software as contributed to or provided by such licensor, or (ii) + * the Larger Works (as defined below), to deal in both + * + * (a) the Software, and + * + * (b) any piece of software and/or hardware listed in the lrgrwrks.txt file if + * one is included with the Software each a "Larger Work" to which the Software + * is contributed by such licensors), + * + * without restriction, including without limitation the rights to copy, create + * derivative works of, display, perform, and distribute the Software and make, + * use, sell, offer for sale, import, export, have made, and have sold the + * Software and the Larger Work(s), and to sublicense the foregoing rights on + * either these or other terms. + * + * This license is subject to the following condition: + * + * The above copyright notice and either this complete permission notice or at a + * minimum a reference to the UPL must be included in all copies or substantial + * portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. */ package org.graalvm.compiler.truffle.runtime.hotspot.java; diff --git a/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/hotspot/libgraal/BinaryInput.java b/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/hotspot/libgraal/BinaryInput.java index dbba6e2debbb..2c52fcae0a98 100644 --- a/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/hotspot/libgraal/BinaryInput.java +++ b/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/hotspot/libgraal/BinaryInput.java @@ -1,26 +1,42 @@ /* - * Copyright (c) 2021, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2023, 2023, 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. Oracle designates this - * particular file as subject to the "Classpath" exception as provided - * by Oracle in the LICENSE file that accompanied this code. + * The Universal Permissive License (UPL), Version 1.0 * - * 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). + * Subject to the condition set forth below, permission is hereby granted to any + * person obtaining a copy of this software, associated documentation and/or + * data (collectively the "Software"), free of charge and under any and all + * copyright rights in the Software, and any and all patent rights owned or + * freely licensable by each licensor hereunder covering either (i) the + * unmodified Software as contributed to or provided by such licensor, or (ii) + * the Larger Works (as defined below), to deal in both * - * 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. + * (a) the Software, and * - * 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. + * (b) any piece of software and/or hardware listed in the lrgrwrks.txt file if + * one is included with the Software each a "Larger Work" to which the Software + * is contributed by such licensors), + * + * without restriction, including without limitation the rights to copy, create + * derivative works of, display, perform, and distribute the Software and make, + * use, sell, offer for sale, import, export, have made, and have sold the + * Software and the Larger Work(s), and to sublicense the foregoing rights on + * either these or other terms. + * + * This license is subject to the following condition: + * + * The above copyright notice and either this complete permission notice or at a + * minimum a reference to the UPL must be included in all copies or substantial + * portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. */ package org.graalvm.compiler.truffle.runtime.hotspot.libgraal; diff --git a/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/hotspot/libgraal/BinaryOutput.java b/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/hotspot/libgraal/BinaryOutput.java index 0c42ae95c723..c66791209118 100644 --- a/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/hotspot/libgraal/BinaryOutput.java +++ b/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/hotspot/libgraal/BinaryOutput.java @@ -1,26 +1,42 @@ /* - * Copyright (c) 2021, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2021, 2023, 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. Oracle designates this - * particular file as subject to the "Classpath" exception as provided - * by Oracle in the LICENSE file that accompanied this code. + * The Universal Permissive License (UPL), Version 1.0 * - * 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). + * Subject to the condition set forth below, permission is hereby granted to any + * person obtaining a copy of this software, associated documentation and/or + * data (collectively the "Software"), free of charge and under any and all + * copyright rights in the Software, and any and all patent rights owned or + * freely licensable by each licensor hereunder covering either (i) the + * unmodified Software as contributed to or provided by such licensor, or (ii) + * the Larger Works (as defined below), to deal in both * - * 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. + * (a) the Software, and * - * 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. + * (b) any piece of software and/or hardware listed in the lrgrwrks.txt file if + * one is included with the Software each a "Larger Work" to which the Software + * is contributed by such licensors), + * + * without restriction, including without limitation the rights to copy, create + * derivative works of, display, perform, and distribute the Software and make, + * use, sell, offer for sale, import, export, have made, and have sold the + * Software and the Larger Work(s), and to sublicense the foregoing rights on + * either these or other terms. + * + * This license is subject to the following condition: + * + * The above copyright notice and either this complete permission notice or at a + * minimum a reference to the UPL must be included in all copies or substantial + * portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. */ package org.graalvm.compiler.truffle.runtime.hotspot.libgraal; diff --git a/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/hotspot/libgraal/LibGraalCompilationResultInfo.java b/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/hotspot/libgraal/LibGraalCompilationResultInfo.java index 5f18e812310a..50ef6a1d15be 100644 --- a/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/hotspot/libgraal/LibGraalCompilationResultInfo.java +++ b/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/hotspot/libgraal/LibGraalCompilationResultInfo.java @@ -1,26 +1,42 @@ /* - * Copyright (c) 2018, 2021, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2018, 2023, 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. Oracle designates this - * particular file as subject to the "Classpath" exception as provided - * by Oracle in the LICENSE file that accompanied this code. + * The Universal Permissive License (UPL), Version 1.0 * - * 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). + * Subject to the condition set forth below, permission is hereby granted to any + * person obtaining a copy of this software, associated documentation and/or + * data (collectively the "Software"), free of charge and under any and all + * copyright rights in the Software, and any and all patent rights owned or + * freely licensable by each licensor hereunder covering either (i) the + * unmodified Software as contributed to or provided by such licensor, or (ii) + * the Larger Works (as defined below), to deal in both * - * 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. + * (a) the Software, and * - * 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. + * (b) any piece of software and/or hardware listed in the lrgrwrks.txt file if + * one is included with the Software each a "Larger Work" to which the Software + * is contributed by such licensors), + * + * without restriction, including without limitation the rights to copy, create + * derivative works of, display, perform, and distribute the Software and make, + * use, sell, offer for sale, import, export, have made, and have sold the + * Software and the Larger Work(s), and to sublicense the foregoing rights on + * either these or other terms. + * + * This license is subject to the following condition: + * + * The above copyright notice and either this complete permission notice or at a + * minimum a reference to the UPL must be included in all copies or substantial + * portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. */ package org.graalvm.compiler.truffle.runtime.hotspot.libgraal; diff --git a/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/hotspot/libgraal/LibGraalGraphInfo.java b/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/hotspot/libgraal/LibGraalGraphInfo.java index 537afb12f468..1440c236dc63 100644 --- a/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/hotspot/libgraal/LibGraalGraphInfo.java +++ b/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/hotspot/libgraal/LibGraalGraphInfo.java @@ -1,26 +1,42 @@ /* - * Copyright (c) 2018, 2021, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2018, 2023, 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. Oracle designates this - * particular file as subject to the "Classpath" exception as provided - * by Oracle in the LICENSE file that accompanied this code. - * - * 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. + * The Universal Permissive License (UPL), Version 1.0 + * + * Subject to the condition set forth below, permission is hereby granted to any + * person obtaining a copy of this software, associated documentation and/or + * data (collectively the "Software"), free of charge and under any and all + * copyright rights in the Software, and any and all patent rights owned or + * freely licensable by each licensor hereunder covering either (i) the + * unmodified Software as contributed to or provided by such licensor, or (ii) + * the Larger Works (as defined below), to deal in both + * + * (a) the Software, and + * + * (b) any piece of software and/or hardware listed in the lrgrwrks.txt file if + * one is included with the Software each a "Larger Work" to which the Software + * is contributed by such licensors), + * + * without restriction, including without limitation the rights to copy, create + * derivative works of, display, perform, and distribute the Software and make, + * use, sell, offer for sale, import, export, have made, and have sold the + * Software and the Larger Work(s), and to sublicense the foregoing rights on + * either these or other terms. + * + * This license is subject to the following condition: + * + * The above copyright notice and either this complete permission notice or at a + * minimum a reference to the UPL must be included in all copies or substantial + * portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. */ package org.graalvm.compiler.truffle.runtime.hotspot.libgraal; diff --git a/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/hotspot/libgraal/LibGraalHotSpotTruffleCompiler.java b/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/hotspot/libgraal/LibGraalHotSpotTruffleCompiler.java index 52f2d80020cb..4c5371e89ca2 100644 --- a/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/hotspot/libgraal/LibGraalHotSpotTruffleCompiler.java +++ b/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/hotspot/libgraal/LibGraalHotSpotTruffleCompiler.java @@ -1,26 +1,42 @@ /* - * Copyright (c) 2018, 2022, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2018, 2023, 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. Oracle designates this - * particular file as subject to the "Classpath" exception as provided - * by Oracle in the LICENSE file that accompanied this code. + * The Universal Permissive License (UPL), Version 1.0 * - * 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). + * Subject to the condition set forth below, permission is hereby granted to any + * person obtaining a copy of this software, associated documentation and/or + * data (collectively the "Software"), free of charge and under any and all + * copyright rights in the Software, and any and all patent rights owned or + * freely licensable by each licensor hereunder covering either (i) the + * unmodified Software as contributed to or provided by such licensor, or (ii) + * the Larger Works (as defined below), to deal in both * - * 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. + * (a) the Software, and * - * 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. + * (b) any piece of software and/or hardware listed in the lrgrwrks.txt file if + * one is included with the Software each a "Larger Work" to which the Software + * is contributed by such licensors), + * + * without restriction, including without limitation the rights to copy, create + * derivative works of, display, perform, and distribute the Software and make, + * use, sell, offer for sale, import, export, have made, and have sold the + * Software and the Larger Work(s), and to sublicense the foregoing rights on + * either these or other terms. + * + * This license is subject to the following condition: + * + * The above copyright notice and either this complete permission notice or at a + * minimum a reference to the UPL must be included in all copies or substantial + * portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. */ package org.graalvm.compiler.truffle.runtime.hotspot.libgraal; diff --git a/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/hotspot/libgraal/LibGraalScopedHandle.java b/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/hotspot/libgraal/LibGraalScopedHandle.java index 093651e60b62..40caae59bef7 100644 --- a/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/hotspot/libgraal/LibGraalScopedHandle.java +++ b/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/hotspot/libgraal/LibGraalScopedHandle.java @@ -1,26 +1,42 @@ /* - * Copyright (c) 2019, 2021, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2019, 2023, 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. Oracle designates this - * particular file as subject to the "Classpath" exception as provided - * by Oracle in the LICENSE file that accompanied this code. + * The Universal Permissive License (UPL), Version 1.0 * - * 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). + * Subject to the condition set forth below, permission is hereby granted to any + * person obtaining a copy of this software, associated documentation and/or + * data (collectively the "Software"), free of charge and under any and all + * copyright rights in the Software, and any and all patent rights owned or + * freely licensable by each licensor hereunder covering either (i) the + * unmodified Software as contributed to or provided by such licensor, or (ii) + * the Larger Works (as defined below), to deal in both * - * 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. + * (a) the Software, and * - * 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. + * (b) any piece of software and/or hardware listed in the lrgrwrks.txt file if + * one is included with the Software each a "Larger Work" to which the Software + * is contributed by such licensors), + * + * without restriction, including without limitation the rights to copy, create + * derivative works of, display, perform, and distribute the Software and make, + * use, sell, offer for sale, import, export, have made, and have sold the + * Software and the Larger Work(s), and to sublicense the foregoing rights on + * either these or other terms. + * + * This license is subject to the following condition: + * + * The above copyright notice and either this complete permission notice or at a + * minimum a reference to the UPL must be included in all copies or substantial + * portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. */ package org.graalvm.compiler.truffle.runtime.hotspot.libgraal; diff --git a/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/hotspot/libgraal/LibGraalStringSupplier.java b/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/hotspot/libgraal/LibGraalStringSupplier.java index 13cc2d9a0bc6..85d76383661c 100644 --- a/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/hotspot/libgraal/LibGraalStringSupplier.java +++ b/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/hotspot/libgraal/LibGraalStringSupplier.java @@ -1,26 +1,42 @@ /* - * Copyright (c) 2018, 2020, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2018, 2023, 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. Oracle designates this - * particular file as subject to the "Classpath" exception as provided - * by Oracle in the LICENSE file that accompanied this code. - * - * 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. + * The Universal Permissive License (UPL), Version 1.0 + * + * Subject to the condition set forth below, permission is hereby granted to any + * person obtaining a copy of this software, associated documentation and/or + * data (collectively the "Software"), free of charge and under any and all + * copyright rights in the Software, and any and all patent rights owned or + * freely licensable by each licensor hereunder covering either (i) the + * unmodified Software as contributed to or provided by such licensor, or (ii) + * the Larger Works (as defined below), to deal in both + * + * (a) the Software, and + * + * (b) any piece of software and/or hardware listed in the lrgrwrks.txt file if + * one is included with the Software each a "Larger Work" to which the Software + * is contributed by such licensors), + * + * without restriction, including without limitation the rights to copy, create + * derivative works of, display, perform, and distribute the Software and make, + * use, sell, offer for sale, import, export, have made, and have sold the + * Software and the Larger Work(s), and to sublicense the foregoing rights on + * either these or other terms. + * + * This license is subject to the following condition: + * + * The above copyright notice and either this complete permission notice or at a + * minimum a reference to the UPL must be included in all copies or substantial + * portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. */ package org.graalvm.compiler.truffle.runtime.hotspot.libgraal; diff --git a/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/hotspot/libgraal/LibGraalTruffleCompilationSupport.java b/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/hotspot/libgraal/LibGraalTruffleCompilationSupport.java index d2f48b0c7618..7c3d52ba1a06 100644 --- a/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/hotspot/libgraal/LibGraalTruffleCompilationSupport.java +++ b/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/hotspot/libgraal/LibGraalTruffleCompilationSupport.java @@ -1,26 +1,42 @@ /* - * Copyright (c) 2023, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2023, 2023, 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. Oracle designates this - * particular file as subject to the "Classpath" exception as provided - * by Oracle in the LICENSE file that accompanied this code. + * The Universal Permissive License (UPL), Version 1.0 * - * 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). + * Subject to the condition set forth below, permission is hereby granted to any + * person obtaining a copy of this software, associated documentation and/or + * data (collectively the "Software"), free of charge and under any and all + * copyright rights in the Software, and any and all patent rights owned or + * freely licensable by each licensor hereunder covering either (i) the + * unmodified Software as contributed to or provided by such licensor, or (ii) + * the Larger Works (as defined below), to deal in both * - * 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. + * (a) the Software, and * - * 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. + * (b) any piece of software and/or hardware listed in the lrgrwrks.txt file if + * one is included with the Software each a "Larger Work" to which the Software + * is contributed by such licensors), + * + * without restriction, including without limitation the rights to copy, create + * derivative works of, display, perform, and distribute the Software and make, + * use, sell, offer for sale, import, export, have made, and have sold the + * Software and the Larger Work(s), and to sublicense the foregoing rights on + * either these or other terms. + * + * This license is subject to the following condition: + * + * The above copyright notice and either this complete permission notice or at a + * minimum a reference to the UPL must be included in all copies or substantial + * portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. */ package org.graalvm.compiler.truffle.runtime.hotspot.libgraal; diff --git a/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/hotspot/libgraal/LibGraalTruffleRuntimeAccess.java b/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/hotspot/libgraal/LibGraalTruffleRuntimeAccess.java index f51ba6d1976c..d569c2534db1 100644 --- a/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/hotspot/libgraal/LibGraalTruffleRuntimeAccess.java +++ b/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/hotspot/libgraal/LibGraalTruffleRuntimeAccess.java @@ -1,26 +1,42 @@ /* - * Copyright (c) 2018, 2019, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2018, 2023, 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. Oracle designates this - * particular file as subject to the "Classpath" exception as provided - * by Oracle in the LICENSE file that accompanied this code. - * - * 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. + * The Universal Permissive License (UPL), Version 1.0 + * + * Subject to the condition set forth below, permission is hereby granted to any + * person obtaining a copy of this software, associated documentation and/or + * data (collectively the "Software"), free of charge and under any and all + * copyright rights in the Software, and any and all patent rights owned or + * freely licensable by each licensor hereunder covering either (i) the + * unmodified Software as contributed to or provided by such licensor, or (ii) + * the Larger Works (as defined below), to deal in both + * + * (a) the Software, and + * + * (b) any piece of software and/or hardware listed in the lrgrwrks.txt file if + * one is included with the Software each a "Larger Work" to which the Software + * is contributed by such licensors), + * + * without restriction, including without limitation the rights to copy, create + * derivative works of, display, perform, and distribute the Software and make, + * use, sell, offer for sale, import, export, have made, and have sold the + * Software and the Larger Work(s), and to sublicense the foregoing rights on + * either these or other terms. + * + * This license is subject to the following condition: + * + * The above copyright notice and either this complete permission notice or at a + * minimum a reference to the UPL must be included in all copies or substantial + * portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. */ package org.graalvm.compiler.truffle.runtime.hotspot.libgraal; diff --git a/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/hotspot/libgraal/TruffleFromLibGraalEntryPoints.java b/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/hotspot/libgraal/TruffleFromLibGraalEntryPoints.java index 2a4bd626747e..d3f139600d5f 100644 --- a/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/hotspot/libgraal/TruffleFromLibGraalEntryPoints.java +++ b/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/hotspot/libgraal/TruffleFromLibGraalEntryPoints.java @@ -1,26 +1,42 @@ /* - * Copyright (c) 2018, 2021, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2018, 2023, 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. Oracle designates this - * particular file as subject to the "Classpath" exception as provided - * by Oracle in the LICENSE file that accompanied this code. + * The Universal Permissive License (UPL), Version 1.0 * - * 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). + * Subject to the condition set forth below, permission is hereby granted to any + * person obtaining a copy of this software, associated documentation and/or + * data (collectively the "Software"), free of charge and under any and all + * copyright rights in the Software, and any and all patent rights owned or + * freely licensable by each licensor hereunder covering either (i) the + * unmodified Software as contributed to or provided by such licensor, or (ii) + * the Larger Works (as defined below), to deal in both * - * 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. + * (a) the Software, and * - * 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. + * (b) any piece of software and/or hardware listed in the lrgrwrks.txt file if + * one is included with the Software each a "Larger Work" to which the Software + * is contributed by such licensors), + * + * without restriction, including without limitation the rights to copy, create + * derivative works of, display, perform, and distribute the Software and make, + * use, sell, offer for sale, import, export, have made, and have sold the + * Software and the Larger Work(s), and to sublicense the foregoing rights on + * either these or other terms. + * + * This license is subject to the following condition: + * + * The above copyright notice and either this complete permission notice or at a + * minimum a reference to the UPL must be included in all copies or substantial + * portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. */ package org.graalvm.compiler.truffle.runtime.hotspot.libgraal; @@ -69,6 +85,7 @@ import static org.graalvm.compiler.truffle.common.hotspot.libgraal.TruffleFromLibGraal.Id.RegisterOptimizedAssumptionDependency; import static org.graalvm.compiler.truffle.common.hotspot.libgraal.TruffleFromLibGraal.Id.SetCallCounts; +import java.io.PrintStream; import java.lang.reflect.Method; import java.lang.reflect.Modifier; import java.net.URI; @@ -464,10 +481,11 @@ private static String missingImpl(Id id) { private static void check(Id id, boolean condition, String format, Object... args) { if (!condition) { String msg = format(format, args); + PrintStream err = System.err; if (id != null) { - System.err.printf("ERROR: %s.%s: %s%n", TruffleFromLibGraalEntryPoints.class.getName(), id, msg); + err.printf("ERROR: %s.%s: %s%n", TruffleFromLibGraalEntryPoints.class.getName(), id, msg); } else { - System.err.printf("ERROR: %s: %s%n", TruffleFromLibGraalEntryPoints.class.getName(), msg); + err.printf("ERROR: %s: %s%n", TruffleFromLibGraalEntryPoints.class.getName(), msg); } System.exit(99); } diff --git a/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/hotspot/libgraal/TruffleToLibGraalCalls.java b/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/hotspot/libgraal/TruffleToLibGraalCalls.java index d4dcdaeae5bc..c359e463d497 100644 --- a/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/hotspot/libgraal/TruffleToLibGraalCalls.java +++ b/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/hotspot/libgraal/TruffleToLibGraalCalls.java @@ -1,26 +1,42 @@ /* - * Copyright (c) 2018, 2022, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2018, 2023, 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. Oracle designates this - * particular file as subject to the "Classpath" exception as provided - * by Oracle in the LICENSE file that accompanied this code. + * The Universal Permissive License (UPL), Version 1.0 * - * 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). + * Subject to the condition set forth below, permission is hereby granted to any + * person obtaining a copy of this software, associated documentation and/or + * data (collectively the "Software"), free of charge and under any and all + * copyright rights in the Software, and any and all patent rights owned or + * freely licensable by each licensor hereunder covering either (i) the + * unmodified Software as contributed to or provided by such licensor, or (ii) + * the Larger Works (as defined below), to deal in both * - * 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. + * (a) the Software, and * - * 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. + * (b) any piece of software and/or hardware listed in the lrgrwrks.txt file if + * one is included with the Software each a "Larger Work" to which the Software + * is contributed by such licensors), + * + * without restriction, including without limitation the rights to copy, create + * derivative works of, display, perform, and distribute the Software and make, + * use, sell, offer for sale, import, export, have made, and have sold the + * Software and the Larger Work(s), and to sublicense the foregoing rights on + * either these or other terms. + * + * This license is subject to the following condition: + * + * The above copyright notice and either this complete permission notice or at a + * minimum a reference to the UPL must be included in all copies or substantial + * portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. */ package org.graalvm.compiler.truffle.runtime.hotspot.libgraal; diff --git a/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/serviceprovider/TruffleRuntimeServices.java b/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/serviceprovider/TruffleRuntimeServices.java index 9eb208e072e9..1dd5d5e7a340 100644 --- a/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/serviceprovider/TruffleRuntimeServices.java +++ b/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/serviceprovider/TruffleRuntimeServices.java @@ -1,26 +1,42 @@ /* - * Copyright (c) 2018, 2022, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2018, 2023, 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. Oracle designates this - * particular file as subject to the "Classpath" exception as provided - * by Oracle in the LICENSE file that accompanied this code. - * - * 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. + * The Universal Permissive License (UPL), Version 1.0 + * + * Subject to the condition set forth below, permission is hereby granted to any + * person obtaining a copy of this software, associated documentation and/or + * data (collectively the "Software"), free of charge and under any and all + * copyright rights in the Software, and any and all patent rights owned or + * freely licensable by each licensor hereunder covering either (i) the + * unmodified Software as contributed to or provided by such licensor, or (ii) + * the Larger Works (as defined below), to deal in both + * + * (a) the Software, and + * + * (b) any piece of software and/or hardware listed in the lrgrwrks.txt file if + * one is included with the Software each a "Larger Work" to which the Software + * is contributed by such licensors), + * + * without restriction, including without limitation the rights to copy, create + * derivative works of, display, perform, and distribute the Software and make, + * use, sell, offer for sale, import, export, have made, and have sold the + * Software and the Larger Work(s), and to sublicense the foregoing rights on + * either these or other terms. + * + * This license is subject to the following condition: + * + * The above copyright notice and either this complete permission notice or at a + * minimum a reference to the UPL must be included in all copies or substantial + * portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. */ package org.graalvm.compiler.truffle.runtime.serviceprovider; diff --git a/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/libgraal/DestroyedIsolateException.java b/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/libgraal/DestroyedIsolateException.java index a3143dd9b930..3e759d42b4aa 100644 --- a/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/libgraal/DestroyedIsolateException.java +++ b/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/libgraal/DestroyedIsolateException.java @@ -1,26 +1,42 @@ /* - * Copyright (c) 2021, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2021, 2023, 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. Oracle designates this - * particular file as subject to the "Classpath" exception as provided - * by Oracle in the LICENSE file that accompanied this code. - * - * 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. + * The Universal Permissive License (UPL), Version 1.0 + * + * Subject to the condition set forth below, permission is hereby granted to any + * person obtaining a copy of this software, associated documentation and/or + * data (collectively the "Software"), free of charge and under any and all + * copyright rights in the Software, and any and all patent rights owned or + * freely licensable by each licensor hereunder covering either (i) the + * unmodified Software as contributed to or provided by such licensor, or (ii) + * the Larger Works (as defined below), to deal in both + * + * (a) the Software, and + * + * (b) any piece of software and/or hardware listed in the lrgrwrks.txt file if + * one is included with the Software each a "Larger Work" to which the Software + * is contributed by such licensors), + * + * without restriction, including without limitation the rights to copy, create + * derivative works of, display, perform, and distribute the Software and make, + * use, sell, offer for sale, import, export, have made, and have sold the + * Software and the Larger Work(s), and to sublicense the foregoing rights on + * either these or other terms. + * + * This license is subject to the following condition: + * + * The above copyright notice and either this complete permission notice or at a + * minimum a reference to the UPL must be included in all copies or substantial + * portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. */ package org.graalvm.libgraal; diff --git a/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/libgraal/LibGraal.java b/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/libgraal/LibGraal.java index 2f5508412088..a7653f4955d6 100644 --- a/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/libgraal/LibGraal.java +++ b/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/libgraal/LibGraal.java @@ -1,26 +1,42 @@ /* - * Copyright (c) 2019, 2020, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2019, 2023, 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. Oracle designates this - * particular file as subject to the "Classpath" exception as provided - * by Oracle in the LICENSE file that accompanied this code. + * The Universal Permissive License (UPL), Version 1.0 * - * 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). + * Subject to the condition set forth below, permission is hereby granted to any + * person obtaining a copy of this software, associated documentation and/or + * data (collectively the "Software"), free of charge and under any and all + * copyright rights in the Software, and any and all patent rights owned or + * freely licensable by each licensor hereunder covering either (i) the + * unmodified Software as contributed to or provided by such licensor, or (ii) + * the Larger Works (as defined below), to deal in both * - * 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. + * (a) the Software, and * - * 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. + * (b) any piece of software and/or hardware listed in the lrgrwrks.txt file if + * one is included with the Software each a "Larger Work" to which the Software + * is contributed by such licensors), + * + * without restriction, including without limitation the rights to copy, create + * derivative works of, display, perform, and distribute the Software and make, + * use, sell, offer for sale, import, export, have made, and have sold the + * Software and the Larger Work(s), and to sublicense the foregoing rights on + * either these or other terms. + * + * This license is subject to the following condition: + * + * The above copyright notice and either this complete permission notice or at a + * minimum a reference to the UPL must be included in all copies or substantial + * portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. */ package org.graalvm.libgraal; diff --git a/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/libgraal/LibGraalIsolate.java b/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/libgraal/LibGraalIsolate.java index e5a0178fe6d3..9b606ffae595 100644 --- a/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/libgraal/LibGraalIsolate.java +++ b/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/libgraal/LibGraalIsolate.java @@ -1,26 +1,42 @@ /* - * Copyright (c) 2020, 2022, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2020, 2023, 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. Oracle designates this - * particular file as subject to the "Classpath" exception as provided - * by Oracle in the LICENSE file that accompanied this code. + * The Universal Permissive License (UPL), Version 1.0 * - * 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). + * Subject to the condition set forth below, permission is hereby granted to any + * person obtaining a copy of this software, associated documentation and/or + * data (collectively the "Software"), free of charge and under any and all + * copyright rights in the Software, and any and all patent rights owned or + * freely licensable by each licensor hereunder covering either (i) the + * unmodified Software as contributed to or provided by such licensor, or (ii) + * the Larger Works (as defined below), to deal in both * - * 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. + * (a) the Software, and * - * 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. + * (b) any piece of software and/or hardware listed in the lrgrwrks.txt file if + * one is included with the Software each a "Larger Work" to which the Software + * is contributed by such licensors), + * + * without restriction, including without limitation the rights to copy, create + * derivative works of, display, perform, and distribute the Software and make, + * use, sell, offer for sale, import, export, have made, and have sold the + * Software and the Larger Work(s), and to sublicense the foregoing rights on + * either these or other terms. + * + * This license is subject to the following condition: + * + * The above copyright notice and either this complete permission notice or at a + * minimum a reference to the UPL must be included in all copies or substantial + * portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. */ package org.graalvm.libgraal; diff --git a/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/libgraal/LibGraalObject.java b/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/libgraal/LibGraalObject.java index 556d09e22b9e..2b1eac1d92bb 100644 --- a/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/libgraal/LibGraalObject.java +++ b/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/libgraal/LibGraalObject.java @@ -1,26 +1,42 @@ /* - * Copyright (c) 2020, 2022, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2020, 2023, 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. Oracle designates this - * particular file as subject to the "Classpath" exception as provided - * by Oracle in the LICENSE file that accompanied this code. + * The Universal Permissive License (UPL), Version 1.0 * - * 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). + * Subject to the condition set forth below, permission is hereby granted to any + * person obtaining a copy of this software, associated documentation and/or + * data (collectively the "Software"), free of charge and under any and all + * copyright rights in the Software, and any and all patent rights owned or + * freely licensable by each licensor hereunder covering either (i) the + * unmodified Software as contributed to or provided by such licensor, or (ii) + * the Larger Works (as defined below), to deal in both * - * 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. + * (a) the Software, and * - * 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. + * (b) any piece of software and/or hardware listed in the lrgrwrks.txt file if + * one is included with the Software each a "Larger Work" to which the Software + * is contributed by such licensors), + * + * without restriction, including without limitation the rights to copy, create + * derivative works of, display, perform, and distribute the Software and make, + * use, sell, offer for sale, import, export, have made, and have sold the + * Software and the Larger Work(s), and to sublicense the foregoing rights on + * either these or other terms. + * + * This license is subject to the following condition: + * + * The above copyright notice and either this complete permission notice or at a + * minimum a reference to the UPL must be included in all copies or substantial + * portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. */ package org.graalvm.libgraal; diff --git a/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/libgraal/LibGraalScope.java b/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/libgraal/LibGraalScope.java index 984f9b4b3132..b960840a624f 100644 --- a/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/libgraal/LibGraalScope.java +++ b/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/libgraal/LibGraalScope.java @@ -1,26 +1,42 @@ /* - * Copyright (c) 2019, 2022, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2019, 2023, 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. Oracle designates this - * particular file as subject to the "Classpath" exception as provided - * by Oracle in the LICENSE file that accompanied this code. + * The Universal Permissive License (UPL), Version 1.0 * - * 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). + * Subject to the condition set forth below, permission is hereby granted to any + * person obtaining a copy of this software, associated documentation and/or + * data (collectively the "Software"), free of charge and under any and all + * copyright rights in the Software, and any and all patent rights owned or + * freely licensable by each licensor hereunder covering either (i) the + * unmodified Software as contributed to or provided by such licensor, or (ii) + * the Larger Works (as defined below), to deal in both * - * 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. + * (a) the Software, and * - * 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. + * (b) any piece of software and/or hardware listed in the lrgrwrks.txt file if + * one is included with the Software each a "Larger Work" to which the Software + * is contributed by such licensors), + * + * without restriction, including without limitation the rights to copy, create + * derivative works of, display, perform, and distribute the Software and make, + * use, sell, offer for sale, import, export, have made, and have sold the + * Software and the Larger Work(s), and to sublicense the foregoing rights on + * either these or other terms. + * + * This license is subject to the following condition: + * + * The above copyright notice and either this complete permission notice or at a + * minimum a reference to the UPL must be included in all copies or substantial + * portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. */ package org.graalvm.libgraal; From 7e85fb53beeca38bc362c13bae0836610ced590a Mon Sep 17 00:00:00 2001 From: Christian Humer Date: Mon, 19 Jun 2023 21:06:45 +0200 Subject: [PATCH 07/43] Rename package of compiler interfaces to use the new com.oracle.truffle.compiler package. --- .../test/AgnosticInliningPhaseTest.java | 2 +- .../test/AssumptionPartialEvaluationTest.java | 2 +- .../truffle/test/CompilationMemoryTest.java | 2 +- .../truffle/test/CompilerLoggingTest.java | 4 +- .../truffle/test/EncodedGraphCacheTest.java | 2 +- .../test/ExitDuringCompilationTest.java | 3 +- .../test/GraalTruffleRuntimeListenerTest.java | 3 +- .../truffle/test/PartialEvaluationTest.java | 2 +- .../truffle/test/PerformanceWarningTest.java | 2 +- .../test/TransferToInterpreterTest.java | 4 +- .../truffle/test/TruffleCompilerImplTest.java | 2 +- .../libgraal/JNIExceptionWrapperTest.java | 8 +- .../compiler/AbstractKnownTruffleTypes.java | 3 +- .../AbstractTruffleCompilationSupport.java | 4 +- .../truffle/compiler/ExpansionStatistics.java | 3 +- .../truffle/compiler/KnownTruffleTypes.java | 2 +- .../truffle/compiler/PartialEvaluator.java | 15 +-- .../PerformanceInformationHandler.java | 5 +- .../compiler/truffle/compiler/TruffleAST.java | 9 +- .../truffle/compiler/TruffleCompilation.java | 7 +- .../TruffleCompilationIdentifier.java | 5 +- .../TruffleCompilerConfiguration.java | 3 +- .../truffle/compiler/TruffleCompilerImpl.java | 15 +-- .../compiler/TruffleCompilerOptions.java | 5 +- .../TruffleConstantFieldProvider.java | 3 +- .../compiler/TruffleDebugJavaMethod.java | 4 +- .../truffle/compiler/TruffleTierContext.java | 7 +- .../compiler/host/HostInliningPhase.java | 2 +- .../compiler/host/TruffleHostEnvironment.java | 7 +- .../compiler/host/TruffleKnownHostTypes.java | 3 +- .../hotspot/HotSpotKnownTruffleTypes.java | 3 +- .../hotspot/HotSpotPartialEvaluator.java | 5 +- .../HotSpotTruffleCompilationIdentifier.java | 5 +- .../HotSpotTruffleCompilationSupport.java | 5 +- .../hotspot/HotSpotTruffleCompilerImpl.java | 9 +- .../HotSpotTruffleHostEnvironment.java | 7 +- .../HotSpotTruffleHostEnvironmentLookup.java | 3 +- ...fleCallBoundaryInstrumentationFactory.java | 4 +- ...TruffleCommunityCompilerConfiguration.java | 3 +- .../hotspot/TruffleEntryPointDecorator.java | 2 +- .../phases/FrameAccessVerificationPhase.java | 3 +- .../InliningAcrossTruffleBoundaryPhase.java | 3 +- .../InstrumentTruffleBoundariesPhase.java | 3 +- .../phases/SetIdentityForValueTypesPhase.java | 3 +- .../compiler/phases/inlining/CallNode.java | 6 +- .../compiler/phases/inlining/CallTree.java | 5 +- .../phases/inlining/GraphManager.java | 3 +- .../TruffleGraphBuilderPlugins.java | 3 +- .../libgraal/jni/FromLibGraalCalls.java | 3 +- .../hotspot/libgraal/HSTruffleCompilable.java | 31 ++--- .../libgraal/HSTruffleCompilationTask.java | 41 +++---- .../libgraal/HSTruffleCompilerListener.java | 20 ++-- .../libgraal/HSTruffleCompilerRuntime.java | 39 +++---- .../libgraal/LibGraalObjectHandles.java | 3 +- .../LibGraalTruffleHostEnvironment.java | 7 +- .../libgraal/TruffleFromLibGraalCalls.java | 6 +- .../TruffleToLibGraalEntryPoints.java | 57 +++++----- .../isolated/IsolatedCodeInstallBridge.java | 5 +- ...SubstrateTruffleCompilationIdentifier.java | 4 +- .../SubstrateTruffleHostEnvironment.java | 7 +- .../oracle/svm/truffle/TruffleSupport.java | 4 +- .../api/SubstrateCompilableTruffleAST.java | 3 +- .../api/SubstrateKnownTruffleTypes.java | 2 +- ...trateOptimizedCallTargetInstalledCode.java | 4 +- .../api/SubstratePartialEvaluator.java | 5 +- .../SubstrateTruffleCompilationSupport.java | 4 +- .../truffle/api/SubstrateTruffleCompiler.java | 3 +- .../api/SubstrateTruffleCompilerImpl.java | 4 +- .../truffle/api/SubstrateTruffleField.java | 2 +- .../truffle/api/SubstrateTruffleMethod.java | 2 +- .../truffle/api/SubstrateTruffleRuntime.java | 12 +- .../api/SubstrateTruffleUniverseFactory.java | 6 +- .../svm/truffle/api/TruffleBoundaryPhase.java | 2 +- .../oracle/svm/truffle/api/TruffleField.java | 2 +- .../oracle/svm/truffle/api/TruffleMethod.java | 2 +- .../isolated/IsolateAwareTruffleCompiler.java | 6 +- .../IsolatedCompilableTruffleAST.java | 2 +- .../IsolatedTruffleCompilationIdentifier.java | 4 +- .../IsolatedTruffleCompilationTask.java | 6 +- ...IsolatedTruffleCompilerEventForwarder.java | 10 +- .../IsolatedTruffleRuntimeSupport.java | 4 +- ...IsolatedTruffleSourceLanguagePosition.java | 2 +- .../truffle/compiler}/ConstantFieldInfo.java | 2 +- .../truffle/compiler}/HostMethodInfo.java | 2 +- .../OptimizedAssumptionDependency.java | 2 +- .../PartialEvaluationMethodInfo.java | 6 +- .../truffle/compiler}/TruffleCompilable.java | 2 +- .../compiler}/TruffleCompilationSupport.java | 2 +- .../compiler}/TruffleCompilationTask.java | 2 +- .../truffle/compiler}/TruffleCompiler.java | 2 +- .../TruffleCompilerAssumptionDependency.java | 2 +- .../compiler}/TruffleCompilerListener.java | 2 +- .../TruffleCompilerOptionDescriptor.java | 2 +- .../compiler}/TruffleCompilerRuntime.java | 2 +- .../TruffleSourceLanguagePosition.java | 2 +- .../hotspot/HotSpotTruffleCompiler.java | 6 +- .../FromLibGraalEntryPointsResolver.java | 2 +- .../hotspot/libgraal/FromLibGraalId.java | 2 +- .../hotspot/libgraal/TruffleFromLibGraal.java | 2 +- .../libgraal/TruffleFromLibGraalRepeated.java | 2 +- .../hotspot/libgraal/TruffleToLibGraal.java | 2 +- .../compiler}/hotspot/libgraal/Utilities.java | 2 +- .../TruffleFromLibGraalProcessor.java | 8 +- ...om.oracle.truffle.api.TruffleRuntimeAccess | 0 ...m.compiler.truffle.runtime.LoopNodeFactory | 0 .../runtime/AbstractCompilationTask.java | 6 +- .../truffle/runtime/FloodControlHandler.java | 3 +- .../truffle/runtime/GraalTruffleRuntime.java | 18 +-- .../runtime/GraalTruffleRuntimeListener.java | 7 +- ...GraalTruffleRuntimeListenerDispatcher.java | 7 +- .../truffle/runtime/OptimizedAssumption.java | 2 +- .../truffle/runtime/OptimizedCallTarget.java | 2 +- .../truffle/runtime/TruffleInlining.java | 2 +- .../truffle/runtime/debug/JFRListener.java | 4 +- .../runtime/debug/StatisticsListener.java | 6 +- .../debug/TraceASTCompilationListener.java | 4 +- .../debug/TraceCompilationListener.java | 4 +- .../TraceCompilationPolymorphismListener.java | 4 +- .../hotspot/HotSpotOptimizedCallTarget.java | 2 +- .../hotspot/HotSpotTruffleRuntime.java | 8 +- .../java/HotSpotTruffleRuntimeAccess.java | 2 +- .../LibGraalCompilationResultInfo.java | 2 +- .../hotspot/libgraal/LibGraalGraphInfo.java | 4 +- .../LibGraalHotSpotTruffleCompiler.java | 9 +- .../LibGraalTruffleCompilationSupport.java | 11 +- .../TruffleFromLibGraalEntryPoints.java | 107 +++++++++--------- .../libgraal/TruffleToLibGraalCalls.java | 56 ++++----- 127 files changed, 450 insertions(+), 403 deletions(-) rename truffle/src/com.oracle.truffle.compiler/src/{org/graalvm/compiler/truffle/common => com/oracle/truffle/compiler}/ConstantFieldInfo.java (99%) rename truffle/src/com.oracle.truffle.compiler/src/{org/graalvm/compiler/truffle/common => com/oracle/truffle/compiler}/HostMethodInfo.java (98%) rename truffle/src/com.oracle.truffle.compiler/src/{org/graalvm/compiler/truffle/common => com/oracle/truffle/compiler}/OptimizedAssumptionDependency.java (98%) rename truffle/src/com.oracle.truffle.compiler/src/{org/graalvm/compiler/truffle/common => com/oracle/truffle/compiler}/PartialEvaluationMethodInfo.java (93%) rename truffle/src/com.oracle.truffle.compiler/src/{org/graalvm/compiler/truffle/common => com/oracle/truffle/compiler}/TruffleCompilable.java (99%) rename truffle/src/com.oracle.truffle.compiler/src/{org/graalvm/compiler/truffle/common => com/oracle/truffle/compiler}/TruffleCompilationSupport.java (98%) rename truffle/src/com.oracle.truffle.compiler/src/{org/graalvm/compiler/truffle/common => com/oracle/truffle/compiler}/TruffleCompilationTask.java (98%) rename truffle/src/com.oracle.truffle.compiler/src/{org/graalvm/compiler/truffle/common => com/oracle/truffle/compiler}/TruffleCompiler.java (98%) rename truffle/src/com.oracle.truffle.compiler/src/{org/graalvm/compiler/truffle/common => com/oracle/truffle/compiler}/TruffleCompilerAssumptionDependency.java (98%) rename truffle/src/com.oracle.truffle.compiler/src/{org/graalvm/compiler/truffle/common => com/oracle/truffle/compiler}/TruffleCompilerListener.java (99%) rename truffle/src/com.oracle.truffle.compiler/src/{org/graalvm/compiler/truffle/common => com/oracle/truffle/compiler}/TruffleCompilerOptionDescriptor.java (98%) rename truffle/src/com.oracle.truffle.compiler/src/{org/graalvm/compiler/truffle/common => com/oracle/truffle/compiler}/TruffleCompilerRuntime.java (99%) rename truffle/src/com.oracle.truffle.compiler/src/{org/graalvm/compiler/truffle/common => com/oracle/truffle/compiler}/TruffleSourceLanguagePosition.java (98%) rename truffle/src/com.oracle.truffle.compiler/src/{org/graalvm/compiler/truffle/common => com/oracle/truffle/compiler}/hotspot/HotSpotTruffleCompiler.java (94%) rename truffle/src/com.oracle.truffle.compiler/src/{org/graalvm/compiler/truffle/common => com/oracle/truffle/compiler}/hotspot/libgraal/FromLibGraalEntryPointsResolver.java (98%) rename truffle/src/com.oracle.truffle.compiler/src/{org/graalvm/compiler/truffle/common => com/oracle/truffle/compiler}/hotspot/libgraal/FromLibGraalId.java (97%) rename truffle/src/com.oracle.truffle.compiler/src/{org/graalvm/compiler/truffle/common => com/oracle/truffle/compiler}/hotspot/libgraal/TruffleFromLibGraal.java (99%) rename truffle/src/com.oracle.truffle.compiler/src/{org/graalvm/compiler/truffle/common => com/oracle/truffle/compiler}/hotspot/libgraal/TruffleFromLibGraalRepeated.java (97%) rename truffle/src/com.oracle.truffle.compiler/src/{org/graalvm/compiler/truffle/common => com/oracle/truffle/compiler}/hotspot/libgraal/TruffleToLibGraal.java (98%) rename truffle/src/com.oracle.truffle.compiler/src/{org/graalvm/compiler/truffle/common => com/oracle/truffle/compiler}/hotspot/libgraal/Utilities.java (97%) rename {compiler/src/jdk.internal.vm.compiler => truffle/src/com.oracle.truffle.runtime}/src/META-INF/services/com.oracle.truffle.api.TruffleRuntimeAccess (100%) rename {compiler/src/jdk.internal.vm.compiler => truffle/src/com.oracle.truffle.runtime}/src/META-INF/services/org.graalvm.compiler.truffle.runtime.LoopNodeFactory (100%) diff --git a/compiler/src/jdk.internal.vm.compiler.test/src/org/graalvm/compiler/truffle/test/AgnosticInliningPhaseTest.java b/compiler/src/jdk.internal.vm.compiler.test/src/org/graalvm/compiler/truffle/test/AgnosticInliningPhaseTest.java index e74e0b103ede..1011f93c69e6 100644 --- a/compiler/src/jdk.internal.vm.compiler.test/src/org/graalvm/compiler/truffle/test/AgnosticInliningPhaseTest.java +++ b/compiler/src/jdk.internal.vm.compiler.test/src/org/graalvm/compiler/truffle/test/AgnosticInliningPhaseTest.java @@ -26,7 +26,6 @@ import org.graalvm.compiler.core.common.CompilationIdentifier; import org.graalvm.compiler.nodes.StructuredGraph; -import org.graalvm.compiler.truffle.common.TruffleCompilationTask; import org.graalvm.compiler.truffle.compiler.PartialEvaluator; import org.graalvm.compiler.truffle.compiler.PostPartialEvaluationSuite; import org.graalvm.compiler.truffle.compiler.TruffleCompilerImpl; @@ -42,6 +41,7 @@ import com.oracle.truffle.api.TruffleRuntime; import com.oracle.truffle.api.frame.VirtualFrame; import com.oracle.truffle.api.nodes.RootNode; +import com.oracle.truffle.compiler.TruffleCompilationTask; public class AgnosticInliningPhaseTest extends PartialEvaluationTest { diff --git a/compiler/src/jdk.internal.vm.compiler.test/src/org/graalvm/compiler/truffle/test/AssumptionPartialEvaluationTest.java b/compiler/src/jdk.internal.vm.compiler.test/src/org/graalvm/compiler/truffle/test/AssumptionPartialEvaluationTest.java index 80d87c9090e6..754ca2eed8d7 100644 --- a/compiler/src/jdk.internal.vm.compiler.test/src/org/graalvm/compiler/truffle/test/AssumptionPartialEvaluationTest.java +++ b/compiler/src/jdk.internal.vm.compiler.test/src/org/graalvm/compiler/truffle/test/AssumptionPartialEvaluationTest.java @@ -26,7 +26,6 @@ import java.lang.ref.WeakReference; -import org.graalvm.compiler.truffle.common.OptimizedAssumptionDependency; import org.graalvm.compiler.truffle.runtime.OptimizedAssumption; import org.graalvm.compiler.truffle.runtime.OptimizedCallTarget; import org.graalvm.compiler.truffle.test.nodes.AbstractTestNode; @@ -46,6 +45,7 @@ import com.oracle.truffle.api.nodes.InvalidAssumptionException; import com.oracle.truffle.api.nodes.NodeInfo; import com.oracle.truffle.api.nodes.RootNode; +import com.oracle.truffle.compiler.OptimizedAssumptionDependency; public class AssumptionPartialEvaluationTest extends PartialEvaluationTest { public static Object constant42() { diff --git a/compiler/src/jdk.internal.vm.compiler.test/src/org/graalvm/compiler/truffle/test/CompilationMemoryTest.java b/compiler/src/jdk.internal.vm.compiler.test/src/org/graalvm/compiler/truffle/test/CompilationMemoryTest.java index a5d900a879b9..696bcf9a1beb 100644 --- a/compiler/src/jdk.internal.vm.compiler.test/src/org/graalvm/compiler/truffle/test/CompilationMemoryTest.java +++ b/compiler/src/jdk.internal.vm.compiler.test/src/org/graalvm/compiler/truffle/test/CompilationMemoryTest.java @@ -29,7 +29,6 @@ import java.util.Arrays; import java.util.concurrent.FutureTask; -import org.graalvm.compiler.truffle.common.TruffleCompilerListener; import org.graalvm.compiler.truffle.runtime.AbstractCompilationTask; import org.graalvm.compiler.truffle.runtime.GraalTruffleRuntime; import org.graalvm.compiler.truffle.runtime.GraalTruffleRuntimeListener; @@ -41,6 +40,7 @@ import com.oracle.truffle.api.interop.TruffleObject; import com.oracle.truffle.api.nodes.RootNode; import com.oracle.truffle.api.test.GCUtils; +import com.oracle.truffle.compiler.TruffleCompilerListener; public class CompilationMemoryTest extends TestWithPolyglotOptions { diff --git a/compiler/src/jdk.internal.vm.compiler.test/src/org/graalvm/compiler/truffle/test/CompilerLoggingTest.java b/compiler/src/jdk.internal.vm.compiler.test/src/org/graalvm/compiler/truffle/test/CompilerLoggingTest.java index 3b8dc1f66897..4f156ae96640 100644 --- a/compiler/src/jdk.internal.vm.compiler.test/src/org/graalvm/compiler/truffle/test/CompilerLoggingTest.java +++ b/compiler/src/jdk.internal.vm.compiler.test/src/org/graalvm/compiler/truffle/test/CompilerLoggingTest.java @@ -36,8 +36,6 @@ import com.oracle.truffle.api.TruffleOptions; import com.oracle.truffle.api.frame.VirtualFrame; import org.graalvm.compiler.debug.TTY; -import org.graalvm.compiler.truffle.common.TruffleCompiler; -import org.graalvm.compiler.truffle.common.TruffleCompilerListener; import org.graalvm.compiler.truffle.compiler.TruffleCompilerImpl; import org.graalvm.compiler.truffle.runtime.AbstractCompilationTask; import org.graalvm.compiler.truffle.runtime.GraalTruffleRuntime; @@ -49,6 +47,8 @@ import org.junit.Test; import com.oracle.truffle.api.nodes.RootNode; +import com.oracle.truffle.compiler.TruffleCompiler; +import com.oracle.truffle.compiler.TruffleCompilerListener; import static org.junit.Assert.assertFalse; import static org.junit.Assert.assertTrue; diff --git a/compiler/src/jdk.internal.vm.compiler.test/src/org/graalvm/compiler/truffle/test/EncodedGraphCacheTest.java b/compiler/src/jdk.internal.vm.compiler.test/src/org/graalvm/compiler/truffle/test/EncodedGraphCacheTest.java index 960220832dfb..e6d6cb3cff2d 100644 --- a/compiler/src/jdk.internal.vm.compiler.test/src/org/graalvm/compiler/truffle/test/EncodedGraphCacheTest.java +++ b/compiler/src/jdk.internal.vm.compiler.test/src/org/graalvm/compiler/truffle/test/EncodedGraphCacheTest.java @@ -32,7 +32,6 @@ import org.graalvm.collections.EconomicMap; import org.graalvm.compiler.debug.DebugContext; import org.graalvm.compiler.nodes.EncodedGraph; -import org.graalvm.compiler.truffle.common.TruffleCompilationTask; import org.graalvm.compiler.truffle.compiler.PartialEvaluator; import org.graalvm.compiler.truffle.compiler.TruffleCompilation; import org.graalvm.compiler.truffle.compiler.TruffleCompilerImpl; @@ -49,6 +48,7 @@ import com.oracle.truffle.api.frame.FrameDescriptor; import com.oracle.truffle.api.frame.VirtualFrame; import com.oracle.truffle.api.nodes.RootNode; +import com.oracle.truffle.compiler.TruffleCompilationTask; import jdk.vm.ci.meta.ResolvedJavaMethod; diff --git a/compiler/src/jdk.internal.vm.compiler.test/src/org/graalvm/compiler/truffle/test/ExitDuringCompilationTest.java b/compiler/src/jdk.internal.vm.compiler.test/src/org/graalvm/compiler/truffle/test/ExitDuringCompilationTest.java index 3d962dde4916..2bf13d75fb9d 100644 --- a/compiler/src/jdk.internal.vm.compiler.test/src/org/graalvm/compiler/truffle/test/ExitDuringCompilationTest.java +++ b/compiler/src/jdk.internal.vm.compiler.test/src/org/graalvm/compiler/truffle/test/ExitDuringCompilationTest.java @@ -26,7 +26,8 @@ import com.oracle.truffle.api.nodes.RootNode; import com.oracle.truffle.api.test.SubprocessTestUtils; -import org.graalvm.compiler.truffle.common.TruffleCompilerListener; +import com.oracle.truffle.compiler.TruffleCompilerListener; + import org.graalvm.compiler.truffle.runtime.AbstractCompilationTask; import org.graalvm.compiler.truffle.runtime.GraalTruffleRuntime; import org.graalvm.compiler.truffle.runtime.GraalTruffleRuntimeListener; diff --git a/compiler/src/jdk.internal.vm.compiler.test/src/org/graalvm/compiler/truffle/test/GraalTruffleRuntimeListenerTest.java b/compiler/src/jdk.internal.vm.compiler.test/src/org/graalvm/compiler/truffle/test/GraalTruffleRuntimeListenerTest.java index 298a6decd2d5..2afcbca59385 100644 --- a/compiler/src/jdk.internal.vm.compiler.test/src/org/graalvm/compiler/truffle/test/GraalTruffleRuntimeListenerTest.java +++ b/compiler/src/jdk.internal.vm.compiler.test/src/org/graalvm/compiler/truffle/test/GraalTruffleRuntimeListenerTest.java @@ -39,7 +39,8 @@ import java.util.List; import com.oracle.truffle.api.test.SubprocessTestUtils; -import org.graalvm.compiler.truffle.common.TruffleCompilerListener; +import com.oracle.truffle.compiler.TruffleCompilerListener; + import org.graalvm.compiler.truffle.runtime.AbstractCompilationTask; import org.graalvm.compiler.truffle.runtime.GraalTruffleRuntime; import org.graalvm.compiler.truffle.runtime.GraalTruffleRuntimeListener; diff --git a/compiler/src/jdk.internal.vm.compiler.test/src/org/graalvm/compiler/truffle/test/PartialEvaluationTest.java b/compiler/src/jdk.internal.vm.compiler.test/src/org/graalvm/compiler/truffle/test/PartialEvaluationTest.java index c62c8c1f08e8..42fb8b5612ad 100644 --- a/compiler/src/jdk.internal.vm.compiler.test/src/org/graalvm/compiler/truffle/test/PartialEvaluationTest.java +++ b/compiler/src/jdk.internal.vm.compiler.test/src/org/graalvm/compiler/truffle/test/PartialEvaluationTest.java @@ -44,7 +44,6 @@ import org.graalvm.compiler.phases.PhaseSuite; import org.graalvm.compiler.phases.common.DeadCodeEliminationPhase; import org.graalvm.compiler.phases.tiers.HighTierContext; -import org.graalvm.compiler.truffle.common.TruffleCompilationTask; import org.graalvm.compiler.truffle.compiler.PartialEvaluator; import org.graalvm.compiler.truffle.compiler.PerformanceInformationHandler; import org.graalvm.compiler.truffle.compiler.TruffleCompilation; @@ -61,6 +60,7 @@ import com.oracle.truffle.api.frame.VirtualFrame; import com.oracle.truffle.api.nodes.ControlFlowException; import com.oracle.truffle.api.nodes.RootNode; +import com.oracle.truffle.compiler.TruffleCompilationTask; import jdk.vm.ci.code.BailoutException; import jdk.vm.ci.meta.Constant; diff --git a/compiler/src/jdk.internal.vm.compiler.test/src/org/graalvm/compiler/truffle/test/PerformanceWarningTest.java b/compiler/src/jdk.internal.vm.compiler.test/src/org/graalvm/compiler/truffle/test/PerformanceWarningTest.java index 3d64074fc180..aa25ff12901d 100644 --- a/compiler/src/jdk.internal.vm.compiler.test/src/org/graalvm/compiler/truffle/test/PerformanceWarningTest.java +++ b/compiler/src/jdk.internal.vm.compiler.test/src/org/graalvm/compiler/truffle/test/PerformanceWarningTest.java @@ -30,7 +30,6 @@ import org.graalvm.compiler.debug.DebugContext; import org.graalvm.compiler.debug.DebugContext.Builder; import org.graalvm.compiler.serviceprovider.GraalServices; -import org.graalvm.compiler.truffle.common.TruffleCompilationTask; import org.graalvm.compiler.truffle.compiler.TruffleCompilation; import org.graalvm.compiler.truffle.compiler.TruffleCompilerImpl; import org.graalvm.compiler.truffle.runtime.GraalTruffleRuntime; @@ -46,6 +45,7 @@ import com.oracle.truffle.api.frame.FrameSlotKind; import com.oracle.truffle.api.frame.VirtualFrame; import com.oracle.truffle.api.nodes.RootNode; +import com.oracle.truffle.compiler.TruffleCompilationTask; public class PerformanceWarningTest extends TruffleCompilerImplTest { diff --git a/compiler/src/jdk.internal.vm.compiler.test/src/org/graalvm/compiler/truffle/test/TransferToInterpreterTest.java b/compiler/src/jdk.internal.vm.compiler.test/src/org/graalvm/compiler/truffle/test/TransferToInterpreterTest.java index 880566c6dc6e..8b1ac173fc4f 100644 --- a/compiler/src/jdk.internal.vm.compiler.test/src/org/graalvm/compiler/truffle/test/TransferToInterpreterTest.java +++ b/compiler/src/jdk.internal.vm.compiler.test/src/org/graalvm/compiler/truffle/test/TransferToInterpreterTest.java @@ -24,8 +24,6 @@ */ package org.graalvm.compiler.truffle.test; -import org.graalvm.compiler.truffle.common.TruffleCompilationTask; -import org.graalvm.compiler.truffle.common.TruffleCompiler; import org.graalvm.compiler.truffle.runtime.GraalTruffleRuntime; import org.graalvm.compiler.truffle.runtime.OptimizedCallTarget; import org.junit.Assert; @@ -35,6 +33,8 @@ import com.oracle.truffle.api.CompilerDirectives; import com.oracle.truffle.api.frame.VirtualFrame; import com.oracle.truffle.api.nodes.RootNode; +import com.oracle.truffle.compiler.TruffleCompilationTask; +import com.oracle.truffle.compiler.TruffleCompiler; public class TransferToInterpreterTest extends TestWithPolyglotOptions { diff --git a/compiler/src/jdk.internal.vm.compiler.test/src/org/graalvm/compiler/truffle/test/TruffleCompilerImplTest.java b/compiler/src/jdk.internal.vm.compiler.test/src/org/graalvm/compiler/truffle/test/TruffleCompilerImplTest.java index 5fb813fb2a82..e65ac7c2be76 100644 --- a/compiler/src/jdk.internal.vm.compiler.test/src/org/graalvm/compiler/truffle/test/TruffleCompilerImplTest.java +++ b/compiler/src/jdk.internal.vm.compiler.test/src/org/graalvm/compiler/truffle/test/TruffleCompilerImplTest.java @@ -30,7 +30,6 @@ import org.graalvm.compiler.core.target.Backend; import org.graalvm.compiler.core.test.GraalCompilerTest; import org.graalvm.compiler.phases.util.Providers; -import org.graalvm.compiler.truffle.common.TruffleCompiler; import org.graalvm.compiler.truffle.compiler.KnownTruffleTypes; import org.graalvm.compiler.truffle.compiler.TruffleCompilation; import org.graalvm.compiler.truffle.compiler.TruffleCompilerImpl; @@ -43,6 +42,7 @@ import com.oracle.truffle.api.TruffleOptions; import com.oracle.truffle.api.nodes.RootNode; +import com.oracle.truffle.compiler.TruffleCompiler; public abstract class TruffleCompilerImplTest extends GraalCompilerTest { diff --git a/compiler/src/jdk.internal.vm.compiler.test/src/org/graalvm/compiler/truffle/test/libgraal/JNIExceptionWrapperTest.java b/compiler/src/jdk.internal.vm.compiler.test/src/org/graalvm/compiler/truffle/test/libgraal/JNIExceptionWrapperTest.java index 1a03fb270bf7..4c9b8fcdb905 100644 --- a/compiler/src/jdk.internal.vm.compiler.test/src/org/graalvm/compiler/truffle/test/libgraal/JNIExceptionWrapperTest.java +++ b/compiler/src/jdk.internal.vm.compiler.test/src/org/graalvm/compiler/truffle/test/libgraal/JNIExceptionWrapperTest.java @@ -36,10 +36,6 @@ import org.graalvm.compiler.core.CompilationWrapper; import org.graalvm.compiler.core.GraalCompilerOptions; import org.graalvm.compiler.test.SubprocessUtil; -import org.graalvm.compiler.truffle.common.TruffleCompilable; -import org.graalvm.compiler.truffle.common.TruffleCompilationTask; -import org.graalvm.compiler.truffle.common.TruffleCompiler; -import org.graalvm.compiler.truffle.common.TruffleCompilerListener; import org.graalvm.compiler.truffle.compiler.TruffleCompilerImpl; import org.graalvm.compiler.truffle.runtime.GraalTruffleRuntime; import org.graalvm.compiler.truffle.runtime.OptimizedCallTarget; @@ -47,6 +43,10 @@ import org.junit.Test; import com.oracle.truffle.api.nodes.RootNode; +import com.oracle.truffle.compiler.TruffleCompilable; +import com.oracle.truffle.compiler.TruffleCompilationTask; +import com.oracle.truffle.compiler.TruffleCompiler; +import com.oracle.truffle.compiler.TruffleCompilerListener; public class JNIExceptionWrapperTest extends TestWithPolyglotOptions { diff --git a/compiler/src/jdk.internal.vm.compiler/src/org/graalvm/compiler/truffle/compiler/AbstractKnownTruffleTypes.java b/compiler/src/jdk.internal.vm.compiler/src/org/graalvm/compiler/truffle/compiler/AbstractKnownTruffleTypes.java index 4ea90103a842..72ff0ae5c2fd 100644 --- a/compiler/src/jdk.internal.vm.compiler/src/org/graalvm/compiler/truffle/compiler/AbstractKnownTruffleTypes.java +++ b/compiler/src/jdk.internal.vm.compiler/src/org/graalvm/compiler/truffle/compiler/AbstractKnownTruffleTypes.java @@ -32,7 +32,8 @@ import java.util.Map; import org.graalvm.compiler.debug.GraalError; -import org.graalvm.compiler.truffle.common.TruffleCompilerRuntime; + +import com.oracle.truffle.compiler.TruffleCompilerRuntime; import jdk.vm.ci.meta.JavaType; import jdk.vm.ci.meta.MetaAccessProvider; diff --git a/compiler/src/jdk.internal.vm.compiler/src/org/graalvm/compiler/truffle/compiler/AbstractTruffleCompilationSupport.java b/compiler/src/jdk.internal.vm.compiler/src/org/graalvm/compiler/truffle/compiler/AbstractTruffleCompilationSupport.java index 2bc35c34d900..d0aebf3c8b12 100644 --- a/compiler/src/jdk.internal.vm.compiler/src/org/graalvm/compiler/truffle/compiler/AbstractTruffleCompilationSupport.java +++ b/compiler/src/jdk.internal.vm.compiler/src/org/graalvm/compiler/truffle/compiler/AbstractTruffleCompilationSupport.java @@ -24,8 +24,8 @@ */ package org.graalvm.compiler.truffle.compiler; -import org.graalvm.compiler.truffle.common.TruffleCompilationSupport; -import org.graalvm.compiler.truffle.common.TruffleCompilerOptionDescriptor; +import com.oracle.truffle.compiler.TruffleCompilationSupport; +import com.oracle.truffle.compiler.TruffleCompilerOptionDescriptor; public abstract class AbstractTruffleCompilationSupport implements TruffleCompilationSupport { diff --git a/compiler/src/jdk.internal.vm.compiler/src/org/graalvm/compiler/truffle/compiler/ExpansionStatistics.java b/compiler/src/jdk.internal.vm.compiler/src/org/graalvm/compiler/truffle/compiler/ExpansionStatistics.java index 833f9c136e4f..b358a5150a5c 100644 --- a/compiler/src/jdk.internal.vm.compiler/src/org/graalvm/compiler/truffle/compiler/ExpansionStatistics.java +++ b/compiler/src/jdk.internal.vm.compiler/src/org/graalvm/compiler/truffle/compiler/ExpansionStatistics.java @@ -52,9 +52,10 @@ import org.graalvm.compiler.nodes.spi.VirtualizableAllocation; import org.graalvm.compiler.options.OptionValues; import org.graalvm.compiler.phases.schedule.SchedulePhase; -import org.graalvm.compiler.truffle.common.TruffleCompilable; import org.graalvm.compiler.truffle.compiler.TruffleCompilerOptions.CompilationTier; +import com.oracle.truffle.compiler.TruffleCompilable; + import jdk.vm.ci.meta.JavaType; import jdk.vm.ci.meta.ResolvedJavaMethod; import jdk.vm.ci.meta.ResolvedJavaType; diff --git a/compiler/src/jdk.internal.vm.compiler/src/org/graalvm/compiler/truffle/compiler/KnownTruffleTypes.java b/compiler/src/jdk.internal.vm.compiler/src/org/graalvm/compiler/truffle/compiler/KnownTruffleTypes.java index 025ff97ec3a8..a63261d90a4e 100644 --- a/compiler/src/jdk.internal.vm.compiler/src/org/graalvm/compiler/truffle/compiler/KnownTruffleTypes.java +++ b/compiler/src/jdk.internal.vm.compiler/src/org/graalvm/compiler/truffle/compiler/KnownTruffleTypes.java @@ -36,7 +36,7 @@ import java.util.Objects; import java.util.Set; -import org.graalvm.compiler.truffle.common.TruffleCompilerRuntime; +import com.oracle.truffle.compiler.TruffleCompilerRuntime; import jdk.vm.ci.meta.ConstantReflectionProvider; import jdk.vm.ci.meta.JavaConstant; diff --git a/compiler/src/jdk.internal.vm.compiler/src/org/graalvm/compiler/truffle/compiler/PartialEvaluator.java b/compiler/src/jdk.internal.vm.compiler/src/org/graalvm/compiler/truffle/compiler/PartialEvaluator.java index 61cd0d95b46e..5e90bdd2e9d5 100644 --- a/compiler/src/jdk.internal.vm.compiler/src/org/graalvm/compiler/truffle/compiler/PartialEvaluator.java +++ b/compiler/src/jdk.internal.vm.compiler/src/org/graalvm/compiler/truffle/compiler/PartialEvaluator.java @@ -66,18 +66,19 @@ import org.graalvm.compiler.serviceprovider.GraalServices; import org.graalvm.compiler.serviceprovider.JavaVersionUtil; import org.graalvm.compiler.serviceprovider.SpeculationReasonGroup; -import org.graalvm.compiler.truffle.common.TruffleCompilable; -import org.graalvm.compiler.truffle.common.ConstantFieldInfo; -import org.graalvm.compiler.truffle.common.PartialEvaluationMethodInfo; -import org.graalvm.compiler.truffle.common.TruffleCompilationTask; -import org.graalvm.compiler.truffle.common.TruffleCompilerRuntime; -import org.graalvm.compiler.truffle.common.TruffleCompilerRuntime.InlineKind; -import org.graalvm.compiler.truffle.common.TruffleSourceLanguagePosition; import org.graalvm.compiler.truffle.compiler.phases.DeoptimizeOnExceptionPhase; import org.graalvm.compiler.truffle.compiler.phases.InstrumentPhase; import org.graalvm.compiler.truffle.compiler.substitutions.GraphBuilderInvocationPluginProvider; import org.graalvm.compiler.truffle.compiler.substitutions.TruffleGraphBuilderPlugins; +import com.oracle.truffle.compiler.ConstantFieldInfo; +import com.oracle.truffle.compiler.PartialEvaluationMethodInfo; +import com.oracle.truffle.compiler.TruffleCompilable; +import com.oracle.truffle.compiler.TruffleCompilationTask; +import com.oracle.truffle.compiler.TruffleCompilerRuntime; +import com.oracle.truffle.compiler.TruffleSourceLanguagePosition; +import com.oracle.truffle.compiler.TruffleCompilerRuntime.InlineKind; + import jdk.vm.ci.meta.DeoptimizationAction; import jdk.vm.ci.meta.DeoptimizationReason; import jdk.vm.ci.meta.JavaConstant; diff --git a/compiler/src/jdk.internal.vm.compiler/src/org/graalvm/compiler/truffle/compiler/PerformanceInformationHandler.java b/compiler/src/jdk.internal.vm.compiler/src/org/graalvm/compiler/truffle/compiler/PerformanceInformationHandler.java index 39646f41002a..8cb5316cefc6 100644 --- a/compiler/src/jdk.internal.vm.compiler/src/org/graalvm/compiler/truffle/compiler/PerformanceInformationHandler.java +++ b/compiler/src/jdk.internal.vm.compiler/src/org/graalvm/compiler/truffle/compiler/PerformanceInformationHandler.java @@ -53,10 +53,11 @@ import org.graalvm.compiler.nodes.java.MethodCallTargetNode; import org.graalvm.compiler.nodes.util.GraphUtil; import org.graalvm.compiler.options.OptionValues; -import org.graalvm.compiler.truffle.common.TruffleCompilable; -import org.graalvm.compiler.truffle.common.TruffleCompilerRuntime; import org.graalvm.compiler.truffle.compiler.TruffleCompilerOptions.PerformanceWarningKind; +import com.oracle.truffle.compiler.TruffleCompilable; +import com.oracle.truffle.compiler.TruffleCompilerRuntime; + import jdk.vm.ci.meta.ResolvedJavaMethod; import jdk.vm.ci.meta.ResolvedJavaType; diff --git a/compiler/src/jdk.internal.vm.compiler/src/org/graalvm/compiler/truffle/compiler/TruffleAST.java b/compiler/src/jdk.internal.vm.compiler/src/org/graalvm/compiler/truffle/compiler/TruffleAST.java index 2fba436c5932..7e5d297497aa 100644 --- a/compiler/src/jdk.internal.vm.compiler/src/org/graalvm/compiler/truffle/compiler/TruffleAST.java +++ b/compiler/src/jdk.internal.vm.compiler/src/org/graalvm/compiler/truffle/compiler/TruffleAST.java @@ -36,10 +36,6 @@ import org.graalvm.compiler.graph.NodeSourcePosition; import org.graalvm.compiler.nodes.ConstantNode; import org.graalvm.compiler.nodes.StructuredGraph; -import org.graalvm.compiler.truffle.common.TruffleCompilable; -import org.graalvm.compiler.truffle.common.ConstantFieldInfo; -import org.graalvm.compiler.truffle.common.TruffleCompilationTask; -import org.graalvm.compiler.truffle.common.TruffleSourceLanguagePosition; import org.graalvm.compiler.truffle.compiler.PartialEvaluator.SourceLanguagePositionImpl; import org.graalvm.compiler.truffle.compiler.phases.inlining.CallNode; import org.graalvm.compiler.truffle.compiler.phases.inlining.CallNode.State; @@ -47,6 +43,11 @@ import org.graalvm.graphio.GraphBlocks; import org.graalvm.graphio.GraphStructure; +import com.oracle.truffle.compiler.ConstantFieldInfo; +import com.oracle.truffle.compiler.TruffleCompilable; +import com.oracle.truffle.compiler.TruffleCompilationTask; +import com.oracle.truffle.compiler.TruffleSourceLanguagePosition; + import jdk.vm.ci.meta.ConstantReflectionProvider; import jdk.vm.ci.meta.JavaConstant; import jdk.vm.ci.meta.JavaMethod; diff --git a/compiler/src/jdk.internal.vm.compiler/src/org/graalvm/compiler/truffle/compiler/TruffleCompilation.java b/compiler/src/jdk.internal.vm.compiler/src/org/graalvm/compiler/truffle/compiler/TruffleCompilation.java index 0bf149d65174..1cee2c3f0dee 100644 --- a/compiler/src/jdk.internal.vm.compiler/src/org/graalvm/compiler/truffle/compiler/TruffleCompilation.java +++ b/compiler/src/jdk.internal.vm.compiler/src/org/graalvm/compiler/truffle/compiler/TruffleCompilation.java @@ -29,9 +29,10 @@ import org.graalvm.compiler.debug.LogStream; import org.graalvm.compiler.debug.TTY; import org.graalvm.compiler.nodes.StructuredGraph; -import org.graalvm.compiler.truffle.common.TruffleCompilable; -import org.graalvm.compiler.truffle.common.TruffleCompilationTask; -import org.graalvm.compiler.truffle.common.TruffleCompilerRuntime; + +import com.oracle.truffle.compiler.TruffleCompilable; +import com.oracle.truffle.compiler.TruffleCompilationTask; +import com.oracle.truffle.compiler.TruffleCompilerRuntime; /** * Represents a truffle compilation bundling compilable and task into a single object. Also installs diff --git a/compiler/src/jdk.internal.vm.compiler/src/org/graalvm/compiler/truffle/compiler/TruffleCompilationIdentifier.java b/compiler/src/jdk.internal.vm.compiler/src/org/graalvm/compiler/truffle/compiler/TruffleCompilationIdentifier.java index 05c547b73f4c..c8aa4d7929e6 100644 --- a/compiler/src/jdk.internal.vm.compiler/src/org/graalvm/compiler/truffle/compiler/TruffleCompilationIdentifier.java +++ b/compiler/src/jdk.internal.vm.compiler/src/org/graalvm/compiler/truffle/compiler/TruffleCompilationIdentifier.java @@ -25,8 +25,9 @@ package org.graalvm.compiler.truffle.compiler; import org.graalvm.compiler.core.common.CompilationIdentifier; -import org.graalvm.compiler.truffle.common.TruffleCompilable; -import org.graalvm.compiler.truffle.common.TruffleCompilationTask; + +import com.oracle.truffle.compiler.TruffleCompilable; +import com.oracle.truffle.compiler.TruffleCompilationTask; public interface TruffleCompilationIdentifier extends CompilationIdentifier { diff --git a/compiler/src/jdk.internal.vm.compiler/src/org/graalvm/compiler/truffle/compiler/TruffleCompilerConfiguration.java b/compiler/src/jdk.internal.vm.compiler/src/org/graalvm/compiler/truffle/compiler/TruffleCompilerConfiguration.java index 6414686e7621..c24610873306 100644 --- a/compiler/src/jdk.internal.vm.compiler/src/org/graalvm/compiler/truffle/compiler/TruffleCompilerConfiguration.java +++ b/compiler/src/jdk.internal.vm.compiler/src/org/graalvm/compiler/truffle/compiler/TruffleCompilerConfiguration.java @@ -31,7 +31,8 @@ import org.graalvm.compiler.core.target.Backend; import org.graalvm.compiler.nodes.graphbuilderconf.GraphBuilderConfiguration; import org.graalvm.compiler.phases.tiers.Suites; -import org.graalvm.compiler.truffle.common.TruffleCompilerRuntime; + +import com.oracle.truffle.compiler.TruffleCompilerRuntime; import jdk.vm.ci.code.Architecture; diff --git a/compiler/src/jdk.internal.vm.compiler/src/org/graalvm/compiler/truffle/compiler/TruffleCompilerImpl.java b/compiler/src/jdk.internal.vm.compiler/src/org/graalvm/compiler/truffle/compiler/TruffleCompilerImpl.java index bfbfd90818a9..515a7bb0a835 100644 --- a/compiler/src/jdk.internal.vm.compiler/src/org/graalvm/compiler/truffle/compiler/TruffleCompilerImpl.java +++ b/compiler/src/jdk.internal.vm.compiler/src/org/graalvm/compiler/truffle/compiler/TruffleCompilerImpl.java @@ -85,13 +85,6 @@ import org.graalvm.compiler.phases.tiers.Suites; import org.graalvm.compiler.phases.util.Providers; import org.graalvm.compiler.serviceprovider.GraalServices; -import org.graalvm.compiler.truffle.common.TruffleCompilable; -import org.graalvm.compiler.truffle.common.OptimizedAssumptionDependency; -import org.graalvm.compiler.truffle.common.TruffleCompilationTask; -import org.graalvm.compiler.truffle.common.TruffleCompiler; -import org.graalvm.compiler.truffle.common.TruffleCompilerAssumptionDependency; -import org.graalvm.compiler.truffle.common.TruffleCompilerListener; -import org.graalvm.compiler.truffle.common.TruffleCompilerRuntime; import org.graalvm.compiler.truffle.compiler.TruffleCompilation.TTYToPolyglotLoggerBridge; import org.graalvm.compiler.truffle.compiler.nodes.AnyExtendNode; import org.graalvm.compiler.truffle.compiler.nodes.TruffleAssumption; @@ -99,6 +92,14 @@ import org.graalvm.compiler.truffle.compiler.phases.InstrumentationSuite; import org.graalvm.compiler.truffle.compiler.phases.TruffleTier; +import com.oracle.truffle.compiler.OptimizedAssumptionDependency; +import com.oracle.truffle.compiler.TruffleCompilable; +import com.oracle.truffle.compiler.TruffleCompilationTask; +import com.oracle.truffle.compiler.TruffleCompiler; +import com.oracle.truffle.compiler.TruffleCompilerAssumptionDependency; +import com.oracle.truffle.compiler.TruffleCompilerListener; +import com.oracle.truffle.compiler.TruffleCompilerRuntime; + import jdk.vm.ci.code.BailoutException; import jdk.vm.ci.code.CompilationRequest; import jdk.vm.ci.code.InstalledCode; diff --git a/compiler/src/jdk.internal.vm.compiler/src/org/graalvm/compiler/truffle/compiler/TruffleCompilerOptions.java b/compiler/src/jdk.internal.vm.compiler/src/org/graalvm/compiler/truffle/compiler/TruffleCompilerOptions.java index 2188c7111ab9..e407f7d81981 100644 --- a/compiler/src/jdk.internal.vm.compiler/src/org/graalvm/compiler/truffle/compiler/TruffleCompilerOptions.java +++ b/compiler/src/jdk.internal.vm.compiler/src/org/graalvm/compiler/truffle/compiler/TruffleCompilerOptions.java @@ -39,8 +39,9 @@ import org.graalvm.compiler.options.OptionType; import org.graalvm.compiler.options.OptionValues; import org.graalvm.compiler.options.OptionsParser; -import org.graalvm.compiler.truffle.common.TruffleCompilerOptionDescriptor; -import org.graalvm.compiler.truffle.common.TruffleCompilerOptionDescriptor.Type; + +import com.oracle.truffle.compiler.TruffleCompilerOptionDescriptor; +import com.oracle.truffle.compiler.TruffleCompilerOptionDescriptor.Type; /* * Do not refer to any compiler classes here to guarantee lazy class loading. diff --git a/compiler/src/jdk.internal.vm.compiler/src/org/graalvm/compiler/truffle/compiler/TruffleConstantFieldProvider.java b/compiler/src/jdk.internal.vm.compiler/src/org/graalvm/compiler/truffle/compiler/TruffleConstantFieldProvider.java index 967d45fcaf66..4d2c1d7d280b 100644 --- a/compiler/src/jdk.internal.vm.compiler/src/org/graalvm/compiler/truffle/compiler/TruffleConstantFieldProvider.java +++ b/compiler/src/jdk.internal.vm.compiler/src/org/graalvm/compiler/truffle/compiler/TruffleConstantFieldProvider.java @@ -25,7 +25,8 @@ package org.graalvm.compiler.truffle.compiler; import org.graalvm.compiler.core.common.spi.ConstantFieldProvider; -import org.graalvm.compiler.truffle.common.ConstantFieldInfo; + +import com.oracle.truffle.compiler.ConstantFieldInfo; import jdk.vm.ci.meta.JavaConstant; import jdk.vm.ci.meta.JavaKind; diff --git a/compiler/src/jdk.internal.vm.compiler/src/org/graalvm/compiler/truffle/compiler/TruffleDebugJavaMethod.java b/compiler/src/jdk.internal.vm.compiler/src/org/graalvm/compiler/truffle/compiler/TruffleDebugJavaMethod.java index 90e93c5f5dbd..c834c9b0201d 100644 --- a/compiler/src/jdk.internal.vm.compiler/src/org/graalvm/compiler/truffle/compiler/TruffleDebugJavaMethod.java +++ b/compiler/src/jdk.internal.vm.compiler/src/org/graalvm/compiler/truffle/compiler/TruffleDebugJavaMethod.java @@ -24,8 +24,8 @@ */ package org.graalvm.compiler.truffle.compiler; -import org.graalvm.compiler.truffle.common.TruffleCompilable; -import org.graalvm.compiler.truffle.common.TruffleCompilationTask; +import com.oracle.truffle.compiler.TruffleCompilable; +import com.oracle.truffle.compiler.TruffleCompilationTask; import jdk.vm.ci.meta.JavaKind; import jdk.vm.ci.meta.JavaMethod; diff --git a/compiler/src/jdk.internal.vm.compiler/src/org/graalvm/compiler/truffle/compiler/TruffleTierContext.java b/compiler/src/jdk.internal.vm.compiler/src/org/graalvm/compiler/truffle/compiler/TruffleTierContext.java index dde0bae0ceb7..9eead2621437 100644 --- a/compiler/src/jdk.internal.vm.compiler/src/org/graalvm/compiler/truffle/compiler/TruffleTierContext.java +++ b/compiler/src/jdk.internal.vm.compiler/src/org/graalvm/compiler/truffle/compiler/TruffleTierContext.java @@ -36,11 +36,12 @@ import org.graalvm.compiler.phases.PhaseSuite; import org.graalvm.compiler.phases.tiers.HighTierContext; import org.graalvm.compiler.phases.util.Providers; -import org.graalvm.compiler.truffle.common.TruffleCompilable; -import org.graalvm.compiler.truffle.common.TruffleCompilationTask; -import org.graalvm.compiler.truffle.common.TruffleCompilerRuntime; import org.graalvm.compiler.truffle.compiler.nodes.TruffleAssumption; +import com.oracle.truffle.compiler.TruffleCompilable; +import com.oracle.truffle.compiler.TruffleCompilationTask; +import com.oracle.truffle.compiler.TruffleCompilerRuntime; + import jdk.vm.ci.meta.JavaConstant; import jdk.vm.ci.meta.ResolvedJavaField; import jdk.vm.ci.meta.ResolvedJavaMethod; diff --git a/compiler/src/jdk.internal.vm.compiler/src/org/graalvm/compiler/truffle/compiler/host/HostInliningPhase.java b/compiler/src/jdk.internal.vm.compiler/src/org/graalvm/compiler/truffle/compiler/host/HostInliningPhase.java index ff498e8e47a5..700a6379f297 100644 --- a/compiler/src/jdk.internal.vm.compiler/src/org/graalvm/compiler/truffle/compiler/host/HostInliningPhase.java +++ b/compiler/src/jdk.internal.vm.compiler/src/org/graalvm/compiler/truffle/compiler/host/HostInliningPhase.java @@ -78,11 +78,11 @@ import org.graalvm.compiler.phases.common.inlining.InliningUtil; import org.graalvm.compiler.phases.contract.NodeCostUtil; import org.graalvm.compiler.phases.tiers.HighTierContext; -import org.graalvm.compiler.truffle.common.HostMethodInfo; import org.graalvm.compiler.truffle.compiler.PartialEvaluator; import com.oracle.truffle.api.CompilerDirectives; import com.oracle.truffle.api.CompilerDirectives.TruffleBoundary; +import com.oracle.truffle.compiler.HostMethodInfo; import jdk.vm.ci.meta.JavaTypeProfile; import jdk.vm.ci.meta.ProfilingInfo; diff --git a/compiler/src/jdk.internal.vm.compiler/src/org/graalvm/compiler/truffle/compiler/host/TruffleHostEnvironment.java b/compiler/src/jdk.internal.vm.compiler/src/org/graalvm/compiler/truffle/compiler/host/TruffleHostEnvironment.java index 00c177746769..1b96b1db947e 100644 --- a/compiler/src/jdk.internal.vm.compiler/src/org/graalvm/compiler/truffle/compiler/host/TruffleHostEnvironment.java +++ b/compiler/src/jdk.internal.vm.compiler/src/org/graalvm/compiler/truffle/compiler/host/TruffleHostEnvironment.java @@ -26,12 +26,13 @@ import org.graalvm.compiler.debug.GraalError; import org.graalvm.compiler.serviceprovider.GraalServices; -import org.graalvm.compiler.truffle.common.TruffleCompilable; -import org.graalvm.compiler.truffle.common.HostMethodInfo; -import org.graalvm.compiler.truffle.common.TruffleCompilerRuntime; import org.graalvm.compiler.truffle.compiler.TruffleCompilerConfiguration; import org.graalvm.compiler.truffle.compiler.TruffleCompilerImpl; +import com.oracle.truffle.compiler.HostMethodInfo; +import com.oracle.truffle.compiler.TruffleCompilable; +import com.oracle.truffle.compiler.TruffleCompilerRuntime; + import jdk.vm.ci.meta.JavaKind; import jdk.vm.ci.meta.MetaAccessProvider; import jdk.vm.ci.meta.ResolvedJavaMethod; diff --git a/compiler/src/jdk.internal.vm.compiler/src/org/graalvm/compiler/truffle/compiler/host/TruffleKnownHostTypes.java b/compiler/src/jdk.internal.vm.compiler/src/org/graalvm/compiler/truffle/compiler/host/TruffleKnownHostTypes.java index e1f0121165b0..e4abd6b7ade8 100644 --- a/compiler/src/jdk.internal.vm.compiler/src/org/graalvm/compiler/truffle/compiler/host/TruffleKnownHostTypes.java +++ b/compiler/src/jdk.internal.vm.compiler/src/org/graalvm/compiler/truffle/compiler/host/TruffleKnownHostTypes.java @@ -24,10 +24,11 @@ */ package org.graalvm.compiler.truffle.compiler.host; -import org.graalvm.compiler.truffle.common.TruffleCompilerRuntime; import org.graalvm.compiler.truffle.compiler.AbstractKnownTruffleTypes; import org.graalvm.compiler.truffle.compiler.KnownTruffleTypes; +import com.oracle.truffle.compiler.TruffleCompilerRuntime; + import jdk.vm.ci.meta.MetaAccessProvider; import jdk.vm.ci.meta.ResolvedJavaMethod; import jdk.vm.ci.meta.ResolvedJavaType; diff --git a/compiler/src/jdk.internal.vm.compiler/src/org/graalvm/compiler/truffle/compiler/hotspot/HotSpotKnownTruffleTypes.java b/compiler/src/jdk.internal.vm.compiler/src/org/graalvm/compiler/truffle/compiler/hotspot/HotSpotKnownTruffleTypes.java index ac1ff8c2b752..b9c16f1b937f 100644 --- a/compiler/src/jdk.internal.vm.compiler/src/org/graalvm/compiler/truffle/compiler/hotspot/HotSpotKnownTruffleTypes.java +++ b/compiler/src/jdk.internal.vm.compiler/src/org/graalvm/compiler/truffle/compiler/hotspot/HotSpotKnownTruffleTypes.java @@ -27,9 +27,10 @@ import java.lang.ref.SoftReference; import java.lang.ref.WeakReference; -import org.graalvm.compiler.truffle.common.TruffleCompilerRuntime; import org.graalvm.compiler.truffle.compiler.KnownTruffleTypes; +import com.oracle.truffle.compiler.TruffleCompilerRuntime; + import jdk.vm.ci.meta.ConstantReflectionProvider; import jdk.vm.ci.meta.MetaAccessProvider; import jdk.vm.ci.meta.ResolvedJavaField; diff --git a/compiler/src/jdk.internal.vm.compiler/src/org/graalvm/compiler/truffle/compiler/hotspot/HotSpotPartialEvaluator.java b/compiler/src/jdk.internal.vm.compiler/src/org/graalvm/compiler/truffle/compiler/hotspot/HotSpotPartialEvaluator.java index 8200464817b6..41963f1f8d22 100644 --- a/compiler/src/jdk.internal.vm.compiler/src/org/graalvm/compiler/truffle/compiler/hotspot/HotSpotPartialEvaluator.java +++ b/compiler/src/jdk.internal.vm.compiler/src/org/graalvm/compiler/truffle/compiler/hotspot/HotSpotPartialEvaluator.java @@ -37,12 +37,13 @@ import org.graalvm.compiler.nodes.graphbuilderconf.GraphBuilderConfiguration; import org.graalvm.compiler.nodes.graphbuilderconf.InvocationPlugins; import org.graalvm.compiler.options.OptionValues; -import org.graalvm.compiler.truffle.common.ConstantFieldInfo; -import org.graalvm.compiler.truffle.common.PartialEvaluationMethodInfo; import org.graalvm.compiler.truffle.compiler.PartialEvaluator; import org.graalvm.compiler.truffle.compiler.TruffleCompilerConfiguration; import org.graalvm.compiler.truffle.compiler.TruffleElementCache; +import com.oracle.truffle.compiler.ConstantFieldInfo; +import com.oracle.truffle.compiler.PartialEvaluationMethodInfo; + import jdk.vm.ci.meta.ResolvedJavaField; import jdk.vm.ci.meta.ResolvedJavaMethod; diff --git a/compiler/src/jdk.internal.vm.compiler/src/org/graalvm/compiler/truffle/compiler/hotspot/HotSpotTruffleCompilationIdentifier.java b/compiler/src/jdk.internal.vm.compiler/src/org/graalvm/compiler/truffle/compiler/hotspot/HotSpotTruffleCompilationIdentifier.java index 6542e3cf9bd4..35b7f255e04a 100644 --- a/compiler/src/jdk.internal.vm.compiler/src/org/graalvm/compiler/truffle/compiler/hotspot/HotSpotTruffleCompilationIdentifier.java +++ b/compiler/src/jdk.internal.vm.compiler/src/org/graalvm/compiler/truffle/compiler/hotspot/HotSpotTruffleCompilationIdentifier.java @@ -25,10 +25,11 @@ package org.graalvm.compiler.truffle.compiler.hotspot; import org.graalvm.compiler.hotspot.HotSpotCompilationIdentifier; -import org.graalvm.compiler.truffle.common.TruffleCompilable; -import org.graalvm.compiler.truffle.common.TruffleCompilationTask; import org.graalvm.compiler.truffle.compiler.TruffleCompilationIdentifier; +import com.oracle.truffle.compiler.TruffleCompilable; +import com.oracle.truffle.compiler.TruffleCompilationTask; + import jdk.vm.ci.hotspot.HotSpotCompilationRequest; /** diff --git a/compiler/src/jdk.internal.vm.compiler/src/org/graalvm/compiler/truffle/compiler/hotspot/HotSpotTruffleCompilationSupport.java b/compiler/src/jdk.internal.vm.compiler/src/org/graalvm/compiler/truffle/compiler/hotspot/HotSpotTruffleCompilationSupport.java index 86a7e7a3b80a..2f346e4c7cde 100644 --- a/compiler/src/jdk.internal.vm.compiler/src/org/graalvm/compiler/truffle/compiler/hotspot/HotSpotTruffleCompilationSupport.java +++ b/compiler/src/jdk.internal.vm.compiler/src/org/graalvm/compiler/truffle/compiler/hotspot/HotSpotTruffleCompilationSupport.java @@ -27,11 +27,12 @@ import org.graalvm.compiler.hotspot.CompilerConfigurationFactory; import org.graalvm.compiler.hotspot.HotSpotGraalOptionValues; import org.graalvm.compiler.options.OptionValues; -import org.graalvm.compiler.truffle.common.TruffleCompiler; -import org.graalvm.compiler.truffle.common.TruffleCompilerRuntime; import org.graalvm.compiler.truffle.compiler.AbstractTruffleCompilationSupport; import org.graalvm.compiler.truffle.compiler.hotspot.HotSpotTruffleCompilerImpl.Options; +import com.oracle.truffle.compiler.TruffleCompiler; +import com.oracle.truffle.compiler.TruffleCompilerRuntime; + import jdk.vm.ci.hotspot.HotSpotJVMCIRuntime; public final class HotSpotTruffleCompilationSupport extends AbstractTruffleCompilationSupport { diff --git a/compiler/src/jdk.internal.vm.compiler/src/org/graalvm/compiler/truffle/compiler/hotspot/HotSpotTruffleCompilerImpl.java b/compiler/src/jdk.internal.vm.compiler/src/org/graalvm/compiler/truffle/compiler/hotspot/HotSpotTruffleCompilerImpl.java index 32c7c2d68e89..babb5ea576c9 100644 --- a/compiler/src/jdk.internal.vm.compiler/src/org/graalvm/compiler/truffle/compiler/hotspot/HotSpotTruffleCompilerImpl.java +++ b/compiler/src/jdk.internal.vm.compiler/src/org/graalvm/compiler/truffle/compiler/hotspot/HotSpotTruffleCompilerImpl.java @@ -80,10 +80,6 @@ import org.graalvm.compiler.phases.util.Providers; import org.graalvm.compiler.printer.GraalDebugHandlersFactory; import org.graalvm.compiler.serviceprovider.GraalServices; -import org.graalvm.compiler.truffle.common.TruffleCompilable; -import org.graalvm.compiler.truffle.common.TruffleCompilationTask; -import org.graalvm.compiler.truffle.common.TruffleCompilerRuntime; -import org.graalvm.compiler.truffle.common.hotspot.HotSpotTruffleCompiler; import org.graalvm.compiler.truffle.compiler.PartialEvaluatorConfiguration; import org.graalvm.compiler.truffle.compiler.TruffleCompilationIdentifier; import org.graalvm.compiler.truffle.compiler.TruffleCompilerConfiguration; @@ -92,6 +88,11 @@ import org.graalvm.compiler.truffle.compiler.host.HostInliningPhase; import org.graalvm.compiler.truffle.compiler.host.InjectImmutableFrameFieldsPhase; +import com.oracle.truffle.compiler.TruffleCompilable; +import com.oracle.truffle.compiler.TruffleCompilationTask; +import com.oracle.truffle.compiler.TruffleCompilerRuntime; +import com.oracle.truffle.compiler.hotspot.HotSpotTruffleCompiler; + import jdk.vm.ci.code.CodeCacheProvider; import jdk.vm.ci.code.CompiledCode; import jdk.vm.ci.code.InstalledCode; diff --git a/compiler/src/jdk.internal.vm.compiler/src/org/graalvm/compiler/truffle/compiler/hotspot/HotSpotTruffleHostEnvironment.java b/compiler/src/jdk.internal.vm.compiler/src/org/graalvm/compiler/truffle/compiler/hotspot/HotSpotTruffleHostEnvironment.java index 901c7192755d..e0b050454422 100644 --- a/compiler/src/jdk.internal.vm.compiler/src/org/graalvm/compiler/truffle/compiler/hotspot/HotSpotTruffleHostEnvironment.java +++ b/compiler/src/jdk.internal.vm.compiler/src/org/graalvm/compiler/truffle/compiler/hotspot/HotSpotTruffleHostEnvironment.java @@ -25,13 +25,14 @@ package org.graalvm.compiler.truffle.compiler.hotspot; import org.graalvm.compiler.debug.GraalError; -import org.graalvm.compiler.truffle.common.HostMethodInfo; -import org.graalvm.compiler.truffle.common.TruffleCompilable; -import org.graalvm.compiler.truffle.common.TruffleCompilerRuntime; import org.graalvm.compiler.truffle.compiler.TruffleCompilerImpl; import org.graalvm.compiler.truffle.compiler.TruffleElementCache; import org.graalvm.compiler.truffle.compiler.host.TruffleHostEnvironment; +import com.oracle.truffle.compiler.HostMethodInfo; +import com.oracle.truffle.compiler.TruffleCompilable; +import com.oracle.truffle.compiler.TruffleCompilerRuntime; + import jdk.vm.ci.meta.MetaAccessProvider; import jdk.vm.ci.meta.ResolvedJavaMethod; diff --git a/compiler/src/jdk.internal.vm.compiler/src/org/graalvm/compiler/truffle/compiler/hotspot/HotSpotTruffleHostEnvironmentLookup.java b/compiler/src/jdk.internal.vm.compiler/src/org/graalvm/compiler/truffle/compiler/hotspot/HotSpotTruffleHostEnvironmentLookup.java index dffc8ff1bae6..c4de7b41528e 100644 --- a/compiler/src/jdk.internal.vm.compiler/src/org/graalvm/compiler/truffle/compiler/hotspot/HotSpotTruffleHostEnvironmentLookup.java +++ b/compiler/src/jdk.internal.vm.compiler/src/org/graalvm/compiler/truffle/compiler/hotspot/HotSpotTruffleHostEnvironmentLookup.java @@ -27,9 +27,10 @@ import java.util.concurrent.atomic.AtomicReference; import org.graalvm.compiler.serviceprovider.ServiceProvider; -import org.graalvm.compiler.truffle.common.TruffleCompilerRuntime; import org.graalvm.compiler.truffle.compiler.host.TruffleHostEnvironment; +import com.oracle.truffle.compiler.TruffleCompilerRuntime; + import jdk.vm.ci.hotspot.HotSpotJVMCIRuntime; import jdk.vm.ci.meta.ResolvedJavaType; diff --git a/compiler/src/jdk.internal.vm.compiler/src/org/graalvm/compiler/truffle/compiler/hotspot/TruffleCallBoundaryInstrumentationFactory.java b/compiler/src/jdk.internal.vm.compiler/src/org/graalvm/compiler/truffle/compiler/hotspot/TruffleCallBoundaryInstrumentationFactory.java index 277650982b6e..95a475577e8c 100644 --- a/compiler/src/jdk.internal.vm.compiler/src/org/graalvm/compiler/truffle/compiler/hotspot/TruffleCallBoundaryInstrumentationFactory.java +++ b/compiler/src/jdk.internal.vm.compiler/src/org/graalvm/compiler/truffle/compiler/hotspot/TruffleCallBoundaryInstrumentationFactory.java @@ -30,10 +30,12 @@ import org.graalvm.compiler.lir.asm.EntryPointDecorator; import org.graalvm.compiler.truffle.compiler.TruffleCompilerConfiguration; +import com.oracle.truffle.compiler.TruffleCompilable; + /** * A service for creating a specialized {@link CompilationResultBuilder} used to inject code into * the beginning of a - * {@linkplain HotSpotTruffleCompilerImpl#installTruffleCallBoundaryMethod(jdk.vm.ci.meta.ResolvedJavaMethod, org.graalvm.compiler.truffle.common.TruffleCompilable) + * {@linkplain HotSpotTruffleCompilerImpl#installTruffleCallBoundaryMethod(jdk.vm.ci.meta.ResolvedJavaMethod, TruffleCompilable) * call boundary method}. The injected code tests the {@code entryPoint} field of the * {@code installedCode} field of the receiver and tail calls it if it is non-zero: * diff --git a/compiler/src/jdk.internal.vm.compiler/src/org/graalvm/compiler/truffle/compiler/hotspot/TruffleCommunityCompilerConfiguration.java b/compiler/src/jdk.internal.vm.compiler/src/org/graalvm/compiler/truffle/compiler/hotspot/TruffleCommunityCompilerConfiguration.java index feec26d2c070..b9dd70a07f0d 100644 --- a/compiler/src/jdk.internal.vm.compiler/src/org/graalvm/compiler/truffle/compiler/hotspot/TruffleCommunityCompilerConfiguration.java +++ b/compiler/src/jdk.internal.vm.compiler/src/org/graalvm/compiler/truffle/compiler/hotspot/TruffleCommunityCompilerConfiguration.java @@ -29,11 +29,12 @@ import org.graalvm.compiler.nodes.graphbuilderconf.GraphBuilderConfiguration.Plugins; import org.graalvm.compiler.nodes.spi.Replacements; import org.graalvm.compiler.options.OptionValues; -import org.graalvm.compiler.truffle.common.TruffleCompilerRuntime; import org.graalvm.compiler.truffle.compiler.host.HostInliningPhase; import org.graalvm.compiler.truffle.compiler.host.InjectImmutableFrameFieldsPhase; import org.graalvm.compiler.truffle.compiler.substitutions.TruffleInvocationPlugins; +import com.oracle.truffle.compiler.TruffleCompilerRuntime; + import jdk.vm.ci.code.Architecture; /** diff --git a/compiler/src/jdk.internal.vm.compiler/src/org/graalvm/compiler/truffle/compiler/hotspot/TruffleEntryPointDecorator.java b/compiler/src/jdk.internal.vm.compiler/src/org/graalvm/compiler/truffle/compiler/hotspot/TruffleEntryPointDecorator.java index f8b9b0bcdafd..0f6df4dd438a 100644 --- a/compiler/src/jdk.internal.vm.compiler/src/org/graalvm/compiler/truffle/compiler/hotspot/TruffleEntryPointDecorator.java +++ b/compiler/src/jdk.internal.vm.compiler/src/org/graalvm/compiler/truffle/compiler/hotspot/TruffleEntryPointDecorator.java @@ -39,7 +39,7 @@ /** * Mechanism for injecting special code into - * {@linkplain HotSpotTruffleCompilerImpl#installTruffleCallBoundaryMethod(jdk.vm.ci.meta.ResolvedJavaMethod, org.graalvm.compiler.truffle.common.TruffleCompilable) + * {@linkplain HotSpotTruffleCompilerImpl#installTruffleCallBoundaryMethod(jdk.vm.ci.meta.ResolvedJavaMethod, com.oracle.truffle.compiler.TruffleCompilable) * call boundary methods}. */ public abstract class TruffleEntryPointDecorator implements EntryPointDecorator { diff --git a/compiler/src/jdk.internal.vm.compiler/src/org/graalvm/compiler/truffle/compiler/phases/FrameAccessVerificationPhase.java b/compiler/src/jdk.internal.vm.compiler/src/org/graalvm/compiler/truffle/compiler/phases/FrameAccessVerificationPhase.java index 72770f02b306..181b10b43cf2 100644 --- a/compiler/src/jdk.internal.vm.compiler/src/org/graalvm/compiler/truffle/compiler/phases/FrameAccessVerificationPhase.java +++ b/compiler/src/jdk.internal.vm.compiler/src/org/graalvm/compiler/truffle/compiler/phases/FrameAccessVerificationPhase.java @@ -54,7 +54,6 @@ import org.graalvm.compiler.phases.graph.ReentrantNodeIterator; import org.graalvm.compiler.phases.graph.ReentrantNodeIterator.LoopInfo; import org.graalvm.compiler.phases.graph.ReentrantNodeIterator.NodeIteratorClosure; -import org.graalvm.compiler.truffle.common.TruffleCompilable; import org.graalvm.compiler.truffle.compiler.PerformanceInformationHandler; import org.graalvm.compiler.truffle.compiler.TruffleCompilerOptions.PerformanceWarningKind; import org.graalvm.compiler.truffle.compiler.TruffleTierContext; @@ -64,6 +63,8 @@ import org.graalvm.compiler.truffle.compiler.nodes.frame.VirtualFrameAccessVerificationNode; import org.graalvm.compiler.truffle.compiler.nodes.frame.VirtualFrameSetNode; +import com.oracle.truffle.compiler.TruffleCompilable; + import jdk.vm.ci.meta.DeoptimizationAction; import jdk.vm.ci.meta.DeoptimizationReason; import jdk.vm.ci.meta.SpeculationLog.Speculation; diff --git a/compiler/src/jdk.internal.vm.compiler/src/org/graalvm/compiler/truffle/compiler/phases/InliningAcrossTruffleBoundaryPhase.java b/compiler/src/jdk.internal.vm.compiler/src/org/graalvm/compiler/truffle/compiler/phases/InliningAcrossTruffleBoundaryPhase.java index ca26d908c1d5..65de31ee72aa 100644 --- a/compiler/src/jdk.internal.vm.compiler/src/org/graalvm/compiler/truffle/compiler/phases/InliningAcrossTruffleBoundaryPhase.java +++ b/compiler/src/jdk.internal.vm.compiler/src/org/graalvm/compiler/truffle/compiler/phases/InliningAcrossTruffleBoundaryPhase.java @@ -27,9 +27,10 @@ import org.graalvm.compiler.nodes.StructuredGraph; import org.graalvm.compiler.nodes.java.MethodCallTargetNode; import org.graalvm.compiler.phases.BasePhase; -import org.graalvm.compiler.truffle.common.TruffleCompilerRuntime; import org.graalvm.compiler.truffle.compiler.TruffleTierContext; +import com.oracle.truffle.compiler.TruffleCompilerRuntime; + public final class InliningAcrossTruffleBoundaryPhase extends BasePhase { @Override protected void run(StructuredGraph graph, TruffleTierContext context) { diff --git a/compiler/src/jdk.internal.vm.compiler/src/org/graalvm/compiler/truffle/compiler/phases/InstrumentTruffleBoundariesPhase.java b/compiler/src/jdk.internal.vm.compiler/src/org/graalvm/compiler/truffle/compiler/phases/InstrumentTruffleBoundariesPhase.java index e1a13d2b95d5..76e9c74376db 100644 --- a/compiler/src/jdk.internal.vm.compiler/src/org/graalvm/compiler/truffle/compiler/phases/InstrumentTruffleBoundariesPhase.java +++ b/compiler/src/jdk.internal.vm.compiler/src/org/graalvm/compiler/truffle/compiler/phases/InstrumentTruffleBoundariesPhase.java @@ -31,9 +31,10 @@ import org.graalvm.compiler.nodes.FixedWithNextNode; import org.graalvm.compiler.nodes.Invoke; import org.graalvm.compiler.nodes.StructuredGraph; -import org.graalvm.compiler.truffle.common.TruffleCompilerRuntime.InlineKind; import org.graalvm.compiler.truffle.compiler.TruffleTierContext; +import com.oracle.truffle.compiler.TruffleCompilerRuntime.InlineKind; + import jdk.vm.ci.meta.JavaConstant; /** diff --git a/compiler/src/jdk.internal.vm.compiler/src/org/graalvm/compiler/truffle/compiler/phases/SetIdentityForValueTypesPhase.java b/compiler/src/jdk.internal.vm.compiler/src/org/graalvm/compiler/truffle/compiler/phases/SetIdentityForValueTypesPhase.java index 50dc54cee7e1..faa762d36a8a 100644 --- a/compiler/src/jdk.internal.vm.compiler/src/org/graalvm/compiler/truffle/compiler/phases/SetIdentityForValueTypesPhase.java +++ b/compiler/src/jdk.internal.vm.compiler/src/org/graalvm/compiler/truffle/compiler/phases/SetIdentityForValueTypesPhase.java @@ -28,9 +28,10 @@ import org.graalvm.compiler.nodes.virtual.VirtualInstanceNode; import org.graalvm.compiler.nodes.virtual.VirtualObjectNode; import org.graalvm.compiler.phases.BasePhase; -import org.graalvm.compiler.truffle.common.TruffleCompilerRuntime; import org.graalvm.compiler.truffle.compiler.TruffleTierContext; +import com.oracle.truffle.compiler.TruffleCompilerRuntime; + import jdk.vm.ci.meta.ResolvedJavaType; public final class SetIdentityForValueTypesPhase extends BasePhase { diff --git a/compiler/src/jdk.internal.vm.compiler/src/org/graalvm/compiler/truffle/compiler/phases/inlining/CallNode.java b/compiler/src/jdk.internal.vm.compiler/src/org/graalvm/compiler/truffle/compiler/phases/inlining/CallNode.java index d8408770e79e..e37c852c0b58 100644 --- a/compiler/src/jdk.internal.vm.compiler/src/org/graalvm/compiler/truffle/compiler/phases/inlining/CallNode.java +++ b/compiler/src/jdk.internal.vm.compiler/src/org/graalvm/compiler/truffle/compiler/phases/inlining/CallNode.java @@ -48,10 +48,12 @@ import org.graalvm.compiler.phases.common.inlining.InliningUtil; import org.graalvm.compiler.phases.common.inlining.InliningUtil.InlineeReturnAction; import org.graalvm.compiler.phases.contract.NodeCostUtil; -import org.graalvm.compiler.truffle.common.TruffleCompilable; -import org.graalvm.compiler.truffle.common.TruffleCompilationTask; import org.graalvm.compiler.truffle.compiler.PerformanceInformationHandler; import org.graalvm.compiler.truffle.compiler.TruffleCompilerOptions.PerformanceWarningKind; + +import com.oracle.truffle.compiler.TruffleCompilable; +import com.oracle.truffle.compiler.TruffleCompilationTask; + import org.graalvm.compiler.truffle.compiler.TruffleTierContext; import jdk.vm.ci.meta.JavaConstant; diff --git a/compiler/src/jdk.internal.vm.compiler/src/org/graalvm/compiler/truffle/compiler/phases/inlining/CallTree.java b/compiler/src/jdk.internal.vm.compiler/src/org/graalvm/compiler/truffle/compiler/phases/inlining/CallTree.java index 46f050f24ac9..03dcba628f3c 100644 --- a/compiler/src/jdk.internal.vm.compiler/src/org/graalvm/compiler/truffle/compiler/phases/inlining/CallTree.java +++ b/compiler/src/jdk.internal.vm.compiler/src/org/graalvm/compiler/truffle/compiler/phases/inlining/CallTree.java @@ -26,13 +26,14 @@ import org.graalvm.compiler.debug.DebugContext; import org.graalvm.compiler.graph.Graph; -import org.graalvm.compiler.truffle.common.TruffleCompilationTask; -import org.graalvm.compiler.truffle.common.TruffleCompilerRuntime; import org.graalvm.compiler.truffle.compiler.PartialEvaluator; import org.graalvm.compiler.truffle.compiler.PostPartialEvaluationSuite; import org.graalvm.compiler.truffle.compiler.TruffleCompilerOptions; import org.graalvm.compiler.truffle.compiler.TruffleTierContext; +import com.oracle.truffle.compiler.TruffleCompilationTask; +import com.oracle.truffle.compiler.TruffleCompilerRuntime; + public final class CallTree extends Graph { private final InliningPolicy policy; diff --git a/compiler/src/jdk.internal.vm.compiler/src/org/graalvm/compiler/truffle/compiler/phases/inlining/GraphManager.java b/compiler/src/jdk.internal.vm.compiler/src/org/graalvm/compiler/truffle/compiler/phases/inlining/GraphManager.java index 8792bb107ba3..979d0aa40f3e 100644 --- a/compiler/src/jdk.internal.vm.compiler/src/org/graalvm/compiler/truffle/compiler/phases/inlining/GraphManager.java +++ b/compiler/src/jdk.internal.vm.compiler/src/org/graalvm/compiler/truffle/compiler/phases/inlining/GraphManager.java @@ -42,7 +42,6 @@ import org.graalvm.compiler.nodes.graphbuilderconf.InlineInvokePlugin; import org.graalvm.compiler.phases.common.inlining.InliningUtil; import org.graalvm.compiler.phases.contract.NodeCostUtil; -import org.graalvm.compiler.truffle.common.TruffleCompilable; import org.graalvm.compiler.truffle.compiler.PEAgnosticInlineInvokePlugin; import org.graalvm.compiler.truffle.compiler.PartialEvaluator; import org.graalvm.compiler.truffle.compiler.PostPartialEvaluationSuite; @@ -51,6 +50,8 @@ import org.graalvm.compiler.truffle.compiler.TruffleTierContext; import org.graalvm.compiler.truffle.compiler.nodes.TruffleAssumption; +import com.oracle.truffle.compiler.TruffleCompilable; + import jdk.vm.ci.meta.ResolvedJavaMethod; final class GraphManager { diff --git a/compiler/src/jdk.internal.vm.compiler/src/org/graalvm/compiler/truffle/compiler/substitutions/TruffleGraphBuilderPlugins.java b/compiler/src/jdk.internal.vm.compiler/src/org/graalvm/compiler/truffle/compiler/substitutions/TruffleGraphBuilderPlugins.java index f76f4ff26e6f..d69b9cf9cdbf 100644 --- a/compiler/src/jdk.internal.vm.compiler/src/org/graalvm/compiler/truffle/compiler/substitutions/TruffleGraphBuilderPlugins.java +++ b/compiler/src/jdk.internal.vm.compiler/src/org/graalvm/compiler/truffle/compiler/substitutions/TruffleGraphBuilderPlugins.java @@ -97,7 +97,6 @@ import org.graalvm.compiler.phases.util.Providers; import org.graalvm.compiler.replacements.nodes.arithmetic.UnsignedMulHighNode; import org.graalvm.compiler.serviceprovider.SpeculationReasonGroup; -import org.graalvm.compiler.truffle.common.TruffleCompilationTask; import org.graalvm.compiler.truffle.compiler.KnownTruffleTypes; import org.graalvm.compiler.truffle.compiler.PerformanceInformationHandler; import org.graalvm.compiler.truffle.compiler.TruffleCompilation; @@ -123,6 +122,8 @@ import org.graalvm.compiler.truffle.compiler.phases.TruffleSafepointInsertionPhase; import org.graalvm.word.LocationIdentity; +import com.oracle.truffle.compiler.TruffleCompilationTask; + import jdk.vm.ci.code.BailoutException; import jdk.vm.ci.meta.ConstantReflectionProvider; import jdk.vm.ci.meta.DeoptimizationAction; diff --git a/compiler/src/jdk.internal.vm.compiler/src/org/graalvm/libgraal/jni/FromLibGraalCalls.java b/compiler/src/jdk.internal.vm.compiler/src/org/graalvm/libgraal/jni/FromLibGraalCalls.java index a6dd341d8e6c..eace6e35e641 100644 --- a/compiler/src/jdk.internal.vm.compiler/src/org/graalvm/libgraal/jni/FromLibGraalCalls.java +++ b/compiler/src/jdk.internal.vm.compiler/src/org/graalvm/libgraal/jni/FromLibGraalCalls.java @@ -35,7 +35,6 @@ import java.util.concurrent.ConcurrentHashMap; import java.util.function.Function; -import org.graalvm.compiler.truffle.common.hotspot.libgraal.FromLibGraalId; import org.graalvm.jniutils.JNI; import org.graalvm.jniutils.JNI.JClass; import org.graalvm.jniutils.JNI.JMethodID; @@ -46,6 +45,8 @@ import org.graalvm.jniutils.JNIUtil; import org.graalvm.nativeimage.c.type.CTypeConversion.CCharPointerHolder; +import com.oracle.truffle.compiler.hotspot.libgraal.FromLibGraalId; + /** * Helpers for calling methods in HotSpot heap via JNI. */ diff --git a/compiler/src/org.graalvm.compiler.truffle.compiler.hotspot.libgraal/src/org/graalvm/compiler/truffle/compiler/hotspot/libgraal/HSTruffleCompilable.java b/compiler/src/org.graalvm.compiler.truffle.compiler.hotspot.libgraal/src/org/graalvm/compiler/truffle/compiler/hotspot/libgraal/HSTruffleCompilable.java index f445e7ca316a..c5b5ef705dfa 100644 --- a/compiler/src/org.graalvm.compiler.truffle.compiler.hotspot.libgraal/src/org/graalvm/compiler/truffle/compiler/hotspot/libgraal/HSTruffleCompilable.java +++ b/compiler/src/org.graalvm.compiler.truffle.compiler.hotspot.libgraal/src/org/graalvm/compiler/truffle/compiler/hotspot/libgraal/HSTruffleCompilable.java @@ -24,18 +24,18 @@ */ package org.graalvm.compiler.truffle.compiler.hotspot.libgraal; -import static org.graalvm.compiler.truffle.common.hotspot.libgraal.TruffleFromLibGraal.Id.AsJavaConstant; -import static org.graalvm.compiler.truffle.common.hotspot.libgraal.TruffleFromLibGraal.Id.CancelCompilation; -import static org.graalvm.compiler.truffle.common.hotspot.libgraal.TruffleFromLibGraal.Id.CompilableToString; -import static org.graalvm.compiler.truffle.common.hotspot.libgraal.TruffleFromLibGraal.Id.CreateStringSupplier; -import static org.graalvm.compiler.truffle.common.hotspot.libgraal.TruffleFromLibGraal.Id.GetCompilableCallCount; -import static org.graalvm.compiler.truffle.common.hotspot.libgraal.TruffleFromLibGraal.Id.GetCompilableName; -import static org.graalvm.compiler.truffle.common.hotspot.libgraal.TruffleFromLibGraal.Id.GetFailedSpeculationsAddress; -import static org.graalvm.compiler.truffle.common.hotspot.libgraal.TruffleFromLibGraal.Id.GetKnownCallSiteCount; -import static org.graalvm.compiler.truffle.common.hotspot.libgraal.TruffleFromLibGraal.Id.GetNonTrivialNodeCount; -import static org.graalvm.compiler.truffle.common.hotspot.libgraal.TruffleFromLibGraal.Id.IsSameOrSplit; -import static org.graalvm.compiler.truffle.common.hotspot.libgraal.TruffleFromLibGraal.Id.IsTrivial; -import static org.graalvm.compiler.truffle.common.hotspot.libgraal.TruffleFromLibGraal.Id.OnCompilationFailed; +import static com.oracle.truffle.compiler.hotspot.libgraal.TruffleFromLibGraal.Id.AsJavaConstant; +import static com.oracle.truffle.compiler.hotspot.libgraal.TruffleFromLibGraal.Id.CancelCompilation; +import static com.oracle.truffle.compiler.hotspot.libgraal.TruffleFromLibGraal.Id.CompilableToString; +import static com.oracle.truffle.compiler.hotspot.libgraal.TruffleFromLibGraal.Id.CreateStringSupplier; +import static com.oracle.truffle.compiler.hotspot.libgraal.TruffleFromLibGraal.Id.GetCompilableCallCount; +import static com.oracle.truffle.compiler.hotspot.libgraal.TruffleFromLibGraal.Id.GetCompilableName; +import static com.oracle.truffle.compiler.hotspot.libgraal.TruffleFromLibGraal.Id.GetFailedSpeculationsAddress; +import static com.oracle.truffle.compiler.hotspot.libgraal.TruffleFromLibGraal.Id.GetKnownCallSiteCount; +import static com.oracle.truffle.compiler.hotspot.libgraal.TruffleFromLibGraal.Id.GetNonTrivialNodeCount; +import static com.oracle.truffle.compiler.hotspot.libgraal.TruffleFromLibGraal.Id.IsSameOrSplit; +import static com.oracle.truffle.compiler.hotspot.libgraal.TruffleFromLibGraal.Id.IsTrivial; +import static com.oracle.truffle.compiler.hotspot.libgraal.TruffleFromLibGraal.Id.OnCompilationFailed; import static org.graalvm.compiler.truffle.compiler.hotspot.libgraal.HSTruffleCompilableGen.callAsJavaConstant; import static org.graalvm.compiler.truffle.compiler.hotspot.libgraal.HSTruffleCompilableGen.callCancelCompilation; import static org.graalvm.compiler.truffle.compiler.hotspot.libgraal.HSTruffleCompilableGen.callCompilableToString; @@ -59,9 +59,6 @@ import org.graalvm.compiler.debug.GraalError; import org.graalvm.compiler.hotspot.HotSpotGraalServices; -import org.graalvm.compiler.truffle.common.TruffleCompilable; -import org.graalvm.compiler.truffle.common.hotspot.libgraal.TruffleFromLibGraal; -import org.graalvm.compiler.truffle.common.hotspot.libgraal.TruffleFromLibGraal.Id; import org.graalvm.jniutils.HSObject; import org.graalvm.jniutils.JNI; import org.graalvm.jniutils.JNI.JNIEnv; @@ -71,6 +68,10 @@ import org.graalvm.jniutils.JNIUtil; import org.graalvm.nativebridge.BinaryInput; +import com.oracle.truffle.compiler.TruffleCompilable; +import com.oracle.truffle.compiler.hotspot.libgraal.TruffleFromLibGraal; +import com.oracle.truffle.compiler.hotspot.libgraal.TruffleFromLibGraal.Id; + import jdk.vm.ci.meta.JavaConstant; import jdk.vm.ci.meta.SpeculationLog; diff --git a/compiler/src/org.graalvm.compiler.truffle.compiler.hotspot.libgraal/src/org/graalvm/compiler/truffle/compiler/hotspot/libgraal/HSTruffleCompilationTask.java b/compiler/src/org.graalvm.compiler.truffle.compiler.hotspot.libgraal/src/org/graalvm/compiler/truffle/compiler/hotspot/libgraal/HSTruffleCompilationTask.java index a47f1ca2b1bd..546f366196e3 100644 --- a/compiler/src/org.graalvm.compiler.truffle.compiler.hotspot.libgraal/src/org/graalvm/compiler/truffle/compiler/hotspot/libgraal/HSTruffleCompilationTask.java +++ b/compiler/src/org.graalvm.compiler.truffle.compiler.hotspot.libgraal/src/org/graalvm/compiler/truffle/compiler/hotspot/libgraal/HSTruffleCompilationTask.java @@ -24,21 +24,21 @@ */ package org.graalvm.compiler.truffle.compiler.hotspot.libgraal; -import static org.graalvm.compiler.truffle.common.hotspot.libgraal.TruffleFromLibGraal.Id.AddInlinedTarget; -import static org.graalvm.compiler.truffle.common.hotspot.libgraal.TruffleFromLibGraal.Id.AddTargetToDequeue; -import static org.graalvm.compiler.truffle.common.hotspot.libgraal.TruffleFromLibGraal.Id.GetDescription; -import static org.graalvm.compiler.truffle.common.hotspot.libgraal.TruffleFromLibGraal.Id.GetLanguage; -import static org.graalvm.compiler.truffle.common.hotspot.libgraal.TruffleFromLibGraal.Id.GetLineNumber; -import static org.graalvm.compiler.truffle.common.hotspot.libgraal.TruffleFromLibGraal.Id.GetNodeClassName; -import static org.graalvm.compiler.truffle.common.hotspot.libgraal.TruffleFromLibGraal.Id.GetNodeId; -import static org.graalvm.compiler.truffle.common.hotspot.libgraal.TruffleFromLibGraal.Id.GetOffsetEnd; -import static org.graalvm.compiler.truffle.common.hotspot.libgraal.TruffleFromLibGraal.Id.GetOffsetStart; -import static org.graalvm.compiler.truffle.common.hotspot.libgraal.TruffleFromLibGraal.Id.GetPosition; -import static org.graalvm.compiler.truffle.common.hotspot.libgraal.TruffleFromLibGraal.Id.GetURI; -import static org.graalvm.compiler.truffle.common.hotspot.libgraal.TruffleFromLibGraal.Id.HasNextTier; -import static org.graalvm.compiler.truffle.common.hotspot.libgraal.TruffleFromLibGraal.Id.IsCancelled; -import static org.graalvm.compiler.truffle.common.hotspot.libgraal.TruffleFromLibGraal.Id.IsLastTier; -import static org.graalvm.compiler.truffle.common.hotspot.libgraal.TruffleFromLibGraal.Id.SetCallCounts; +import static com.oracle.truffle.compiler.hotspot.libgraal.TruffleFromLibGraal.Id.AddInlinedTarget; +import static com.oracle.truffle.compiler.hotspot.libgraal.TruffleFromLibGraal.Id.AddTargetToDequeue; +import static com.oracle.truffle.compiler.hotspot.libgraal.TruffleFromLibGraal.Id.GetDescription; +import static com.oracle.truffle.compiler.hotspot.libgraal.TruffleFromLibGraal.Id.GetLanguage; +import static com.oracle.truffle.compiler.hotspot.libgraal.TruffleFromLibGraal.Id.GetLineNumber; +import static com.oracle.truffle.compiler.hotspot.libgraal.TruffleFromLibGraal.Id.GetNodeClassName; +import static com.oracle.truffle.compiler.hotspot.libgraal.TruffleFromLibGraal.Id.GetNodeId; +import static com.oracle.truffle.compiler.hotspot.libgraal.TruffleFromLibGraal.Id.GetOffsetEnd; +import static com.oracle.truffle.compiler.hotspot.libgraal.TruffleFromLibGraal.Id.GetOffsetStart; +import static com.oracle.truffle.compiler.hotspot.libgraal.TruffleFromLibGraal.Id.GetPosition; +import static com.oracle.truffle.compiler.hotspot.libgraal.TruffleFromLibGraal.Id.GetURI; +import static com.oracle.truffle.compiler.hotspot.libgraal.TruffleFromLibGraal.Id.HasNextTier; +import static com.oracle.truffle.compiler.hotspot.libgraal.TruffleFromLibGraal.Id.IsCancelled; +import static com.oracle.truffle.compiler.hotspot.libgraal.TruffleFromLibGraal.Id.IsLastTier; +import static com.oracle.truffle.compiler.hotspot.libgraal.TruffleFromLibGraal.Id.SetCallCounts; import static org.graalvm.compiler.truffle.compiler.hotspot.libgraal.HSTruffleCompilationTaskGen.callAddInlinedTarget; import static org.graalvm.compiler.truffle.compiler.hotspot.libgraal.HSTruffleCompilationTaskGen.callAddTargetToDequeue; import static org.graalvm.compiler.truffle.compiler.hotspot.libgraal.HSTruffleCompilationTaskGen.callGetDebugProperties; @@ -62,11 +62,6 @@ import java.util.LinkedHashMap; import java.util.Map; -import org.graalvm.compiler.truffle.common.TruffleCompilable; -import org.graalvm.compiler.truffle.common.TruffleCompilationTask; -import org.graalvm.compiler.truffle.common.TruffleSourceLanguagePosition; -import org.graalvm.compiler.truffle.common.hotspot.libgraal.TruffleFromLibGraal; -import org.graalvm.compiler.truffle.common.hotspot.libgraal.TruffleFromLibGraal.Id; import org.graalvm.jniutils.HSObject; import org.graalvm.jniutils.JNI; import org.graalvm.jniutils.JNI.JNIEnv; @@ -76,6 +71,12 @@ import org.graalvm.jniutils.JNIUtil; import org.graalvm.nativebridge.BinaryInput; +import com.oracle.truffle.compiler.TruffleCompilable; +import com.oracle.truffle.compiler.TruffleCompilationTask; +import com.oracle.truffle.compiler.TruffleSourceLanguagePosition; +import com.oracle.truffle.compiler.hotspot.libgraal.TruffleFromLibGraal; +import com.oracle.truffle.compiler.hotspot.libgraal.TruffleFromLibGraal.Id; + import jdk.vm.ci.meta.JavaConstant; /** diff --git a/compiler/src/org.graalvm.compiler.truffle.compiler.hotspot.libgraal/src/org/graalvm/compiler/truffle/compiler/hotspot/libgraal/HSTruffleCompilerListener.java b/compiler/src/org.graalvm.compiler.truffle.compiler.hotspot.libgraal/src/org/graalvm/compiler/truffle/compiler/hotspot/libgraal/HSTruffleCompilerListener.java index 9a3fc96d0d08..9b1bad20dcbf 100644 --- a/compiler/src/org.graalvm.compiler.truffle.compiler.hotspot.libgraal/src/org/graalvm/compiler/truffle/compiler/hotspot/libgraal/HSTruffleCompilerListener.java +++ b/compiler/src/org.graalvm.compiler.truffle.compiler.hotspot.libgraal/src/org/graalvm/compiler/truffle/compiler/hotspot/libgraal/HSTruffleCompilerListener.java @@ -24,11 +24,11 @@ */ package org.graalvm.compiler.truffle.compiler.hotspot.libgraal; -import static org.graalvm.compiler.truffle.common.hotspot.libgraal.TruffleFromLibGraal.Id.OnCompilationRetry; -import static org.graalvm.compiler.truffle.common.hotspot.libgraal.TruffleFromLibGraal.Id.OnFailure; -import static org.graalvm.compiler.truffle.common.hotspot.libgraal.TruffleFromLibGraal.Id.OnGraalTierFinished; -import static org.graalvm.compiler.truffle.common.hotspot.libgraal.TruffleFromLibGraal.Id.OnSuccess; -import static org.graalvm.compiler.truffle.common.hotspot.libgraal.TruffleFromLibGraal.Id.OnTruffleTierFinished; +import static com.oracle.truffle.compiler.hotspot.libgraal.TruffleFromLibGraal.Id.OnCompilationRetry; +import static com.oracle.truffle.compiler.hotspot.libgraal.TruffleFromLibGraal.Id.OnFailure; +import static com.oracle.truffle.compiler.hotspot.libgraal.TruffleFromLibGraal.Id.OnGraalTierFinished; +import static com.oracle.truffle.compiler.hotspot.libgraal.TruffleFromLibGraal.Id.OnSuccess; +import static com.oracle.truffle.compiler.hotspot.libgraal.TruffleFromLibGraal.Id.OnTruffleTierFinished; import static org.graalvm.compiler.truffle.compiler.hotspot.libgraal.HSTruffleCompilerListenerGen.callOnCompilationRetry; import static org.graalvm.compiler.truffle.compiler.hotspot.libgraal.HSTruffleCompilerListenerGen.callOnFailure; import static org.graalvm.compiler.truffle.compiler.hotspot.libgraal.HSTruffleCompilerListenerGen.callOnGraalTierFinished; @@ -38,14 +38,16 @@ import java.io.Closeable; -import org.graalvm.compiler.truffle.common.TruffleCompilable; -import org.graalvm.compiler.truffle.common.TruffleCompilationTask; -import org.graalvm.compiler.truffle.common.TruffleCompilerListener; -import org.graalvm.compiler.truffle.common.hotspot.libgraal.TruffleFromLibGraal; import org.graalvm.jniutils.HSObject; import org.graalvm.jniutils.JNI.JNIEnv; import org.graalvm.jniutils.JNI.JObject; import org.graalvm.jniutils.JNI.JString; + +import com.oracle.truffle.compiler.TruffleCompilable; +import com.oracle.truffle.compiler.TruffleCompilationTask; +import com.oracle.truffle.compiler.TruffleCompilerListener; +import com.oracle.truffle.compiler.hotspot.libgraal.TruffleFromLibGraal; + import org.graalvm.jniutils.JNIMethodScope; /** diff --git a/compiler/src/org.graalvm.compiler.truffle.compiler.hotspot.libgraal/src/org/graalvm/compiler/truffle/compiler/hotspot/libgraal/HSTruffleCompilerRuntime.java b/compiler/src/org.graalvm.compiler.truffle.compiler.hotspot.libgraal/src/org/graalvm/compiler/truffle/compiler/hotspot/libgraal/HSTruffleCompilerRuntime.java index 72f1fe5f63c2..be05c0994247 100644 --- a/compiler/src/org.graalvm.compiler.truffle.compiler.hotspot.libgraal/src/org/graalvm/compiler/truffle/compiler/hotspot/libgraal/HSTruffleCompilerRuntime.java +++ b/compiler/src/org.graalvm.compiler.truffle.compiler.hotspot.libgraal/src/org/graalvm/compiler/truffle/compiler/hotspot/libgraal/HSTruffleCompilerRuntime.java @@ -24,16 +24,16 @@ */ package org.graalvm.compiler.truffle.compiler.hotspot.libgraal; +import static com.oracle.truffle.compiler.hotspot.libgraal.TruffleFromLibGraal.Id.ConsumeOptimizedAssumptionDependency; +import static com.oracle.truffle.compiler.hotspot.libgraal.TruffleFromLibGraal.Id.CreateStringSupplier; +import static com.oracle.truffle.compiler.hotspot.libgraal.TruffleFromLibGraal.Id.GetConstantFieldInfo; +import static com.oracle.truffle.compiler.hotspot.libgraal.TruffleFromLibGraal.Id.GetPartialEvaluationMethodInfo; +import static com.oracle.truffle.compiler.hotspot.libgraal.TruffleFromLibGraal.Id.IsSuppressedFailure; +import static com.oracle.truffle.compiler.hotspot.libgraal.TruffleFromLibGraal.Id.IsValueType; +import static com.oracle.truffle.compiler.hotspot.libgraal.TruffleFromLibGraal.Id.Log; +import static com.oracle.truffle.compiler.hotspot.libgraal.TruffleFromLibGraal.Id.OnCodeInstallation; +import static com.oracle.truffle.compiler.hotspot.libgraal.TruffleFromLibGraal.Id.RegisterOptimizedAssumptionDependency; import static jdk.vm.ci.hotspot.HotSpotJVMCIRuntime.runtime; -import static org.graalvm.compiler.truffle.common.hotspot.libgraal.TruffleFromLibGraal.Id.ConsumeOptimizedAssumptionDependency; -import static org.graalvm.compiler.truffle.common.hotspot.libgraal.TruffleFromLibGraal.Id.CreateStringSupplier; -import static org.graalvm.compiler.truffle.common.hotspot.libgraal.TruffleFromLibGraal.Id.GetConstantFieldInfo; -import static org.graalvm.compiler.truffle.common.hotspot.libgraal.TruffleFromLibGraal.Id.GetPartialEvaluationMethodInfo; -import static org.graalvm.compiler.truffle.common.hotspot.libgraal.TruffleFromLibGraal.Id.IsSuppressedFailure; -import static org.graalvm.compiler.truffle.common.hotspot.libgraal.TruffleFromLibGraal.Id.IsValueType; -import static org.graalvm.compiler.truffle.common.hotspot.libgraal.TruffleFromLibGraal.Id.Log; -import static org.graalvm.compiler.truffle.common.hotspot.libgraal.TruffleFromLibGraal.Id.OnCodeInstallation; -import static org.graalvm.compiler.truffle.common.hotspot.libgraal.TruffleFromLibGraal.Id.RegisterOptimizedAssumptionDependency; import static org.graalvm.compiler.truffle.compiler.hotspot.libgraal.HSTruffleCompilerRuntimeGen.callConsumeOptimizedAssumptionDependency; import static org.graalvm.compiler.truffle.compiler.hotspot.libgraal.HSTruffleCompilerRuntimeGen.callCreateStringSupplier; import static org.graalvm.compiler.truffle.compiler.hotspot.libgraal.HSTruffleCompilerRuntimeGen.callGetConstantFieldInfo; @@ -50,16 +50,6 @@ import java.util.function.Consumer; import java.util.function.Supplier; -import org.graalvm.compiler.truffle.common.ConstantFieldInfo; -import org.graalvm.compiler.truffle.common.HostMethodInfo; -import org.graalvm.compiler.truffle.common.OptimizedAssumptionDependency; -import org.graalvm.compiler.truffle.common.PartialEvaluationMethodInfo; -import org.graalvm.compiler.truffle.common.TruffleCompilable; -import org.graalvm.compiler.truffle.common.TruffleCompilerAssumptionDependency; -import org.graalvm.compiler.truffle.common.TruffleCompilerRuntime; -import org.graalvm.compiler.truffle.common.hotspot.libgraal.FromLibGraalEntryPointsResolver; -import org.graalvm.compiler.truffle.common.hotspot.libgraal.TruffleFromLibGraal; -import org.graalvm.compiler.truffle.common.hotspot.libgraal.TruffleFromLibGraal.Id; import org.graalvm.jniutils.HSObject; import org.graalvm.jniutils.JNI.JByteArray; import org.graalvm.jniutils.JNI.JNIEnv; @@ -72,6 +62,17 @@ import org.graalvm.nativeimage.c.type.CCharPointer; import org.graalvm.word.WordFactory; +import com.oracle.truffle.compiler.ConstantFieldInfo; +import com.oracle.truffle.compiler.HostMethodInfo; +import com.oracle.truffle.compiler.OptimizedAssumptionDependency; +import com.oracle.truffle.compiler.PartialEvaluationMethodInfo; +import com.oracle.truffle.compiler.TruffleCompilable; +import com.oracle.truffle.compiler.TruffleCompilerAssumptionDependency; +import com.oracle.truffle.compiler.TruffleCompilerRuntime; +import com.oracle.truffle.compiler.hotspot.libgraal.FromLibGraalEntryPointsResolver; +import com.oracle.truffle.compiler.hotspot.libgraal.TruffleFromLibGraal; +import com.oracle.truffle.compiler.hotspot.libgraal.TruffleFromLibGraal.Id; + import jdk.vm.ci.code.InstalledCode; import jdk.vm.ci.hotspot.HotSpotObjectConstant; import jdk.vm.ci.hotspot.HotSpotResolvedObjectType; diff --git a/compiler/src/org.graalvm.compiler.truffle.compiler.hotspot.libgraal/src/org/graalvm/compiler/truffle/compiler/hotspot/libgraal/LibGraalObjectHandles.java b/compiler/src/org.graalvm.compiler.truffle.compiler.hotspot.libgraal/src/org/graalvm/compiler/truffle/compiler/hotspot/libgraal/LibGraalObjectHandles.java index 15ea6afe8fb9..1d1a93563955 100644 --- a/compiler/src/org.graalvm.compiler.truffle.compiler.hotspot.libgraal/src/org/graalvm/compiler/truffle/compiler/hotspot/libgraal/LibGraalObjectHandles.java +++ b/compiler/src/org.graalvm.compiler.truffle.compiler.hotspot.libgraal/src/org/graalvm/compiler/truffle/compiler/hotspot/libgraal/LibGraalObjectHandles.java @@ -29,8 +29,7 @@ /** * Manages handles to libgraal objects whose lifetime is controlled by - * {@code org.graalvm.compiler.truffle.runtime.hotspot.libgraal.LibGraalObject} instances in the - * HotSpot heap. + * {@code com.oracle.truffle.runtime.hotspot.libgraal.LibGraalObject} instances in the HotSpot heap. */ final class LibGraalObjectHandles { diff --git a/compiler/src/org.graalvm.compiler.truffle.compiler.hotspot.libgraal/src/org/graalvm/compiler/truffle/compiler/hotspot/libgraal/LibGraalTruffleHostEnvironment.java b/compiler/src/org.graalvm.compiler.truffle.compiler.hotspot.libgraal/src/org/graalvm/compiler/truffle/compiler/hotspot/libgraal/LibGraalTruffleHostEnvironment.java index 3d1d859fbc20..827199ffe098 100644 --- a/compiler/src/org.graalvm.compiler.truffle.compiler.hotspot.libgraal/src/org/graalvm/compiler/truffle/compiler/hotspot/libgraal/LibGraalTruffleHostEnvironment.java +++ b/compiler/src/org.graalvm.compiler.truffle.compiler.hotspot.libgraal/src/org/graalvm/compiler/truffle/compiler/hotspot/libgraal/LibGraalTruffleHostEnvironment.java @@ -25,14 +25,15 @@ package org.graalvm.compiler.truffle.compiler.hotspot.libgraal; import org.graalvm.compiler.core.common.util.MethodKey; -import org.graalvm.compiler.truffle.common.TruffleCompilable; -import org.graalvm.compiler.truffle.common.HostMethodInfo; -import org.graalvm.compiler.truffle.common.TruffleCompilerRuntime; import org.graalvm.compiler.truffle.compiler.TruffleCompilerImpl; import org.graalvm.compiler.truffle.compiler.TruffleElementCache; import org.graalvm.compiler.truffle.compiler.host.TruffleHostEnvironment; import org.graalvm.compiler.truffle.compiler.hotspot.HotSpotTruffleCompilerImpl; +import com.oracle.truffle.compiler.HostMethodInfo; +import com.oracle.truffle.compiler.TruffleCompilable; +import com.oracle.truffle.compiler.TruffleCompilerRuntime; + import jdk.vm.ci.meta.MetaAccessProvider; import jdk.vm.ci.meta.ResolvedJavaMethod; diff --git a/compiler/src/org.graalvm.compiler.truffle.compiler.hotspot.libgraal/src/org/graalvm/compiler/truffle/compiler/hotspot/libgraal/TruffleFromLibGraalCalls.java b/compiler/src/org.graalvm.compiler.truffle.compiler.hotspot.libgraal/src/org/graalvm/compiler/truffle/compiler/hotspot/libgraal/TruffleFromLibGraalCalls.java index 693e74ae5a3c..3ccf6b2a077f 100644 --- a/compiler/src/org.graalvm.compiler.truffle.compiler.hotspot.libgraal/src/org/graalvm/compiler/truffle/compiler/hotspot/libgraal/TruffleFromLibGraalCalls.java +++ b/compiler/src/org.graalvm.compiler.truffle.compiler.hotspot.libgraal/src/org/graalvm/compiler/truffle/compiler/hotspot/libgraal/TruffleFromLibGraalCalls.java @@ -25,9 +25,11 @@ package org.graalvm.compiler.truffle.compiler.hotspot.libgraal; import org.graalvm.libgraal.jni.FromLibGraalCalls; + +import com.oracle.truffle.compiler.hotspot.libgraal.TruffleFromLibGraal.Id; + import org.graalvm.jniutils.JNI.JClass; import org.graalvm.jniutils.JNI.JNIEnv; -import org.graalvm.compiler.truffle.common.hotspot.libgraal.TruffleFromLibGraal.Id; final class TruffleFromLibGraalCalls extends FromLibGraalCalls { @@ -39,6 +41,6 @@ private TruffleFromLibGraalCalls() { @Override protected JClass resolvePeer(JNIEnv env) { - return getJNIClass(env, "org.graalvm.compiler.truffle.runtime.hotspot.libgraal.TruffleFromLibGraalEntryPoints"); + return getJNIClass(env, "com.oracle.truffle.runtime.hotspot.libgraal.TruffleFromLibGraalEntryPoints"); } } diff --git a/compiler/src/org.graalvm.compiler.truffle.compiler.hotspot.libgraal/src/org/graalvm/compiler/truffle/compiler/hotspot/libgraal/TruffleToLibGraalEntryPoints.java b/compiler/src/org.graalvm.compiler.truffle.compiler.hotspot.libgraal/src/org/graalvm/compiler/truffle/compiler/hotspot/libgraal/TruffleToLibGraalEntryPoints.java index 30bd71743a4f..1aa55b0e9a8e 100644 --- a/compiler/src/org.graalvm.compiler.truffle.compiler.hotspot.libgraal/src/org/graalvm/compiler/truffle/compiler/hotspot/libgraal/TruffleToLibGraalEntryPoints.java +++ b/compiler/src/org.graalvm.compiler.truffle.compiler.hotspot.libgraal/src/org/graalvm/compiler/truffle/compiler/hotspot/libgraal/TruffleToLibGraalEntryPoints.java @@ -24,26 +24,26 @@ */ package org.graalvm.compiler.truffle.compiler.hotspot.libgraal; -import static org.graalvm.compiler.truffle.common.hotspot.libgraal.TruffleToLibGraal.Id.DoCompile; -import static org.graalvm.compiler.truffle.common.hotspot.libgraal.TruffleToLibGraal.Id.GetCompilerConfigurationFactoryName; -import static org.graalvm.compiler.truffle.common.hotspot.libgraal.TruffleToLibGraal.Id.GetDataPatchesCount; -import static org.graalvm.compiler.truffle.common.hotspot.libgraal.TruffleToLibGraal.Id.GetExceptionHandlersCount; -import static org.graalvm.compiler.truffle.common.hotspot.libgraal.TruffleToLibGraal.Id.GetInfopoints; -import static org.graalvm.compiler.truffle.common.hotspot.libgraal.TruffleToLibGraal.Id.GetInfopointsCount; -import static org.graalvm.compiler.truffle.common.hotspot.libgraal.TruffleToLibGraal.Id.GetMarksCount; -import static org.graalvm.compiler.truffle.common.hotspot.libgraal.TruffleToLibGraal.Id.GetNodeCount; -import static org.graalvm.compiler.truffle.common.hotspot.libgraal.TruffleToLibGraal.Id.GetNodeTypes; -import static org.graalvm.compiler.truffle.common.hotspot.libgraal.TruffleToLibGraal.Id.GetSuppliedString; -import static org.graalvm.compiler.truffle.common.hotspot.libgraal.TruffleToLibGraal.Id.GetTargetCodeSize; -import static org.graalvm.compiler.truffle.common.hotspot.libgraal.TruffleToLibGraal.Id.GetTotalFrameSize; -import static org.graalvm.compiler.truffle.common.hotspot.libgraal.TruffleToLibGraal.Id.InitializeCompiler; -import static org.graalvm.compiler.truffle.common.hotspot.libgraal.TruffleToLibGraal.Id.InitializeRuntime; -import static org.graalvm.compiler.truffle.common.hotspot.libgraal.TruffleToLibGraal.Id.InstallTruffleCallBoundaryMethod; -import static org.graalvm.compiler.truffle.common.hotspot.libgraal.TruffleToLibGraal.Id.NewCompiler; -import static org.graalvm.compiler.truffle.common.hotspot.libgraal.TruffleToLibGraal.Id.PendingTransferToInterpreterOffset; -import static org.graalvm.compiler.truffle.common.hotspot.libgraal.TruffleToLibGraal.Id.PurgePartialEvaluationCaches; -import static org.graalvm.compiler.truffle.common.hotspot.libgraal.TruffleToLibGraal.Id.RegisterRuntime; -import static org.graalvm.compiler.truffle.common.hotspot.libgraal.TruffleToLibGraal.Id.Shutdown; +import static com.oracle.truffle.compiler.hotspot.libgraal.TruffleToLibGraal.Id.DoCompile; +import static com.oracle.truffle.compiler.hotspot.libgraal.TruffleToLibGraal.Id.GetCompilerConfigurationFactoryName; +import static com.oracle.truffle.compiler.hotspot.libgraal.TruffleToLibGraal.Id.GetDataPatchesCount; +import static com.oracle.truffle.compiler.hotspot.libgraal.TruffleToLibGraal.Id.GetExceptionHandlersCount; +import static com.oracle.truffle.compiler.hotspot.libgraal.TruffleToLibGraal.Id.GetInfopoints; +import static com.oracle.truffle.compiler.hotspot.libgraal.TruffleToLibGraal.Id.GetInfopointsCount; +import static com.oracle.truffle.compiler.hotspot.libgraal.TruffleToLibGraal.Id.GetMarksCount; +import static com.oracle.truffle.compiler.hotspot.libgraal.TruffleToLibGraal.Id.GetNodeCount; +import static com.oracle.truffle.compiler.hotspot.libgraal.TruffleToLibGraal.Id.GetNodeTypes; +import static com.oracle.truffle.compiler.hotspot.libgraal.TruffleToLibGraal.Id.GetSuppliedString; +import static com.oracle.truffle.compiler.hotspot.libgraal.TruffleToLibGraal.Id.GetTargetCodeSize; +import static com.oracle.truffle.compiler.hotspot.libgraal.TruffleToLibGraal.Id.GetTotalFrameSize; +import static com.oracle.truffle.compiler.hotspot.libgraal.TruffleToLibGraal.Id.InitializeCompiler; +import static com.oracle.truffle.compiler.hotspot.libgraal.TruffleToLibGraal.Id.InitializeRuntime; +import static com.oracle.truffle.compiler.hotspot.libgraal.TruffleToLibGraal.Id.InstallTruffleCallBoundaryMethod; +import static com.oracle.truffle.compiler.hotspot.libgraal.TruffleToLibGraal.Id.NewCompiler; +import static com.oracle.truffle.compiler.hotspot.libgraal.TruffleToLibGraal.Id.PendingTransferToInterpreterOffset; +import static com.oracle.truffle.compiler.hotspot.libgraal.TruffleToLibGraal.Id.PurgePartialEvaluationCaches; +import static com.oracle.truffle.compiler.hotspot.libgraal.TruffleToLibGraal.Id.RegisterRuntime; +import static com.oracle.truffle.compiler.hotspot.libgraal.TruffleToLibGraal.Id.Shutdown; import static org.graalvm.jniutils.JNIUtil.NewObjectArray; import static org.graalvm.jniutils.JNIUtil.SetObjectArrayElement; import static org.graalvm.jniutils.JNIUtil.createHSString; @@ -52,14 +52,6 @@ import org.graalvm.compiler.hotspot.CompilationContext; import org.graalvm.compiler.hotspot.HotSpotGraalServices; -import org.graalvm.compiler.truffle.common.TruffleCompilable; -import org.graalvm.compiler.truffle.common.TruffleCompilationTask; -import org.graalvm.compiler.truffle.common.TruffleCompilerListener; -import org.graalvm.compiler.truffle.common.TruffleCompilerListener.CompilationResultInfo; -import org.graalvm.compiler.truffle.common.TruffleCompilerListener.GraphInfo; -import org.graalvm.compiler.truffle.common.TruffleCompilerOptionDescriptor; -import org.graalvm.compiler.truffle.common.hotspot.libgraal.TruffleToLibGraal; -import org.graalvm.compiler.truffle.common.hotspot.libgraal.TruffleToLibGraal.Id; import org.graalvm.compiler.truffle.compiler.TruffleCompilerOptions; import org.graalvm.compiler.truffle.compiler.hotspot.HotSpotTruffleCompilationSupport; import org.graalvm.compiler.truffle.compiler.hotspot.HotSpotTruffleCompilerImpl; @@ -79,6 +71,15 @@ import org.graalvm.nativeimage.c.function.CEntryPoint; import org.graalvm.word.WordFactory; +import com.oracle.truffle.compiler.TruffleCompilable; +import com.oracle.truffle.compiler.TruffleCompilationTask; +import com.oracle.truffle.compiler.TruffleCompilerListener; +import com.oracle.truffle.compiler.TruffleCompilerOptionDescriptor; +import com.oracle.truffle.compiler.TruffleCompilerListener.CompilationResultInfo; +import com.oracle.truffle.compiler.TruffleCompilerListener.GraphInfo; +import com.oracle.truffle.compiler.hotspot.libgraal.TruffleToLibGraal; +import com.oracle.truffle.compiler.hotspot.libgraal.TruffleToLibGraal.Id; + import jdk.vm.ci.meta.ResolvedJavaMethod; import jdk.vm.ci.meta.ResolvedJavaType; diff --git a/substratevm/src/com.oracle.svm.graal/src/com/oracle/svm/graal/isolated/IsolatedCodeInstallBridge.java b/substratevm/src/com.oracle.svm.graal/src/com/oracle/svm/graal/isolated/IsolatedCodeInstallBridge.java index ca8e5afef144..5bea3b0063b1 100644 --- a/substratevm/src/com.oracle.svm.graal/src/com/oracle/svm/graal/isolated/IsolatedCodeInstallBridge.java +++ b/substratevm/src/com.oracle.svm.graal/src/com/oracle/svm/graal/isolated/IsolatedCodeInstallBridge.java @@ -24,11 +24,10 @@ */ package com.oracle.svm.graal.isolated; -import org.graalvm.compiler.truffle.common.TruffleCompilable; -import org.graalvm.compiler.truffle.common.OptimizedAssumptionDependency; - import com.oracle.svm.core.deopt.SubstrateInstalledCode; import com.oracle.svm.core.util.VMError; +import com.oracle.truffle.compiler.OptimizedAssumptionDependency; +import com.oracle.truffle.compiler.TruffleCompilable; import jdk.vm.ci.code.InstalledCode; diff --git a/substratevm/src/com.oracle.svm.truffle/src/com/oracle/svm/truffle/SubstrateTruffleCompilationIdentifier.java b/substratevm/src/com.oracle.svm.truffle/src/com/oracle/svm/truffle/SubstrateTruffleCompilationIdentifier.java index fb002e314526..c4ba776fd3e7 100644 --- a/substratevm/src/com.oracle.svm.truffle/src/com/oracle/svm/truffle/SubstrateTruffleCompilationIdentifier.java +++ b/substratevm/src/com.oracle.svm.truffle/src/com/oracle/svm/truffle/SubstrateTruffleCompilationIdentifier.java @@ -25,11 +25,11 @@ package com.oracle.svm.truffle; import org.graalvm.compiler.debug.GraalError; -import org.graalvm.compiler.truffle.common.TruffleCompilable; -import org.graalvm.compiler.truffle.common.TruffleCompilationTask; import org.graalvm.compiler.truffle.compiler.TruffleCompilationIdentifier; import com.oracle.svm.core.graal.code.SubstrateCompilationIdentifier; +import com.oracle.truffle.compiler.TruffleCompilable; +import com.oracle.truffle.compiler.TruffleCompilationTask; public final class SubstrateTruffleCompilationIdentifier extends SubstrateCompilationIdentifier implements TruffleCompilationIdentifier { diff --git a/substratevm/src/com.oracle.svm.truffle/src/com/oracle/svm/truffle/SubstrateTruffleHostEnvironment.java b/substratevm/src/com.oracle.svm.truffle/src/com/oracle/svm/truffle/SubstrateTruffleHostEnvironment.java index fb0de6bf26c3..e5828e4441df 100644 --- a/substratevm/src/com.oracle.svm.truffle/src/com/oracle/svm/truffle/SubstrateTruffleHostEnvironment.java +++ b/substratevm/src/com.oracle.svm.truffle/src/com/oracle/svm/truffle/SubstrateTruffleHostEnvironment.java @@ -24,15 +24,16 @@ */ package com.oracle.svm.truffle; -import org.graalvm.compiler.truffle.common.TruffleCompilable; -import org.graalvm.compiler.truffle.common.HostMethodInfo; -import org.graalvm.compiler.truffle.common.TruffleCompilerRuntime; import org.graalvm.compiler.truffle.compiler.TruffleCompilerImpl; import org.graalvm.compiler.truffle.compiler.TruffleElementCache; import org.graalvm.compiler.truffle.compiler.host.TruffleHostEnvironment; import org.graalvm.nativeimage.Platform; import org.graalvm.nativeimage.Platforms; +import com.oracle.truffle.compiler.HostMethodInfo; +import com.oracle.truffle.compiler.TruffleCompilable; +import com.oracle.truffle.compiler.TruffleCompilerRuntime; + import jdk.vm.ci.meta.MetaAccessProvider; import jdk.vm.ci.meta.ResolvedJavaMethod; diff --git a/substratevm/src/com.oracle.svm.truffle/src/com/oracle/svm/truffle/TruffleSupport.java b/substratevm/src/com.oracle.svm.truffle/src/com/oracle/svm/truffle/TruffleSupport.java index ec67adc2fddc..4225039c5bff 100644 --- a/substratevm/src/com.oracle.svm.truffle/src/com/oracle/svm/truffle/TruffleSupport.java +++ b/substratevm/src/com.oracle.svm.truffle/src/com/oracle/svm/truffle/TruffleSupport.java @@ -31,8 +31,6 @@ import org.graalvm.compiler.api.replacements.SnippetReflectionProvider; import org.graalvm.compiler.nodes.graphbuilderconf.GraphBuilderConfiguration; import org.graalvm.compiler.phases.util.Providers; -import org.graalvm.compiler.truffle.common.TruffleCompilable; -import org.graalvm.compiler.truffle.common.OptimizedAssumptionDependency; import org.graalvm.compiler.truffle.compiler.EconomyPartialEvaluatorConfiguration; import org.graalvm.compiler.truffle.compiler.PartialEvaluator; import org.graalvm.compiler.truffle.compiler.PartialEvaluatorConfiguration; @@ -65,6 +63,8 @@ import com.oracle.svm.util.ReflectionUtil; import com.oracle.truffle.api.nodes.RootNode; import com.oracle.truffle.api.utilities.TriState; +import com.oracle.truffle.compiler.OptimizedAssumptionDependency; +import com.oracle.truffle.compiler.TruffleCompilable; import jdk.vm.ci.meta.JavaConstant; diff --git a/substratevm/src/com.oracle.svm.truffle/src/com/oracle/svm/truffle/api/SubstrateCompilableTruffleAST.java b/substratevm/src/com.oracle.svm.truffle/src/com/oracle/svm/truffle/api/SubstrateCompilableTruffleAST.java index 3b6c28d7db75..6b17e9dd0d91 100644 --- a/substratevm/src/com.oracle.svm.truffle/src/com/oracle/svm/truffle/api/SubstrateCompilableTruffleAST.java +++ b/substratevm/src/com.oracle.svm.truffle/src/com/oracle/svm/truffle/api/SubstrateCompilableTruffleAST.java @@ -24,10 +24,9 @@ */ package com.oracle.svm.truffle.api; -import org.graalvm.compiler.truffle.common.TruffleCompilable; - import com.oracle.svm.core.deopt.SubstrateInstalledCode; import com.oracle.svm.graal.meta.SubstrateCodeCacheProvider; +import com.oracle.truffle.compiler.TruffleCompilable; import jdk.vm.ci.code.InstalledCode; diff --git a/substratevm/src/com.oracle.svm.truffle/src/com/oracle/svm/truffle/api/SubstrateKnownTruffleTypes.java b/substratevm/src/com.oracle.svm.truffle/src/com/oracle/svm/truffle/api/SubstrateKnownTruffleTypes.java index 33d969ff7fbc..941f8702b1cc 100644 --- a/substratevm/src/com.oracle.svm.truffle/src/com/oracle/svm/truffle/api/SubstrateKnownTruffleTypes.java +++ b/substratevm/src/com.oracle.svm.truffle/src/com/oracle/svm/truffle/api/SubstrateKnownTruffleTypes.java @@ -24,10 +24,10 @@ */ package com.oracle.svm.truffle.api; -import org.graalvm.compiler.truffle.common.TruffleCompilerRuntime; import org.graalvm.compiler.truffle.compiler.KnownTruffleTypes; import com.oracle.graal.pointsto.meta.AnalysisType; +import com.oracle.truffle.compiler.TruffleCompilerRuntime; import jdk.vm.ci.meta.ConstantReflectionProvider; import jdk.vm.ci.meta.MetaAccessProvider; diff --git a/substratevm/src/com.oracle.svm.truffle/src/com/oracle/svm/truffle/api/SubstrateOptimizedCallTargetInstalledCode.java b/substratevm/src/com.oracle.svm.truffle/src/com/oracle/svm/truffle/api/SubstrateOptimizedCallTargetInstalledCode.java index 56d0d81a1956..9bf3bf161c67 100644 --- a/substratevm/src/com.oracle.svm.truffle/src/com/oracle/svm/truffle/api/SubstrateOptimizedCallTargetInstalledCode.java +++ b/substratevm/src/com.oracle.svm.truffle/src/com/oracle/svm/truffle/api/SubstrateOptimizedCallTargetInstalledCode.java @@ -27,8 +27,6 @@ import java.lang.ref.WeakReference; import org.graalvm.compiler.core.common.CompilationIdentifier; -import org.graalvm.compiler.truffle.common.TruffleCompilable; -import org.graalvm.compiler.truffle.common.OptimizedAssumptionDependency; import org.graalvm.compiler.truffle.compiler.TruffleCompilerImpl; import org.graalvm.word.WordFactory; @@ -43,6 +41,8 @@ import com.oracle.svm.core.deopt.SubstrateSpeculationLog; import com.oracle.svm.core.thread.VMOperation; import com.oracle.svm.core.util.VMError; +import com.oracle.truffle.compiler.OptimizedAssumptionDependency; +import com.oracle.truffle.compiler.TruffleCompilable; import jdk.vm.ci.code.InstalledCode; import jdk.vm.ci.meta.ResolvedJavaMethod; diff --git a/substratevm/src/com.oracle.svm.truffle/src/com/oracle/svm/truffle/api/SubstratePartialEvaluator.java b/substratevm/src/com.oracle.svm.truffle/src/com/oracle/svm/truffle/api/SubstratePartialEvaluator.java index 3dac3f287863..88f80291f188 100644 --- a/substratevm/src/com.oracle.svm.truffle/src/com/oracle/svm/truffle/api/SubstratePartialEvaluator.java +++ b/substratevm/src/com.oracle.svm.truffle/src/com/oracle/svm/truffle/api/SubstratePartialEvaluator.java @@ -40,8 +40,6 @@ import org.graalvm.compiler.phases.util.Providers; import org.graalvm.compiler.replacements.PEGraphDecoder; import org.graalvm.compiler.replacements.PEGraphDecoder.SpecialCallTargetCacheKey; -import org.graalvm.compiler.truffle.common.ConstantFieldInfo; -import org.graalvm.compiler.truffle.common.PartialEvaluationMethodInfo; import org.graalvm.compiler.truffle.compiler.PartialEvaluator; import org.graalvm.compiler.truffle.compiler.PartialEvaluatorConfiguration; import org.graalvm.compiler.truffle.compiler.TruffleCompilerConfiguration; @@ -49,6 +47,9 @@ import org.graalvm.nativeimage.Platform; import org.graalvm.nativeimage.Platforms; +import com.oracle.truffle.compiler.ConstantFieldInfo; +import com.oracle.truffle.compiler.PartialEvaluationMethodInfo; + import jdk.vm.ci.meta.ResolvedJavaField; import jdk.vm.ci.meta.ResolvedJavaMethod; diff --git a/substratevm/src/com.oracle.svm.truffle/src/com/oracle/svm/truffle/api/SubstrateTruffleCompilationSupport.java b/substratevm/src/com.oracle.svm.truffle/src/com/oracle/svm/truffle/api/SubstrateTruffleCompilationSupport.java index 61a0117d34fc..b765a9e3e827 100644 --- a/substratevm/src/com.oracle.svm.truffle/src/com/oracle/svm/truffle/api/SubstrateTruffleCompilationSupport.java +++ b/substratevm/src/com.oracle.svm.truffle/src/com/oracle/svm/truffle/api/SubstrateTruffleCompilationSupport.java @@ -24,8 +24,6 @@ */ package com.oracle.svm.truffle.api; -import org.graalvm.compiler.truffle.common.TruffleCompiler; -import org.graalvm.compiler.truffle.common.TruffleCompilerRuntime; import org.graalvm.compiler.truffle.compiler.AbstractTruffleCompilationSupport; import org.graalvm.nativeimage.Platform; import org.graalvm.nativeimage.Platforms; @@ -33,6 +31,8 @@ import com.oracle.svm.core.graal.GraalConfiguration; import com.oracle.svm.truffle.TruffleSupport; import com.oracle.truffle.api.CompilerDirectives; +import com.oracle.truffle.compiler.TruffleCompiler; +import com.oracle.truffle.compiler.TruffleCompilerRuntime; /** * Represents a truffle compilation bundling compilable and task into a single object. Also installs diff --git a/substratevm/src/com.oracle.svm.truffle/src/com/oracle/svm/truffle/api/SubstrateTruffleCompiler.java b/substratevm/src/com.oracle.svm.truffle/src/com/oracle/svm/truffle/api/SubstrateTruffleCompiler.java index f9c398e10f72..ecc281aabfd6 100644 --- a/substratevm/src/com.oracle.svm.truffle/src/com/oracle/svm/truffle/api/SubstrateTruffleCompiler.java +++ b/substratevm/src/com.oracle.svm.truffle/src/com/oracle/svm/truffle/api/SubstrateTruffleCompiler.java @@ -24,12 +24,13 @@ */ package com.oracle.svm.truffle.api; -import org.graalvm.compiler.truffle.common.TruffleCompiler; import org.graalvm.compiler.truffle.compiler.PartialEvaluator; import org.graalvm.compiler.truffle.compiler.phases.TruffleTier; import org.graalvm.nativeimage.Platform; import org.graalvm.nativeimage.Platforms; +import com.oracle.truffle.compiler.TruffleCompiler; + public interface SubstrateTruffleCompiler extends TruffleCompiler { @Platforms(Platform.HOSTED_ONLY.class) diff --git a/substratevm/src/com.oracle.svm.truffle/src/com/oracle/svm/truffle/api/SubstrateTruffleCompilerImpl.java b/substratevm/src/com.oracle.svm.truffle/src/com/oracle/svm/truffle/api/SubstrateTruffleCompilerImpl.java index 30f437d48876..c4b098b32e23 100644 --- a/substratevm/src/com.oracle.svm.truffle/src/com/oracle/svm/truffle/api/SubstrateTruffleCompilerImpl.java +++ b/substratevm/src/com.oracle.svm.truffle/src/com/oracle/svm/truffle/api/SubstrateTruffleCompilerImpl.java @@ -36,8 +36,6 @@ import org.graalvm.compiler.options.OptionValues; import org.graalvm.compiler.phases.PhaseSuite; import org.graalvm.compiler.phases.tiers.HighTierContext; -import org.graalvm.compiler.truffle.common.TruffleCompilable; -import org.graalvm.compiler.truffle.common.TruffleCompilationTask; import org.graalvm.compiler.truffle.compiler.PartialEvaluator; import org.graalvm.compiler.truffle.compiler.TruffleCompilationIdentifier; import org.graalvm.compiler.truffle.compiler.TruffleCompilerConfiguration; @@ -55,6 +53,8 @@ import com.oracle.svm.graal.SubstrateGraalUtils; import com.oracle.svm.truffle.SubstrateTruffleCompilationIdentifier; import com.oracle.svm.truffle.TruffleSupport; +import com.oracle.truffle.compiler.TruffleCompilable; +import com.oracle.truffle.compiler.TruffleCompilationTask; import jdk.vm.ci.code.InstalledCode; diff --git a/substratevm/src/com.oracle.svm.truffle/src/com/oracle/svm/truffle/api/SubstrateTruffleField.java b/substratevm/src/com.oracle.svm.truffle/src/com/oracle/svm/truffle/api/SubstrateTruffleField.java index 5111f3b66b07..1535679ebf17 100644 --- a/substratevm/src/com.oracle.svm.truffle/src/com/oracle/svm/truffle/api/SubstrateTruffleField.java +++ b/substratevm/src/com.oracle.svm.truffle/src/com/oracle/svm/truffle/api/SubstrateTruffleField.java @@ -24,13 +24,13 @@ */ package com.oracle.svm.truffle.api; -import org.graalvm.compiler.truffle.common.ConstantFieldInfo; import org.graalvm.nativeimage.Platform; import org.graalvm.nativeimage.Platforms; import com.oracle.graal.pointsto.meta.AnalysisField; import com.oracle.svm.core.util.HostedStringDeduplication; import com.oracle.svm.graal.meta.SubstrateField; +import com.oracle.truffle.compiler.ConstantFieldInfo; public class SubstrateTruffleField extends SubstrateField implements TruffleField { diff --git a/substratevm/src/com.oracle.svm.truffle/src/com/oracle/svm/truffle/api/SubstrateTruffleMethod.java b/substratevm/src/com.oracle.svm.truffle/src/com/oracle/svm/truffle/api/SubstrateTruffleMethod.java index a982aa520664..aa185b22b116 100644 --- a/substratevm/src/com.oracle.svm.truffle/src/com/oracle/svm/truffle/api/SubstrateTruffleMethod.java +++ b/substratevm/src/com.oracle.svm.truffle/src/com/oracle/svm/truffle/api/SubstrateTruffleMethod.java @@ -24,13 +24,13 @@ */ package com.oracle.svm.truffle.api; -import org.graalvm.compiler.truffle.common.PartialEvaluationMethodInfo; import org.graalvm.nativeimage.Platform; import org.graalvm.nativeimage.Platforms; import com.oracle.graal.pointsto.meta.AnalysisMethod; import com.oracle.svm.core.util.HostedStringDeduplication; import com.oracle.svm.graal.meta.SubstrateMethod; +import com.oracle.truffle.compiler.PartialEvaluationMethodInfo; public class SubstrateTruffleMethod extends SubstrateMethod implements TruffleMethod { diff --git a/substratevm/src/com.oracle.svm.truffle/src/com/oracle/svm/truffle/api/SubstrateTruffleRuntime.java b/substratevm/src/com.oracle.svm.truffle/src/com/oracle/svm/truffle/api/SubstrateTruffleRuntime.java index d06e6e778ec1..8dad34d0b1a4 100644 --- a/substratevm/src/com.oracle.svm.truffle/src/com/oracle/svm/truffle/api/SubstrateTruffleRuntime.java +++ b/substratevm/src/com.oracle.svm.truffle/src/com/oracle/svm/truffle/api/SubstrateTruffleRuntime.java @@ -34,12 +34,6 @@ import org.graalvm.compiler.api.replacements.Fold; import org.graalvm.compiler.options.Option; -import org.graalvm.compiler.truffle.common.ConstantFieldInfo; -import org.graalvm.compiler.truffle.common.HostMethodInfo; -import org.graalvm.compiler.truffle.common.OptimizedAssumptionDependency; -import org.graalvm.compiler.truffle.common.PartialEvaluationMethodInfo; -import org.graalvm.compiler.truffle.common.TruffleCompilable; -import org.graalvm.compiler.truffle.common.TruffleCompiler; import org.graalvm.compiler.truffle.runtime.AbstractCompilationTask; import org.graalvm.compiler.truffle.runtime.BackgroundCompileQueue; import org.graalvm.compiler.truffle.runtime.CompilationTask; @@ -73,6 +67,12 @@ import com.oracle.truffle.api.impl.ThreadLocalHandshake; import com.oracle.truffle.api.nodes.RootNode; import com.oracle.truffle.api.utilities.TriState; +import com.oracle.truffle.compiler.ConstantFieldInfo; +import com.oracle.truffle.compiler.HostMethodInfo; +import com.oracle.truffle.compiler.OptimizedAssumptionDependency; +import com.oracle.truffle.compiler.PartialEvaluationMethodInfo; +import com.oracle.truffle.compiler.TruffleCompilable; +import com.oracle.truffle.compiler.TruffleCompiler; import jdk.vm.ci.code.InstalledCode; import jdk.vm.ci.code.stack.StackIntrospection; diff --git a/substratevm/src/com.oracle.svm.truffle/src/com/oracle/svm/truffle/api/SubstrateTruffleUniverseFactory.java b/substratevm/src/com.oracle.svm.truffle/src/com/oracle/svm/truffle/api/SubstrateTruffleUniverseFactory.java index 99f52dd4d19c..35d30e6452a3 100644 --- a/substratevm/src/com.oracle.svm.truffle/src/com/oracle/svm/truffle/api/SubstrateTruffleUniverseFactory.java +++ b/substratevm/src/com.oracle.svm.truffle/src/com/oracle/svm/truffle/api/SubstrateTruffleUniverseFactory.java @@ -27,9 +27,6 @@ import java.util.concurrent.ConcurrentHashMap; import java.util.concurrent.ConcurrentMap; -import org.graalvm.compiler.truffle.common.ConstantFieldInfo; -import org.graalvm.compiler.truffle.common.PartialEvaluationMethodInfo; -import org.graalvm.compiler.truffle.common.TruffleCompilerRuntime; import org.graalvm.nativeimage.Platform; import org.graalvm.nativeimage.Platforms; @@ -40,6 +37,9 @@ import com.oracle.svm.graal.meta.SubstrateField; import com.oracle.svm.graal.meta.SubstrateMethod; import com.oracle.svm.graal.meta.SubstrateUniverseFactory; +import com.oracle.truffle.compiler.ConstantFieldInfo; +import com.oracle.truffle.compiler.PartialEvaluationMethodInfo; +import com.oracle.truffle.compiler.TruffleCompilerRuntime; import jdk.vm.ci.meta.ResolvedJavaMethod; diff --git a/substratevm/src/com.oracle.svm.truffle/src/com/oracle/svm/truffle/api/TruffleBoundaryPhase.java b/substratevm/src/com.oracle.svm.truffle/src/com/oracle/svm/truffle/api/TruffleBoundaryPhase.java index 8cd87af6e700..83fb3b6c75a6 100644 --- a/substratevm/src/com.oracle.svm.truffle/src/com/oracle/svm/truffle/api/TruffleBoundaryPhase.java +++ b/substratevm/src/com.oracle.svm.truffle/src/com/oracle/svm/truffle/api/TruffleBoundaryPhase.java @@ -32,11 +32,11 @@ import org.graalvm.compiler.nodes.java.ExceptionObjectNode; import org.graalvm.compiler.nodes.util.GraphUtil; import org.graalvm.compiler.phases.Phase; -import org.graalvm.compiler.truffle.common.TruffleCompilerRuntime.InlineKind; import org.graalvm.compiler.truffle.compiler.PartialEvaluator; import com.oracle.svm.hosted.phases.SubstrateGraphBuilderPhase.SubstrateBytecodeParser; import com.oracle.truffle.api.CompilerDirectives.TruffleBoundary; +import com.oracle.truffle.compiler.TruffleCompilerRuntime.InlineKind; import jdk.vm.ci.meta.DeoptimizationAction; import jdk.vm.ci.meta.DeoptimizationReason; diff --git a/substratevm/src/com.oracle.svm.truffle/src/com/oracle/svm/truffle/api/TruffleField.java b/substratevm/src/com.oracle.svm.truffle/src/com/oracle/svm/truffle/api/TruffleField.java index 2f3d34d7f1ab..58e63c394244 100644 --- a/substratevm/src/com.oracle.svm.truffle/src/com/oracle/svm/truffle/api/TruffleField.java +++ b/substratevm/src/com.oracle.svm.truffle/src/com/oracle/svm/truffle/api/TruffleField.java @@ -24,7 +24,7 @@ */ package com.oracle.svm.truffle.api; -import org.graalvm.compiler.truffle.common.ConstantFieldInfo; +import com.oracle.truffle.compiler.ConstantFieldInfo; public interface TruffleField { diff --git a/substratevm/src/com.oracle.svm.truffle/src/com/oracle/svm/truffle/api/TruffleMethod.java b/substratevm/src/com.oracle.svm.truffle/src/com/oracle/svm/truffle/api/TruffleMethod.java index f4579b91cf13..063c15e2a31e 100644 --- a/substratevm/src/com.oracle.svm.truffle/src/com/oracle/svm/truffle/api/TruffleMethod.java +++ b/substratevm/src/com.oracle.svm.truffle/src/com/oracle/svm/truffle/api/TruffleMethod.java @@ -24,7 +24,7 @@ */ package com.oracle.svm.truffle.api; -import org.graalvm.compiler.truffle.common.PartialEvaluationMethodInfo; +import com.oracle.truffle.compiler.PartialEvaluationMethodInfo; public interface TruffleMethod { diff --git a/substratevm/src/com.oracle.svm.truffle/src/com/oracle/svm/truffle/isolated/IsolateAwareTruffleCompiler.java b/substratevm/src/com.oracle.svm.truffle/src/com/oracle/svm/truffle/isolated/IsolateAwareTruffleCompiler.java index 4e9ad0fc520b..e90b6a0904f3 100644 --- a/substratevm/src/com.oracle.svm.truffle/src/com/oracle/svm/truffle/isolated/IsolateAwareTruffleCompiler.java +++ b/substratevm/src/com.oracle.svm.truffle/src/com/oracle/svm/truffle/isolated/IsolateAwareTruffleCompiler.java @@ -31,9 +31,6 @@ import org.graalvm.compiler.core.common.CompilationIdentifier; import org.graalvm.compiler.core.common.SuppressFBWarnings; import org.graalvm.compiler.nodes.PauseNode; -import org.graalvm.compiler.truffle.common.TruffleCompilable; -import org.graalvm.compiler.truffle.common.TruffleCompilationTask; -import org.graalvm.compiler.truffle.common.TruffleCompilerListener; import org.graalvm.compiler.truffle.compiler.PartialEvaluator; import org.graalvm.compiler.truffle.compiler.TruffleCompilation; import org.graalvm.compiler.truffle.compiler.phases.TruffleTier; @@ -65,6 +62,9 @@ import com.oracle.svm.truffle.api.SubstrateCompilableTruffleAST; import com.oracle.svm.truffle.api.SubstrateTruffleCompiler; import com.oracle.svm.truffle.api.SubstrateTruffleCompilerImpl; +import com.oracle.truffle.compiler.TruffleCompilable; +import com.oracle.truffle.compiler.TruffleCompilationTask; +import com.oracle.truffle.compiler.TruffleCompilerListener; public class IsolateAwareTruffleCompiler implements SubstrateTruffleCompiler { private static final Word ISOLATE_INITIALIZING = WordFactory.signed(-1); diff --git a/substratevm/src/com.oracle.svm.truffle/src/com/oracle/svm/truffle/isolated/IsolatedCompilableTruffleAST.java b/substratevm/src/com.oracle.svm.truffle/src/com/oracle/svm/truffle/isolated/IsolatedCompilableTruffleAST.java index a566384e7640..e3262e183ddf 100644 --- a/substratevm/src/com.oracle.svm.truffle/src/com/oracle/svm/truffle/isolated/IsolatedCompilableTruffleAST.java +++ b/substratevm/src/com.oracle.svm.truffle/src/com/oracle/svm/truffle/isolated/IsolatedCompilableTruffleAST.java @@ -29,7 +29,6 @@ import java.util.function.Supplier; import org.graalvm.compiler.debug.GraalError; -import org.graalvm.compiler.truffle.common.TruffleCompilable; import org.graalvm.nativebridge.BinaryInput; import org.graalvm.nativebridge.BinaryOutput; import org.graalvm.nativebridge.BinaryOutput.ByteArrayBinaryOutput; @@ -50,6 +49,7 @@ import com.oracle.svm.graal.isolated.IsolatedObjectProxy; import com.oracle.svm.graal.isolated.IsolatedSpeculationLog; import com.oracle.svm.truffle.api.SubstrateCompilableTruffleAST; +import com.oracle.truffle.compiler.TruffleCompilable; import jdk.vm.ci.code.InstalledCode; import jdk.vm.ci.meta.JavaConstant; diff --git a/substratevm/src/com.oracle.svm.truffle/src/com/oracle/svm/truffle/isolated/IsolatedTruffleCompilationIdentifier.java b/substratevm/src/com.oracle.svm.truffle/src/com/oracle/svm/truffle/isolated/IsolatedTruffleCompilationIdentifier.java index f3ce1054cd96..b2619834fa50 100644 --- a/substratevm/src/com.oracle.svm.truffle/src/com/oracle/svm/truffle/isolated/IsolatedTruffleCompilationIdentifier.java +++ b/substratevm/src/com.oracle.svm.truffle/src/com/oracle/svm/truffle/isolated/IsolatedTruffleCompilationIdentifier.java @@ -25,8 +25,6 @@ package com.oracle.svm.truffle.isolated; import org.graalvm.compiler.core.common.CompilationIdentifier; -import org.graalvm.compiler.truffle.common.TruffleCompilable; -import org.graalvm.compiler.truffle.common.TruffleCompilationTask; import org.graalvm.compiler.truffle.compiler.TruffleCompilationIdentifier; import org.graalvm.nativeimage.c.function.CEntryPoint; @@ -36,6 +34,8 @@ import com.oracle.svm.graal.isolated.IsolatedCompileClient; import com.oracle.svm.graal.isolated.IsolatedCompileContext; import com.oracle.svm.graal.isolated.IsolatedObjectProxy; +import com.oracle.truffle.compiler.TruffleCompilable; +import com.oracle.truffle.compiler.TruffleCompilationTask; final class IsolatedTruffleCompilationIdentifier extends IsolatedObjectProxy implements TruffleCompilationIdentifier { diff --git a/substratevm/src/com.oracle.svm.truffle/src/com/oracle/svm/truffle/isolated/IsolatedTruffleCompilationTask.java b/substratevm/src/com.oracle.svm.truffle/src/com/oracle/svm/truffle/isolated/IsolatedTruffleCompilationTask.java index 2fb79f6c106f..9a6a9bdb519b 100644 --- a/substratevm/src/com.oracle.svm.truffle/src/com/oracle/svm/truffle/isolated/IsolatedTruffleCompilationTask.java +++ b/substratevm/src/com.oracle.svm.truffle/src/com/oracle/svm/truffle/isolated/IsolatedTruffleCompilationTask.java @@ -28,9 +28,6 @@ import java.util.LinkedHashMap; import java.util.Map; -import org.graalvm.compiler.truffle.common.TruffleCompilable; -import org.graalvm.compiler.truffle.common.TruffleCompilationTask; -import org.graalvm.compiler.truffle.common.TruffleSourceLanguagePosition; import org.graalvm.nativebridge.BinaryInput; import org.graalvm.nativebridge.BinaryOutput; import org.graalvm.nativebridge.BinaryOutput.ByteArrayBinaryOutput; @@ -49,6 +46,9 @@ import com.oracle.svm.graal.isolated.IsolatedObjectConstant; import com.oracle.svm.graal.isolated.IsolatedObjectProxy; import com.oracle.svm.truffle.api.SubstrateCompilableTruffleAST; +import com.oracle.truffle.compiler.TruffleCompilable; +import com.oracle.truffle.compiler.TruffleCompilationTask; +import com.oracle.truffle.compiler.TruffleSourceLanguagePosition; import jdk.vm.ci.meta.JavaConstant; diff --git a/substratevm/src/com.oracle.svm.truffle/src/com/oracle/svm/truffle/isolated/IsolatedTruffleCompilerEventForwarder.java b/substratevm/src/com.oracle.svm.truffle/src/com/oracle/svm/truffle/isolated/IsolatedTruffleCompilerEventForwarder.java index 9feef18a948a..db16ae8ae9a3 100644 --- a/substratevm/src/com.oracle.svm.truffle/src/com/oracle/svm/truffle/isolated/IsolatedTruffleCompilerEventForwarder.java +++ b/substratevm/src/com.oracle.svm.truffle/src/com/oracle/svm/truffle/isolated/IsolatedTruffleCompilerEventForwarder.java @@ -24,11 +24,6 @@ */ package com.oracle.svm.truffle.isolated; -import org.graalvm.compiler.truffle.common.TruffleCompilable; -import org.graalvm.compiler.truffle.common.TruffleCompilationTask; -import org.graalvm.compiler.truffle.common.TruffleCompilerListener; -import org.graalvm.compiler.truffle.common.TruffleCompilerListener.CompilationResultInfo; -import org.graalvm.compiler.truffle.common.TruffleCompilerListener.GraphInfo; import org.graalvm.nativeimage.StackValue; import org.graalvm.nativeimage.c.function.CEntryPoint; import org.graalvm.nativeimage.c.struct.RawField; @@ -44,6 +39,11 @@ import com.oracle.svm.graal.isolated.CompilerIsolateThread; import com.oracle.svm.graal.isolated.IsolatedCompileClient; import com.oracle.svm.graal.isolated.IsolatedCompileContext; +import com.oracle.truffle.compiler.TruffleCompilable; +import com.oracle.truffle.compiler.TruffleCompilationTask; +import com.oracle.truffle.compiler.TruffleCompilerListener; +import com.oracle.truffle.compiler.TruffleCompilerListener.CompilationResultInfo; +import com.oracle.truffle.compiler.TruffleCompilerListener.GraphInfo; final class IsolatedTruffleCompilerEventForwarder implements TruffleCompilerListener { private final ClientHandle contextHandle; diff --git a/substratevm/src/com.oracle.svm.truffle/src/com/oracle/svm/truffle/isolated/IsolatedTruffleRuntimeSupport.java b/substratevm/src/com.oracle.svm.truffle/src/com/oracle/svm/truffle/isolated/IsolatedTruffleRuntimeSupport.java index 64b59f8eb2bc..6832be914166 100644 --- a/substratevm/src/com.oracle.svm.truffle/src/com/oracle/svm/truffle/isolated/IsolatedTruffleRuntimeSupport.java +++ b/substratevm/src/com.oracle.svm.truffle/src/com/oracle/svm/truffle/isolated/IsolatedTruffleRuntimeSupport.java @@ -27,8 +27,6 @@ import java.util.function.Consumer; import java.util.function.Supplier; -import org.graalvm.compiler.truffle.common.TruffleCompilable; -import org.graalvm.compiler.truffle.common.OptimizedAssumptionDependency; import org.graalvm.compiler.truffle.runtime.OptimizedAssumption; import org.graalvm.compiler.truffle.runtime.OptimizedCallTarget; import org.graalvm.compiler.truffle.runtime.OptimizedDirectCallNode; @@ -50,6 +48,8 @@ import com.oracle.svm.truffle.api.SubstrateCompilableTruffleAST; import com.oracle.svm.truffle.api.SubstrateTruffleRuntime; import com.oracle.truffle.api.utilities.TriState; +import com.oracle.truffle.compiler.OptimizedAssumptionDependency; +import com.oracle.truffle.compiler.TruffleCompilable; import jdk.vm.ci.meta.JavaConstant; diff --git a/substratevm/src/com.oracle.svm.truffle/src/com/oracle/svm/truffle/isolated/IsolatedTruffleSourceLanguagePosition.java b/substratevm/src/com.oracle.svm.truffle/src/com/oracle/svm/truffle/isolated/IsolatedTruffleSourceLanguagePosition.java index 62c949625e72..110198881393 100644 --- a/substratevm/src/com.oracle.svm.truffle/src/com/oracle/svm/truffle/isolated/IsolatedTruffleSourceLanguagePosition.java +++ b/substratevm/src/com.oracle.svm.truffle/src/com/oracle/svm/truffle/isolated/IsolatedTruffleSourceLanguagePosition.java @@ -27,7 +27,6 @@ import java.net.URI; import java.net.URISyntaxException; -import org.graalvm.compiler.truffle.common.TruffleSourceLanguagePosition; import org.graalvm.nativeimage.c.function.CEntryPoint; import com.oracle.svm.core.util.VMError; @@ -38,6 +37,7 @@ import com.oracle.svm.graal.isolated.IsolatedCompileContext; import com.oracle.svm.graal.isolated.IsolatedHandles; import com.oracle.svm.graal.isolated.IsolatedObjectProxy; +import com.oracle.truffle.compiler.TruffleSourceLanguagePosition; final class IsolatedTruffleSourceLanguagePosition extends IsolatedObjectProxy implements TruffleSourceLanguagePosition { private final int lineNumber; diff --git a/truffle/src/com.oracle.truffle.compiler/src/org/graalvm/compiler/truffle/common/ConstantFieldInfo.java b/truffle/src/com.oracle.truffle.compiler/src/com/oracle/truffle/compiler/ConstantFieldInfo.java similarity index 99% rename from truffle/src/com.oracle.truffle.compiler/src/org/graalvm/compiler/truffle/common/ConstantFieldInfo.java rename to truffle/src/com.oracle.truffle.compiler/src/com/oracle/truffle/compiler/ConstantFieldInfo.java index 139478f5f4ac..aa70872915b7 100644 --- a/truffle/src/com.oracle.truffle.compiler/src/org/graalvm/compiler/truffle/common/ConstantFieldInfo.java +++ b/truffle/src/com.oracle.truffle.compiler/src/com/oracle/truffle/compiler/ConstantFieldInfo.java @@ -38,7 +38,7 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ -package org.graalvm.compiler.truffle.common; +package com.oracle.truffle.compiler; import jdk.vm.ci.meta.ResolvedJavaField; diff --git a/truffle/src/com.oracle.truffle.compiler/src/org/graalvm/compiler/truffle/common/HostMethodInfo.java b/truffle/src/com.oracle.truffle.compiler/src/com/oracle/truffle/compiler/HostMethodInfo.java similarity index 98% rename from truffle/src/com.oracle.truffle.compiler/src/org/graalvm/compiler/truffle/common/HostMethodInfo.java rename to truffle/src/com.oracle.truffle.compiler/src/com/oracle/truffle/compiler/HostMethodInfo.java index 4f302848ac39..1aa24b2f3949 100644 --- a/truffle/src/com.oracle.truffle.compiler/src/org/graalvm/compiler/truffle/common/HostMethodInfo.java +++ b/truffle/src/com.oracle.truffle.compiler/src/com/oracle/truffle/compiler/HostMethodInfo.java @@ -38,7 +38,7 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ -package org.graalvm.compiler.truffle.common; +package com.oracle.truffle.compiler; /** * TODO GR-44222 as soon as the annotation API is available in libgraal this can be moved to the diff --git a/truffle/src/com.oracle.truffle.compiler/src/org/graalvm/compiler/truffle/common/OptimizedAssumptionDependency.java b/truffle/src/com.oracle.truffle.compiler/src/com/oracle/truffle/compiler/OptimizedAssumptionDependency.java similarity index 98% rename from truffle/src/com.oracle.truffle.compiler/src/org/graalvm/compiler/truffle/common/OptimizedAssumptionDependency.java rename to truffle/src/com.oracle.truffle.compiler/src/com/oracle/truffle/compiler/OptimizedAssumptionDependency.java index a6b6ee4e0f32..b3e04852a797 100644 --- a/truffle/src/com.oracle.truffle.compiler/src/org/graalvm/compiler/truffle/common/OptimizedAssumptionDependency.java +++ b/truffle/src/com.oracle.truffle.compiler/src/com/oracle/truffle/compiler/OptimizedAssumptionDependency.java @@ -38,7 +38,7 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ -package org.graalvm.compiler.truffle.common; +package com.oracle.truffle.compiler; /** * Represents some machine code whose validity depends on an assumption. Valid machine code can diff --git a/truffle/src/com.oracle.truffle.compiler/src/org/graalvm/compiler/truffle/common/PartialEvaluationMethodInfo.java b/truffle/src/com.oracle.truffle.compiler/src/com/oracle/truffle/compiler/PartialEvaluationMethodInfo.java similarity index 93% rename from truffle/src/com.oracle.truffle.compiler/src/org/graalvm/compiler/truffle/common/PartialEvaluationMethodInfo.java rename to truffle/src/com.oracle.truffle.compiler/src/com/oracle/truffle/compiler/PartialEvaluationMethodInfo.java index bb6bfe9c93de..cbc2390db20b 100644 --- a/truffle/src/com.oracle.truffle.compiler/src/org/graalvm/compiler/truffle/common/PartialEvaluationMethodInfo.java +++ b/truffle/src/com.oracle.truffle.compiler/src/com/oracle/truffle/compiler/PartialEvaluationMethodInfo.java @@ -38,10 +38,10 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ -package org.graalvm.compiler.truffle.common; +package com.oracle.truffle.compiler; -import org.graalvm.compiler.truffle.common.TruffleCompilerRuntime.InlineKind; -import org.graalvm.compiler.truffle.common.TruffleCompilerRuntime.LoopExplosionKind; +import com.oracle.truffle.compiler.TruffleCompilerRuntime.InlineKind; +import com.oracle.truffle.compiler.TruffleCompilerRuntime.LoopExplosionKind; /** * TODO GR-44222 as soon as the annotation API is available in libgraal this can be moved to the diff --git a/truffle/src/com.oracle.truffle.compiler/src/org/graalvm/compiler/truffle/common/TruffleCompilable.java b/truffle/src/com.oracle.truffle.compiler/src/com/oracle/truffle/compiler/TruffleCompilable.java similarity index 99% rename from truffle/src/com.oracle.truffle.compiler/src/org/graalvm/compiler/truffle/common/TruffleCompilable.java rename to truffle/src/com.oracle.truffle.compiler/src/com/oracle/truffle/compiler/TruffleCompilable.java index 7f3362f5b65b..43f1a0d36d6e 100644 --- a/truffle/src/com.oracle.truffle.compiler/src/org/graalvm/compiler/truffle/common/TruffleCompilable.java +++ b/truffle/src/com.oracle.truffle.compiler/src/com/oracle/truffle/compiler/TruffleCompilable.java @@ -38,7 +38,7 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ -package org.graalvm.compiler.truffle.common; +package com.oracle.truffle.compiler; import java.io.PrintWriter; import java.io.StringWriter; diff --git a/truffle/src/com.oracle.truffle.compiler/src/org/graalvm/compiler/truffle/common/TruffleCompilationSupport.java b/truffle/src/com.oracle.truffle.compiler/src/com/oracle/truffle/compiler/TruffleCompilationSupport.java similarity index 98% rename from truffle/src/com.oracle.truffle.compiler/src/org/graalvm/compiler/truffle/common/TruffleCompilationSupport.java rename to truffle/src/com.oracle.truffle.compiler/src/com/oracle/truffle/compiler/TruffleCompilationSupport.java index 1f1064e7b71e..1d70e948fe79 100644 --- a/truffle/src/com.oracle.truffle.compiler/src/org/graalvm/compiler/truffle/common/TruffleCompilationSupport.java +++ b/truffle/src/com.oracle.truffle.compiler/src/com/oracle/truffle/compiler/TruffleCompilationSupport.java @@ -38,7 +38,7 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ -package org.graalvm.compiler.truffle.common; +package com.oracle.truffle.compiler; /** * Represents entry points for Truffle runtime implementations to Truffle compilation. diff --git a/truffle/src/com.oracle.truffle.compiler/src/org/graalvm/compiler/truffle/common/TruffleCompilationTask.java b/truffle/src/com.oracle.truffle.compiler/src/com/oracle/truffle/compiler/TruffleCompilationTask.java similarity index 98% rename from truffle/src/com.oracle.truffle.compiler/src/org/graalvm/compiler/truffle/common/TruffleCompilationTask.java rename to truffle/src/com.oracle.truffle.compiler/src/com/oracle/truffle/compiler/TruffleCompilationTask.java index f4b92464db65..202c21b0c42c 100644 --- a/truffle/src/com.oracle.truffle.compiler/src/org/graalvm/compiler/truffle/common/TruffleCompilationTask.java +++ b/truffle/src/com.oracle.truffle.compiler/src/com/oracle/truffle/compiler/TruffleCompilationTask.java @@ -38,7 +38,7 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ -package org.graalvm.compiler.truffle.common; +package com.oracle.truffle.compiler; import java.util.Collections; import java.util.Map; diff --git a/truffle/src/com.oracle.truffle.compiler/src/org/graalvm/compiler/truffle/common/TruffleCompiler.java b/truffle/src/com.oracle.truffle.compiler/src/com/oracle/truffle/compiler/TruffleCompiler.java similarity index 98% rename from truffle/src/com.oracle.truffle.compiler/src/org/graalvm/compiler/truffle/common/TruffleCompiler.java rename to truffle/src/com.oracle.truffle.compiler/src/com/oracle/truffle/compiler/TruffleCompiler.java index 6f2fdaf8063c..faa1c9ce36f9 100644 --- a/truffle/src/com.oracle.truffle.compiler/src/org/graalvm/compiler/truffle/common/TruffleCompiler.java +++ b/truffle/src/com.oracle.truffle.compiler/src/com/oracle/truffle/compiler/TruffleCompiler.java @@ -38,7 +38,7 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ -package org.graalvm.compiler.truffle.common; +package com.oracle.truffle.compiler; /** * A compiler that partially evaluates and compiles a {@link TruffleCompilable} to machine code. diff --git a/truffle/src/com.oracle.truffle.compiler/src/org/graalvm/compiler/truffle/common/TruffleCompilerAssumptionDependency.java b/truffle/src/com.oracle.truffle.compiler/src/com/oracle/truffle/compiler/TruffleCompilerAssumptionDependency.java similarity index 98% rename from truffle/src/com.oracle.truffle.compiler/src/org/graalvm/compiler/truffle/common/TruffleCompilerAssumptionDependency.java rename to truffle/src/com.oracle.truffle.compiler/src/com/oracle/truffle/compiler/TruffleCompilerAssumptionDependency.java index 20cbc272d159..10883dc35999 100644 --- a/truffle/src/com.oracle.truffle.compiler/src/org/graalvm/compiler/truffle/common/TruffleCompilerAssumptionDependency.java +++ b/truffle/src/com.oracle.truffle.compiler/src/com/oracle/truffle/compiler/TruffleCompilerAssumptionDependency.java @@ -38,7 +38,7 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ -package org.graalvm.compiler.truffle.common; +package com.oracle.truffle.compiler; import java.lang.ref.WeakReference; import java.util.Objects; diff --git a/truffle/src/com.oracle.truffle.compiler/src/org/graalvm/compiler/truffle/common/TruffleCompilerListener.java b/truffle/src/com.oracle.truffle.compiler/src/com/oracle/truffle/compiler/TruffleCompilerListener.java similarity index 99% rename from truffle/src/com.oracle.truffle.compiler/src/org/graalvm/compiler/truffle/common/TruffleCompilerListener.java rename to truffle/src/com.oracle.truffle.compiler/src/com/oracle/truffle/compiler/TruffleCompilerListener.java index d8dddf0ba82d..0620d69f639b 100644 --- a/truffle/src/com.oracle.truffle.compiler/src/org/graalvm/compiler/truffle/common/TruffleCompilerListener.java +++ b/truffle/src/com.oracle.truffle.compiler/src/com/oracle/truffle/compiler/TruffleCompilerListener.java @@ -38,7 +38,7 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ -package org.graalvm.compiler.truffle.common; +package com.oracle.truffle.compiler; /** * A listener for events related to the compilation of a {@link TruffleCompilable}. The events are diff --git a/truffle/src/com.oracle.truffle.compiler/src/org/graalvm/compiler/truffle/common/TruffleCompilerOptionDescriptor.java b/truffle/src/com.oracle.truffle.compiler/src/com/oracle/truffle/compiler/TruffleCompilerOptionDescriptor.java similarity index 98% rename from truffle/src/com.oracle.truffle.compiler/src/org/graalvm/compiler/truffle/common/TruffleCompilerOptionDescriptor.java rename to truffle/src/com.oracle.truffle.compiler/src/com/oracle/truffle/compiler/TruffleCompilerOptionDescriptor.java index e813e244f0a6..dd84972d0cf3 100644 --- a/truffle/src/com.oracle.truffle.compiler/src/org/graalvm/compiler/truffle/common/TruffleCompilerOptionDescriptor.java +++ b/truffle/src/com.oracle.truffle.compiler/src/com/oracle/truffle/compiler/TruffleCompilerOptionDescriptor.java @@ -38,7 +38,7 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ -package org.graalvm.compiler.truffle.common; +package com.oracle.truffle.compiler; /** * Represents the description of a Truffle compiler options. diff --git a/truffle/src/com.oracle.truffle.compiler/src/org/graalvm/compiler/truffle/common/TruffleCompilerRuntime.java b/truffle/src/com.oracle.truffle.compiler/src/com/oracle/truffle/compiler/TruffleCompilerRuntime.java similarity index 99% rename from truffle/src/com.oracle.truffle.compiler/src/org/graalvm/compiler/truffle/common/TruffleCompilerRuntime.java rename to truffle/src/com.oracle.truffle.compiler/src/com/oracle/truffle/compiler/TruffleCompilerRuntime.java index 5a350144f4bb..ca31c7121442 100644 --- a/truffle/src/com.oracle.truffle.compiler/src/org/graalvm/compiler/truffle/common/TruffleCompilerRuntime.java +++ b/truffle/src/com.oracle.truffle.compiler/src/com/oracle/truffle/compiler/TruffleCompilerRuntime.java @@ -38,7 +38,7 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ -package org.graalvm.compiler.truffle.common; +package com.oracle.truffle.compiler; import java.util.Map; import java.util.function.Consumer; diff --git a/truffle/src/com.oracle.truffle.compiler/src/org/graalvm/compiler/truffle/common/TruffleSourceLanguagePosition.java b/truffle/src/com.oracle.truffle.compiler/src/com/oracle/truffle/compiler/TruffleSourceLanguagePosition.java similarity index 98% rename from truffle/src/com.oracle.truffle.compiler/src/org/graalvm/compiler/truffle/common/TruffleSourceLanguagePosition.java rename to truffle/src/com.oracle.truffle.compiler/src/com/oracle/truffle/compiler/TruffleSourceLanguagePosition.java index d2a1888edd43..83b51d82e8d0 100644 --- a/truffle/src/com.oracle.truffle.compiler/src/org/graalvm/compiler/truffle/common/TruffleSourceLanguagePosition.java +++ b/truffle/src/com.oracle.truffle.compiler/src/com/oracle/truffle/compiler/TruffleSourceLanguagePosition.java @@ -38,7 +38,7 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ -package org.graalvm.compiler.truffle.common; +package com.oracle.truffle.compiler; import java.net.URI; diff --git a/truffle/src/com.oracle.truffle.compiler/src/org/graalvm/compiler/truffle/common/hotspot/HotSpotTruffleCompiler.java b/truffle/src/com.oracle.truffle.compiler/src/com/oracle/truffle/compiler/hotspot/HotSpotTruffleCompiler.java similarity index 94% rename from truffle/src/com.oracle.truffle.compiler/src/org/graalvm/compiler/truffle/common/hotspot/HotSpotTruffleCompiler.java rename to truffle/src/com.oracle.truffle.compiler/src/com/oracle/truffle/compiler/hotspot/HotSpotTruffleCompiler.java index 7582ef9b530a..44e3924819e2 100644 --- a/truffle/src/com.oracle.truffle.compiler/src/org/graalvm/compiler/truffle/common/hotspot/HotSpotTruffleCompiler.java +++ b/truffle/src/com.oracle.truffle.compiler/src/com/oracle/truffle/compiler/hotspot/HotSpotTruffleCompiler.java @@ -38,10 +38,10 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ -package org.graalvm.compiler.truffle.common.hotspot; +package com.oracle.truffle.compiler.hotspot; -import org.graalvm.compiler.truffle.common.TruffleCompilable; -import org.graalvm.compiler.truffle.common.TruffleCompiler; +import com.oracle.truffle.compiler.TruffleCompilable; +import com.oracle.truffle.compiler.TruffleCompiler; import jdk.vm.ci.meta.ResolvedJavaMethod; diff --git a/truffle/src/com.oracle.truffle.compiler/src/org/graalvm/compiler/truffle/common/hotspot/libgraal/FromLibGraalEntryPointsResolver.java b/truffle/src/com.oracle.truffle.compiler/src/com/oracle/truffle/compiler/hotspot/libgraal/FromLibGraalEntryPointsResolver.java similarity index 98% rename from truffle/src/com.oracle.truffle.compiler/src/org/graalvm/compiler/truffle/common/hotspot/libgraal/FromLibGraalEntryPointsResolver.java rename to truffle/src/com.oracle.truffle.compiler/src/com/oracle/truffle/compiler/hotspot/libgraal/FromLibGraalEntryPointsResolver.java index c25863bd7239..a0d07605f37c 100644 --- a/truffle/src/com.oracle.truffle.compiler/src/org/graalvm/compiler/truffle/common/hotspot/libgraal/FromLibGraalEntryPointsResolver.java +++ b/truffle/src/com.oracle.truffle.compiler/src/com/oracle/truffle/compiler/hotspot/libgraal/FromLibGraalEntryPointsResolver.java @@ -38,7 +38,7 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ -package org.graalvm.compiler.truffle.common.hotspot.libgraal; +package com.oracle.truffle.compiler.hotspot.libgraal; import static java.lang.annotation.ElementType.TYPE; import static java.lang.annotation.ElementType.METHOD; diff --git a/truffle/src/com.oracle.truffle.compiler/src/org/graalvm/compiler/truffle/common/hotspot/libgraal/FromLibGraalId.java b/truffle/src/com.oracle.truffle.compiler/src/com/oracle/truffle/compiler/hotspot/libgraal/FromLibGraalId.java similarity index 97% rename from truffle/src/com.oracle.truffle.compiler/src/org/graalvm/compiler/truffle/common/hotspot/libgraal/FromLibGraalId.java rename to truffle/src/com.oracle.truffle.compiler/src/com/oracle/truffle/compiler/hotspot/libgraal/FromLibGraalId.java index f02fa0da4b51..e024f312b7fa 100644 --- a/truffle/src/com.oracle.truffle.compiler/src/org/graalvm/compiler/truffle/common/hotspot/libgraal/FromLibGraalId.java +++ b/truffle/src/com.oracle.truffle.compiler/src/com/oracle/truffle/compiler/hotspot/libgraal/FromLibGraalId.java @@ -38,7 +38,7 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ -package org.graalvm.compiler.truffle.common.hotspot.libgraal; +package com.oracle.truffle.compiler.hotspot.libgraal; public interface FromLibGraalId { diff --git a/truffle/src/com.oracle.truffle.compiler/src/org/graalvm/compiler/truffle/common/hotspot/libgraal/TruffleFromLibGraal.java b/truffle/src/com.oracle.truffle.compiler/src/com/oracle/truffle/compiler/hotspot/libgraal/TruffleFromLibGraal.java similarity index 99% rename from truffle/src/com.oracle.truffle.compiler/src/org/graalvm/compiler/truffle/common/hotspot/libgraal/TruffleFromLibGraal.java rename to truffle/src/com.oracle.truffle.compiler/src/com/oracle/truffle/compiler/hotspot/libgraal/TruffleFromLibGraal.java index d6504a3308e3..aa19e688b9f8 100644 --- a/truffle/src/com.oracle.truffle.compiler/src/org/graalvm/compiler/truffle/common/hotspot/libgraal/TruffleFromLibGraal.java +++ b/truffle/src/com.oracle.truffle.compiler/src/com/oracle/truffle/compiler/hotspot/libgraal/TruffleFromLibGraal.java @@ -38,7 +38,7 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ -package org.graalvm.compiler.truffle.common.hotspot.libgraal; +package com.oracle.truffle.compiler.hotspot.libgraal; import java.lang.annotation.ElementType; import java.lang.annotation.Repeatable; diff --git a/truffle/src/com.oracle.truffle.compiler/src/org/graalvm/compiler/truffle/common/hotspot/libgraal/TruffleFromLibGraalRepeated.java b/truffle/src/com.oracle.truffle.compiler/src/com/oracle/truffle/compiler/hotspot/libgraal/TruffleFromLibGraalRepeated.java similarity index 97% rename from truffle/src/com.oracle.truffle.compiler/src/org/graalvm/compiler/truffle/common/hotspot/libgraal/TruffleFromLibGraalRepeated.java rename to truffle/src/com.oracle.truffle.compiler/src/com/oracle/truffle/compiler/hotspot/libgraal/TruffleFromLibGraalRepeated.java index 620100dac574..5871021ee70c 100644 --- a/truffle/src/com.oracle.truffle.compiler/src/org/graalvm/compiler/truffle/common/hotspot/libgraal/TruffleFromLibGraalRepeated.java +++ b/truffle/src/com.oracle.truffle.compiler/src/com/oracle/truffle/compiler/hotspot/libgraal/TruffleFromLibGraalRepeated.java @@ -38,7 +38,7 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ -package org.graalvm.compiler.truffle.common.hotspot.libgraal; +package com.oracle.truffle.compiler.hotspot.libgraal; import java.lang.annotation.ElementType; import java.lang.annotation.Retention; diff --git a/truffle/src/com.oracle.truffle.compiler/src/org/graalvm/compiler/truffle/common/hotspot/libgraal/TruffleToLibGraal.java b/truffle/src/com.oracle.truffle.compiler/src/com/oracle/truffle/compiler/hotspot/libgraal/TruffleToLibGraal.java similarity index 98% rename from truffle/src/com.oracle.truffle.compiler/src/org/graalvm/compiler/truffle/common/hotspot/libgraal/TruffleToLibGraal.java rename to truffle/src/com.oracle.truffle.compiler/src/com/oracle/truffle/compiler/hotspot/libgraal/TruffleToLibGraal.java index 6d833d285189..1a00960bfeaa 100644 --- a/truffle/src/com.oracle.truffle.compiler/src/org/graalvm/compiler/truffle/common/hotspot/libgraal/TruffleToLibGraal.java +++ b/truffle/src/com.oracle.truffle.compiler/src/com/oracle/truffle/compiler/hotspot/libgraal/TruffleToLibGraal.java @@ -38,7 +38,7 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ -package org.graalvm.compiler.truffle.common.hotspot.libgraal; +package com.oracle.truffle.compiler.hotspot.libgraal; import java.lang.annotation.ElementType; import java.lang.annotation.Retention; diff --git a/truffle/src/com.oracle.truffle.compiler/src/org/graalvm/compiler/truffle/common/hotspot/libgraal/Utilities.java b/truffle/src/com.oracle.truffle.compiler/src/com/oracle/truffle/compiler/hotspot/libgraal/Utilities.java similarity index 97% rename from truffle/src/com.oracle.truffle.compiler/src/org/graalvm/compiler/truffle/common/hotspot/libgraal/Utilities.java rename to truffle/src/com.oracle.truffle.compiler/src/com/oracle/truffle/compiler/hotspot/libgraal/Utilities.java index b7f73e5718af..6120991c23ef 100644 --- a/truffle/src/com.oracle.truffle.compiler/src/org/graalvm/compiler/truffle/common/hotspot/libgraal/Utilities.java +++ b/truffle/src/com.oracle.truffle.compiler/src/com/oracle/truffle/compiler/hotspot/libgraal/Utilities.java @@ -38,7 +38,7 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ -package org.graalvm.compiler.truffle.common.hotspot.libgraal; +package com.oracle.truffle.compiler.hotspot.libgraal; final class Utilities { diff --git a/truffle/src/com.oracle.truffle.libgraal.processor/src/com/oracle/truffle/libgraal/processor/TruffleFromLibGraalProcessor.java b/truffle/src/com.oracle.truffle.libgraal.processor/src/com/oracle/truffle/libgraal/processor/TruffleFromLibGraalProcessor.java index 11c7d67fc74f..611aec2ac44b 100644 --- a/truffle/src/com.oracle.truffle.libgraal.processor/src/com/oracle/truffle/libgraal/processor/TruffleFromLibGraalProcessor.java +++ b/truffle/src/com.oracle.truffle.libgraal.processor/src/com/oracle/truffle/libgraal/processor/TruffleFromLibGraalProcessor.java @@ -75,8 +75,8 @@ * {@code org.graalvm.nativeimage.StackValue}, it's very hard to use runtime assertion checking. */ @SupportedAnnotationTypes({ - "org.graalvm.compiler.truffle.common.hotspot.libgraal.TruffleFromLibGraal", - "org.graalvm.compiler.truffle.common.hotspot.libgraal.TruffleFromLibGraalRepeated"}) + "com.oracle.truffle.compiler.hotspot.libgraal.TruffleFromLibGraal", + "com.oracle.truffle.compiler.hotspot.libgraal.TruffleFromLibGraalRepeated"}) public class TruffleFromLibGraalProcessor extends AbstractProcessor { /** @@ -167,7 +167,7 @@ private void processElement(ExecutableElement hsCall, DeclaredType annotationTyp annotations = Collections.singletonList(annotation); } - TypeMirror signatureAnnotationType = getType("org.graalvm.compiler.truffle.common.hotspot.libgraal.TruffleFromLibGraal.Signature"); + TypeMirror signatureAnnotationType = getType("com.oracle.truffle.compiler.hotspot.libgraal.TruffleFromLibGraal.Signature"); for (AnnotationMirror a : annotations) { VariableElement annotationValue = getAnnotationValue(a, "value", VariableElement.class); String idName = annotationValue.getSimpleName().toString(); @@ -225,7 +225,7 @@ private void createGenSource(CallsInfo info, String pkg, Name topDeclaringClass, out.println(""); boolean usesJObject = false; for (Id id : info.ids) { - out.printf("import static org.graalvm.compiler.truffle.common.hotspot.libgraal.TruffleFromLibGraal.Id.%s;%n", id.name); + out.printf("import static com.oracle.truffle.compiler.hotspot.libgraal.TruffleFromLibGraal.Id.%s;%n", id.name); TypeMirror returnType = id.returnType; if (!isPrimitiveOrVoid(returnType)) { usesJObject = true; diff --git a/compiler/src/jdk.internal.vm.compiler/src/META-INF/services/com.oracle.truffle.api.TruffleRuntimeAccess b/truffle/src/com.oracle.truffle.runtime/src/META-INF/services/com.oracle.truffle.api.TruffleRuntimeAccess similarity index 100% rename from compiler/src/jdk.internal.vm.compiler/src/META-INF/services/com.oracle.truffle.api.TruffleRuntimeAccess rename to truffle/src/com.oracle.truffle.runtime/src/META-INF/services/com.oracle.truffle.api.TruffleRuntimeAccess diff --git a/compiler/src/jdk.internal.vm.compiler/src/META-INF/services/org.graalvm.compiler.truffle.runtime.LoopNodeFactory b/truffle/src/com.oracle.truffle.runtime/src/META-INF/services/org.graalvm.compiler.truffle.runtime.LoopNodeFactory similarity index 100% rename from compiler/src/jdk.internal.vm.compiler/src/META-INF/services/org.graalvm.compiler.truffle.runtime.LoopNodeFactory rename to truffle/src/com.oracle.truffle.runtime/src/META-INF/services/org.graalvm.compiler.truffle.runtime.LoopNodeFactory diff --git a/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/AbstractCompilationTask.java b/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/AbstractCompilationTask.java index 0b7478e1b121..b70443543bc7 100644 --- a/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/AbstractCompilationTask.java +++ b/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/AbstractCompilationTask.java @@ -51,9 +51,6 @@ import org.graalvm.collections.EconomicMap; import org.graalvm.collections.Equivalence; -import org.graalvm.compiler.truffle.common.TruffleCompilable; -import org.graalvm.compiler.truffle.common.TruffleCompilationTask; -import org.graalvm.compiler.truffle.common.TruffleSourceLanguagePosition; import com.oracle.truffle.api.dsl.Introspection; import com.oracle.truffle.api.nodes.DirectCallNode; @@ -61,6 +58,9 @@ import com.oracle.truffle.api.nodes.NodeCost; import com.oracle.truffle.api.nodes.NodeUtil; import com.oracle.truffle.api.source.SourceSection; +import com.oracle.truffle.compiler.TruffleCompilable; +import com.oracle.truffle.compiler.TruffleCompilationTask; +import com.oracle.truffle.compiler.TruffleSourceLanguagePosition; import jdk.vm.ci.meta.JavaConstant; diff --git a/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/FloodControlHandler.java b/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/FloodControlHandler.java index 575a28bb9e78..d2bca6b2ae8a 100644 --- a/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/FloodControlHandler.java +++ b/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/FloodControlHandler.java @@ -41,7 +41,8 @@ package org.graalvm.compiler.truffle.runtime; import java.util.function.Supplier; -import org.graalvm.compiler.truffle.common.TruffleCompilable; + +import com.oracle.truffle.compiler.TruffleCompilable; /** * Support for an embedder to impose control over logging and dumping during Truffle compilation diff --git a/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/GraalTruffleRuntime.java b/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/GraalTruffleRuntime.java index 5478df2dad4a..23ac82cd8942 100644 --- a/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/GraalTruffleRuntime.java +++ b/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/GraalTruffleRuntime.java @@ -69,15 +69,6 @@ import org.graalvm.collections.EconomicMap; import org.graalvm.collections.UnmodifiableEconomicMap; -import org.graalvm.compiler.truffle.common.ConstantFieldInfo; -import org.graalvm.compiler.truffle.common.HostMethodInfo; -import org.graalvm.compiler.truffle.common.OptimizedAssumptionDependency; -import org.graalvm.compiler.truffle.common.PartialEvaluationMethodInfo; -import org.graalvm.compiler.truffle.common.TruffleCompilable; -import org.graalvm.compiler.truffle.common.TruffleCompilationSupport; -import org.graalvm.compiler.truffle.common.TruffleCompiler; -import org.graalvm.compiler.truffle.common.TruffleCompilerOptionDescriptor; -import org.graalvm.compiler.truffle.common.TruffleCompilerRuntime; import org.graalvm.compiler.truffle.runtime.BackgroundCompileQueue.Priority; import org.graalvm.compiler.truffle.runtime.OptimizedRuntimeOptions.ExceptionAction; import org.graalvm.compiler.truffle.runtime.debug.JFRListener; @@ -145,6 +136,15 @@ import com.oracle.truffle.api.source.SourceSection; import com.oracle.truffle.api.strings.AbstractTruffleString; import com.oracle.truffle.api.strings.TruffleString; +import com.oracle.truffle.compiler.ConstantFieldInfo; +import com.oracle.truffle.compiler.HostMethodInfo; +import com.oracle.truffle.compiler.OptimizedAssumptionDependency; +import com.oracle.truffle.compiler.PartialEvaluationMethodInfo; +import com.oracle.truffle.compiler.TruffleCompilable; +import com.oracle.truffle.compiler.TruffleCompilationSupport; +import com.oracle.truffle.compiler.TruffleCompiler; +import com.oracle.truffle.compiler.TruffleCompilerOptionDescriptor; +import com.oracle.truffle.compiler.TruffleCompilerRuntime; import jdk.vm.ci.code.BailoutException; import jdk.vm.ci.code.InstalledCode; diff --git a/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/GraalTruffleRuntimeListener.java b/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/GraalTruffleRuntimeListener.java index 723f145fa8d5..c2696b37f495 100644 --- a/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/GraalTruffleRuntimeListener.java +++ b/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/GraalTruffleRuntimeListener.java @@ -42,13 +42,12 @@ import java.util.Map; -import org.graalvm.compiler.truffle.common.TruffleCompilationTask; -import org.graalvm.compiler.truffle.common.TruffleCompilerListener.CompilationResultInfo; -import org.graalvm.compiler.truffle.common.TruffleCompilerListener.GraphInfo; - import com.oracle.truffle.api.frame.Frame; import com.oracle.truffle.api.nodes.DirectCallNode; import com.oracle.truffle.api.nodes.Node; +import com.oracle.truffle.compiler.TruffleCompilationTask; +import com.oracle.truffle.compiler.TruffleCompilerListener.CompilationResultInfo; +import com.oracle.truffle.compiler.TruffleCompilerListener.GraphInfo; /** * A listener for events related to the execution and compilation phases of a diff --git a/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/GraalTruffleRuntimeListenerDispatcher.java b/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/GraalTruffleRuntimeListenerDispatcher.java index 0315e0d9b674..a89aae945524 100644 --- a/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/GraalTruffleRuntimeListenerDispatcher.java +++ b/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/GraalTruffleRuntimeListenerDispatcher.java @@ -43,11 +43,10 @@ import java.util.concurrent.CopyOnWriteArrayList; import java.util.function.Consumer; -import org.graalvm.compiler.truffle.common.TruffleCompilable; -import org.graalvm.compiler.truffle.common.TruffleCompilationTask; -import org.graalvm.compiler.truffle.common.TruffleCompilerListener; - import com.oracle.truffle.api.frame.Frame; +import com.oracle.truffle.compiler.TruffleCompilable; +import com.oracle.truffle.compiler.TruffleCompilationTask; +import com.oracle.truffle.compiler.TruffleCompilerListener; /** * A collection for broadcasting {@link GraalTruffleRuntimeListener} events and converting diff --git a/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/OptimizedAssumption.java b/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/OptimizedAssumption.java index 31a5afe4945e..0e905723fa54 100644 --- a/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/OptimizedAssumption.java +++ b/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/OptimizedAssumption.java @@ -43,7 +43,6 @@ import java.util.function.Consumer; import java.util.logging.Level; -import org.graalvm.compiler.truffle.common.OptimizedAssumptionDependency; import org.graalvm.options.OptionValues; import com.oracle.truffle.api.Assumption; @@ -52,6 +51,7 @@ import com.oracle.truffle.api.TruffleLogger; import com.oracle.truffle.api.impl.AbstractAssumption; import com.oracle.truffle.api.nodes.InvalidAssumptionException; +import com.oracle.truffle.compiler.OptimizedAssumptionDependency; import jdk.vm.ci.meta.JavaKind.FormatWithToString; diff --git a/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/OptimizedCallTarget.java b/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/OptimizedCallTarget.java index 7fa4dd2c3967..c233ff84c997 100644 --- a/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/OptimizedCallTarget.java +++ b/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/OptimizedCallTarget.java @@ -52,7 +52,6 @@ import java.util.concurrent.atomic.AtomicReferenceFieldUpdater; import java.util.function.Supplier; -import org.graalvm.compiler.truffle.common.TruffleCompilable; import org.graalvm.compiler.truffle.runtime.OptimizedRuntimeOptions.ExceptionAction; import org.graalvm.options.OptionKey; import org.graalvm.options.OptionValues; @@ -79,6 +78,7 @@ import com.oracle.truffle.api.nodes.NodeUtil; import com.oracle.truffle.api.nodes.NodeVisitor; import com.oracle.truffle.api.nodes.RootNode; +import com.oracle.truffle.compiler.TruffleCompilable; import jdk.vm.ci.meta.JavaConstant; import jdk.vm.ci.meta.SpeculationLog; diff --git a/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/TruffleInlining.java b/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/TruffleInlining.java index f34c4f12f703..c42779caacbd 100644 --- a/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/TruffleInlining.java +++ b/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/TruffleInlining.java @@ -40,7 +40,7 @@ */ package org.graalvm.compiler.truffle.runtime; -import org.graalvm.compiler.truffle.common.TruffleCompilable; +import com.oracle.truffle.compiler.TruffleCompilable; /** * @deprecated this class is schedule for removal. Use {@link AbstractCompilationTask} instead. diff --git a/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/debug/JFRListener.java b/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/debug/JFRListener.java index 761771bdee7b..82cbffa6144b 100644 --- a/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/debug/JFRListener.java +++ b/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/debug/JFRListener.java @@ -48,8 +48,6 @@ import java.util.concurrent.atomic.AtomicLong; import java.util.concurrent.atomic.AtomicReference; -import org.graalvm.compiler.truffle.common.TruffleCompilerListener.CompilationResultInfo; -import org.graalvm.compiler.truffle.common.TruffleCompilerListener.GraphInfo; import org.graalvm.compiler.truffle.jfr.CompilationEvent; import org.graalvm.compiler.truffle.jfr.CompilationStatisticsEvent; import org.graalvm.compiler.truffle.jfr.DeoptimizationEvent; @@ -65,6 +63,8 @@ import org.graalvm.nativeimage.ImageSingletons; import com.oracle.truffle.api.frame.Frame; +import com.oracle.truffle.compiler.TruffleCompilerListener.CompilationResultInfo; +import com.oracle.truffle.compiler.TruffleCompilerListener.GraphInfo; import jdk.vm.ci.meta.ResolvedJavaMethod; import jdk.vm.ci.meta.ResolvedJavaType; diff --git a/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/debug/StatisticsListener.java b/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/debug/StatisticsListener.java index 6facabdfec19..2e1bc2dc2e6e 100644 --- a/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/debug/StatisticsListener.java +++ b/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/debug/StatisticsListener.java @@ -54,9 +54,6 @@ import java.util.function.Function; import java.util.logging.Level; -import org.graalvm.compiler.truffle.common.TruffleCompilable; -import org.graalvm.compiler.truffle.common.TruffleCompilerListener.CompilationResultInfo; -import org.graalvm.compiler.truffle.common.TruffleCompilerListener.GraphInfo; import org.graalvm.compiler.truffle.runtime.AbstractCompilationTask; import org.graalvm.compiler.truffle.runtime.AbstractGraalTruffleRuntimeListener; import org.graalvm.compiler.truffle.runtime.EngineData; @@ -71,6 +68,9 @@ import com.oracle.truffle.api.nodes.Node; import com.oracle.truffle.api.nodes.NodeCost; import com.oracle.truffle.api.nodes.NodeVisitor; +import com.oracle.truffle.compiler.TruffleCompilable; +import com.oracle.truffle.compiler.TruffleCompilerListener.CompilationResultInfo; +import com.oracle.truffle.compiler.TruffleCompilerListener.GraphInfo; public final class StatisticsListener extends AbstractGraalTruffleRuntimeListener { diff --git a/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/debug/TraceASTCompilationListener.java b/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/debug/TraceASTCompilationListener.java index e7686dbd02d6..9530392dcfcc 100644 --- a/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/debug/TraceASTCompilationListener.java +++ b/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/debug/TraceASTCompilationListener.java @@ -43,8 +43,6 @@ import java.io.PrintWriter; import java.io.StringWriter; -import org.graalvm.compiler.truffle.common.TruffleCompilerListener.CompilationResultInfo; -import org.graalvm.compiler.truffle.common.TruffleCompilerListener.GraphInfo; import org.graalvm.compiler.truffle.runtime.AbstractCompilationTask; import org.graalvm.compiler.truffle.runtime.AbstractGraalTruffleRuntimeListener; import org.graalvm.compiler.truffle.runtime.GraalTruffleRuntime; @@ -54,6 +52,8 @@ import com.oracle.truffle.api.nodes.Node; import com.oracle.truffle.api.nodes.NodeUtil; import com.oracle.truffle.api.nodes.NodeVisitor; +import com.oracle.truffle.compiler.TruffleCompilerListener.CompilationResultInfo; +import com.oracle.truffle.compiler.TruffleCompilerListener.GraphInfo; /** * Traces all polymorphic and generic nodes after each successful Truffle compilation. diff --git a/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/debug/TraceCompilationListener.java b/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/debug/TraceCompilationListener.java index b5303cbde9d0..2ed7cea6ae02 100644 --- a/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/debug/TraceCompilationListener.java +++ b/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/debug/TraceCompilationListener.java @@ -40,8 +40,6 @@ */ package org.graalvm.compiler.truffle.runtime.debug; -import org.graalvm.compiler.truffle.common.TruffleCompilerListener.CompilationResultInfo; -import org.graalvm.compiler.truffle.common.TruffleCompilerListener.GraphInfo; import org.graalvm.compiler.truffle.runtime.AbstractCompilationTask; import org.graalvm.compiler.truffle.runtime.AbstractGraalTruffleRuntimeListener; import org.graalvm.compiler.truffle.runtime.CompilationTask; @@ -55,6 +53,8 @@ import com.oracle.truffle.api.nodes.Node; import com.oracle.truffle.api.nodes.NodeVisitor; import com.oracle.truffle.api.source.SourceSection; +import com.oracle.truffle.compiler.TruffleCompilerListener.CompilationResultInfo; +import com.oracle.truffle.compiler.TruffleCompilerListener.GraphInfo; /** * Traces AST-level compilation events with a detailed log message sent to the Truffle log stream diff --git a/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/debug/TraceCompilationPolymorphismListener.java b/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/debug/TraceCompilationPolymorphismListener.java index c0b6cea67747..77610b6eaf23 100644 --- a/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/debug/TraceCompilationPolymorphismListener.java +++ b/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/debug/TraceCompilationPolymorphismListener.java @@ -43,8 +43,6 @@ import java.util.LinkedHashMap; import java.util.Map; -import org.graalvm.compiler.truffle.common.TruffleCompilerListener.CompilationResultInfo; -import org.graalvm.compiler.truffle.common.TruffleCompilerListener.GraphInfo; import org.graalvm.compiler.truffle.runtime.AbstractCompilationTask; import org.graalvm.compiler.truffle.runtime.AbstractGraalTruffleRuntimeListener; import org.graalvm.compiler.truffle.runtime.GraalTruffleRuntime; @@ -55,6 +53,8 @@ import com.oracle.truffle.api.nodes.NodeCost; import com.oracle.truffle.api.nodes.NodeUtil; import com.oracle.truffle.api.nodes.NodeVisitor; +import com.oracle.truffle.compiler.TruffleCompilerListener.CompilationResultInfo; +import com.oracle.truffle.compiler.TruffleCompilerListener.GraphInfo; public final class TraceCompilationPolymorphismListener extends AbstractGraalTruffleRuntimeListener { diff --git a/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/hotspot/HotSpotOptimizedCallTarget.java b/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/hotspot/HotSpotOptimizedCallTarget.java index 26fcc247e351..9189d05ba31f 100644 --- a/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/hotspot/HotSpotOptimizedCallTarget.java +++ b/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/hotspot/HotSpotOptimizedCallTarget.java @@ -42,12 +42,12 @@ import java.lang.reflect.Method; -import org.graalvm.compiler.truffle.common.TruffleCompiler; import org.graalvm.compiler.truffle.runtime.EngineData; import org.graalvm.compiler.truffle.runtime.OptimizedCallTarget; import org.graalvm.compiler.truffle.runtime.TruffleCallBoundary; import com.oracle.truffle.api.nodes.RootNode; +import com.oracle.truffle.compiler.TruffleCompiler; import jdk.vm.ci.code.InstalledCode; import jdk.vm.ci.hotspot.HotSpotNmethod; diff --git a/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/hotspot/HotSpotTruffleRuntime.java b/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/hotspot/HotSpotTruffleRuntime.java index b479aa69800f..4cb535bdf264 100644 --- a/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/hotspot/HotSpotTruffleRuntime.java +++ b/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/hotspot/HotSpotTruffleRuntime.java @@ -53,10 +53,6 @@ import java.util.concurrent.ExecutionException; import java.util.function.Consumer; -import org.graalvm.compiler.truffle.common.TruffleCompilable; -import org.graalvm.compiler.truffle.common.TruffleCompilationSupport; -import org.graalvm.compiler.truffle.common.TruffleCompiler; -import org.graalvm.compiler.truffle.common.hotspot.HotSpotTruffleCompiler; import org.graalvm.compiler.truffle.runtime.BackgroundCompileQueue; import org.graalvm.compiler.truffle.runtime.CompilationTask; import org.graalvm.compiler.truffle.runtime.EngineData; @@ -71,6 +67,10 @@ import com.oracle.truffle.api.impl.AbstractFastThreadLocal; import com.oracle.truffle.api.impl.ThreadLocalHandshake; import com.oracle.truffle.api.nodes.RootNode; +import com.oracle.truffle.compiler.TruffleCompilable; +import com.oracle.truffle.compiler.TruffleCompilationSupport; +import com.oracle.truffle.compiler.TruffleCompiler; +import com.oracle.truffle.compiler.hotspot.HotSpotTruffleCompiler; import jdk.vm.ci.code.InstalledCode; import jdk.vm.ci.code.stack.StackIntrospection; diff --git a/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/hotspot/java/HotSpotTruffleRuntimeAccess.java b/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/hotspot/java/HotSpotTruffleRuntimeAccess.java index 6ae54da2d9ee..29fd9c49ef02 100644 --- a/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/hotspot/java/HotSpotTruffleRuntimeAccess.java +++ b/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/hotspot/java/HotSpotTruffleRuntimeAccess.java @@ -40,11 +40,11 @@ */ package org.graalvm.compiler.truffle.runtime.hotspot.java; -import org.graalvm.compiler.truffle.common.TruffleCompilationSupport; import org.graalvm.compiler.truffle.runtime.hotspot.AbstractHotSpotTruffleRuntimeAccess; import org.graalvm.compiler.truffle.runtime.hotspot.HotSpotTruffleRuntime; import com.oracle.truffle.api.TruffleRuntime; +import com.oracle.truffle.compiler.TruffleCompilationSupport; public final class HotSpotTruffleRuntimeAccess extends AbstractHotSpotTruffleRuntimeAccess { diff --git a/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/hotspot/libgraal/LibGraalCompilationResultInfo.java b/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/hotspot/libgraal/LibGraalCompilationResultInfo.java index 50ef6a1d15be..b952930c521c 100644 --- a/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/hotspot/libgraal/LibGraalCompilationResultInfo.java +++ b/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/hotspot/libgraal/LibGraalCompilationResultInfo.java @@ -42,7 +42,7 @@ import static org.graalvm.libgraal.LibGraalScope.getIsolateThread; -import org.graalvm.compiler.truffle.common.TruffleCompilerListener; +import com.oracle.truffle.compiler.TruffleCompilerListener; /** * Encapsulates a handle to a {@code CompilationResultInfo} object in the libgraal heap. diff --git a/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/hotspot/libgraal/LibGraalGraphInfo.java b/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/hotspot/libgraal/LibGraalGraphInfo.java index 1440c236dc63..61baf7ffa06a 100644 --- a/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/hotspot/libgraal/LibGraalGraphInfo.java +++ b/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/hotspot/libgraal/LibGraalGraphInfo.java @@ -42,8 +42,8 @@ import static org.graalvm.libgraal.LibGraalScope.getIsolateThread; -import org.graalvm.compiler.truffle.common.TruffleCompilerListener; -import org.graalvm.compiler.truffle.common.TruffleCompilerListener.GraphInfo; +import com.oracle.truffle.compiler.TruffleCompilerListener; +import com.oracle.truffle.compiler.TruffleCompilerListener.GraphInfo; /** * Encapsulates a handle to a {@link GraphInfo} object in the libgraal heap. diff --git a/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/hotspot/libgraal/LibGraalHotSpotTruffleCompiler.java b/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/hotspot/libgraal/LibGraalHotSpotTruffleCompiler.java index 4c5371e89ca2..e40a203a5aa3 100644 --- a/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/hotspot/libgraal/LibGraalHotSpotTruffleCompiler.java +++ b/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/hotspot/libgraal/LibGraalHotSpotTruffleCompiler.java @@ -44,16 +44,17 @@ import java.util.function.Supplier; -import org.graalvm.compiler.truffle.common.TruffleCompilable; -import org.graalvm.compiler.truffle.common.TruffleCompilationTask; -import org.graalvm.compiler.truffle.common.TruffleCompilerListener; -import org.graalvm.compiler.truffle.common.hotspot.HotSpotTruffleCompiler; import org.graalvm.compiler.truffle.runtime.hotspot.HotSpotTruffleRuntime; import org.graalvm.libgraal.DestroyedIsolateException; import org.graalvm.libgraal.LibGraal; import org.graalvm.libgraal.LibGraalObject; import org.graalvm.libgraal.LibGraalScope; +import com.oracle.truffle.compiler.TruffleCompilable; +import com.oracle.truffle.compiler.TruffleCompilationTask; +import com.oracle.truffle.compiler.TruffleCompilerListener; +import com.oracle.truffle.compiler.hotspot.HotSpotTruffleCompiler; + import jdk.vm.ci.meta.ResolvedJavaMethod; /** diff --git a/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/hotspot/libgraal/LibGraalTruffleCompilationSupport.java b/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/hotspot/libgraal/LibGraalTruffleCompilationSupport.java index 7c3d52ba1a06..024782b08beb 100644 --- a/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/hotspot/libgraal/LibGraalTruffleCompilationSupport.java +++ b/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/hotspot/libgraal/LibGraalTruffleCompilationSupport.java @@ -43,17 +43,18 @@ import static jdk.vm.ci.hotspot.HotSpotJVMCIRuntime.runtime; import static org.graalvm.libgraal.LibGraalScope.getIsolateThread; -import org.graalvm.compiler.truffle.common.TruffleCompilationSupport; -import org.graalvm.compiler.truffle.common.TruffleCompiler; -import org.graalvm.compiler.truffle.common.TruffleCompilerOptionDescriptor; -import org.graalvm.compiler.truffle.common.TruffleCompilerOptionDescriptor.Type; -import org.graalvm.compiler.truffle.common.TruffleCompilerRuntime; import org.graalvm.compiler.truffle.runtime.hotspot.HotSpotTruffleRuntime; import org.graalvm.libgraal.DestroyedIsolateException; import org.graalvm.libgraal.LibGraalObject; import org.graalvm.libgraal.LibGraalScope; import org.graalvm.libgraal.LibGraalScope.DetachAction; +import com.oracle.truffle.compiler.TruffleCompilationSupport; +import com.oracle.truffle.compiler.TruffleCompiler; +import com.oracle.truffle.compiler.TruffleCompilerOptionDescriptor; +import com.oracle.truffle.compiler.TruffleCompilerRuntime; +import com.oracle.truffle.compiler.TruffleCompilerOptionDescriptor.Type; + /** * Represents a truffle compilation bundling compilable and task into a single object. Also installs * the TTY filter to forward log messages to the truffle runtime. diff --git a/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/hotspot/libgraal/TruffleFromLibGraalEntryPoints.java b/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/hotspot/libgraal/TruffleFromLibGraalEntryPoints.java index d3f139600d5f..7c00bc4414d9 100644 --- a/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/hotspot/libgraal/TruffleFromLibGraalEntryPoints.java +++ b/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/hotspot/libgraal/TruffleFromLibGraalEntryPoints.java @@ -40,50 +40,50 @@ */ package org.graalvm.compiler.truffle.runtime.hotspot.libgraal; +import static com.oracle.truffle.compiler.hotspot.libgraal.TruffleFromLibGraal.Id.AddInlinedTarget; +import static com.oracle.truffle.compiler.hotspot.libgraal.TruffleFromLibGraal.Id.AddTargetToDequeue; +import static com.oracle.truffle.compiler.hotspot.libgraal.TruffleFromLibGraal.Id.AsJavaConstant; +import static com.oracle.truffle.compiler.hotspot.libgraal.TruffleFromLibGraal.Id.CancelCompilation; +import static com.oracle.truffle.compiler.hotspot.libgraal.TruffleFromLibGraal.Id.CompilableToString; +import static com.oracle.truffle.compiler.hotspot.libgraal.TruffleFromLibGraal.Id.ConsumeOptimizedAssumptionDependency; +import static com.oracle.truffle.compiler.hotspot.libgraal.TruffleFromLibGraal.Id.CreateStringSupplier; +import static com.oracle.truffle.compiler.hotspot.libgraal.TruffleFromLibGraal.Id.GetCompilableCallCount; +import static com.oracle.truffle.compiler.hotspot.libgraal.TruffleFromLibGraal.Id.GetCompilableName; +import static com.oracle.truffle.compiler.hotspot.libgraal.TruffleFromLibGraal.Id.GetConstantFieldInfo; +import static com.oracle.truffle.compiler.hotspot.libgraal.TruffleFromLibGraal.Id.GetDescription; +import static com.oracle.truffle.compiler.hotspot.libgraal.TruffleFromLibGraal.Id.GetFailedSpeculationsAddress; +import static com.oracle.truffle.compiler.hotspot.libgraal.TruffleFromLibGraal.Id.GetKnownCallSiteCount; +import static com.oracle.truffle.compiler.hotspot.libgraal.TruffleFromLibGraal.Id.GetLanguage; +import static com.oracle.truffle.compiler.hotspot.libgraal.TruffleFromLibGraal.Id.GetLineNumber; +import static com.oracle.truffle.compiler.hotspot.libgraal.TruffleFromLibGraal.Id.GetNodeClassName; +import static com.oracle.truffle.compiler.hotspot.libgraal.TruffleFromLibGraal.Id.GetNodeId; +import static com.oracle.truffle.compiler.hotspot.libgraal.TruffleFromLibGraal.Id.GetNonTrivialNodeCount; +import static com.oracle.truffle.compiler.hotspot.libgraal.TruffleFromLibGraal.Id.GetOffsetEnd; +import static com.oracle.truffle.compiler.hotspot.libgraal.TruffleFromLibGraal.Id.GetOffsetStart; +import static com.oracle.truffle.compiler.hotspot.libgraal.TruffleFromLibGraal.Id.GetPartialEvaluationMethodInfo; +import static com.oracle.truffle.compiler.hotspot.libgraal.TruffleFromLibGraal.Id.GetPosition; +import static com.oracle.truffle.compiler.hotspot.libgraal.TruffleFromLibGraal.Id.GetSuppliedString; +import static com.oracle.truffle.compiler.hotspot.libgraal.TruffleFromLibGraal.Id.GetURI; +import static com.oracle.truffle.compiler.hotspot.libgraal.TruffleFromLibGraal.Id.HasNextTier; +import static com.oracle.truffle.compiler.hotspot.libgraal.TruffleFromLibGraal.Id.IsCancelled; +import static com.oracle.truffle.compiler.hotspot.libgraal.TruffleFromLibGraal.Id.IsLastTier; +import static com.oracle.truffle.compiler.hotspot.libgraal.TruffleFromLibGraal.Id.IsSameOrSplit; +import static com.oracle.truffle.compiler.hotspot.libgraal.TruffleFromLibGraal.Id.IsSuppressedFailure; +import static com.oracle.truffle.compiler.hotspot.libgraal.TruffleFromLibGraal.Id.IsTrivial; +import static com.oracle.truffle.compiler.hotspot.libgraal.TruffleFromLibGraal.Id.IsValueType; +import static com.oracle.truffle.compiler.hotspot.libgraal.TruffleFromLibGraal.Id.Log; +import static com.oracle.truffle.compiler.hotspot.libgraal.TruffleFromLibGraal.Id.OnCodeInstallation; +import static com.oracle.truffle.compiler.hotspot.libgraal.TruffleFromLibGraal.Id.OnCompilationFailed; +import static com.oracle.truffle.compiler.hotspot.libgraal.TruffleFromLibGraal.Id.OnCompilationRetry; +import static com.oracle.truffle.compiler.hotspot.libgraal.TruffleFromLibGraal.Id.OnFailure; +import static com.oracle.truffle.compiler.hotspot.libgraal.TruffleFromLibGraal.Id.OnGraalTierFinished; +import static com.oracle.truffle.compiler.hotspot.libgraal.TruffleFromLibGraal.Id.OnSuccess; +import static com.oracle.truffle.compiler.hotspot.libgraal.TruffleFromLibGraal.Id.OnTruffleTierFinished; +import static com.oracle.truffle.compiler.hotspot.libgraal.TruffleFromLibGraal.Id.RegisterOptimizedAssumptionDependency; +import static com.oracle.truffle.compiler.hotspot.libgraal.TruffleFromLibGraal.Id.SetCallCounts; import static java.lang.String.format; import static java.lang.System.lineSeparator; import static java.util.stream.Collectors.joining; -import static org.graalvm.compiler.truffle.common.hotspot.libgraal.TruffleFromLibGraal.Id.AddInlinedTarget; -import static org.graalvm.compiler.truffle.common.hotspot.libgraal.TruffleFromLibGraal.Id.AddTargetToDequeue; -import static org.graalvm.compiler.truffle.common.hotspot.libgraal.TruffleFromLibGraal.Id.AsJavaConstant; -import static org.graalvm.compiler.truffle.common.hotspot.libgraal.TruffleFromLibGraal.Id.CancelCompilation; -import static org.graalvm.compiler.truffle.common.hotspot.libgraal.TruffleFromLibGraal.Id.CompilableToString; -import static org.graalvm.compiler.truffle.common.hotspot.libgraal.TruffleFromLibGraal.Id.ConsumeOptimizedAssumptionDependency; -import static org.graalvm.compiler.truffle.common.hotspot.libgraal.TruffleFromLibGraal.Id.CreateStringSupplier; -import static org.graalvm.compiler.truffle.common.hotspot.libgraal.TruffleFromLibGraal.Id.GetCompilableCallCount; -import static org.graalvm.compiler.truffle.common.hotspot.libgraal.TruffleFromLibGraal.Id.GetCompilableName; -import static org.graalvm.compiler.truffle.common.hotspot.libgraal.TruffleFromLibGraal.Id.GetConstantFieldInfo; -import static org.graalvm.compiler.truffle.common.hotspot.libgraal.TruffleFromLibGraal.Id.GetDescription; -import static org.graalvm.compiler.truffle.common.hotspot.libgraal.TruffleFromLibGraal.Id.GetFailedSpeculationsAddress; -import static org.graalvm.compiler.truffle.common.hotspot.libgraal.TruffleFromLibGraal.Id.GetKnownCallSiteCount; -import static org.graalvm.compiler.truffle.common.hotspot.libgraal.TruffleFromLibGraal.Id.GetLanguage; -import static org.graalvm.compiler.truffle.common.hotspot.libgraal.TruffleFromLibGraal.Id.GetLineNumber; -import static org.graalvm.compiler.truffle.common.hotspot.libgraal.TruffleFromLibGraal.Id.GetNodeClassName; -import static org.graalvm.compiler.truffle.common.hotspot.libgraal.TruffleFromLibGraal.Id.GetNodeId; -import static org.graalvm.compiler.truffle.common.hotspot.libgraal.TruffleFromLibGraal.Id.GetNonTrivialNodeCount; -import static org.graalvm.compiler.truffle.common.hotspot.libgraal.TruffleFromLibGraal.Id.GetOffsetEnd; -import static org.graalvm.compiler.truffle.common.hotspot.libgraal.TruffleFromLibGraal.Id.GetOffsetStart; -import static org.graalvm.compiler.truffle.common.hotspot.libgraal.TruffleFromLibGraal.Id.GetPartialEvaluationMethodInfo; -import static org.graalvm.compiler.truffle.common.hotspot.libgraal.TruffleFromLibGraal.Id.GetPosition; -import static org.graalvm.compiler.truffle.common.hotspot.libgraal.TruffleFromLibGraal.Id.GetSuppliedString; -import static org.graalvm.compiler.truffle.common.hotspot.libgraal.TruffleFromLibGraal.Id.GetURI; -import static org.graalvm.compiler.truffle.common.hotspot.libgraal.TruffleFromLibGraal.Id.HasNextTier; -import static org.graalvm.compiler.truffle.common.hotspot.libgraal.TruffleFromLibGraal.Id.IsCancelled; -import static org.graalvm.compiler.truffle.common.hotspot.libgraal.TruffleFromLibGraal.Id.IsLastTier; -import static org.graalvm.compiler.truffle.common.hotspot.libgraal.TruffleFromLibGraal.Id.IsSameOrSplit; -import static org.graalvm.compiler.truffle.common.hotspot.libgraal.TruffleFromLibGraal.Id.IsSuppressedFailure; -import static org.graalvm.compiler.truffle.common.hotspot.libgraal.TruffleFromLibGraal.Id.IsTrivial; -import static org.graalvm.compiler.truffle.common.hotspot.libgraal.TruffleFromLibGraal.Id.IsValueType; -import static org.graalvm.compiler.truffle.common.hotspot.libgraal.TruffleFromLibGraal.Id.Log; -import static org.graalvm.compiler.truffle.common.hotspot.libgraal.TruffleFromLibGraal.Id.OnCodeInstallation; -import static org.graalvm.compiler.truffle.common.hotspot.libgraal.TruffleFromLibGraal.Id.OnCompilationFailed; -import static org.graalvm.compiler.truffle.common.hotspot.libgraal.TruffleFromLibGraal.Id.OnCompilationRetry; -import static org.graalvm.compiler.truffle.common.hotspot.libgraal.TruffleFromLibGraal.Id.OnFailure; -import static org.graalvm.compiler.truffle.common.hotspot.libgraal.TruffleFromLibGraal.Id.OnGraalTierFinished; -import static org.graalvm.compiler.truffle.common.hotspot.libgraal.TruffleFromLibGraal.Id.OnSuccess; -import static org.graalvm.compiler.truffle.common.hotspot.libgraal.TruffleFromLibGraal.Id.OnTruffleTierFinished; -import static org.graalvm.compiler.truffle.common.hotspot.libgraal.TruffleFromLibGraal.Id.RegisterOptimizedAssumptionDependency; -import static org.graalvm.compiler.truffle.common.hotspot.libgraal.TruffleFromLibGraal.Id.SetCallCounts; import java.io.PrintStream; import java.lang.reflect.Method; @@ -98,22 +98,23 @@ import java.util.function.Supplier; import java.util.stream.Stream; -import org.graalvm.compiler.truffle.common.ConstantFieldInfo; -import org.graalvm.compiler.truffle.common.HostMethodInfo; -import org.graalvm.compiler.truffle.common.OptimizedAssumptionDependency; -import org.graalvm.compiler.truffle.common.PartialEvaluationMethodInfo; -import org.graalvm.compiler.truffle.common.TruffleCompilable; -import org.graalvm.compiler.truffle.common.TruffleCompilationTask; -import org.graalvm.compiler.truffle.common.TruffleCompilerAssumptionDependency; -import org.graalvm.compiler.truffle.common.TruffleCompilerListener; -import org.graalvm.compiler.truffle.common.TruffleCompilerRuntime; -import org.graalvm.compiler.truffle.common.TruffleSourceLanguagePosition; -import org.graalvm.compiler.truffle.common.hotspot.libgraal.TruffleFromLibGraal; -import org.graalvm.compiler.truffle.common.hotspot.libgraal.TruffleFromLibGraal.Id; import org.graalvm.compiler.truffle.runtime.OptimizedCallTarget; import org.graalvm.compiler.truffle.runtime.hotspot.libgraal.BinaryOutput.ByteArrayBinaryOutput; import org.graalvm.libgraal.LibGraal; +import com.oracle.truffle.compiler.ConstantFieldInfo; +import com.oracle.truffle.compiler.HostMethodInfo; +import com.oracle.truffle.compiler.OptimizedAssumptionDependency; +import com.oracle.truffle.compiler.PartialEvaluationMethodInfo; +import com.oracle.truffle.compiler.TruffleCompilable; +import com.oracle.truffle.compiler.TruffleCompilationTask; +import com.oracle.truffle.compiler.TruffleCompilerAssumptionDependency; +import com.oracle.truffle.compiler.TruffleCompilerListener; +import com.oracle.truffle.compiler.TruffleCompilerRuntime; +import com.oracle.truffle.compiler.TruffleSourceLanguagePosition; +import com.oracle.truffle.compiler.hotspot.libgraal.TruffleFromLibGraal; +import com.oracle.truffle.compiler.hotspot.libgraal.TruffleFromLibGraal.Id; + import jdk.vm.ci.code.InstalledCode; import jdk.vm.ci.hotspot.HotSpotSpeculationLog; import jdk.vm.ci.meta.JavaConstant; diff --git a/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/hotspot/libgraal/TruffleToLibGraalCalls.java b/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/hotspot/libgraal/TruffleToLibGraalCalls.java index c359e463d497..0d3aaa0b6ee2 100644 --- a/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/hotspot/libgraal/TruffleToLibGraalCalls.java +++ b/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/hotspot/libgraal/TruffleToLibGraalCalls.java @@ -40,34 +40,34 @@ */ package org.graalvm.compiler.truffle.runtime.hotspot.libgraal; -import static org.graalvm.compiler.truffle.common.hotspot.libgraal.TruffleToLibGraal.Id.DoCompile; -import static org.graalvm.compiler.truffle.common.hotspot.libgraal.TruffleToLibGraal.Id.GetCompilerConfigurationFactoryName; -import static org.graalvm.compiler.truffle.common.hotspot.libgraal.TruffleToLibGraal.Id.GetDataPatchesCount; -import static org.graalvm.compiler.truffle.common.hotspot.libgraal.TruffleToLibGraal.Id.GetExceptionHandlersCount; -import static org.graalvm.compiler.truffle.common.hotspot.libgraal.TruffleToLibGraal.Id.GetInfopoints; -import static org.graalvm.compiler.truffle.common.hotspot.libgraal.TruffleToLibGraal.Id.GetInfopointsCount; -import static org.graalvm.compiler.truffle.common.hotspot.libgraal.TruffleToLibGraal.Id.GetMarksCount; -import static org.graalvm.compiler.truffle.common.hotspot.libgraal.TruffleToLibGraal.Id.GetNodeCount; -import static org.graalvm.compiler.truffle.common.hotspot.libgraal.TruffleToLibGraal.Id.GetNodeTypes; -import static org.graalvm.compiler.truffle.common.hotspot.libgraal.TruffleToLibGraal.Id.GetSuppliedString; -import static org.graalvm.compiler.truffle.common.hotspot.libgraal.TruffleToLibGraal.Id.GetTargetCodeSize; -import static org.graalvm.compiler.truffle.common.hotspot.libgraal.TruffleToLibGraal.Id.GetTotalFrameSize; -import static org.graalvm.compiler.truffle.common.hotspot.libgraal.TruffleToLibGraal.Id.InitializeCompiler; -import static org.graalvm.compiler.truffle.common.hotspot.libgraal.TruffleToLibGraal.Id.InitializeRuntime; -import static org.graalvm.compiler.truffle.common.hotspot.libgraal.TruffleToLibGraal.Id.InstallTruffleCallBoundaryMethod; -import static org.graalvm.compiler.truffle.common.hotspot.libgraal.TruffleToLibGraal.Id.InstallTruffleReservedOopMethod; -import static org.graalvm.compiler.truffle.common.hotspot.libgraal.TruffleToLibGraal.Id.NewCompiler; -import static org.graalvm.compiler.truffle.common.hotspot.libgraal.TruffleToLibGraal.Id.PendingTransferToInterpreterOffset; -import static org.graalvm.compiler.truffle.common.hotspot.libgraal.TruffleToLibGraal.Id.PurgePartialEvaluationCaches; -import static org.graalvm.compiler.truffle.common.hotspot.libgraal.TruffleToLibGraal.Id.RegisterRuntime; -import static org.graalvm.compiler.truffle.common.hotspot.libgraal.TruffleToLibGraal.Id.Shutdown; - -import org.graalvm.compiler.truffle.common.TruffleCompilable; -import org.graalvm.compiler.truffle.common.TruffleCompilationTask; -import org.graalvm.compiler.truffle.common.TruffleCompilerListener; -import org.graalvm.compiler.truffle.common.TruffleCompilerRuntime; -import org.graalvm.compiler.truffle.common.hotspot.libgraal.TruffleToLibGraal; -import org.graalvm.compiler.truffle.common.hotspot.libgraal.TruffleToLibGraal.Id; +import static com.oracle.truffle.compiler.hotspot.libgraal.TruffleToLibGraal.Id.DoCompile; +import static com.oracle.truffle.compiler.hotspot.libgraal.TruffleToLibGraal.Id.GetCompilerConfigurationFactoryName; +import static com.oracle.truffle.compiler.hotspot.libgraal.TruffleToLibGraal.Id.GetDataPatchesCount; +import static com.oracle.truffle.compiler.hotspot.libgraal.TruffleToLibGraal.Id.GetExceptionHandlersCount; +import static com.oracle.truffle.compiler.hotspot.libgraal.TruffleToLibGraal.Id.GetInfopoints; +import static com.oracle.truffle.compiler.hotspot.libgraal.TruffleToLibGraal.Id.GetInfopointsCount; +import static com.oracle.truffle.compiler.hotspot.libgraal.TruffleToLibGraal.Id.GetMarksCount; +import static com.oracle.truffle.compiler.hotspot.libgraal.TruffleToLibGraal.Id.GetNodeCount; +import static com.oracle.truffle.compiler.hotspot.libgraal.TruffleToLibGraal.Id.GetNodeTypes; +import static com.oracle.truffle.compiler.hotspot.libgraal.TruffleToLibGraal.Id.GetSuppliedString; +import static com.oracle.truffle.compiler.hotspot.libgraal.TruffleToLibGraal.Id.GetTargetCodeSize; +import static com.oracle.truffle.compiler.hotspot.libgraal.TruffleToLibGraal.Id.GetTotalFrameSize; +import static com.oracle.truffle.compiler.hotspot.libgraal.TruffleToLibGraal.Id.InitializeCompiler; +import static com.oracle.truffle.compiler.hotspot.libgraal.TruffleToLibGraal.Id.InitializeRuntime; +import static com.oracle.truffle.compiler.hotspot.libgraal.TruffleToLibGraal.Id.InstallTruffleCallBoundaryMethod; +import static com.oracle.truffle.compiler.hotspot.libgraal.TruffleToLibGraal.Id.InstallTruffleReservedOopMethod; +import static com.oracle.truffle.compiler.hotspot.libgraal.TruffleToLibGraal.Id.NewCompiler; +import static com.oracle.truffle.compiler.hotspot.libgraal.TruffleToLibGraal.Id.PendingTransferToInterpreterOffset; +import static com.oracle.truffle.compiler.hotspot.libgraal.TruffleToLibGraal.Id.PurgePartialEvaluationCaches; +import static com.oracle.truffle.compiler.hotspot.libgraal.TruffleToLibGraal.Id.RegisterRuntime; +import static com.oracle.truffle.compiler.hotspot.libgraal.TruffleToLibGraal.Id.Shutdown; + +import com.oracle.truffle.compiler.TruffleCompilable; +import com.oracle.truffle.compiler.TruffleCompilationTask; +import com.oracle.truffle.compiler.TruffleCompilerListener; +import com.oracle.truffle.compiler.TruffleCompilerRuntime; +import com.oracle.truffle.compiler.hotspot.libgraal.TruffleToLibGraal; +import com.oracle.truffle.compiler.hotspot.libgraal.TruffleToLibGraal.Id; /** * Native methods linked to libgraal entry points. From ce30563b25a814512c12a954977144dc8eebf9b1 Mon Sep 17 00:00:00 2001 From: Christian Humer Date: Wed, 21 Jun 2023 21:46:19 +0200 Subject: [PATCH 08/43] Changes and cleanup after moving compiler interfaces to use the new com.oracle.truffle.compiler package. --- compiler/mx.compiler/mx_compiler.py | 5 +- compiler/mx.compiler/suite.py | 1 + .../compiler/host/HostInliningPhase.java | 10 +- .../TruffleSafepointInsertionPhase.java | 6 +- .../TruffleGraphBuilderPlugins.java | 5 +- .../TruffleInvocationPlugins.java | 45 +-- .../src/org/graalvm/jniutils/JNIUtil.java | 13 + .../libgraal/jni/FromLibGraalCalls.java | 76 +---- .../hotspot/libgraal/HSTruffleCompilable.java | 36 +-- .../libgraal/HSTruffleCompilationTask.java | 44 +-- .../libgraal/HSTruffleCompilerListener.java | 15 +- .../libgraal/HSTruffleCompilerRuntime.java | 33 ++- .../LibGraalTruffleHostEnvironmentLookup.java | 20 +- .../libgraal/TruffleFromLibGraalCalls.java | 25 +- .../libgraal/TruffleLibGraalShutdownHook.java | 72 +++++ .../TruffleToLibGraalEntryPoints.java | 81 ++++- substratevm/mx.substratevm/mx_substratevm.py | 9 +- .../svm/graal/hotspot/libgraal/LibGraal.java | 280 ++++++++++++++++++ .../hotspot/libgraal/LibGraalEntryPoints.java | 56 +--- .../hotspot/libgraal/LibGraalFeature.java | 44 +-- truffle/mx.truffle/suite.py | 9 +- .../src/com/oracle/truffle/api/Truffle.java | 5 +- .../hotspot/libgraal/TruffleFromLibGraal.java | 4 +- .../hotspot/libgraal/TruffleToLibGraal.java | 1 + .../TruffleFromLibGraalProcessor.java | 6 +- ...om.oracle.truffle.api.TruffleRuntimeAccess | 2 +- .../truffle/runtime/GraalTruffleRuntime.java | 27 +- .../AbstractHotSpotTruffleRuntimeAccess.java | 86 ------ .../hotspot/HotSpotTruffleRuntimeAccess.java | 123 ++++++++ .../runtime/hotspot/JVMCIOpenSupport.java | 103 ------- ...RuntimeAccess.java => ModulesSupport.java} | 50 ++-- .../java/HotSpotTruffleRuntimeAccess.java | 68 ----- .../LibGraalTruffleCompilationSupport.java | 5 + .../TruffleFromLibGraalEntryPoints.java | 6 + .../libgraal/TruffleToLibGraalCalls.java | 10 +- .../src/org/graalvm/libgraal/LibGraal.java | 1 + .../org/graalvm/libgraal/LibGraalIsolate.java | 2 +- .../org/graalvm/libgraal/LibGraalScope.java | 8 + .../src/truffle_attach.cc | 20 +- 39 files changed, 827 insertions(+), 585 deletions(-) create mode 100644 compiler/src/org.graalvm.compiler.truffle.compiler.hotspot.libgraal/src/org/graalvm/compiler/truffle/compiler/hotspot/libgraal/TruffleLibGraalShutdownHook.java create mode 100644 substratevm/src/com.oracle.svm.graal.hotspot.libgraal/src/com/oracle/svm/graal/hotspot/libgraal/LibGraal.java delete mode 100644 truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/hotspot/AbstractHotSpotTruffleRuntimeAccess.java create mode 100644 truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/hotspot/HotSpotTruffleRuntimeAccess.java delete mode 100644 truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/hotspot/JVMCIOpenSupport.java rename truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/hotspot/{libgraal/LibGraalTruffleRuntimeAccess.java => ModulesSupport.java} (65%) delete mode 100644 truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/hotspot/java/HotSpotTruffleRuntimeAccess.java diff --git a/compiler/mx.compiler/mx_compiler.py b/compiler/mx.compiler/mx_compiler.py index dfab3cf79425..42addf0fb410 100644 --- a/compiler/mx.compiler/mx_compiler.py +++ b/compiler/mx.compiler/mx_compiler.py @@ -705,6 +705,9 @@ def _unittest_config_participant(config): # tests widely use JVMCI classes so JVMCI needs to also export all its packages to # ALL-UNNAMED. mainClassArgs.extend(['-JUnitOpenPackages', 'jdk.internal.vm.ci/*=jdk.internal.vm.compiler,ALL-UNNAMED']) + mainClassArgs.extend(['-JUnitOpenPackages', 'org.graalvm.truffle/*=ALL-UNNAMED']) + mainClassArgs.extend(['-JUnitOpenPackages', 'org.graalvm.truffle.compiler/*=ALL-UNNAMED']) + mainClassArgs.extend(['-JUnitOpenPackages', 'org.graalvm.truffle.runtime/*=ALL-UNNAMED']) limited_modules = None for arg in vmArgs: @@ -1312,7 +1315,7 @@ def __init__(self): self.boot_dists.append(d) self.boot_jars.append(d.classpath_repr()) - self.jvmci_parent_dists = [mx.distribution('truffle:TRUFFLE_API', 'truffle:TRUFFLE_COMPILER', 'truffle:TRUFFLE_RUNTIME')] + self.jvmci_parent_dists = [] self.jvmci_parent_jars = [jar.classpath_repr() for jar in self.jvmci_parent_dists] self.dists = self.jvmci_dists + self.jvmci_parent_dists + self.boot_dists diff --git a/compiler/mx.compiler/suite.py b/compiler/mx.compiler/suite.py index 63e38003cbae..2deea249d270 100644 --- a/compiler/mx.compiler/suite.py +++ b/compiler/mx.compiler/suite.py @@ -434,6 +434,7 @@ "jdk.vm.ci.code", "jdk.vm.ci.runtime", "jdk.vm.ci.hotspot", + "jdk.vm.ci.services", ], }, "jacoco" : "exclude", # GR-13965 diff --git a/compiler/src/jdk.internal.vm.compiler/src/org/graalvm/compiler/truffle/compiler/host/HostInliningPhase.java b/compiler/src/jdk.internal.vm.compiler/src/org/graalvm/compiler/truffle/compiler/host/HostInliningPhase.java index 700a6379f297..7648a02bfab0 100644 --- a/compiler/src/jdk.internal.vm.compiler/src/org/graalvm/compiler/truffle/compiler/host/HostInliningPhase.java +++ b/compiler/src/jdk.internal.vm.compiler/src/org/graalvm/compiler/truffle/compiler/host/HostInliningPhase.java @@ -78,10 +78,9 @@ import org.graalvm.compiler.phases.common.inlining.InliningUtil; import org.graalvm.compiler.phases.contract.NodeCostUtil; import org.graalvm.compiler.phases.tiers.HighTierContext; +import org.graalvm.compiler.truffle.compiler.KnownTruffleTypes; import org.graalvm.compiler.truffle.compiler.PartialEvaluator; -import com.oracle.truffle.api.CompilerDirectives; -import com.oracle.truffle.api.CompilerDirectives.TruffleBoundary; import com.oracle.truffle.compiler.HostMethodInfo; import jdk.vm.ci.meta.JavaTypeProfile; @@ -397,9 +396,10 @@ private static boolean isInBudget(CallTree call, int graphSize, int sizeLimit) { *

* This method follows the same rules as the {@link PartialEvaluator} for recursive exploration. * For example, methods dominated by a call to - * {@link CompilerDirectives#transferToInterpreterAndInvalidate()} are not inlined or explored. - * The same applies to calls protected by {@link CompilerDirectives#inInterpreter()} or methods - * annotated by {@link TruffleBoundary}. + * {@link KnownTruffleTypes#CompilerDirectives}#transferToInterpreterAndInvalidate() not inlined + * or explored. The same applies to calls protected by + * {@link KnownTruffleTypes#CompilerDirectives}#inInterpreter() or methods annotated by + * TruffleBoundary. */ private List exploreGraph(InliningPhaseContext context, CallTree caller, StructuredGraph graph, int exploreRound) { caller.exploredIndex = exploreRound; diff --git a/compiler/src/jdk.internal.vm.compiler/src/org/graalvm/compiler/truffle/compiler/phases/TruffleSafepointInsertionPhase.java b/compiler/src/jdk.internal.vm.compiler/src/org/graalvm/compiler/truffle/compiler/phases/TruffleSafepointInsertionPhase.java index c1be891c47e9..66d24978044a 100644 --- a/compiler/src/jdk.internal.vm.compiler/src/org/graalvm/compiler/truffle/compiler/phases/TruffleSafepointInsertionPhase.java +++ b/compiler/src/jdk.internal.vm.compiler/src/org/graalvm/compiler/truffle/compiler/phases/TruffleSafepointInsertionPhase.java @@ -47,8 +47,6 @@ import org.graalvm.compiler.truffle.compiler.TruffleCompilation; import org.graalvm.compiler.truffle.compiler.nodes.TruffleSafepointNode; -import com.oracle.truffle.api.TruffleSafepoint; - import jdk.vm.ci.meta.JavaConstant; import jdk.vm.ci.meta.ResolvedJavaField; import jdk.vm.ci.meta.ResolvedJavaMethod; @@ -57,8 +55,8 @@ /** * Adds Truffle safepoints to loops and methods ends. * - * Invocations of {@link TruffleSafepoint#poll(com.oracle.truffle.api.nodes.Node)} are removed - * during PE. This phase ensures that they are efficiently added again at method and loop ends. + * Invocations of TruffleSafepoint.poll are removed during PE. This phase ensures that they are + * efficiently added again at method and loop ends. */ public final class TruffleSafepointInsertionPhase extends Phase { diff --git a/compiler/src/jdk.internal.vm.compiler/src/org/graalvm/compiler/truffle/compiler/substitutions/TruffleGraphBuilderPlugins.java b/compiler/src/jdk.internal.vm.compiler/src/org/graalvm/compiler/truffle/compiler/substitutions/TruffleGraphBuilderPlugins.java index d69b9cf9cdbf..a102383cff68 100644 --- a/compiler/src/jdk.internal.vm.compiler/src/org/graalvm/compiler/truffle/compiler/substitutions/TruffleGraphBuilderPlugins.java +++ b/compiler/src/jdk.internal.vm.compiler/src/org/graalvm/compiler/truffle/compiler/substitutions/TruffleGraphBuilderPlugins.java @@ -171,7 +171,7 @@ public static void registerInvocationPlugins(InvocationPlugins plugins, KnownTru private static void registerTruffleSafepointPlugins(InvocationPlugins plugins, KnownTruffleTypes types, boolean canDelayIntrinsification) { final ResolvedJavaType truffleSafepoint = types.TruffleSafepoint; Registration r = new Registration(plugins, new ResolvedJavaSymbol(truffleSafepoint)); - r.register(new RequiredInvocationPlugin("poll", com.oracle.truffle.api.nodes.Node.class) { + r.register(new RequiredInvocationPlugin("poll", new ResolvedJavaSymbol(types.Node)) { @Override public boolean apply(GraphBuilderContext b, ResolvedJavaMethod targetMethod, Receiver receiver, ValueNode arg) { if (!TruffleSafepointInsertionPhase.allowsSafepoints(b.getGraph())) { @@ -927,9 +927,6 @@ public boolean apply(GraphBuilderContext b, ResolvedJavaMethod targetMethod, Rec }); } - /** - * @see com.oracle.truffle.api.nodes.Node - */ public static void registerNodePlugins(InvocationPlugins plugins, KnownTruffleTypes types, MetaAccessProvider metaAccess, boolean canDelayIntrinsification, ConstantReflectionProvider constantReflection) { Registration r = new Registration(plugins, new ResolvedJavaSymbol(types.Node)); diff --git a/compiler/src/jdk.internal.vm.compiler/src/org/graalvm/compiler/truffle/compiler/substitutions/TruffleInvocationPlugins.java b/compiler/src/jdk.internal.vm.compiler/src/org/graalvm/compiler/truffle/compiler/substitutions/TruffleInvocationPlugins.java index 8bad07545a10..61fcd7a3860f 100644 --- a/compiler/src/jdk.internal.vm.compiler/src/org/graalvm/compiler/truffle/compiler/substitutions/TruffleInvocationPlugins.java +++ b/compiler/src/jdk.internal.vm.compiler/src/org/graalvm/compiler/truffle/compiler/substitutions/TruffleInvocationPlugins.java @@ -45,6 +45,7 @@ import org.graalvm.compiler.nodes.graphbuilderconf.InvocationPlugin; import org.graalvm.compiler.nodes.graphbuilderconf.InvocationPlugin.InlineOnlyInvocationPlugin; import org.graalvm.compiler.nodes.graphbuilderconf.InvocationPlugins; +import org.graalvm.compiler.nodes.graphbuilderconf.InvocationPlugins.OptionalLazySymbol; import org.graalvm.compiler.nodes.spi.Replacements; import org.graalvm.compiler.replacements.nodes.ArrayCopyWithConversionsNode; import org.graalvm.compiler.replacements.nodes.ArrayIndexOfMacroNode; @@ -55,8 +56,6 @@ import org.graalvm.compiler.replacements.nodes.MacroNode; import org.graalvm.word.LocationIdentity; -import com.oracle.truffle.api.nodes.Node; - import jdk.vm.ci.aarch64.AArch64; import jdk.vm.ci.amd64.AMD64; import jdk.vm.ci.code.Architecture; @@ -268,28 +267,30 @@ private static void registerTStringPlugins(InvocationPlugins plugins, Replacemen plugins.registerIntrinsificationPredicate(t -> t.getName().equals("Lcom/oracle/truffle/api/strings/TStringOps;")); InvocationPlugins.Registration r = new InvocationPlugins.Registration(plugins, "com.oracle.truffle.api.strings.TStringOps", replacements); - r.register(new InlineOnlyInvocationPlugin("runIndexOfAny1", Node.class, byte[].class, long.class, int.class, int.class, boolean.class, int.class, int.class) { + OptionalLazySymbol nodeType = new OptionalLazySymbol("com.oracle.truffle.api.nodes.Node"); + + r.register(new InlineOnlyInvocationPlugin("runIndexOfAny1", nodeType, byte[].class, long.class, int.class, int.class, boolean.class, int.class, int.class) { @Override public boolean apply(GraphBuilderContext b, ResolvedJavaMethod targetMethod, Receiver receiver, ValueNode location, ValueNode array, ValueNode offset, ValueNode length, ValueNode stride, ValueNode isNative, ValueNode fromIndex, ValueNode v0) { return applyIndexOf(b, targetMethod, ArrayIndexOfVariant.MatchAny, location, array, offset, length, stride, isNative, fromIndex, v0); } }); - r.register(new InlineOnlyInvocationPlugin("runIndexOfAny2", Node.class, byte[].class, long.class, int.class, int.class, boolean.class, int.class, int.class, int.class) { + r.register(new InlineOnlyInvocationPlugin("runIndexOfAny2", nodeType, byte[].class, long.class, int.class, int.class, boolean.class, int.class, int.class, int.class) { @Override public boolean apply(GraphBuilderContext b, ResolvedJavaMethod targetMethod, Receiver receiver, ValueNode location, ValueNode array, ValueNode offset, ValueNode length, ValueNode stride, ValueNode isNative, ValueNode fromIndex, ValueNode v0, ValueNode v1) { return applyIndexOf(b, targetMethod, ArrayIndexOfVariant.MatchAny, location, array, offset, length, stride, isNative, fromIndex, v0, v1); } }); - r.register(new InlineOnlyInvocationPlugin("runIndexOfAny3", Node.class, byte[].class, long.class, int.class, int.class, boolean.class, int.class, int.class, int.class, int.class) { + r.register(new InlineOnlyInvocationPlugin("runIndexOfAny3", nodeType, byte[].class, long.class, int.class, int.class, boolean.class, int.class, int.class, int.class, int.class) { @Override public boolean apply(GraphBuilderContext b, ResolvedJavaMethod targetMethod, Receiver receiver, ValueNode location, ValueNode array, ValueNode offset, ValueNode length, ValueNode stride, ValueNode isNative, ValueNode fromIndex, ValueNode v0, ValueNode v1, ValueNode v2) { return applyIndexOf(b, targetMethod, ArrayIndexOfVariant.MatchAny, location, array, offset, length, stride, isNative, fromIndex, v0, v1, v2); } }); - r.register(new InlineOnlyInvocationPlugin("runIndexOfAny4", Node.class, byte[].class, long.class, int.class, int.class, boolean.class, int.class, int.class, int.class, int.class, int.class) { + r.register(new InlineOnlyInvocationPlugin("runIndexOfAny4", nodeType, byte[].class, long.class, int.class, int.class, boolean.class, int.class, int.class, int.class, int.class, int.class) { @Override public boolean apply(GraphBuilderContext b, ResolvedJavaMethod targetMethod, Receiver receiver, ValueNode location, ValueNode array, ValueNode offset, ValueNode length, ValueNode stride, ValueNode isNative, ValueNode fromIndex, ValueNode v0, ValueNode v1, ValueNode v2, @@ -297,14 +298,14 @@ public boolean apply(GraphBuilderContext b, ResolvedJavaMethod targetMethod, Rec return applyIndexOf(b, targetMethod, ArrayIndexOfVariant.MatchAny, location, array, offset, length, stride, isNative, fromIndex, v0, v1, v2, v3); } }); - r.register(new InlineOnlyInvocationPlugin("runIndexOfRange1", Node.class, byte[].class, long.class, int.class, int.class, boolean.class, int.class, int.class, int.class) { + r.register(new InlineOnlyInvocationPlugin("runIndexOfRange1", nodeType, byte[].class, long.class, int.class, int.class, boolean.class, int.class, int.class, int.class) { @Override public boolean apply(GraphBuilderContext b, ResolvedJavaMethod targetMethod, Receiver receiver, ValueNode location, ValueNode array, ValueNode offset, ValueNode length, ValueNode stride, ValueNode isNative, ValueNode fromIndex, ValueNode v0, ValueNode v1) { return applyIndexOf(b, targetMethod, ArrayIndexOfVariant.MatchRange, location, array, offset, length, stride, isNative, fromIndex, v0, v1); } }); - r.register(new InlineOnlyInvocationPlugin("runIndexOfRange2", Node.class, byte[].class, long.class, int.class, int.class, boolean.class, int.class, int.class, int.class, int.class, + r.register(new InlineOnlyInvocationPlugin("runIndexOfRange2", nodeType, byte[].class, long.class, int.class, int.class, boolean.class, int.class, int.class, int.class, int.class, int.class) { @Override public boolean apply(GraphBuilderContext b, ResolvedJavaMethod targetMethod, Receiver receiver, ValueNode location, @@ -313,14 +314,14 @@ public boolean apply(GraphBuilderContext b, ResolvedJavaMethod targetMethod, Rec return applyIndexOf(b, targetMethod, ArrayIndexOfVariant.MatchRange, location, array, offset, length, stride, isNative, fromIndex, v0, v1, v2, v3); } }); - r.register(new InlineOnlyInvocationPlugin("runIndexOfTable", Node.class, byte[].class, long.class, int.class, int.class, boolean.class, int.class, byte[].class) { + r.register(new InlineOnlyInvocationPlugin("runIndexOfTable", nodeType, byte[].class, long.class, int.class, int.class, boolean.class, int.class, byte[].class) { @Override public boolean apply(GraphBuilderContext b, ResolvedJavaMethod targetMethod, Receiver receiver, ValueNode location, ValueNode array, ValueNode offset, ValueNode length, ValueNode stride, ValueNode isNative, ValueNode fromIndex, ValueNode tables) { return applyIndexOf(b, targetMethod, ArrayIndexOfVariant.Table, location, array, offset, length, stride, isNative, fromIndex, tables); } }); - r.register(new InlineOnlyInvocationPlugin("runIndexOf2ConsecutiveWithStride", Node.class, byte[].class, long.class, int.class, int.class, boolean.class, int.class, int.class, int.class) { + r.register(new InlineOnlyInvocationPlugin("runIndexOf2ConsecutiveWithStride", nodeType, byte[].class, long.class, int.class, int.class, boolean.class, int.class, int.class, int.class) { @Override public boolean apply(GraphBuilderContext b, ResolvedJavaMethod targetMethod, Receiver receiver, ValueNode location, ValueNode array, ValueNode offset, ValueNode length, ValueNode stride, ValueNode isNative, ValueNode fromIndex, ValueNode v0, ValueNode v1) { @@ -328,7 +329,7 @@ public boolean apply(GraphBuilderContext b, ResolvedJavaMethod targetMethod, Rec } }); - r.register(new InlineOnlyInvocationPlugin("runRegionEqualsWithStride", Node.class, + r.register(new InlineOnlyInvocationPlugin("runRegionEqualsWithStride", nodeType, byte[].class, long.class, boolean.class, byte[].class, long.class, boolean.class, int.class, int.class) { @Override @@ -348,7 +349,7 @@ public boolean apply(GraphBuilderContext b, ResolvedJavaMethod targetMethod, Rec return true; } }); - r.register(new InlineOnlyInvocationPlugin("runMemCmp", Node.class, + r.register(new InlineOnlyInvocationPlugin("runMemCmp", nodeType, byte[].class, long.class, boolean.class, byte[].class, long.class, boolean.class, int.class, int.class) { @Override @@ -368,7 +369,7 @@ public boolean apply(GraphBuilderContext b, ResolvedJavaMethod targetMethod, Rec return true; } }); - r.register(new InlineOnlyInvocationPlugin("runArrayCopy", Node.class, + r.register(new InlineOnlyInvocationPlugin("runArrayCopy", nodeType, byte[].class, long.class, boolean.class, byte[].class, long.class, boolean.class, int.class, int.class) { @Override @@ -378,7 +379,7 @@ public boolean apply(GraphBuilderContext b, ResolvedJavaMethod targetMethod, Rec return applyArrayCopy(b, arrayA, offsetA, arrayB, offsetB, length, dynamicStrides); } }); - r.register(new InlineOnlyInvocationPlugin("runArrayCopy", Node.class, + r.register(new InlineOnlyInvocationPlugin("runArrayCopy", nodeType, char[].class, long.class, byte[].class, long.class, int.class, int.class) { @Override @@ -388,7 +389,7 @@ public boolean apply(GraphBuilderContext b, ResolvedJavaMethod targetMethod, Rec return applyArrayCopy(b, arrayA, offsetA, arrayB, offsetB, length, dynamicStrides); } }); - r.register(new InlineOnlyInvocationPlugin("runArrayCopy", Node.class, + r.register(new InlineOnlyInvocationPlugin("runArrayCopy", nodeType, int[].class, long.class, byte[].class, long.class, int.class, int.class) { @Override @@ -398,7 +399,7 @@ public boolean apply(GraphBuilderContext b, ResolvedJavaMethod targetMethod, Rec return applyArrayCopy(b, arrayA, offsetA, arrayB, offsetB, length, dynamicStrides); } }); - r.register(new InlineOnlyInvocationPlugin("runCalcStringAttributesLatin1", Node.class, byte[].class, long.class, int.class, boolean.class) { + r.register(new InlineOnlyInvocationPlugin("runCalcStringAttributesLatin1", nodeType, byte[].class, long.class, int.class, boolean.class) { @Override public boolean apply(GraphBuilderContext b, ResolvedJavaMethod targetMethod, Receiver receiver, ValueNode location, ValueNode array, ValueNode offset, ValueNode length, ValueNode isNative) { @@ -407,7 +408,7 @@ public boolean apply(GraphBuilderContext b, ResolvedJavaMethod targetMethod, Rec return true; } }); - r.register(new InlineOnlyInvocationPlugin("runCalcStringAttributesBMP", Node.class, byte[].class, long.class, int.class, boolean.class) { + r.register(new InlineOnlyInvocationPlugin("runCalcStringAttributesBMP", nodeType, byte[].class, long.class, int.class, boolean.class) { @Override public boolean apply(GraphBuilderContext b, ResolvedJavaMethod targetMethod, Receiver receiver, ValueNode location, ValueNode array, ValueNode offset, ValueNode length, ValueNode isNative) { @@ -416,7 +417,7 @@ public boolean apply(GraphBuilderContext b, ResolvedJavaMethod targetMethod, Rec return true; } }); - r.register(new InlineOnlyInvocationPlugin("runCalcStringAttributesUTF8", Node.class, byte[].class, long.class, int.class, boolean.class, boolean.class) { + r.register(new InlineOnlyInvocationPlugin("runCalcStringAttributesUTF8", nodeType, byte[].class, long.class, int.class, boolean.class, boolean.class) { @Override public boolean apply(GraphBuilderContext b, ResolvedJavaMethod targetMethod, Receiver receiver, ValueNode location, ValueNode array, ValueNode offset, ValueNode length, ValueNode isNative, ValueNode assumeValid) { @@ -425,7 +426,7 @@ public boolean apply(GraphBuilderContext b, ResolvedJavaMethod targetMethod, Rec return true; } }); - r.register(new InlineOnlyInvocationPlugin("runCalcStringAttributesUTF16", Node.class, byte[].class, long.class, int.class, boolean.class, boolean.class) { + r.register(new InlineOnlyInvocationPlugin("runCalcStringAttributesUTF16", nodeType, byte[].class, long.class, int.class, boolean.class, boolean.class) { @Override public boolean apply(GraphBuilderContext b, ResolvedJavaMethod targetMethod, Receiver receiver, ValueNode location, ValueNode array, ValueNode offset, ValueNode length, ValueNode isNative, ValueNode assumeValid) { @@ -434,7 +435,7 @@ public boolean apply(GraphBuilderContext b, ResolvedJavaMethod targetMethod, Rec return true; } }); - r.register(new InlineOnlyInvocationPlugin("runCalcStringAttributesUTF16C", Node.class, char[].class, long.class, int.class) { + r.register(new InlineOnlyInvocationPlugin("runCalcStringAttributesUTF16C", nodeType, char[].class, long.class, int.class) { @Override public boolean apply(GraphBuilderContext b, ResolvedJavaMethod targetMethod, Receiver receiver, ValueNode location, ValueNode array, ValueNode offset, ValueNode length) { @@ -443,7 +444,7 @@ public boolean apply(GraphBuilderContext b, ResolvedJavaMethod targetMethod, Rec return true; } }); - r.register(new InlineOnlyInvocationPlugin("runCalcStringAttributesUTF32", Node.class, byte[].class, long.class, int.class, boolean.class) { + r.register(new InlineOnlyInvocationPlugin("runCalcStringAttributesUTF32", nodeType, byte[].class, long.class, int.class, boolean.class) { @Override public boolean apply(GraphBuilderContext b, ResolvedJavaMethod targetMethod, Receiver receiver, ValueNode location, ValueNode array, ValueNode offset, ValueNode length, ValueNode isNative) { @@ -452,7 +453,7 @@ public boolean apply(GraphBuilderContext b, ResolvedJavaMethod targetMethod, Rec return true; } }); - r.register(new InlineOnlyInvocationPlugin("runCalcStringAttributesUTF32I", Node.class, int[].class, long.class, int.class) { + r.register(new InlineOnlyInvocationPlugin("runCalcStringAttributesUTF32I", nodeType, int[].class, long.class, int.class) { @Override public boolean apply(GraphBuilderContext b, ResolvedJavaMethod targetMethod, Receiver receiver, ValueNode location, ValueNode array, ValueNode offset, ValueNode length) { diff --git a/compiler/src/jdk.internal.vm.compiler/src/org/graalvm/jniutils/JNIUtil.java b/compiler/src/jdk.internal.vm.compiler/src/org/graalvm/jniutils/JNIUtil.java index 1ebe5c566b3f..dcf16d8d1cec 100644 --- a/compiler/src/jdk.internal.vm.compiler/src/org/graalvm/jniutils/JNIUtil.java +++ b/compiler/src/jdk.internal.vm.compiler/src/org/graalvm/jniutils/JNIUtil.java @@ -1090,6 +1090,19 @@ public static JObject getJVMCIClassLoader(JNIEnv env) { return env.getFunctions().getCallStaticObjectMethodA().call(env, clazz, getClassLoaderId, nullPointer()); } + public static JObject getClassLoader(JNIEnv env, JClass clazz) { + if (clazz.isNull()) { + throw new NullPointerException(); + } + // Class + JClass classClass = GetObjectClass(env, clazz); // Class + JNI.JMethodID getClassLoader = JNIUtil.findMethod(env, classClass, false, "getClassLoader", "()Ljava/lang/ClassLoader;"); + if (getClassLoader.isNull()) { + throw new NullPointerException("getClassLoader() not found"); + } + return env.getFunctions().getCallObjectMethodA().call(env, clazz, getClassLoader, nullPointer()); + } + /** * Returns the {@link ClassLoader#getSystemClassLoader()}. */ diff --git a/compiler/src/jdk.internal.vm.compiler/src/org/graalvm/libgraal/jni/FromLibGraalCalls.java b/compiler/src/jdk.internal.vm.compiler/src/org/graalvm/libgraal/jni/FromLibGraalCalls.java index eace6e35e641..d09407ac14bb 100644 --- a/compiler/src/jdk.internal.vm.compiler/src/org/graalvm/libgraal/jni/FromLibGraalCalls.java +++ b/compiler/src/jdk.internal.vm.compiler/src/org/graalvm/libgraal/jni/FromLibGraalCalls.java @@ -26,23 +26,17 @@ import static org.graalvm.jniutils.JNIExceptionWrapper.wrapAndThrowPendingJNIException; import static org.graalvm.jniutils.JNIUtil.GetStaticMethodID; -import static org.graalvm.jniutils.JNIUtil.NewGlobalRef; -import static org.graalvm.jniutils.JNIUtil.getBinaryName; import static org.graalvm.nativeimage.c.type.CTypeConversion.toCString; import java.util.EnumMap; -import java.util.Map; -import java.util.concurrent.ConcurrentHashMap; import java.util.function.Function; -import org.graalvm.jniutils.JNI; import org.graalvm.jniutils.JNI.JClass; import org.graalvm.jniutils.JNI.JMethodID; import org.graalvm.jniutils.JNI.JNIEnv; import org.graalvm.jniutils.JNI.JObject; import org.graalvm.jniutils.JNI.JValue; import org.graalvm.jniutils.JNICalls; -import org.graalvm.jniutils.JNIUtil; import org.graalvm.nativeimage.c.type.CTypeConversion.CCharPointerHolder; import com.oracle.truffle.compiler.hotspot.libgraal.FromLibGraalId; @@ -52,22 +46,16 @@ */ public abstract class FromLibGraalCalls & FromLibGraalId> { - private static final Map classes = new ConcurrentHashMap<>(); - private final EnumMap> methods; private final JNICalls hotSpotCalls; - private volatile JClass peer; + private final JClass peer; - protected FromLibGraalCalls(Class idType) { - methods = new EnumMap<>(idType); - hotSpotCalls = JNICalls.getDefault(); + protected FromLibGraalCalls(Class idType, JClass peer) { + this.methods = new EnumMap<>(idType); + this.hotSpotCalls = JNICalls.getDefault(); + this.peer = peer; } - /** - * Returns a {@link JClass} for the entry points from LibGraal. - */ - protected abstract JClass resolvePeer(JNIEnv env); - /** * Describes a class and holds a reference to its {@linkplain #jclass JNI value}. */ @@ -82,7 +70,7 @@ static final class JNIClass { } /** - * Describes a method in {@link #peer(JNI.JNIEnv) HotSpot peer class}. + * Describes a method in HotSpot peer class}. */ static final class JNIMethodImpl & FromLibGraalId> implements JNICalls.JNIMethod { final T hcId; @@ -111,62 +99,28 @@ public String toString() { public final void callVoid(JNIEnv env, T id, JValue args) { JNIMethodImpl method = getJNIMethod(env, id, void.class); - hotSpotCalls.callStaticVoid(env, peer(env), method, args); + hotSpotCalls.callStaticVoid(env, peer, method, args); } public final boolean callBoolean(JNIEnv env, T id, JValue args) { JNIMethodImpl method = getJNIMethod(env, id, boolean.class); - return hotSpotCalls.callStaticBoolean(env, peer(env), method, args); + return hotSpotCalls.callStaticBoolean(env, peer, method, args); } public final long callLong(JNIEnv env, T id, JValue args) { JNIMethodImpl method = getJNIMethod(env, id, long.class); - return hotSpotCalls.callStaticLong(env, peer(env), method, args); + return hotSpotCalls.callStaticLong(env, peer, method, args); } public final int callInt(JNIEnv env, T id, JValue args) { JNIMethodImpl method = getJNIMethod(env, id, int.class); - return hotSpotCalls.callStaticInt(env, peer(env), method, args); + return hotSpotCalls.callStaticInt(env, peer, method, args); } @SuppressWarnings("unchecked") public final R callJObject(JNIEnv env, T id, JValue args) { JNIMethodImpl method = getJNIMethod(env, id, Object.class); - return hotSpotCalls.callStaticJObject(env, peer(env), method, args); - } - - public static JClass getJNIClass(JNIEnv env, Class clazz) { - if (clazz.isArray()) { - throw new UnsupportedOperationException("Array classes are not supported"); - } - return getJNIClassImpl(env, clazz.getName()).jclass; - } - - public static JClass getJNIClass(JNIEnv env, String className) { - return getJNIClassImpl(env, className).jclass; - } - - private static JNIClass getJNIClassImpl(JNIEnv env, String className) { - try { - return classes.computeIfAbsent(className, new Function() { - @Override - public JNIClass apply(String name) { - JNI.JObject classLoader = JNIUtil.getJVMCIClassLoader(env); - // If the JVMCI classloader does not exist, then JVMCI must have been loaded on - // the boot classpath. This is the case, for example, in unit tests, when the - // -XX:-UseJVMCIClassLoader flag is specified. - JClass clazz = classLoader.isNull() ? JNIUtil.findClass(env, getBinaryName(name)) : JNIUtil.findClass(env, classLoader, getBinaryName(name)); - if (clazz.isNull()) { - JNIUtil.ExceptionClear(env); - throw new InternalError("Cannot load class: " + name); - } - return new JNIClass(name, NewGlobalRef(env, clazz, "Class<" + name + ">")); - } - }); - } catch (InternalError ie) { - wrapAndThrowPendingJNIException(env); - throw ie; - } + return hotSpotCalls.callStaticJObject(env, peer, method, args); } private JNIMethodImpl getJNIMethod(JNIEnv env, T hcId, Class expectedReturnType) { @@ -175,7 +129,7 @@ private JNIMethodImpl getJNIMethod(JNIEnv env, T hcId, Class expectedRetur return methods.computeIfAbsent(hcId, new Function>() { @Override public JNIMethodImpl apply(T id) { - JClass c = peer(env); + JClass c = peer; String methodName = id.getMethodName(); try (CCharPointerHolder name = toCString(methodName); CCharPointerHolder sig = toCString(id.getSignature())) { JMethodID jniId = GetStaticMethodID(env, c, name.get(), sig.get()); @@ -192,10 +146,4 @@ public JNIMethodImpl apply(T id) { } } - private JClass peer(JNIEnv env) { - if (peer.isNull()) { - peer = resolvePeer(env); - } - return peer; - } } diff --git a/compiler/src/org.graalvm.compiler.truffle.compiler.hotspot.libgraal/src/org/graalvm/compiler/truffle/compiler/hotspot/libgraal/HSTruffleCompilable.java b/compiler/src/org.graalvm.compiler.truffle.compiler.hotspot.libgraal/src/org/graalvm/compiler/truffle/compiler/hotspot/libgraal/HSTruffleCompilable.java index c5b5ef705dfa..c1d1325372ce 100644 --- a/compiler/src/org.graalvm.compiler.truffle.compiler.hotspot.libgraal/src/org/graalvm/compiler/truffle/compiler/hotspot/libgraal/HSTruffleCompilable.java +++ b/compiler/src/org.graalvm.compiler.truffle.compiler.hotspot.libgraal/src/org/graalvm/compiler/truffle/compiler/hotspot/libgraal/HSTruffleCompilable.java @@ -80,6 +80,7 @@ */ final class HSTruffleCompilable extends HSObject implements TruffleCompilable { + private final TruffleFromLibGraalCalls calls; private volatile String cachedName; /** @@ -94,8 +95,9 @@ final class HSTruffleCompilable extends HSObject implements TruffleCompilable { * @param scope the owning scope * @param handle the JNI object reference */ - HSTruffleCompilable(JNIMethodScope scope, JObject handle) { + HSTruffleCompilable(JNIMethodScope scope, JObject handle, HSTruffleCompilerRuntime runtime) { super(scope, handle); + this.calls = runtime.calls; } @TruffleFromLibGraal(GetFailedSpeculationsAddress) @@ -103,7 +105,7 @@ final class HSTruffleCompilable extends HSObject implements TruffleCompilable { public SpeculationLog getCompilationSpeculationLog() { Long res = cachedFailedSpeculationsAddress; if (res == null) { - res = callGetFailedSpeculationsAddress(env(), getHandle()); + res = callGetFailedSpeculationsAddress(calls, env(), getHandle()); cachedFailedSpeculationsAddress = res; } return HotSpotGraalServices.newHotSpotSpeculationLog(cachedFailedSpeculationsAddress); @@ -113,7 +115,7 @@ public SpeculationLog getCompilationSpeculationLog() { @TruffleFromLibGraal(Id.GetCompilerOptions) public Map getCompilerOptions() { JNIEnv env = env(); - JNI.JByteArray res = HSTruffleCompilableGen.callGetCompilerOptions(env, getHandle()); + JNI.JByteArray res = HSTruffleCompilableGen.callGetCompilerOptions(calls, env, getHandle()); byte[] realArray = JNIUtil.createArray(env, res); return readDebugMap(BinaryInput.create(realArray)); } @@ -131,25 +133,25 @@ private static Map readDebugMap(BinaryInput in) { @Override @TruffleFromLibGraal(Id.EngineId) public long engineId() { - return HSTruffleCompilableGen.callEngineId(env(), getHandle()); + return HSTruffleCompilableGen.callEngineId(calls, env(), getHandle()); } @Override @TruffleFromLibGraal(Id.PrepareForCompilation) public void prepareForCompilation() { - callPrepareForCompilation(env(), getHandle()); + callPrepareForCompilation(calls, env(), getHandle()); } @TruffleFromLibGraal(IsTrivial) @Override public boolean isTrivial() { - return callIsTrivial(env(), getHandle()); + return callIsTrivial(calls, env(), getHandle()); } @TruffleFromLibGraal(AsJavaConstant) @Override public JavaConstant asJavaConstant() { - return LibGraal.unhand(JavaConstant.class, callAsJavaConstant(env(), getHandle())); + return LibGraal.unhand(JavaConstant.class, callAsJavaConstant(calls, env(), getHandle())); } @TruffleFromLibGraal(CreateStringSupplier) @@ -160,8 +162,8 @@ public void onCompilationFailed(Supplier serializedException, boolean si boolean success = false; JNIEnv env = env(); try { - JObject instance = callCreateStringSupplier(env, serializedExceptionHandle); - callOnCompilationFailed(env, getHandle(), instance, silent, bailout, permanentBailout, graphTooBig); + JObject instance = callCreateStringSupplier(calls, env, serializedExceptionHandle); + callOnCompilationFailed(calls, env, getHandle(), instance, silent, bailout, permanentBailout, graphTooBig); success = true; } finally { if (!success) { @@ -176,7 +178,7 @@ public String getName() { String res = cachedName; if (res == null) { JNIEnv env = JNIMethodScope.env(); - JString name = callGetCompilableName(env, getHandle()); + JString name = callGetCompilableName(calls, env, getHandle()); res = createString(env, name); cachedName = res; } @@ -186,19 +188,19 @@ public String getName() { @TruffleFromLibGraal(GetNonTrivialNodeCount) @Override public int getNonTrivialNodeCount() { - return callGetNonTrivialNodeCount(env(), getHandle()); + return callGetNonTrivialNodeCount(calls, env(), getHandle()); } @TruffleFromLibGraal(Id.CountDirectCallNodes) @Override public int countDirectCallNodes() { - return callCountDirectCallNodes(env(), getHandle()); + return callCountDirectCallNodes(calls, env(), getHandle()); } @TruffleFromLibGraal(GetCompilableCallCount) @Override public int getCallCount() { - return callGetCompilableCallCount(env(), getHandle()); + return callGetCompilableCallCount(calls, env(), getHandle()); } private volatile String cachedString; @@ -209,7 +211,7 @@ public String toString() { String res = cachedString; if (res == null) { JNIEnv env = JNIMethodScope.env(); - JString value = callCompilableToString(env, getHandle()); + JString value = callCompilableToString(calls, env, getHandle()); res = createString(env, value); cachedString = res; } @@ -221,20 +223,20 @@ public String toString() { public boolean cancelCompilation(CharSequence reason) { JNIEnv env = env(); JString jniReason = JNIUtil.createHSString(env, reason.toString()); - return callCancelCompilation(env, getHandle(), jniReason); + return callCancelCompilation(calls, env, getHandle(), jniReason); } @TruffleFromLibGraal(IsSameOrSplit) @Override public boolean isSameOrSplit(TruffleCompilable ast) { JObject astHandle = ((HSTruffleCompilable) ast).getHandle(); - return callIsSameOrSplit(env(), getHandle(), astHandle); + return callIsSameOrSplit(calls, env(), getHandle(), astHandle); } @TruffleFromLibGraal(GetKnownCallSiteCount) @Override public int getKnownCallSiteCount() { - return callGetKnownCallSiteCount(env(), getHandle()); + return callGetKnownCallSiteCount(calls, env(), getHandle()); } @Override diff --git a/compiler/src/org.graalvm.compiler.truffle.compiler.hotspot.libgraal/src/org/graalvm/compiler/truffle/compiler/hotspot/libgraal/HSTruffleCompilationTask.java b/compiler/src/org.graalvm.compiler.truffle.compiler.hotspot.libgraal/src/org/graalvm/compiler/truffle/compiler/hotspot/libgraal/HSTruffleCompilationTask.java index 546f366196e3..414e426db924 100644 --- a/compiler/src/org.graalvm.compiler.truffle.compiler.hotspot.libgraal/src/org/graalvm/compiler/truffle/compiler/hotspot/libgraal/HSTruffleCompilationTask.java +++ b/compiler/src/org.graalvm.compiler.truffle.compiler.hotspot.libgraal/src/org/graalvm/compiler/truffle/compiler/hotspot/libgraal/HSTruffleCompilationTask.java @@ -84,57 +84,60 @@ */ final class HSTruffleCompilationTask extends HSObject implements TruffleCompilationTask { - HSTruffleCompilationTask(JNIMethodScope scope, JObject handle) { + private final TruffleFromLibGraalCalls calls; + + HSTruffleCompilationTask(JNIMethodScope scope, JObject handle, HSTruffleCompilerRuntime runtime) { super(scope, handle); + this.calls = runtime.calls; } @TruffleFromLibGraal(IsCancelled) @Override public boolean isCancelled() { - return callIsCancelled(env(), getHandle()); + return callIsCancelled(calls, env(), getHandle()); } @TruffleFromLibGraal(HasNextTier) @Override public boolean hasNextTier() { - return callHasNextTier(env(), getHandle()); + return callHasNextTier(calls, env(), getHandle()); } @TruffleFromLibGraal(IsLastTier) @Override public boolean isLastTier() { - return callIsLastTier(env(), getHandle()); + return callIsLastTier(calls, env(), getHandle()); } @TruffleFromLibGraal(GetPosition) @Override public TruffleSourceLanguagePosition getPosition(JavaConstant node) { long nodeHandle = LibGraal.translate(node); - JObject res = callGetPosition(env(), getHandle(), nodeHandle); + JObject res = callGetPosition(calls, env(), getHandle(), nodeHandle); if (res.isNull()) { return null; } - return new HSTruffleSourceLanguagePosition(JNIMethodScope.scope(), res); + return new HSTruffleSourceLanguagePosition(JNIMethodScope.scope(), res, calls); } @TruffleFromLibGraal(AddTargetToDequeue) @Override public void addTargetToDequeue(TruffleCompilable target) { JObject hsCompilable = ((HSTruffleCompilable) target).getHandle(); - callAddTargetToDequeue(env(), getHandle(), hsCompilable); + callAddTargetToDequeue(calls, env(), getHandle(), hsCompilable); } @TruffleFromLibGraal(SetCallCounts) @Override public void setCallCounts(int total, int inlined) { - callSetCallCounts(env(), getHandle(), total, inlined); + callSetCallCounts(calls, env(), getHandle(), total, inlined); } @TruffleFromLibGraal(AddInlinedTarget) @Override public void addInlinedTarget(TruffleCompilable target) { JObject hsCompilable = ((HSTruffleCompilable) target).getHandle(); - callAddInlinedTarget(env(), getHandle(), hsCompilable); + callAddInlinedTarget(calls, env(), getHandle(), hsCompilable); } @TruffleFromLibGraal(Id.GetDebugProperties) @@ -142,7 +145,7 @@ public void addInlinedTarget(TruffleCompilable target) { public Map getDebugProperties(JavaConstant node) { long nodeHandle = LibGraal.translate(node); JNIEnv env = env(); - JNI.JByteArray res = callGetDebugProperties(env, getHandle(), nodeHandle); + JNI.JByteArray res = callGetDebugProperties(calls, env, getHandle(), nodeHandle); byte[] realArray = JNIUtil.createArray(env, res); return readDebugMap(BinaryInput.create(realArray)); } @@ -163,46 +166,49 @@ private static Map readDebugMap(BinaryInput in) { */ private static final class HSTruffleSourceLanguagePosition extends HSObject implements TruffleSourceLanguagePosition { - HSTruffleSourceLanguagePosition(JNIMethodScope scope, JObject handle) { + private final TruffleFromLibGraalCalls calls; + + HSTruffleSourceLanguagePosition(JNIMethodScope scope, JObject handle, TruffleFromLibGraalCalls calls) { super(scope, handle); + this.calls = calls; } @TruffleFromLibGraal(GetOffsetStart) @Override public int getOffsetStart() { - return callGetOffsetStart(JNIMethodScope.env(), getHandle()); + return callGetOffsetStart(calls, JNIMethodScope.env(), getHandle()); } @TruffleFromLibGraal(GetOffsetEnd) @Override public int getOffsetEnd() { - return callGetOffsetEnd(JNIMethodScope.env(), getHandle()); + return callGetOffsetEnd(calls, JNIMethodScope.env(), getHandle()); } @TruffleFromLibGraal(GetLineNumber) @Override public int getLineNumber() { - return callGetLineNumber(JNIMethodScope.env(), getHandle()); + return callGetLineNumber(calls, JNIMethodScope.env(), getHandle()); } @TruffleFromLibGraal(GetLanguage) @Override public String getLanguage() { - JString res = callGetLanguage(JNIMethodScope.env(), getHandle()); + JString res = callGetLanguage(calls, JNIMethodScope.env(), getHandle()); return createString(JNIMethodScope.env(), res); } @TruffleFromLibGraal(GetDescription) @Override public String getDescription() { - JString res = callGetDescription(JNIMethodScope.env(), getHandle()); + JString res = callGetDescription(calls, JNIMethodScope.env(), getHandle()); return createString(JNIMethodScope.env(), res); } @TruffleFromLibGraal(GetURI) @Override public URI getURI() { - JString res = callGetURI(JNIMethodScope.env(), getHandle()); + JString res = callGetURI(calls, JNIMethodScope.env(), getHandle()); String stringifiedURI = createString(JNIMethodScope.env(), res); return stringifiedURI == null ? null : URI.create(stringifiedURI); } @@ -210,14 +216,14 @@ public URI getURI() { @TruffleFromLibGraal(GetNodeClassName) @Override public String getNodeClassName() { - JString res = callGetNodeClassName(JNIMethodScope.env(), getHandle()); + JString res = callGetNodeClassName(calls, JNIMethodScope.env(), getHandle()); return createString(JNIMethodScope.env(), res); } @TruffleFromLibGraal(GetNodeId) @Override public int getNodeId() { - return callGetNodeId(JNIMethodScope.env(), getHandle()); + return callGetNodeId(calls, JNIMethodScope.env(), getHandle()); } } } diff --git a/compiler/src/org.graalvm.compiler.truffle.compiler.hotspot.libgraal/src/org/graalvm/compiler/truffle/compiler/hotspot/libgraal/HSTruffleCompilerListener.java b/compiler/src/org.graalvm.compiler.truffle.compiler.hotspot.libgraal/src/org/graalvm/compiler/truffle/compiler/hotspot/libgraal/HSTruffleCompilerListener.java index 9b1bad20dcbf..b0d35d219850 100644 --- a/compiler/src/org.graalvm.compiler.truffle.compiler.hotspot.libgraal/src/org/graalvm/compiler/truffle/compiler/hotspot/libgraal/HSTruffleCompilerListener.java +++ b/compiler/src/org.graalvm.compiler.truffle.compiler.hotspot.libgraal/src/org/graalvm/compiler/truffle/compiler/hotspot/libgraal/HSTruffleCompilerListener.java @@ -55,8 +55,11 @@ */ final class HSTruffleCompilerListener extends HSObject implements TruffleCompilerListener { - HSTruffleCompilerListener(JNIMethodScope scope, JObject handle) { + private final TruffleFromLibGraalCalls calls; + + HSTruffleCompilerListener(JNIMethodScope scope, JObject handle, HSTruffleCompilerRuntime runtime) { super(scope, handle); + this.calls = runtime.calls; } @TruffleFromLibGraal(OnSuccess) @@ -67,7 +70,7 @@ public void onSuccess(TruffleCompilable compilable, TruffleCompilationTask task, JNIEnv env = JNIMethodScope.env(); try (LibGraalObjectHandleScope graphInfoScope = LibGraalObjectHandleScope.forObject(graphInfo); LibGraalObjectHandleScope compilationResultInfoScope = LibGraalObjectHandleScope.forObject(compilationResultInfo)) { - callOnSuccess(env, getHandle(), hsCompilable, hsTask, graphInfoScope.getHandle(), compilationResultInfoScope.getHandle(), tier); + callOnSuccess(calls, env, getHandle(), hsCompilable, hsTask, graphInfoScope.getHandle(), compilationResultInfoScope.getHandle(), tier); } } @@ -78,7 +81,7 @@ public void onTruffleTierFinished(TruffleCompilable compilable, TruffleCompilati JObject hasTask = ((HSTruffleCompilationTask) task).getHandle(); JNIEnv env = JNIMethodScope.env(); try (LibGraalObjectHandleScope graphInfoScope = LibGraalObjectHandleScope.forObject(graph)) { - callOnTruffleTierFinished(env, getHandle(), hsCompilable, hasTask, graphInfoScope.getHandle()); + callOnTruffleTierFinished(calls, env, getHandle(), hsCompilable, hasTask, graphInfoScope.getHandle()); } } @@ -89,7 +92,7 @@ public void onGraalTierFinished(TruffleCompilable compilable, GraphInfo graph) { JObject hsCompilable = ((HSTruffleCompilable) compilable).getHandle(); JNIEnv env = JNIMethodScope.env(); try (LibGraalObjectHandleScope graphInfoScope = LibGraalObjectHandleScope.forObject(graph)) { - callOnGraalTierFinished(env, getHandle(), hsCompilable, graphInfoScope.getHandle()); + callOnGraalTierFinished(calls, env, getHandle(), hsCompilable, graphInfoScope.getHandle()); } } @@ -99,7 +102,7 @@ public void onFailure(TruffleCompilable compilable, String serializedException, JObject hsCompilable = ((HSTruffleCompilable) compilable).getHandle(); JNIEnv env = JNIMethodScope.env(); JString hsReason = createHSString(env, serializedException); - callOnFailure(env, getHandle(), hsCompilable, hsReason, bailout, permanentBailout, tier); + callOnFailure(calls, env, getHandle(), hsCompilable, hsReason, bailout, permanentBailout, tier); } @TruffleFromLibGraal(OnCompilationRetry) @@ -108,7 +111,7 @@ public void onCompilationRetry(TruffleCompilable compilable, TruffleCompilationT JObject hsCompilable = ((HSTruffleCompilable) compilable).getHandle(); JObject hsTask = ((HSTruffleCompilationTask) task).getHandle(); JNIEnv env = JNIMethodScope.env(); - callOnCompilationRetry(env, getHandle(), hsCompilable, hsTask); + callOnCompilationRetry(calls, env, getHandle(), hsCompilable, hsTask); } private static final class LibGraalObjectHandleScope implements Closeable { diff --git a/compiler/src/org.graalvm.compiler.truffle.compiler.hotspot.libgraal/src/org/graalvm/compiler/truffle/compiler/hotspot/libgraal/HSTruffleCompilerRuntime.java b/compiler/src/org.graalvm.compiler.truffle.compiler.hotspot.libgraal/src/org/graalvm/compiler/truffle/compiler/hotspot/libgraal/HSTruffleCompilerRuntime.java index be05c0994247..d6ea5012f02f 100644 --- a/compiler/src/org.graalvm.compiler.truffle.compiler.hotspot.libgraal/src/org/graalvm/compiler/truffle/compiler/hotspot/libgraal/HSTruffleCompilerRuntime.java +++ b/compiler/src/org.graalvm.compiler.truffle.compiler.hotspot.libgraal/src/org/graalvm/compiler/truffle/compiler/hotspot/libgraal/HSTruffleCompilerRuntime.java @@ -52,6 +52,7 @@ import org.graalvm.jniutils.HSObject; import org.graalvm.jniutils.JNI.JByteArray; +import org.graalvm.jniutils.JNI.JClass; import org.graalvm.jniutils.JNI.JNIEnv; import org.graalvm.jniutils.JNI.JObject; import org.graalvm.jniutils.JNI.JString; @@ -91,20 +92,22 @@ final class HSTruffleCompilerRuntime extends HSObject implements TruffleCompilerRuntime { private final ResolvedJavaType classLoaderDelegate; + final TruffleFromLibGraalCalls calls; - HSTruffleCompilerRuntime(JNIEnv env, JObject handle, ResolvedJavaType classLoaderDelegate) { + HSTruffleCompilerRuntime(JNIEnv env, JObject handle, ResolvedJavaType classLoaderDelegate, JClass peer) { /* * Note global duplicates may happen if the compiler is initialized by a host compilation. */ super(env, handle, true, false); this.classLoaderDelegate = classLoaderDelegate; + this.calls = new TruffleFromLibGraalCalls(env, peer); } @TruffleFromLibGraal(GetPartialEvaluationMethodInfo) @Override public PartialEvaluationMethodInfo getPartialEvaluationMethodInfo(ResolvedJavaMethod method) { long methodHandle = LibGraal.translate(method); - JByteArray hsByteArray = HSTruffleCompilerRuntimeGen.callGetPartialEvaluationMethodInfo(env(), getHandle(), methodHandle); + JByteArray hsByteArray = HSTruffleCompilerRuntimeGen.callGetPartialEvaluationMethodInfo(calls, env(), getHandle(), methodHandle); CCharPointer buffer = StackValue.get(5); JNIUtil.GetByteArrayRegion(env(), hsByteArray, 0, 5, buffer); BinaryInput in = BinaryInput.create(buffer, 5); @@ -120,7 +123,7 @@ public PartialEvaluationMethodInfo getPartialEvaluationMethodInfo(ResolvedJavaMe @Override public HostMethodInfo getHostMethodInfo(ResolvedJavaMethod method) { long methodHandle = LibGraal.translate(method); - JByteArray hsByteArray = HSTruffleCompilerRuntimeGen.callGetHostMethodInfo(env(), getHandle(), methodHandle); + JByteArray hsByteArray = HSTruffleCompilerRuntimeGen.callGetHostMethodInfo(calls, env(), getHandle(), methodHandle); CCharPointer buffer = StackValue.get(4); JNIUtil.GetByteArrayRegion(env(), hsByteArray, 0, 4, buffer); BinaryInput in = BinaryInput.create(buffer, 4); @@ -141,7 +144,7 @@ public TruffleCompilable asCompilableTruffleAST(JavaConstant constant) { return null; } JObject hsCompilable = JNIUtil.NewLocalRef(scope.getEnv(), LibGraal.getJObjectValue((HotSpotObjectConstant) constant)); - return new HSTruffleCompilable(scope, hsCompilable); + return new HSTruffleCompilable(scope, hsCompilable, this); } @TruffleFromLibGraal(OnCodeInstallation) @@ -149,7 +152,7 @@ public TruffleCompilable asCompilableTruffleAST(JavaConstant constant) { public void onCodeInstallation(TruffleCompilable compilable, InstalledCode installedCode) { long installedCodeHandle = LibGraal.translate(installedCode); JNIEnv env = env(); - callOnCodeInstallation(env, getHandle(), ((HSTruffleCompilable) compilable).getHandle(), installedCodeHandle); + callOnCodeInstallation(calls, env, getHandle(), ((HSTruffleCompilable) compilable).getHandle(), installedCodeHandle); } @TruffleFromLibGraal(RegisterOptimizedAssumptionDependency) @@ -157,14 +160,14 @@ public void onCodeInstallation(TruffleCompilable compilable, InstalledCode insta public Consumer registerOptimizedAssumptionDependency(JavaConstant optimizedAssumption) { long optimizedAssumptionHandle = LibGraal.translate(optimizedAssumption); JNIEnv env = env(); - JObject assumptionConsumer = callRegisterOptimizedAssumptionDependency(env, getHandle(), optimizedAssumptionHandle); - return assumptionConsumer.isNull() ? null : new HSConsumer(scope(), assumptionConsumer); + JObject assumptionConsumer = callRegisterOptimizedAssumptionDependency(calls, env, getHandle(), optimizedAssumptionHandle); + return assumptionConsumer.isNull() ? null : new HSConsumer(scope(), assumptionConsumer, calls); } @TruffleFromLibGraal(IsValueType) @Override public boolean isValueType(ResolvedJavaType type) { - return callIsValueType(env(), getHandle(), LibGraal.translate(type)); + return callIsValueType(calls, env(), getHandle(), LibGraal.translate(type)); } @TruffleFromLibGraal(GetConstantFieldInfo) @@ -189,7 +192,7 @@ public ConstantFieldInfo getConstantFieldInfo(ResolvedJavaField field) { Arrays.toString(declaredFields))); } long typeHandle = LibGraal.translate(enclosingType); - int rawValue = callGetConstantFieldInfo(env(), getHandle(), typeHandle, isStatic, fieldIndex); + int rawValue = callGetConstantFieldInfo(calls, env(), getHandle(), typeHandle, isStatic, fieldIndex); if (rawValue == Integer.MIN_VALUE) { return null; } @@ -229,7 +232,7 @@ public void log(String loggerId, TruffleCompilable compilable, String message) { JNIEnv env = env(); JString jniLoggerId = JNIUtil.createHSString(env, loggerId); JString jniMessage = JNIUtil.createHSString(env, message); - callLog(env, getHandle(), jniLoggerId, ((HSTruffleCompilable) compilable).getHandle(), jniMessage); + callLog(calls, env, getHandle(), jniLoggerId, ((HSTruffleCompilable) compilable).getHandle(), jniMessage); } @TruffleFromLibGraal(CreateStringSupplier) @@ -240,8 +243,8 @@ public boolean isSuppressedFailure(TruffleCompilable compilable, Supplier { + private final TruffleFromLibGraalCalls calls; - HSConsumer(JNIMethodScope scope, JObject handle) { + HSConsumer(JNIMethodScope scope, JObject handle, TruffleFromLibGraalCalls calls) { super(scope, handle); + this.calls = calls; } @TruffleFromLibGraal(ConsumeOptimizedAssumptionDependency) @@ -279,7 +284,7 @@ public void accept(OptimizedAssumptionDependency optimizedDependency) { } installedCode = LibGraal.translate(dependency.getInstalledCode()); } - callConsumeOptimizedAssumptionDependency(env(), getHandle(), compilable, installedCode); + callConsumeOptimizedAssumptionDependency(calls, env(), getHandle(), compilable, installedCode); } } } diff --git a/compiler/src/org.graalvm.compiler.truffle.compiler.hotspot.libgraal/src/org/graalvm/compiler/truffle/compiler/hotspot/libgraal/LibGraalTruffleHostEnvironmentLookup.java b/compiler/src/org.graalvm.compiler.truffle.compiler.hotspot.libgraal/src/org/graalvm/compiler/truffle/compiler/hotspot/libgraal/LibGraalTruffleHostEnvironmentLookup.java index a1aa0ade1a56..a57124be8a73 100644 --- a/compiler/src/org.graalvm.compiler.truffle.compiler.hotspot.libgraal/src/org/graalvm/compiler/truffle/compiler/hotspot/libgraal/LibGraalTruffleHostEnvironmentLookup.java +++ b/compiler/src/org.graalvm.compiler.truffle.compiler.hotspot.libgraal/src/org/graalvm/compiler/truffle/compiler/hotspot/libgraal/LibGraalTruffleHostEnvironmentLookup.java @@ -27,6 +27,7 @@ import org.graalvm.compiler.debug.GraalError; import org.graalvm.compiler.serviceprovider.GlobalAtomicLong; import org.graalvm.compiler.truffle.compiler.host.TruffleHostEnvironment; +import org.graalvm.jniutils.JNI.JClass; import org.graalvm.jniutils.JNI.JNIEnv; import org.graalvm.jniutils.JNI.JObject; import org.graalvm.jniutils.JNI.JWeak; @@ -81,7 +82,8 @@ public TruffleHostEnvironment lookup(ResolvedJavaType forType) { return environment; } } - ResolvedJavaType runtimeType = LibGraal.asResolvedJavaType(JNIUtil.GetObjectClass(env, runtimeLocalRef)); + JClass runtimeClass = JNIUtil.GetObjectClass(env, runtimeLocalRef); + ResolvedJavaType runtimeType = LibGraal.asResolvedJavaType(runtimeClass); if (runtimeType == null) { throw GraalError.shouldNotReachHere("The object class needs to be available for a Truffle runtime object."); } @@ -89,7 +91,7 @@ public TruffleHostEnvironment lookup(ResolvedJavaType forType) { * We do not currently validate the forType. But in the future we want to lookup the runtime * per type. So in theory multiple truffle runtimes can be loaded. */ - HSTruffleCompilerRuntime runtime = new HSTruffleCompilerRuntime(env, runtimeLocalRef, runtimeType); + HSTruffleCompilerRuntime runtime = new HSTruffleCompilerRuntime(env, runtimeLocalRef, runtimeType, runtimeClass); this.previousRuntime = environment = new LibGraalTruffleHostEnvironment(runtime, HotSpotJVMCIRuntime.runtime().getHostJVMCIBackend().getMetaAccess()); assert JNIUtil.IsSameObject(env, hsRuntime(environment).getHandle(), runtimeLocalRef); return environment; @@ -99,6 +101,20 @@ private static HSTruffleCompilerRuntime hsRuntime(TruffleHostEnvironment environ return (HSTruffleCompilerRuntime) environment.runtime(); } + static JClass lookupPeer(JNIEnv env) { + long globalReference = WEAK_TRUFFLE_RUNTIME_INSTANCE.get(); + if (globalReference == NO_TRUFFLE_REGISTERED) { + // fast path if Truffle was not initialized + return WordFactory.nullPointer(); + } + JObject runtimeLocalRef = JNIUtil.NewLocalRef(env, WordFactory.pointer(globalReference)); + if (runtimeLocalRef.isNull()) { + // The Truffle runtime was collected by the GC + return WordFactory.nullPointer(); + } + return JNIUtil.GetObjectClass(env, runtimeLocalRef); + } + public static boolean registerRuntime(JNIEnv env, JObject truffleRuntime) { // TODO GR-44222 support multiple runtimes. JWeak globalRuntimeRef = JNIUtil.NewWeakGlobalRef(env, truffleRuntime, ""); diff --git a/compiler/src/org.graalvm.compiler.truffle.compiler.hotspot.libgraal/src/org/graalvm/compiler/truffle/compiler/hotspot/libgraal/TruffleFromLibGraalCalls.java b/compiler/src/org.graalvm.compiler.truffle.compiler.hotspot.libgraal/src/org/graalvm/compiler/truffle/compiler/hotspot/libgraal/TruffleFromLibGraalCalls.java index 3ccf6b2a077f..a65ae2f159ae 100644 --- a/compiler/src/org.graalvm.compiler.truffle.compiler.hotspot.libgraal/src/org/graalvm/compiler/truffle/compiler/hotspot/libgraal/TruffleFromLibGraalCalls.java +++ b/compiler/src/org.graalvm.compiler.truffle.compiler.hotspot.libgraal/src/org/graalvm/compiler/truffle/compiler/hotspot/libgraal/TruffleFromLibGraalCalls.java @@ -24,23 +24,30 @@ */ package org.graalvm.compiler.truffle.compiler.hotspot.libgraal; +import org.graalvm.jniutils.JNI.JClass; +import org.graalvm.jniutils.JNI.JNIEnv; +import org.graalvm.jniutils.JNI.JObject; + +import static org.graalvm.jniutils.JNIUtil.NewGlobalRef; + +import org.graalvm.jniutils.JNIUtil; import org.graalvm.libgraal.jni.FromLibGraalCalls; import com.oracle.truffle.compiler.hotspot.libgraal.TruffleFromLibGraal.Id; -import org.graalvm.jniutils.JNI.JClass; -import org.graalvm.jniutils.JNI.JNIEnv; - final class TruffleFromLibGraalCalls extends FromLibGraalCalls { - static final TruffleFromLibGraalCalls INSTANCE = new TruffleFromLibGraalCalls(); + private static final String ENTRY_POINT_CLASS_NAME = "org.graalvm.compiler.truffle.runtime.hotspot.libgraal.TruffleFromLibGraalEntryPoints"; + private static final String CLASS_ENTRY_POINT_CLASS_NAME = "Class<" + ENTRY_POINT_CLASS_NAME + ">"; - private TruffleFromLibGraalCalls() { - super(Id.class); + TruffleFromLibGraalCalls(JNIEnv env, JClass runtimeClass) { + super(Id.class, resolvePeer(env, runtimeClass)); } - @Override - protected JClass resolvePeer(JNIEnv env) { - return getJNIClass(env, "com.oracle.truffle.runtime.hotspot.libgraal.TruffleFromLibGraalEntryPoints"); + private static JClass resolvePeer(JNIEnv env, JClass runtimeClass) { + JObject classLoader = JNIUtil.getClassLoader(env, runtimeClass); + JClass clazz = JNIUtil.findClass(env, classLoader, ENTRY_POINT_CLASS_NAME); + return NewGlobalRef(env, clazz, CLASS_ENTRY_POINT_CLASS_NAME); } + } diff --git a/compiler/src/org.graalvm.compiler.truffle.compiler.hotspot.libgraal/src/org/graalvm/compiler/truffle/compiler/hotspot/libgraal/TruffleLibGraalShutdownHook.java b/compiler/src/org.graalvm.compiler.truffle.compiler.hotspot.libgraal/src/org/graalvm/compiler/truffle/compiler/hotspot/libgraal/TruffleLibGraalShutdownHook.java new file mode 100644 index 000000000000..ef12004fffdd --- /dev/null +++ b/compiler/src/org.graalvm.compiler.truffle.compiler.hotspot.libgraal/src/org/graalvm/compiler/truffle/compiler/hotspot/libgraal/TruffleLibGraalShutdownHook.java @@ -0,0 +1,72 @@ +/* + * Copyright (c) 2023, 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. Oracle designates this + * particular file as subject to the "Classpath" exception as provided + * by Oracle in the LICENSE file that accompanied this code. + * + * 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 org.graalvm.compiler.truffle.compiler.hotspot.libgraal; + +import org.graalvm.compiler.serviceprovider.IsolateUtil; +import org.graalvm.compiler.serviceprovider.ServiceProvider; +import org.graalvm.jniutils.JNI.JClass; +import org.graalvm.jniutils.JNI.JNIEnv; +import org.graalvm.jniutils.JNI.JavaVM; +import org.graalvm.jniutils.JNIUtil; + +import com.oracle.truffle.compiler.hotspot.libgraal.TruffleFromLibGraal; + +import jdk.vm.ci.hotspot.HotSpotVMEventListener; +import jdk.vm.ci.services.JVMCIServiceLocator; + +@ServiceProvider(JVMCIServiceLocator.class) +public class TruffleLibGraalShutdownHook extends JVMCIServiceLocator { + + private static volatile ShutdownHook registeredHook; + + @Override + protected S getProvider(Class service) { + ShutdownHook hook = registeredHook; + if (hook != null && service == HotSpotVMEventListener.class) { + return service.cast(hook); + } + return null; + } + + static void registerShutdownHook(JNIEnv env, JClass runtimeClass) { + JavaVM vm = JNIUtil.GetJavaVM(env); + ShutdownHook hook = registeredHook; + assert hook == null || hook.javaVm.isNull() || hook.javaVm.equal(vm); + registeredHook = new ShutdownHook(vm, new TruffleFromLibGraalCalls(env, runtimeClass)); + } + + record ShutdownHook(JavaVM javaVm, TruffleFromLibGraalCalls calls) implements HotSpotVMEventListener { + + @Override + @TruffleFromLibGraal(TruffleFromLibGraal.Id.OnIsolateShutdown) + public void notifyShutdown() { + JNIEnv env = JNIUtil.GetEnv(javaVm); + assert env.isNonNull(); + TruffleLibGraalShutdownHookGen.callOnIsolateShutdown(calls, env, IsolateUtil.getIsolateID()); + } + + } + +} diff --git a/compiler/src/org.graalvm.compiler.truffle.compiler.hotspot.libgraal/src/org/graalvm/compiler/truffle/compiler/hotspot/libgraal/TruffleToLibGraalEntryPoints.java b/compiler/src/org.graalvm.compiler.truffle.compiler.hotspot.libgraal/src/org/graalvm/compiler/truffle/compiler/hotspot/libgraal/TruffleToLibGraalEntryPoints.java index 1aa55b0e9a8e..cd9f704ac787 100644 --- a/compiler/src/org.graalvm.compiler.truffle.compiler.hotspot.libgraal/src/org/graalvm/compiler/truffle/compiler/hotspot/libgraal/TruffleToLibGraalEntryPoints.java +++ b/compiler/src/org.graalvm.compiler.truffle.compiler.hotspot.libgraal/src/org/graalvm/compiler/truffle/compiler/hotspot/libgraal/TruffleToLibGraalEntryPoints.java @@ -52,6 +52,7 @@ import org.graalvm.compiler.hotspot.CompilationContext; import org.graalvm.compiler.hotspot.HotSpotGraalServices; +import org.graalvm.compiler.serviceprovider.IsolateUtil; import org.graalvm.compiler.truffle.compiler.TruffleCompilerOptions; import org.graalvm.compiler.truffle.compiler.hotspot.HotSpotTruffleCompilationSupport; import org.graalvm.compiler.truffle.compiler.hotspot.HotSpotTruffleCompilerImpl; @@ -64,19 +65,24 @@ import org.graalvm.jniutils.JNIExceptionWrapper; import org.graalvm.jniutils.JNIMethodScope; import org.graalvm.jniutils.JNIUtil; -import org.graalvm.libgraal.jni.FromLibGraalCalls; import org.graalvm.libgraal.jni.LibGraalUtil; import org.graalvm.nativebridge.BinaryOutput; import org.graalvm.nativebridge.BinaryOutput.ByteArrayBinaryOutput; +import org.graalvm.nativeimage.Isolate; +import org.graalvm.nativeimage.IsolateThread; +import org.graalvm.nativeimage.ObjectHandles; import org.graalvm.nativeimage.c.function.CEntryPoint; +import org.graalvm.nativeimage.c.function.CEntryPoint.Builtin; +import org.graalvm.nativeimage.c.function.CEntryPoint.IsolateContext; +import org.graalvm.word.PointerBase; import org.graalvm.word.WordFactory; import com.oracle.truffle.compiler.TruffleCompilable; import com.oracle.truffle.compiler.TruffleCompilationTask; import com.oracle.truffle.compiler.TruffleCompilerListener; -import com.oracle.truffle.compiler.TruffleCompilerOptionDescriptor; import com.oracle.truffle.compiler.TruffleCompilerListener.CompilationResultInfo; import com.oracle.truffle.compiler.TruffleCompilerListener.GraphInfo; +import com.oracle.truffle.compiler.TruffleCompilerOptionDescriptor; import com.oracle.truffle.compiler.hotspot.libgraal.TruffleToLibGraal; import com.oracle.truffle.compiler.hotspot.libgraal.TruffleToLibGraal.Id; @@ -92,6 +98,52 @@ */ final class TruffleToLibGraalEntryPoints { + @CEntryPoint(builtin = Builtin.GET_CURRENT_THREAD, name = "Java_org_graalvm_libgraal_LibGraalScope_getIsolateThreadIn") + private static native IsolateThread getIsolateThreadIn(PointerBase env, PointerBase hsClazz, @IsolateContext Isolate isolate); + + @CEntryPoint(name = "Java_org_graalvm_libgraal_LibGraalScope_attachThreadTo", builtin = CEntryPoint.Builtin.ATTACH_THREAD) + static native long attachThreadTo(PointerBase env, PointerBase hsClazz, @CEntryPoint.IsolateContext long isolate); + + @CEntryPoint(name = "Java_org_graalvm_libgraal_LibGraalScope_detachThreadFrom", builtin = CEntryPoint.Builtin.DETACH_THREAD) + static native void detachThreadFrom(PointerBase env, PointerBase hsClazz, @CEntryPoint.IsolateThreadContext long isolateThread); + + @SuppressWarnings({"unused"}) + @CEntryPoint(name = "Java_org_graalvm_libgraal_LibGraalObject_releaseHandle") + public static boolean releaseHandle(PointerBase jniEnv, + PointerBase jclass, + @CEntryPoint.IsolateThreadContext long isolateThreadId, + long handle) { + try { + ObjectHandles.getGlobal().destroy(WordFactory.pointer(handle)); + return true; + } catch (Throwable t) { + return false; + } + } + + @SuppressWarnings({"unused"}) + @CEntryPoint(name = "Java_org_graalvm_libgraal_LibGraalScope_getIsolateId") + public static long getIsolateId(PointerBase jniEnv, + PointerBase jclass, + @CEntryPoint.IsolateThreadContext long isolateThreadId) { + try { + return IsolateUtil.getIsolateID(); + } catch (Throwable t) { + return 0L; + } + } + + @TruffleToLibGraal(Id.InitializeIsolate) + @SuppressWarnings({"unused", "try"}) + @CEntryPoint(name = "Java_org_graalvm_compiler_truffle_runtime_hotspot_libgraal_TruffleToLibGraalCalls_initializeIsolate") + public static void initializeIsolate(JNIEnv env, JClass hsClazz, @CEntryPoint.IsolateThreadContext long isolateThreadId, JClass runtimeClass) { + try (JNIMethodScope s = LibGraalUtil.openScope(TruffleToLibGraalEntryPoints.class, Id.InitializeIsolate, env)) { + TruffleLibGraalShutdownHook.registerShutdownHook(env, runtimeClass); + } catch (Throwable t) { + JNIExceptionWrapper.throwInHotSpot(env, t); + } + } + @TruffleToLibGraal(RegisterRuntime) @SuppressWarnings({"unused", "try"}) @CEntryPoint(name = "Java_org_graalvm_compiler_truffle_runtime_hotspot_libgraal_TruffleToLibGraalCalls_registerRuntime") @@ -111,7 +163,7 @@ public static long initializeRuntime(JNIEnv env, JClass hsClazz, @CEntryPoint.Is JObject truffleRuntime, JClass hsClassLoaderDelegate) { try (JNIMethodScope s = LibGraalUtil.openScope(TruffleToLibGraalEntryPoints.class, InitializeRuntime, env)) { ResolvedJavaType classLoaderDelegate = LibGraal.asResolvedJavaType(hsClassLoaderDelegate); - HSTruffleCompilerRuntime hsTruffleRuntime = new HSTruffleCompilerRuntime(env, truffleRuntime, classLoaderDelegate); + HSTruffleCompilerRuntime hsTruffleRuntime = new HSTruffleCompilerRuntime(env, truffleRuntime, classLoaderDelegate, hsClassLoaderDelegate); long truffleRuntimeHandle = LibGraalObjectHandles.create(hsTruffleRuntime); return truffleRuntimeHandle; } catch (Throwable t) { @@ -134,6 +186,10 @@ public static long newCompiler(JNIEnv env, JClass hsClazz, @CEntryPoint.IsolateT } } + private static JClass getStringClass(JNIEnv env) { + return JNIUtil.NewGlobalRef(env, JNIUtil.findClass(env, "java/lang/String"), "Class"); + } + @TruffleToLibGraal(InitializeCompiler) @SuppressWarnings("unused") @CEntryPoint(name = "Java_org_graalvm_compiler_truffle_runtime_hotspot_libgraal_TruffleToLibGraalCalls_initializeCompiler") @@ -141,7 +197,8 @@ public static void initializeCompiler(JNIEnv env, JClass hsClazz, @CEntryPoint.I boolean firstInitialization) { try (JNIMethodScope s = LibGraalUtil.openScope(TruffleToLibGraalEntryPoints.class, InitializeCompiler, env)) { HotSpotTruffleCompilerImpl compiler = LibGraalObjectHandles.resolve(compilerHandle, HotSpotTruffleCompilerImpl.class); - TruffleCompilable compilable = new HSTruffleCompilable(s, hsCompilable); + HSTruffleCompilerRuntime runtime = (HSTruffleCompilerRuntime) compiler.getConfig().runtime(); + TruffleCompilable compilable = new HSTruffleCompilable(s, hsCompilable, runtime); compiler.initialize(compilable, firstInitialization); } catch (Throwable t) { JNIExceptionWrapper.throwInHotSpot(env, t); @@ -174,11 +231,12 @@ public static void doCompile(JNIEnv env, JObject hsCompilable, JObject hsListener) { try (JNIMethodScope scope = LibGraalUtil.openScope(TruffleToLibGraalEntryPoints.class, DoCompile, env)) { - HSTruffleCompilable compilable = new HSTruffleCompilable(scope, hsCompilable); - TruffleCompilationTask task = hsTask.isNull() ? null : new HSTruffleCompilationTask(scope, hsTask); + HotSpotTruffleCompilerImpl compiler = LibGraalObjectHandles.resolve(compilerHandle, HotSpotTruffleCompilerImpl.class); + HSTruffleCompilerRuntime runtime = (HSTruffleCompilerRuntime) compiler.getConfig().runtime(); + HSTruffleCompilable compilable = new HSTruffleCompilable(scope, hsCompilable, runtime); + TruffleCompilationTask task = hsTask.isNull() ? null : new HSTruffleCompilationTask(scope, hsTask, runtime); try (CompilationContext hotSpotObjectConstantScope = HotSpotGraalServices.openLocalCompilationContext(compilable)) { - HotSpotTruffleCompilerImpl compiler = LibGraalObjectHandles.resolve(compilerHandle, HotSpotTruffleCompilerImpl.class); - TruffleCompilerListener listener = hsListener.isNull() ? null : new HSTruffleCompilerListener(scope, hsListener); + TruffleCompilerListener listener = hsListener.isNull() ? null : new HSTruffleCompilerListener(scope, hsListener, runtime); compiler.doCompile(task, compilable, listener); } finally { doReferenceHandling(); @@ -238,7 +296,8 @@ public static void installTruffleReservedOopMethod(JNIEnv env, JClass hsClazz, @ public static int pendingTransferToInterpreterOffset(JNIEnv env, JClass hsClazz, @CEntryPoint.IsolateThreadContext long isolateThreadId, long handle, JObject hsCompilable) { try (JNIMethodScope scope = LibGraalUtil.openScope(TruffleToLibGraalEntryPoints.class, PendingTransferToInterpreterOffset, env)) { HotSpotTruffleCompilerImpl compiler = LibGraalObjectHandles.resolve(handle, HotSpotTruffleCompilerImpl.class); - TruffleCompilable compilable = new HSTruffleCompilable(scope, hsCompilable); + HSTruffleCompilerRuntime runtime = (HSTruffleCompilerRuntime) compiler.getConfig().runtime(); + TruffleCompilable compilable = new HSTruffleCompilable(scope, hsCompilable, runtime); return compiler.pendingTransferToInterpreterOffset(compilable); } catch (Throwable t) { JNIExceptionWrapper.throwInHotSpot(env, t); @@ -287,7 +346,7 @@ public static JObjectArray getNodeTypes(JNIEnv env, JClass hsClazz, @CEntryPoint try (JNIMethodScope s = scope) { GraphInfo orig = LibGraalObjectHandles.resolve(handle, GraphInfo.class); String[] nodeTypes = orig.getNodeTypes(simpleNames); - JClass componentType = FromLibGraalCalls.getJNIClass(env, String.class); + JClass componentType = getStringClass(env); JObjectArray res = NewObjectArray(env, nodeTypes.length, componentType, WordFactory.nullPointer()); for (int i = 0; i < nodeTypes.length; i++) { SetObjectArrayElement(env, res, i, JNIUtil.createHSString(env, nodeTypes[i])); @@ -355,7 +414,7 @@ public static JObjectArray getInfopoints(JNIEnv env, JClass hsClazz, @CEntryPoin JNIMethodScope scope = LibGraalUtil.openScope(TruffleToLibGraalEntryPoints.class, GetInfopoints, env); try (JNIMethodScope s = scope) { String[] infoPoints = LibGraalObjectHandles.resolve(handle, CompilationResultInfo.class).getInfopoints(); - JClass componentType = FromLibGraalCalls.getJNIClass(env, String.class); + JClass componentType = getStringClass(env); JObjectArray res = NewObjectArray(env, infoPoints.length, componentType, WordFactory.nullPointer()); for (int i = 0; i < infoPoints.length; i++) { SetObjectArrayElement(env, res, i, createHSString(env, infoPoints[i])); diff --git a/substratevm/mx.substratevm/mx_substratevm.py b/substratevm/mx.substratevm/mx_substratevm.py index d827d0573a33..6d8f17eece90 100644 --- a/substratevm/mx.substratevm/mx_substratevm.py +++ b/substratevm/mx.substratevm/mx_substratevm.py @@ -1179,13 +1179,14 @@ def _native_image_launcher_extra_jvm_args(): ## Pass via JVM args opening up of packages needed for image builder early on '-J--add-exports=jdk.internal.vm.compiler/org.graalvm.compiler.hotspot=ALL-UNNAMED', '-J--add-exports=jdk.internal.vm.compiler/org.graalvm.compiler.options=ALL-UNNAMED', - '-J--add-exports=jdk.internal.vm.compiler/org.graalvm.compiler.truffle.common.hotspot=ALL-UNNAMED', - '-J--add-exports=jdk.internal.vm.compiler/org.graalvm.compiler.truffle.common=ALL-UNNAMED', '-J--add-exports=jdk.internal.vm.compiler/org.graalvm.compiler.truffle.compiler=ALL-UNNAMED', '-J--add-exports=jdk.internal.vm.compiler/org.graalvm.compiler.truffle.compiler.hotspot=ALL-UNNAMED', '-J--add-exports=jdk.internal.vm.compiler/org.graalvm.jniutils=ALL-UNNAMED', '-J--add-exports=jdk.internal.vm.compiler/org.graalvm.libgraal.jni.annotation=ALL-UNNAMED', '-J--add-exports=jdk.internal.vm.compiler/org.graalvm.libgraal.jni=ALL-UNNAMED', + '-J--add-exports=org.graalvm.truffle.compiler/com.oracle.truffle.compiler.hotspot.libgraal=ALL-UNNAMED', + '-J--add-exports=org.graalvm.truffle.compiler/com.oracle.truffle.compiler.hotspot=ALL-UNNAMED', + '-J--add-exports=org.graalvm.truffle.compiler/com.oracle.truffle.compiler=ALL-UNNAMED', '-J--add-exports=org.graalvm.nativeimage.builder/com.oracle.svm.core.annotate=ALL-UNNAMED', '-J--add-exports=org.graalvm.nativeimage.builder/com.oracle.svm.core.option=ALL-UNNAMED', ## Packages used after option-processing can be opened by the builder (`-J`-prefix not needed) @@ -1193,6 +1194,8 @@ def _native_image_launcher_extra_jvm_args(): '--add-exports=org.graalvm.nativeimage.builder/com.oracle.svm.core.feature=ALL-UNNAMED', # Make ModuleSupport accessible to do the remaining opening-up in LibGraalFeature constructor '--add-exports=org.graalvm.nativeimage.base/com.oracle.svm.util=ALL-UNNAMED', + # TruffleLibGraalJVMCIServiceLocator needs access to JVMCIServiceLocator + '--add-exports=jdk.internal.vm.ci/jdk.vm.ci.services=ALL-UNNAMED', '--initialize-at-build-time=org.graalvm.compiler,org.graalvm.libgraal,com.oracle.truffle', '-H:-UseServiceLoaderFeature', @@ -1246,7 +1249,7 @@ def _native_image_launcher_extra_jvm_args(): mx_sdk_vm.register_graalvm_component(libgraal) def _native_image_configure_extra_jvm_args(): - packages = ['jdk.internal.vm.compiler/org.graalvm.compiler.phases.common', 'jdk.internal.vm.ci/jdk.vm.ci.meta', 'jdk.internal.vm.compiler/org.graalvm.compiler.core.common.util'] + packages = ['jdk.internal.vm.compiler/org.graalvm.compiler.phases.common', 'jdk.internal.vm.ci/jdk.vm.ci.meta', 'jdk.internal.vm.ci/jdk.vm.ci.services', 'jdk.internal.vm.compiler/org.graalvm.compiler.core.common.util'] args = ['--add-exports=' + packageName + '=ALL-UNNAMED' for packageName in packages] if not mx_sdk_vm.jdk_enables_jvmci_by_default(get_jdk()): args.extend(['-XX:+UnlockExperimentalVMOptions', '-XX:+EnableJVMCI']) diff --git a/substratevm/src/com.oracle.svm.graal.hotspot.libgraal/src/com/oracle/svm/graal/hotspot/libgraal/LibGraal.java b/substratevm/src/com.oracle.svm.graal.hotspot.libgraal/src/com/oracle/svm/graal/hotspot/libgraal/LibGraal.java new file mode 100644 index 000000000000..e00b22be464d --- /dev/null +++ b/substratevm/src/com.oracle.svm.graal.hotspot.libgraal/src/com/oracle/svm/graal/hotspot/libgraal/LibGraal.java @@ -0,0 +1,280 @@ +/* + * Copyright (c) 2019, 2023, 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. Oracle designates this + * particular file as subject to the "Classpath" exception as provided + * by Oracle in the LICENSE file that accompanied this code. + * + * 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.svm.graal.hotspot.libgraal; + +import static jdk.vm.ci.hotspot.HotSpotJVMCIRuntime.runtime; + +import java.lang.reflect.InvocationTargetException; +import java.lang.reflect.Method; +import java.util.Arrays; + +import jdk.vm.ci.hotspot.HotSpotJVMCIRuntime; +import jdk.vm.ci.hotspot.HotSpotSpeculationLog; +import jdk.vm.ci.services.Services; + +/** + * Access to libgraal, a shared library containing an AOT compiled version of Graal produced by + * GraalVM Native Image. The libgraal library is only available if: + *

    + *
  • the {@linkplain #inLibGraal() current runtime} is libgraal, or
  • + *
  • the HotSpot {@code UseJVMCINativeLibrary} flag is true and the current runtime includes the + * relevant JVMCI API additions for accessing libgraal.
  • + *
+ * + * The {@link #isAvailable()} method is provided to test these conditions. It must be used to guard + * usage of all other methods in this class. In addition, only the following methods can be called + * from within libgraal: + *
    + *
  • {@link #isAvailable()}
  • + *
  • {@link #inLibGraal()}
  • + *
  • {@link #translate(Object)}
  • + *
  • {@link #unhand(Class, long)}
  • + *
+ * + */ +final class LibGraal { + + // NOTE: The use of reflection to access JVMCI API is to support + // compiling on JDKs with varying versions of JVMCI. + + static { + // Initialize JVMCI to ensure JVMCI opens its packages to Graal. + Services.initializeJVMCI(); + } + + private static final Method unhand = methodOrNull(HotSpotJVMCIRuntime.class, "unhand", sig(Class.class, Long.TYPE)); + private static final Method translate = methodIf(unhand, HotSpotJVMCIRuntime.class, "translate", sig(Object.class)); + private static final Method registerNativeMethods = methodIf(unhand, HotSpotJVMCIRuntime.class, "registerNativeMethods", sig(Class.class)); + private static final Method attachCurrentThread = methodIf(unhand, HotSpotJVMCIRuntime.class, "attachCurrentThread", sig(Boolean.TYPE, long[].class), sig(Boolean.TYPE)); + private static final Method detachCurrentThread = methodIf(unhand, HotSpotJVMCIRuntime.class, "detachCurrentThread", sig(Boolean.TYPE), sig()); + private static final Method getFailedSpeculationsAddress = methodIf(unhand, HotSpotSpeculationLog.class, "getFailedSpeculationsAddress"); + + /** + * Determines if libgraal is available for use. + */ + public static boolean isAvailable() { + return inLibGraal() || available; + } + + /** + * Determines if the current runtime supports building a libgraal image. + */ + public static boolean isSupported() { + return getFailedSpeculationsAddress != null; + } + + /** + * Determines if the current runtime is libgraal. + */ + public static boolean inLibGraal() { + return Services.IS_IN_NATIVE_IMAGE; + } + + /** + * Creates or retrieves an object in the peer runtime that mirrors {@code obj}. + * + * This mechanism can be used to pass and return values between the HotSpot and libgraal + * runtimes. In the receiving runtime, the value can be converted back to an object with + * {@link #unhand}. + * + * @param obj an object for which an equivalent instance in the peer runtime is requested + * @return a JNI global reference to the mirror of {@code obj} in the peer runtime + * @throws IllegalArgumentException if {@code obj} is not of a translatable type + */ + public static long translate(Object obj) { + if (!isAvailable()) { + throw new IllegalStateException(); + } + try { + return (long) translate.invoke(runtime(), obj); + } catch (Throwable throwable) { + throw new InternalError(throwable); + } + } + + /** + * Dereferences and returns the object referred to by the JNI global reference {@code handle}. + * The global reference is deleted prior to returning. Any further use of {@code handle} is + * invalid. + * + * @param handle a JNI global reference to an object in the current runtime + * @return the object referred to by {@code handle} + * @throws ClassCastException if the returned object cannot be cast to {@code type} + */ + @SuppressWarnings("unchecked") + public static T unhand(Class type, long handle) { + if (!isAvailable()) { + throw new IllegalStateException(); + } + try { + return (T) unhand.invoke(runtime(), type, handle); + } catch (Throwable throwable) { + throw new InternalError(throwable); + } + } + + private static long initializeLibgraal() { + if (registerNativeMethods == null) { + return 0L; + } + try { + long[] javaVMInfo = (long[]) registerNativeMethods.invoke(runtime(), LibGraal.class); + long isolate = javaVMInfo[1]; + return isolate; + } catch (InvocationTargetException e) { + if (e.getTargetException() instanceof UnsupportedOperationException) { + return 0L; + } + throw new InternalError(e); + } catch (Throwable throwable) { + throw new InternalError(throwable); + } + } + + static final long initialIsolate = Services.IS_BUILDING_NATIVE_IMAGE ? 0L : initializeLibgraal(); + static final boolean available = initialIsolate != 0L; + + /** + * Ensures the current thread is attached to the peer runtime. + * + * @param isDaemon if the thread is not yet attached, should it be attached as a daemon + * @param isolate if non-null, the isolate for the current thread is returned in element 0 + * @return {@code true} if this call attached the current thread, {@code false} if the current + * thread was already attached + */ + public static boolean attachCurrentThread(boolean isDaemon, long[] isolate) { + try { + if (attachCurrentThread.getParameterCount() == 2) { + long[] javaVMInfo = isolate != null ? new long[4] : null; + boolean res = (boolean) attachCurrentThread.invoke(runtime(), isDaemon, javaVMInfo); + if (isolate != null) { + isolate[0] = javaVMInfo[1]; + } + return res; + } else { + if (isolate != null) { + isolate[0] = initialIsolate; + } + return (boolean) attachCurrentThread.invoke(runtime(), isDaemon); + } + } catch (Throwable throwable) { + throw new InternalError(throwable); + } + } + + /** + * Detaches the current thread from the peer runtime. + * + * @param release if {@code true} and the VM supports releasing the {@code JavaVM} associated + * with libgraal runtimes and this is the last thread attached to a libgraal runtime, + * then this call destroys the associated {@code JavaVM} instance, releasing its + * resources + * @return {@code true} if the {@code JavaVM} associated with the libgraal runtime was destroyed + * as a result of this call + */ + public static boolean detachCurrentThread(boolean release) { + try { + if (detachCurrentThread.getParameterCount() == 1) { + return (Boolean) detachCurrentThread.invoke(runtime(), release); + } else { + detachCurrentThread.invoke(runtime()); + return false; + } + } catch (Throwable throwable) { + throw new InternalError(throwable); + } + } + + /** + * Convenience function for wrapping varargs into an array for use in calls to + * {@link #method(Class, String, Class[][])}. + */ + private static Class[] sig(Class... types) { + return types; + } + + /** + * Gets the method in {@code declaringClass} with the unique name {@code name}. + * + * @param sigs the signatures the method may have + */ + private static Method method(Class declaringClass, String name, Class[]... sigs) { + if (sigs.length == 1 || sigs.length == 0) { + try { + Class[] sig = sigs.length == 1 ? sigs[0] : new Class[0]; + return declaringClass.getDeclaredMethod(name, sig); + } catch (NoSuchMethodException | SecurityException e) { + throw (NoSuchMethodError) new NoSuchMethodError(name).initCause(e); + } + } + Method match = null; + for (Method m : declaringClass.getDeclaredMethods()) { + if (m.getName().equals(name)) { + if (match != null) { + throw new InternalError(String.format("Expected single method named %s, found %s and %s", + name, match, m)); + } + match = m; + } + } + if (match == null) { + throw new NoSuchMethodError("Cannot find method " + name + " in " + declaringClass.getName()); + } + Class[] parameterTypes = match.getParameterTypes(); + for (Class[] sig : sigs) { + if (Arrays.equals(parameterTypes, sig)) { + return match; + } + } + throw new NoSuchMethodError(String.format("Unexpected signature for %s: %s", name, Arrays.toString(parameterTypes))); + } + + /** + * Gets the method in {@code declaringClass} with the unique name {@code name} or {@code null} + * if not found. + * + * @param sigs the signatures the method may have + */ + private static Method methodOrNull(Class declaringClass, String name, Class[]... sigs) { + try { + return method(declaringClass, name, sigs); + } catch (NoSuchMethodError e) { + return null; + } + } + + /** + * Gets the method in {@code declaringClass} with the unique name {@code name} or {@code null} + * if {@code guard == null}. + * + * @param sigs the signatures the method may have + */ + private static Method methodIf(Object guard, Class declaringClass, String name, Class[]... sigs) { + if (guard == null) { + return null; + } + return method(declaringClass, name, sigs); + } +} diff --git a/substratevm/src/com.oracle.svm.graal.hotspot.libgraal/src/com/oracle/svm/graal/hotspot/libgraal/LibGraalEntryPoints.java b/substratevm/src/com.oracle.svm.graal.hotspot.libgraal/src/com/oracle/svm/graal/hotspot/libgraal/LibGraalEntryPoints.java index 69df667f3e9b..500152717611 100644 --- a/substratevm/src/com.oracle.svm.graal.hotspot.libgraal/src/com/oracle/svm/graal/hotspot/libgraal/LibGraalEntryPoints.java +++ b/substratevm/src/com.oracle.svm.graal.hotspot.libgraal/src/com/oracle/svm/graal/hotspot/libgraal/LibGraalEntryPoints.java @@ -50,18 +50,10 @@ import org.graalvm.compiler.options.OptionKey; import org.graalvm.compiler.options.OptionValues; import org.graalvm.compiler.options.OptionsParser; -import org.graalvm.compiler.serviceprovider.IsolateUtil; import org.graalvm.jniutils.JNI.JNIEnv; import org.graalvm.jniutils.JNIMethodScope; -import org.graalvm.libgraal.LibGraal; -import org.graalvm.libgraal.LibGraalScope; -import org.graalvm.nativeimage.Isolate; -import org.graalvm.nativeimage.IsolateThread; -import org.graalvm.nativeimage.ObjectHandles; import org.graalvm.nativeimage.UnmanagedMemory; import org.graalvm.nativeimage.c.function.CEntryPoint; -import org.graalvm.nativeimage.c.function.CEntryPoint.Builtin; -import org.graalvm.nativeimage.c.function.CEntryPoint.IsolateContext; import org.graalvm.nativeimage.c.struct.RawField; import org.graalvm.nativeimage.c.struct.RawFieldAddress; import org.graalvm.nativeimage.c.struct.RawStructure; @@ -94,7 +86,7 @@ import jdk.vm.ci.runtime.JVMCICompiler; /** - * Entry points in libgraal corresponding to native methods in {@link LibGraalScope} and + * Entry points in libgraal corresponding to native methods in the scope and * {@code CompileTheWorld}. */ public final class LibGraalEntryPoints { @@ -210,15 +202,6 @@ static CodeInfo newCodeInfo(RuntimeStubInfo rsi, Backend backend) { } } - @CEntryPoint(builtin = Builtin.GET_CURRENT_THREAD, name = "Java_org_graalvm_libgraal_LibGraalScope_getIsolateThreadIn") - private static native IsolateThread getIsolateThreadIn(PointerBase env, PointerBase hsClazz, @IsolateContext Isolate isolate); - - @CEntryPoint(name = "Java_org_graalvm_libgraal_LibGraalScope_attachThreadTo", builtin = CEntryPoint.Builtin.ATTACH_THREAD) - static native long attachThreadTo(PointerBase env, PointerBase hsClazz, @CEntryPoint.IsolateContext long isolate); - - @CEntryPoint(name = "Java_org_graalvm_libgraal_LibGraalScope_detachThreadFrom", builtin = CEntryPoint.Builtin.DETACH_THREAD) - static native void detachThreadFrom(PointerBase env, PointerBase hsClazz, @CEntryPoint.IsolateThreadContext long isolateThread); - static class CachedOptions { final OptionValues options; final long hash; @@ -231,16 +214,6 @@ static class CachedOptions { private static final ThreadLocal cachedOptions = new ThreadLocal<>(); - public static boolean hasLibGraalIsolatePeer() { - return hasLibGraalIsolatePeer; - } - - /** - * Indicates whether this runtime has an associated peer runtime that it must be unregistered - * from during shutdown. - */ - private static boolean hasLibGraalIsolatePeer; - private static OptionValues decodeOptions(long address, int size, int hash) { CachedOptions options = cachedOptions.get(); if (options == null || options.hash != hash) { @@ -265,33 +238,6 @@ private static OptionValues decodeOptions(long address, int size, int hash) { return options.options; } - @SuppressWarnings({"unused"}) - @CEntryPoint(name = "Java_org_graalvm_libgraal_LibGraalObject_releaseHandle") - public static boolean releaseHandle(PointerBase jniEnv, - PointerBase jclass, - @CEntryPoint.IsolateThreadContext long isolateThreadId, - long handle) { - try { - ObjectHandles.getGlobal().destroy(WordFactory.pointer(handle)); - return true; - } catch (Throwable t) { - return false; - } - } - - @SuppressWarnings({"unused"}) - @CEntryPoint(name = "Java_org_graalvm_libgraal_LibGraalScope_getIsolateId") - public static long getIsolateId(PointerBase jniEnv, - PointerBase jclass, - @CEntryPoint.IsolateThreadContext long isolateThreadId) { - try { - hasLibGraalIsolatePeer = true; - return IsolateUtil.getIsolateID(); - } catch (Throwable t) { - return 0L; - } - } - @SuppressWarnings({"unused", "try"}) @CEntryPoint(name = "Java_org_graalvm_compiler_hotspot_test_LibGraalCompilerTest_hashConstantOopFields", include = LibGraalFeature.IsEnabled.class) private static long hashConstantOopFields(JNIEnv jniEnv, diff --git a/substratevm/src/com.oracle.svm.graal.hotspot.libgraal/src/com/oracle/svm/graal/hotspot/libgraal/LibGraalFeature.java b/substratevm/src/com.oracle.svm.graal.hotspot.libgraal/src/com/oracle/svm/graal/hotspot/libgraal/LibGraalFeature.java index b58a570d182d..e40a79ce5463 100644 --- a/substratevm/src/com.oracle.svm.graal.hotspot.libgraal/src/com/oracle/svm/graal/hotspot/libgraal/LibGraalFeature.java +++ b/substratevm/src/com.oracle.svm.graal.hotspot.libgraal/src/com/oracle/svm/graal/hotspot/libgraal/LibGraalFeature.java @@ -59,7 +59,6 @@ import org.graalvm.compiler.core.target.Backend; import org.graalvm.compiler.debug.DebugContext; import org.graalvm.compiler.debug.GraalError; -import org.graalvm.compiler.debug.TTY; import org.graalvm.compiler.graph.Node; import org.graalvm.compiler.graph.NodeClass; import org.graalvm.compiler.hotspot.EncodedSnippets; @@ -87,7 +86,6 @@ import org.graalvm.compiler.options.OptionsParser; import org.graalvm.compiler.phases.util.Providers; import org.graalvm.compiler.serviceprovider.GraalServices; -import org.graalvm.compiler.serviceprovider.IsolateUtil; import org.graalvm.compiler.serviceprovider.SpeculationReasonGroup; import org.graalvm.compiler.truffle.compiler.PartialEvaluatorConfiguration; import org.graalvm.compiler.truffle.compiler.host.TruffleHostEnvironment; @@ -96,16 +94,12 @@ import org.graalvm.compiler.truffle.compiler.substitutions.GraphBuilderInvocationPluginProvider; import org.graalvm.compiler.truffle.compiler.substitutions.GraphDecoderInvocationPluginProvider; import org.graalvm.jniutils.JNI; -import org.graalvm.jniutils.JNIExceptionWrapper; import org.graalvm.jniutils.JNIMethodScope; -import org.graalvm.jniutils.JNIUtil; import org.graalvm.jniutils.NativeBridgeSupport; -import org.graalvm.libgraal.LibGraal; import org.graalvm.libgraal.jni.LibGraalNativeBridgeSupport; import org.graalvm.libgraal.jni.LibGraalUtil; import org.graalvm.nativeimage.ImageSingletons; import org.graalvm.nativeimage.LogHandler; -import org.graalvm.nativeimage.StackValue; import org.graalvm.nativeimage.VMRuntime; import org.graalvm.nativeimage.hosted.Feature; import org.graalvm.nativeimage.hosted.RuntimeJNIAccess; @@ -605,7 +599,7 @@ private static void verifyReachableTruffleClasses(AfterAnalysisAccess access) { private static boolean isAllowedType(String className) { if (className.startsWith("com.oracle.truffle.")) { - return className.startsWith("com.oracle.truffle.api.nodes.") || className.startsWith("com.oracle.truffle.compiler.enterprise."); + return className.startsWith("com.oracle.truffle.compiler."); } return true; } @@ -714,42 +708,10 @@ private static void startupLibGraal(HotSpotGraalRuntime runtime) { VMRuntime.initialize(); } + @SuppressWarnings("unused") @Substitute private static void shutdownLibGraal(HotSpotGraalRuntime runtime) { - try { - // Unregister this isolate if it was created as a peer - if (LibGraalEntryPoints.hasLibGraalIsolatePeer()) { - long offset = runtime.getVMConfig().jniEnvironmentOffset; - long javaThreadAddr = HotSpotJVMCIRuntime.runtime().getCurrentJavaThread(); - JNI.JNIEnv env = (JNI.JNIEnv) WordFactory.unsigned(javaThreadAddr).add(WordFactory.unsigned(offset)); - JNI.JClass libGraalIsolateClass = JNIUtil.findClass(env, JNIUtil.getJVMCIClassLoader(env), - JNIUtil.getBinaryName("org.graalvm.libgraal.LibGraalIsolate"), true); - JNI.JMethodID unregisterMethod = JNIUtil.findMethod(env, libGraalIsolateClass, true, "unregister", "(J)V"); - JNI.JValue args = StackValue.get(JNI.JValue.class); - args.setLong(IsolateUtil.getIsolateID()); - env.getFunctions().getCallStaticVoidMethodA().call(env, libGraalIsolateClass, unregisterMethod, args); - JNIExceptionWrapper.wrapAndThrowPendingJNIException(env); - - String callback = LibGraalOptions.OnShutdownCallback.getValue(); - if (callback != null) { - int lastDot = callback.lastIndexOf('.'); - if (lastDot < 1 || lastDot == callback.length() - 1) { - throw new IllegalArgumentException(LibGraalOptions.OnShutdownCallback.getName() + " value does not have . format: " + callback); - } - String cbClassName = callback.substring(0, lastDot); - String cbMethodName = callback.substring(lastDot + 1); - JNI.JClass cbClass = JNIUtil.findClass(env, JNIUtil.getSystemClassLoader(env), - JNIUtil.getBinaryName(cbClassName), true); - JNI.JMethodID cbMethod = JNIUtil.findMethod(env, cbClass, true, cbMethodName, "()V"); - env.getFunctions().getCallStaticVoidMethodA().call(env, cbClass, cbMethod, StackValue.get(0)); - JNIExceptionWrapper.wrapAndThrowPendingJNIException(env); - } - } - } catch (Throwable t) { - t.printStackTrace(TTY.out); - } finally { - VMRuntime.shutdown(); - } + VMRuntime.shutdown(); } } diff --git a/truffle/mx.truffle/suite.py b/truffle/mx.truffle/suite.py index 6ad82c8a0f4c..9a51230b448b 100644 --- a/truffle/mx.truffle/suite.py +++ b/truffle/mx.truffle/suite.py @@ -1161,7 +1161,9 @@ ], "exports" : [ # Qualified exports - "com.oracle.truffle.compiler to org.graalvm.truffle.runtime, jdk.internal.vm.compiler, com.oracle.graal.graal_enterprise" + "com.oracle.truffle.compiler to org.graalvm.truffle.runtime, jdk.internal.vm.compiler, com.oracle.graal.graal_enterprise, org.graalvm.nativeimage.builder", + "com.oracle.truffle.compiler.hotspot to org.graalvm.truffle.runtime, jdk.internal.vm.compiler", + "com.oracle.truffle.compiler.hotspot.libgraal to org.graalvm.truffle.runtime, jdk.internal.vm.compiler" ], "uses" : [ ], @@ -1196,7 +1198,7 @@ ], "exports" : [ # Qualified exports - "org.graalvm.compiler.truffle.runtime to jdk.internal.vm.compiler, com.oracle.graal.graal_enterprise, com.oracle.svm.svm_enterprise" + "org.graalvm.compiler.truffle.runtime to jdk.internal.vm.compiler, com.oracle.graal.graal_enterprise, com.oracle.svm.svm_enterprise, org.graalvm.nativeimage.builder" ], "uses" : [ "com.oracle.truffle.api.impl.TruffleLocator", @@ -1317,7 +1319,7 @@ "moduleInfo" : "closed", } }, - + "TRUFFLE_LIBGRAAL_TRUFFLEATTACH" : { "native" : True, "platformDependent" : True, @@ -1624,6 +1626,7 @@ ], "distDependencies" : [ "TRUFFLE_API", + "TRUFFLE_RUNTIME", "TRUFFLE_SL", "TRUFFLE_TCK_COMMON", "TRUFFLE_TCK_TESTS", diff --git a/truffle/src/com.oracle.truffle.api/src/com/oracle/truffle/api/Truffle.java b/truffle/src/com.oracle.truffle.api/src/com/oracle/truffle/api/Truffle.java index 0058b3b011d1..2e1ba4d7fff4 100644 --- a/truffle/src/com.oracle.truffle.api/src/com/oracle/truffle/api/Truffle.java +++ b/truffle/src/com.oracle.truffle.api/src/com/oracle/truffle/api/Truffle.java @@ -136,7 +136,10 @@ public TruffleRuntime run() { if (access != null) { exportTo(access.getClass()); - return access.getRuntime(); + TruffleRuntime runtime = access.getRuntime(); + if (runtime != null) { + return runtime; + } } return new DefaultTruffleRuntime(); } diff --git a/truffle/src/com.oracle.truffle.compiler/src/com/oracle/truffle/compiler/hotspot/libgraal/TruffleFromLibGraal.java b/truffle/src/com.oracle.truffle.compiler/src/com/oracle/truffle/compiler/hotspot/libgraal/TruffleFromLibGraal.java index aa19e688b9f8..449ab7070966 100644 --- a/truffle/src/com.oracle.truffle.compiler/src/com/oracle/truffle/compiler/hotspot/libgraal/TruffleFromLibGraal.java +++ b/truffle/src/com.oracle.truffle.compiler/src/com/oracle/truffle/compiler/hotspot/libgraal/TruffleFromLibGraal.java @@ -178,7 +178,9 @@ enum Id implements FromLibGraalId { @Signature({Consumer.class, Object.class, long.class}) RegisterOptimizedAssumptionDependency, @Signature({void.class, Object.class, int.class, int.class}) - SetCallCounts; + SetCallCounts, + @Signature({void.class, long.class}) + OnIsolateShutdown; // @formatter:on private final String signature; diff --git a/truffle/src/com.oracle.truffle.compiler/src/com/oracle/truffle/compiler/hotspot/libgraal/TruffleToLibGraal.java b/truffle/src/com.oracle.truffle.compiler/src/com/oracle/truffle/compiler/hotspot/libgraal/TruffleToLibGraal.java index 1a00960bfeaa..66abe85106c2 100644 --- a/truffle/src/com.oracle.truffle.compiler/src/com/oracle/truffle/compiler/hotspot/libgraal/TruffleToLibGraal.java +++ b/truffle/src/com.oracle.truffle.compiler/src/com/oracle/truffle/compiler/hotspot/libgraal/TruffleToLibGraal.java @@ -74,6 +74,7 @@ enum Id { GetSuppliedString, GetTargetCodeSize, GetTotalFrameSize, + InitializeIsolate, InitializeCompiler, RegisterRuntime, ListCompilerOptions, diff --git a/truffle/src/com.oracle.truffle.libgraal.processor/src/com/oracle/truffle/libgraal/processor/TruffleFromLibGraalProcessor.java b/truffle/src/com.oracle.truffle.libgraal.processor/src/com/oracle/truffle/libgraal/processor/TruffleFromLibGraalProcessor.java index 611aec2ac44b..27da23d8ff4e 100644 --- a/truffle/src/com.oracle.truffle.libgraal.processor/src/com/oracle/truffle/libgraal/processor/TruffleFromLibGraalProcessor.java +++ b/truffle/src/com.oracle.truffle.libgraal.processor/src/com/oracle/truffle/libgraal/processor/TruffleFromLibGraalProcessor.java @@ -252,9 +252,9 @@ private void createGenSource(CallsInfo info, String pkg, Name topDeclaringClass, out.println(""); if (!isPrimitiveOrVoid(rt)) { out.println(" @SuppressWarnings(\"unchecked\")"); - out.printf(" static T call%s(JNIEnv env", idName); + out.printf(" static T call%s(TruffleFromLibGraalCalls calls, JNIEnv env", idName); } else { - out.printf(" static %s call%s(JNIEnv env", toJNIType(rt, false), idName); + out.printf(" static %s call%s(TruffleFromLibGraalCalls calls, JNIEnv env", toJNIType(rt, false), idName); } List parameterTypes = id.parameterTypes; for (TypeMirror t : parameterTypes) { @@ -276,7 +276,7 @@ private void createGenSource(CallsInfo info, String pkg, Name topDeclaringClass, } else { returnPrefix = "return "; } - out.printf(" %sTruffleFromLibGraalCalls.INSTANCE.call%s(env, %s, args);%n", returnPrefix, toJNIType(rt, true), idName); + out.printf(" %scalls.call%s(env, %s, args);%n", returnPrefix, toJNIType(rt, true), idName); out.println(" }"); } out.println("}"); diff --git a/truffle/src/com.oracle.truffle.runtime/src/META-INF/services/com.oracle.truffle.api.TruffleRuntimeAccess b/truffle/src/com.oracle.truffle.runtime/src/META-INF/services/com.oracle.truffle.api.TruffleRuntimeAccess index 3a087fe78a10..0b91504eb67a 100644 --- a/truffle/src/com.oracle.truffle.runtime/src/META-INF/services/com.oracle.truffle.api.TruffleRuntimeAccess +++ b/truffle/src/com.oracle.truffle.runtime/src/META-INF/services/com.oracle.truffle.api.TruffleRuntimeAccess @@ -1 +1 @@ -org.graalvm.compiler.truffle.runtime.hotspot.libgraal.LibGraalTruffleRuntimeAccess +org.graalvm.compiler.truffle.runtime.hotspot.HotSpotTruffleRuntimeAccess diff --git a/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/GraalTruffleRuntime.java b/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/GraalTruffleRuntime.java index 23ac82cd8942..ac76b631a7ac 100644 --- a/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/GraalTruffleRuntime.java +++ b/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/GraalTruffleRuntime.java @@ -1007,15 +1007,24 @@ private static com.oracle.truffle.api.object.LayoutFactory loadObjectLayoutFacto } private static List> loadService(Class service) { - ServiceLoader graalLoader = ServiceLoader.load(service, GraalTruffleRuntime.class.getClassLoader()); - /* - * The Graal module (i.e., jdk.internal.vm.compiler) is loaded by the platform class loader. - * Its module dependencies such as Truffle are supplied via --module-path which means they - * are loaded by the app class loader. As such, we need to search the app class loader path - * as well. - */ - ServiceLoader appLoader = ServiceLoader.load(service, service.getClassLoader()); - return Arrays.asList(graalLoader, appLoader); + ClassLoader runtimeClassLoader = GraalTruffleRuntime.class.getClassLoader(); + ClassLoader appClassLoader = service.getClassLoader(); + ServiceLoader appLoader = ServiceLoader.load(service, appClassLoader); + if (runtimeClassLoader.equals(appClassLoader)) { + /* + * Primary mode of operation for Truffle consumed from the application module path. + */ + return List.of(appLoader); + } else { + ServiceLoader runtimeLoader = ServiceLoader.load(service, runtimeClassLoader); + /* + * The Graal module (i.e., jdk.internal.vm.compiler) is loaded by the platform class + * loader. Its module dependencies such as Truffle are supplied via --module-path which + * means they are loaded by the app class loader. As such, we need to search the app + * class loader path as well. + */ + return List.of(runtimeLoader, appLoader); + } } @SuppressWarnings("deprecation") diff --git a/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/hotspot/AbstractHotSpotTruffleRuntimeAccess.java b/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/hotspot/AbstractHotSpotTruffleRuntimeAccess.java deleted file mode 100644 index 83ac0e900c78..000000000000 --- a/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/hotspot/AbstractHotSpotTruffleRuntimeAccess.java +++ /dev/null @@ -1,86 +0,0 @@ -/* - * Copyright (c) 2013, 2023, Oracle and/or its affiliates. All rights reserved. - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * The Universal Permissive License (UPL), Version 1.0 - * - * Subject to the condition set forth below, permission is hereby granted to any - * person obtaining a copy of this software, associated documentation and/or - * data (collectively the "Software"), free of charge and under any and all - * copyright rights in the Software, and any and all patent rights owned or - * freely licensable by each licensor hereunder covering either (i) the - * unmodified Software as contributed to or provided by such licensor, or (ii) - * the Larger Works (as defined below), to deal in both - * - * (a) the Software, and - * - * (b) any piece of software and/or hardware listed in the lrgrwrks.txt file if - * one is included with the Software each a "Larger Work" to which the Software - * is contributed by such licensors), - * - * without restriction, including without limitation the rights to copy, create - * derivative works of, display, perform, and distribute the Software and make, - * use, sell, offer for sale, import, export, have made, and have sold the - * Software and the Larger Work(s), and to sublicense the foregoing rights on - * either these or other terms. - * - * This license is subject to the following condition: - * - * The above copyright notice and either this complete permission notice or at a - * minimum a reference to the UPL must be included in all copies or substantial - * portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ -package org.graalvm.compiler.truffle.runtime.hotspot; - -import com.oracle.truffle.api.TruffleRuntime; -import com.oracle.truffle.api.TruffleRuntimeAccess; -import com.oracle.truffle.api.impl.DefaultTruffleRuntime; -import jdk.vm.ci.hotspot.HotSpotJVMCIRuntime; -import jdk.vm.ci.hotspot.HotSpotVMConfigAccess; -import jdk.vm.ci.runtime.JVMCI; -import jdk.vm.ci.services.Services; - -public abstract class AbstractHotSpotTruffleRuntimeAccess implements TruffleRuntimeAccess { - - private final boolean hasOpenJVMCI; - - protected AbstractHotSpotTruffleRuntimeAccess() { - hasOpenJVMCI = JVMCIOpenSupport.openJVMCI(); - } - - @Override - public final TruffleRuntime getRuntime() { - if (hasOpenJVMCI) { - // initialize JVMCI to make sure the TruffleCompiler option is parsed - Services.initializeJVMCI(); - HotSpotJVMCIRuntime hsRuntime = (HotSpotJVMCIRuntime) JVMCI.getRuntime(); - HotSpotVMConfigAccess config = new HotSpotVMConfigAccess(hsRuntime.getConfigStore()); - boolean useCompiler = config.getFlag("UseCompiler", Boolean.class); - if (useCompiler) { - return createRuntime(); - } - } - return new DefaultTruffleRuntime(); - } - - @Override - public final int getPriority() { - if (hasOpenJVMCI) { - return calculatePriority(); - } else { - return Integer.MIN_VALUE; - } - } - - protected abstract TruffleRuntime createRuntime(); - - protected abstract int calculatePriority(); -} diff --git a/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/hotspot/HotSpotTruffleRuntimeAccess.java b/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/hotspot/HotSpotTruffleRuntimeAccess.java new file mode 100644 index 000000000000..2cffb2c382c7 --- /dev/null +++ b/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/hotspot/HotSpotTruffleRuntimeAccess.java @@ -0,0 +1,123 @@ +/* + * Copyright (c) 2015, 2023, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * The Universal Permissive License (UPL), Version 1.0 + * + * Subject to the condition set forth below, permission is hereby granted to any + * person obtaining a copy of this software, associated documentation and/or + * data (collectively the "Software"), free of charge and under any and all + * copyright rights in the Software, and any and all patent rights owned or + * freely licensable by each licensor hereunder covering either (i) the + * unmodified Software as contributed to or provided by such licensor, or (ii) + * the Larger Works (as defined below), to deal in both + * + * (a) the Software, and + * + * (b) any piece of software and/or hardware listed in the lrgrwrks.txt file if + * one is included with the Software each a "Larger Work" to which the Software + * is contributed by such licensors), + * + * without restriction, including without limitation the rights to copy, create + * derivative works of, display, perform, and distribute the Software and make, + * use, sell, offer for sale, import, export, have made, and have sold the + * Software and the Larger Work(s), and to sublicense the foregoing rights on + * either these or other terms. + * + * This license is subject to the following condition: + * + * The above copyright notice and either this complete permission notice or at a + * minimum a reference to the UPL must be included in all copies or substantial + * portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ +package org.graalvm.compiler.truffle.runtime.hotspot; + +import org.graalvm.compiler.truffle.runtime.hotspot.libgraal.LibGraalTruffleCompilationSupport; +import org.graalvm.libgraal.LibGraal; + +import com.oracle.truffle.api.TruffleRuntime; +import com.oracle.truffle.api.TruffleRuntimeAccess; +import com.oracle.truffle.api.impl.DefaultTruffleRuntime; +import com.oracle.truffle.compiler.TruffleCompilable; +import com.oracle.truffle.compiler.TruffleCompilationSupport; + +import jdk.vm.ci.hotspot.HotSpotJVMCIRuntime; +import jdk.vm.ci.hotspot.HotSpotVMConfigAccess; +import jdk.vm.ci.runtime.JVMCI; +import jdk.vm.ci.services.Services; + +public final class HotSpotTruffleRuntimeAccess implements TruffleRuntimeAccess { + + public HotSpotTruffleRuntimeAccess() { + } + + @Override + public TruffleRuntime getRuntime() { + TruffleRuntime runtime = createRuntime(); + if (runtime == null) { + return new DefaultTruffleRuntime(); + } + return runtime; + } + + @Override + public int getPriority() { + return 0; + } + + protected static TruffleRuntime createRuntime() { + Module runtimeModule = HotSpotTruffleRuntimeAccess.class.getModule(); + Module compilerAPIModule = TruffleCompilable.class.getModule(); + Module jvmciModule = HotSpotTruffleRuntimeAccess.class.getModule().getLayer().findModule("jdk.internal.vm.ci").orElse(null); + + if (jvmciModule == null) { + // jvmci not found -> fallback to default runtime + return null; + } + + for (String pn : jvmciModule.getPackages()) { + ModulesSupport.addExports(jvmciModule, pn, runtimeModule); + ModulesSupport.addExports(jvmciModule, pn, compilerAPIModule); + } + + Services.initializeJVMCI(); + HotSpotJVMCIRuntime hsRuntime = (HotSpotJVMCIRuntime) JVMCI.getRuntime(); + HotSpotVMConfigAccess config = new HotSpotVMConfigAccess(hsRuntime.getConfigStore()); + boolean useCompiler = config.getFlag("UseCompiler", Boolean.class); + if (!useCompiler) { + // compilation disabled in host VM -> fallback to default runtime + return null; + } + + TruffleCompilationSupport compilationSupport; + if (LibGraal.isAvailable()) { + compilationSupport = new LibGraalTruffleCompilationSupport(); + } else { + try { + // jar graal + Module compilerModule = HotSpotTruffleRuntimeAccess.class.getModule().getLayer().findModule("jdk.internal.vm.compiler").orElse(null); + if (compilerModule == null) { + // jargraal compiler module not found -> fallback to default runtime + return null; + } + ModulesSupport.addExports(compilerModule, "org.graalvm.compiler.truffle.compiler.hotspot", runtimeModule); + Class hotspotCompilationSupport = Class.forName("org.graalvm.compiler.truffle.compiler.hotspot.HotSpotTruffleCompilationSupport"); + compilationSupport = (TruffleCompilationSupport) hotspotCompilationSupport.getConstructor().newInstance(); + } catch (ReflectiveOperationException e) { + throw new InternalError(e); + } + } + HotSpotTruffleRuntime rt = new HotSpotTruffleRuntime(compilationSupport); + compilationSupport.registerRuntime(rt); + return rt; + } + +} diff --git a/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/hotspot/JVMCIOpenSupport.java b/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/hotspot/JVMCIOpenSupport.java deleted file mode 100644 index 6986b3e7f0b4..000000000000 --- a/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/hotspot/JVMCIOpenSupport.java +++ /dev/null @@ -1,103 +0,0 @@ -/* - * Copyright (c) 2023, 2023, Oracle and/or its affiliates. All rights reserved. - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * The Universal Permissive License (UPL), Version 1.0 - * - * Subject to the condition set forth below, permission is hereby granted to any - * person obtaining a copy of this software, associated documentation and/or - * data (collectively the "Software"), free of charge and under any and all - * copyright rights in the Software, and any and all patent rights owned or - * freely licensable by each licensor hereunder covering either (i) the - * unmodified Software as contributed to or provided by such licensor, or (ii) - * the Larger Works (as defined below), to deal in both - * - * (a) the Software, and - * - * (b) any piece of software and/or hardware listed in the lrgrwrks.txt file if - * one is included with the Software each a "Larger Work" to which the Software - * is contributed by such licensors), - * - * without restriction, including without limitation the rights to copy, create - * derivative works of, display, perform, and distribute the Software and make, - * use, sell, offer for sale, import, export, have made, and have sold the - * Software and the Larger Work(s), and to sublicense the foregoing rights on - * either these or other terms. - * - * This license is subject to the following condition: - * - * The above copyright notice and either this complete permission notice or at a - * minimum a reference to the UPL must be included in all copies or substantial - * portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ -package org.graalvm.compiler.truffle.runtime.hotspot; - -final class JVMCIOpenSupport { - - private static final Module truffleRuntimeModule; - private static final Module jvmciModule; - private static final boolean truffleAttachLibraryAvailable; - static { - truffleRuntimeModule = JVMCIOpenSupport.class.getModule(); - jvmciModule = truffleRuntimeModule.getLayer().findModule("jdk.internal.vm.ci").orElse(null); - truffleAttachLibraryAvailable = jvmciModule != null && loadTruffleAttachLibrary(); - } - - private JVMCIOpenSupport() { - } - - static boolean hasOpenJVMCI() { - return jvmciModule != null && isJVMCIExportedOrOpenedToTruffleRuntime(); - } - - static boolean openJVMCI() { - if (jvmciModule == null) { - return false; - } - if (isJVMCIExportedOrOpenedToTruffleRuntime()) { - return true; - } - if (truffleAttachLibraryAvailable) { - truffleRuntimeModule.addReads(jvmciModule); - openJVMCITo0(truffleRuntimeModule); - return true; - } - return false; - } - - private static boolean isJVMCIExportedOrOpenedToTruffleRuntime() { - return jvmciModule.isExported("jdk.vm.ci.hotspot", truffleRuntimeModule); - } - - private static boolean loadTruffleAttachLibrary() { - /* - * Support for unittests. Unittests are passing path to the truffleattach library using - * truffle.attach.library system property. - */ - String attachLib = System.getProperty("truffle.attach.library"); - try { - if (attachLib == null) { - try { - System.loadLibrary("truffleattach"); - } catch (UnsatisfiedLinkError invalidLibrary) { - return false; - } - } else { - System.load(attachLib); - } - return true; - } catch (Throwable throwable) { - throw new InternalError(throwable); - } - } - - private static native void openJVMCITo0(Module toModule); -} diff --git a/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/hotspot/libgraal/LibGraalTruffleRuntimeAccess.java b/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/hotspot/ModulesSupport.java similarity index 65% rename from truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/hotspot/libgraal/LibGraalTruffleRuntimeAccess.java rename to truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/hotspot/ModulesSupport.java index d569c2534db1..1fc2ce8f61f5 100644 --- a/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/hotspot/libgraal/LibGraalTruffleRuntimeAccess.java +++ b/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/hotspot/ModulesSupport.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2018, 2023, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2023, 2023, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * The Universal Permissive License (UPL), Version 1.0 @@ -38,32 +38,40 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ -package org.graalvm.compiler.truffle.runtime.hotspot.libgraal; +package org.graalvm.compiler.truffle.runtime.hotspot; -import org.graalvm.compiler.truffle.runtime.hotspot.AbstractHotSpotTruffleRuntimeAccess; -import org.graalvm.compiler.truffle.runtime.hotspot.HotSpotTruffleRuntime; -import org.graalvm.libgraal.LibGraal; +final class ModulesSupport { -import com.oracle.truffle.api.TruffleRuntime; + static { + loadModulesSupportLibrary(); + } -/** - * Access to a {@link TruffleRuntime} that uses libgraal for compilation. - */ -public final class LibGraalTruffleRuntimeAccess extends AbstractHotSpotTruffleRuntimeAccess { + private ModulesSupport() { + } - @Override - protected TruffleRuntime createRuntime() { - LibGraalTruffleCompilationSupport compilationSupport = new LibGraalTruffleCompilationSupport(); - HotSpotTruffleRuntime runtime = new HotSpotTruffleRuntime(compilationSupport); - compilationSupport.registerRuntime(runtime); - return runtime; + static void addExports(Module m1, String pn, Module m2) { + + addExports0(m1, pn, m2); } - @Override - protected int calculatePriority() { - if (LibGraal.isAvailable()) { - return Integer.MAX_VALUE; + private static boolean loadModulesSupportLibrary() { + String attachLib = System.getProperty("truffle.attach.library"); + try { + if (attachLib == null) { + try { + System.loadLibrary("truffleattach"); + } catch (UnsatisfiedLinkError invalidLibrary) { + return false; + } + } else { + System.load(attachLib); + } + return true; + } catch (Throwable throwable) { + throw new InternalError(throwable); } - return Integer.MIN_VALUE; } + + private static native void addExports0(Module runtimeModule, String packageName, Module compilerModule); + } diff --git a/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/hotspot/java/HotSpotTruffleRuntimeAccess.java b/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/hotspot/java/HotSpotTruffleRuntimeAccess.java deleted file mode 100644 index 29fd9c49ef02..000000000000 --- a/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/hotspot/java/HotSpotTruffleRuntimeAccess.java +++ /dev/null @@ -1,68 +0,0 @@ -/* - * Copyright (c) 2015, 2023, Oracle and/or its affiliates. All rights reserved. - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * The Universal Permissive License (UPL), Version 1.0 - * - * Subject to the condition set forth below, permission is hereby granted to any - * person obtaining a copy of this software, associated documentation and/or - * data (collectively the "Software"), free of charge and under any and all - * copyright rights in the Software, and any and all patent rights owned or - * freely licensable by each licensor hereunder covering either (i) the - * unmodified Software as contributed to or provided by such licensor, or (ii) - * the Larger Works (as defined below), to deal in both - * - * (a) the Software, and - * - * (b) any piece of software and/or hardware listed in the lrgrwrks.txt file if - * one is included with the Software each a "Larger Work" to which the Software - * is contributed by such licensors), - * - * without restriction, including without limitation the rights to copy, create - * derivative works of, display, perform, and distribute the Software and make, - * use, sell, offer for sale, import, export, have made, and have sold the - * Software and the Larger Work(s), and to sublicense the foregoing rights on - * either these or other terms. - * - * This license is subject to the following condition: - * - * The above copyright notice and either this complete permission notice or at a - * minimum a reference to the UPL must be included in all copies or substantial - * portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ -package org.graalvm.compiler.truffle.runtime.hotspot.java; - -import org.graalvm.compiler.truffle.runtime.hotspot.AbstractHotSpotTruffleRuntimeAccess; -import org.graalvm.compiler.truffle.runtime.hotspot.HotSpotTruffleRuntime; - -import com.oracle.truffle.api.TruffleRuntime; -import com.oracle.truffle.compiler.TruffleCompilationSupport; - -public final class HotSpotTruffleRuntimeAccess extends AbstractHotSpotTruffleRuntimeAccess { - - @Override - protected TruffleRuntime createRuntime() { - try { - Class hotspotCompilationSupport = Class.forName("org.graalvm.compiler.truffle.compiler.hotspot.HotSpotTruffleCompilationSupport"); - TruffleCompilationSupport compilationSupport = (TruffleCompilationSupport) hotspotCompilationSupport.getConstructor().newInstance(); - HotSpotTruffleRuntime rt = new HotSpotTruffleRuntime(compilationSupport); - compilationSupport.registerRuntime(rt); - return rt; - } catch (ReflectiveOperationException e) { - throw new InternalError(e); - } - } - - @Override - protected int calculatePriority() { - return 0; - } -} diff --git a/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/hotspot/libgraal/LibGraalTruffleCompilationSupport.java b/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/hotspot/libgraal/LibGraalTruffleCompilationSupport.java index 024782b08beb..204888646302 100644 --- a/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/hotspot/libgraal/LibGraalTruffleCompilationSupport.java +++ b/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/hotspot/libgraal/LibGraalTruffleCompilationSupport.java @@ -63,6 +63,11 @@ public final class LibGraalTruffleCompilationSupport implements TruffleCompilati private volatile String cachedCompilerConfigurationName; + public static void initializeIsolate(long isolateThreadId) { + runtime().registerNativeMethods(TruffleToLibGraalCalls.class); + TruffleToLibGraalCalls.initializeIsolate(isolateThreadId, LibGraalTruffleCompilationSupport.class); + } + /* * When migrated to native-bridge this method should be marked @Idempotent instead. */ diff --git a/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/hotspot/libgraal/TruffleFromLibGraalEntryPoints.java b/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/hotspot/libgraal/TruffleFromLibGraalEntryPoints.java index 7c00bc4414d9..15ce4929aa34 100644 --- a/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/hotspot/libgraal/TruffleFromLibGraalEntryPoints.java +++ b/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/hotspot/libgraal/TruffleFromLibGraalEntryPoints.java @@ -101,6 +101,7 @@ import org.graalvm.compiler.truffle.runtime.OptimizedCallTarget; import org.graalvm.compiler.truffle.runtime.hotspot.libgraal.BinaryOutput.ByteArrayBinaryOutput; import org.graalvm.libgraal.LibGraal; +import org.graalvm.libgraal.LibGraalIsolate; import com.oracle.truffle.compiler.ConstantFieldInfo; import com.oracle.truffle.compiler.HostMethodInfo; @@ -131,6 +132,11 @@ final class TruffleFromLibGraalEntryPoints { assert checkHotSpotCalls(); } + @TruffleFromLibGraal(Id.OnIsolateShutdown) + static void onIsolateShutdown(long isolateId) { + LibGraalIsolate.unregister(isolateId); + } + @TruffleFromLibGraal(ConsumeOptimizedAssumptionDependency) static void consumeOptimizedAssumptionDependency(Consumer consumer, Object target, long installedCode) { OptimizedCallTarget callTarget = (OptimizedCallTarget) target; diff --git a/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/hotspot/libgraal/TruffleToLibGraalCalls.java b/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/hotspot/libgraal/TruffleToLibGraalCalls.java index 0d3aaa0b6ee2..4de0848a0834 100644 --- a/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/hotspot/libgraal/TruffleToLibGraalCalls.java +++ b/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/hotspot/libgraal/TruffleToLibGraalCalls.java @@ -74,8 +74,11 @@ */ final class TruffleToLibGraalCalls { - @TruffleToLibGraal(InitializeRuntime) - static native long initializeRuntime(long isolateThreadId, TruffleCompilerRuntime truffleRuntime, Class classLoaderDelegate); + /** + * Invoked first time the isolate is attached. + */ + @TruffleToLibGraal(Id.InitializeIsolate) + static native boolean initializeIsolate(long isolateThreadId, Class runtimeClass); /** * Registers a Truffle runtime. Returns true if this was the first runtime @@ -85,6 +88,9 @@ final class TruffleToLibGraalCalls { @TruffleToLibGraal(RegisterRuntime) static native boolean registerRuntime(long isolateThreadId, Object truffleRuntime); + @TruffleToLibGraal(InitializeRuntime) + static native long initializeRuntime(long isolateThreadId, TruffleCompilerRuntime truffleRuntime, Class classLoaderDelegate); + @TruffleToLibGraal(Id.ListCompilerOptions) static native byte[] listCompilerOptions(long isolateThreadId); diff --git a/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/libgraal/LibGraal.java b/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/libgraal/LibGraal.java index a7653f4955d6..b7e6ff0da395 100644 --- a/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/libgraal/LibGraal.java +++ b/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/libgraal/LibGraal.java @@ -207,6 +207,7 @@ private static long initializeLibgraal() { return isolate; } catch (InvocationTargetException e) { if (e.getTargetException() instanceof UnsupportedOperationException) { + // libgraal available but not enabled return 0L; } throw new InternalError(e); diff --git a/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/libgraal/LibGraalIsolate.java b/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/libgraal/LibGraalIsolate.java index 9b606ffae595..c652eabf644b 100644 --- a/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/libgraal/LibGraalIsolate.java +++ b/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/libgraal/LibGraalIsolate.java @@ -153,7 +153,7 @@ boolean clean() { * {@link DestroyedIsolateException}. Called by {@code LibGraalFeature#shutdownLibGraal} using * JNI. */ - static synchronized void unregister(long isolateId) { + public static synchronized void unregister(long isolateId) { LibGraalIsolate isolate = isolates.remove(isolateId); // The isolates.remove(isolateId) may return null when no LibGraalScope was created for the // given isolateId. diff --git a/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/libgraal/LibGraalScope.java b/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/libgraal/LibGraalScope.java index b960840a624f..b838aeb33eac 100644 --- a/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/libgraal/LibGraalScope.java +++ b/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/libgraal/LibGraalScope.java @@ -42,6 +42,8 @@ import java.util.concurrent.atomic.AtomicInteger; +import org.graalvm.compiler.truffle.runtime.hotspot.libgraal.LibGraalTruffleCompilationSupport; + /** * Scope for calling CEntryPoints in libgraal. {@linkplain #LibGraalScope() Opening} a scope ensures * the current thread is attached to libgraal and {@linkplain #close() closing} the outer most scope @@ -166,18 +168,24 @@ public LibGraalScope(DetachAction detachAction) { } id = nextId.getAndIncrement(); parent = currentScope.get(); + boolean initializeIsolate; if (parent == null) { long[] isolateBox = {0}; boolean firstAttach = LibGraal.attachCurrentThread(false, isolateBox); long isolateAddress = isolateBox[0]; long isolateThread = getIsolateThreadIn(isolateAddress); long isolateId = getIsolateId(isolateThread); + initializeIsolate = firstAttach; LibGraalIsolate isolate = LibGraalIsolate.forIsolateId(isolateId, isolateAddress); shared = new Shared(firstAttach ? detachAction : null, isolate, isolateThread); } else { shared = parent.shared; + initializeIsolate = false; } currentScope.set(this); + if (initializeIsolate) { + LibGraalTruffleCompilationSupport.initializeIsolate(shared.getIsolateThread()); + } } @Override diff --git a/truffle/src/org.graalvm.compiler.truffle.libgraal.truffleattach/src/truffle_attach.cc b/truffle/src/org.graalvm.compiler.truffle.libgraal.truffleattach/src/truffle_attach.cc index 994198d5c297..069dbf1f008a 100644 --- a/truffle/src/org.graalvm.compiler.truffle.libgraal.truffleattach/src/truffle_attach.cc +++ b/truffle/src/org.graalvm.compiler.truffle.libgraal.truffleattach/src/truffle_attach.cc @@ -29,15 +29,16 @@ return; \ } - -static void openJVMCITo(JNIEnv* jniEnv, jobject callerModule) { - jclass servicesClz = jniEnv->FindClass("jdk/vm/ci/services/Services"); +static void addExports(JNIEnv* jniEnv, jobject m1, jobject pn, jobject m2) { + jclass modulesClass = jniEnv->FindClass("jdk/internal/module/Modules"); EXCEPTION_CHECK_VOID(jniEnv) - jmethodID openJVMCIMethod = jniEnv->GetStaticMethodID(servicesClz, "openJVMCITo", "(Ljava/lang/Module;)V"); + jmethodID addExports = jniEnv->GetStaticMethodID(modulesClass, "addExports", "(Ljava/lang/Module;Ljava/lang/String;Ljava/lang/Module;)V"); EXCEPTION_CHECK_VOID(jniEnv) - jvalue args[2] {}; - args[0].l = callerModule; - jniEnv->CallStaticVoidMethodA(servicesClz, openJVMCIMethod, args); + jvalue args[4] {}; + args[0].l = m1; + args[1].l = pn; + args[2].l = m2; + jniEnv->CallStaticVoidMethodA(modulesClass, addExports, args); } // Library entry points @@ -46,10 +47,11 @@ static void openJVMCITo(JNIEnv* jniEnv, jobject callerModule) { extern "C" { #endif -JNIEXPORT void JNICALL Java_org_graalvm_compiler_truffle_runtime_hotspot_JVMCIOpenSupport_openJVMCITo0(JNIEnv *env, jclass clz, jobject callerModule) { - openJVMCITo(env, callerModule); +JNIEXPORT void JNICALL Java_org_graalvm_compiler_truffle_runtime_hotspot_ModulesSupport_addExports0(JNIEnv *env, jclass clz, jobject m1, jobject pn, jobject m2) { + addExports(env, m1, pn, m2); } + #ifdef __cplusplus } #endif From c52d6751d1a08aa01a18429286e9797f1de96710 Mon Sep 17 00:00:00 2001 From: Christian Humer Date: Thu, 22 Jun 2023 21:03:29 +0200 Subject: [PATCH 09/43] Move org.graalvm.compiler.truffle.compiler.hotspot.libgraal to com.oracle.svm.graal.hotspot.libgraal project. --- compiler/mx.compiler/suite.py | 38 ----- .../graalvm/libgraal/jni/LibGraalUtil.java | 106 ------------- substratevm/mx.substratevm/mx_substratevm.py | 3 +- substratevm/mx.substratevm/suite.py | 1 + .../hotspot/libgraal/LibGraalFeature.java | 7 - .../hotspot/libgraal}/FromLibGraalCalls.java | 2 +- .../hotspot/libgraal/HSTruffleCompilable.java | 0 .../libgraal/HSTruffleCompilationTask.java | 0 .../libgraal/HSTruffleCompilerListener.java | 0 .../libgraal/HSTruffleCompilerRuntime.java | 0 .../compiler/hotspot/libgraal/LibGraal.java | 0 .../hotspot/libgraal/LibGraalChecker.java | 140 ++++++++++++++++++ .../LibGraalNativeBridgeSupport.java | 4 +- .../libgraal/LibGraalObjectHandles.java | 0 .../LibGraalTruffleHostEnvironment.java | 2 +- .../LibGraalTruffleHostEnvironmentLookup.java | 2 +- .../libgraal/TruffleFromLibGraalCalls.java | 3 +- .../libgraal/TruffleLibGraalFeature.java | 9 +- .../libgraal/TruffleLibGraalShutdownHook.java | 2 +- .../TruffleToLibGraalEntryPoints.java | 2 +- 20 files changed, 158 insertions(+), 163 deletions(-) rename {compiler/src/jdk.internal.vm.compiler/src/org/graalvm/libgraal/jni => substratevm/src/com.oracle.svm.graal.hotspot.libgraal/src/org/graalvm/compiler/truffle/compiler/hotspot/libgraal}/FromLibGraalCalls.java (98%) rename {compiler/src/org.graalvm.compiler.truffle.compiler.hotspot.libgraal => substratevm/src/com.oracle.svm.graal.hotspot.libgraal}/src/org/graalvm/compiler/truffle/compiler/hotspot/libgraal/HSTruffleCompilable.java (100%) rename {compiler/src/org.graalvm.compiler.truffle.compiler.hotspot.libgraal => substratevm/src/com.oracle.svm.graal.hotspot.libgraal}/src/org/graalvm/compiler/truffle/compiler/hotspot/libgraal/HSTruffleCompilationTask.java (100%) rename {compiler/src/org.graalvm.compiler.truffle.compiler.hotspot.libgraal => substratevm/src/com.oracle.svm.graal.hotspot.libgraal}/src/org/graalvm/compiler/truffle/compiler/hotspot/libgraal/HSTruffleCompilerListener.java (100%) rename {compiler/src/org.graalvm.compiler.truffle.compiler.hotspot.libgraal => substratevm/src/com.oracle.svm.graal.hotspot.libgraal}/src/org/graalvm/compiler/truffle/compiler/hotspot/libgraal/HSTruffleCompilerRuntime.java (100%) rename {compiler/src/org.graalvm.compiler.truffle.compiler.hotspot.libgraal => substratevm/src/com.oracle.svm.graal.hotspot.libgraal}/src/org/graalvm/compiler/truffle/compiler/hotspot/libgraal/LibGraal.java (100%) create mode 100644 substratevm/src/com.oracle.svm.graal.hotspot.libgraal/src/org/graalvm/compiler/truffle/compiler/hotspot/libgraal/LibGraalChecker.java rename {compiler/src/jdk.internal.vm.compiler/src/org/graalvm/libgraal/jni => substratevm/src/com.oracle.svm.graal.hotspot.libgraal/src/org/graalvm/compiler/truffle/compiler/hotspot/libgraal}/LibGraalNativeBridgeSupport.java (95%) rename {compiler/src/org.graalvm.compiler.truffle.compiler.hotspot.libgraal => substratevm/src/com.oracle.svm.graal.hotspot.libgraal}/src/org/graalvm/compiler/truffle/compiler/hotspot/libgraal/LibGraalObjectHandles.java (100%) rename {compiler/src/org.graalvm.compiler.truffle.compiler.hotspot.libgraal => substratevm/src/com.oracle.svm.graal.hotspot.libgraal}/src/org/graalvm/compiler/truffle/compiler/hotspot/libgraal/LibGraalTruffleHostEnvironment.java (97%) rename {compiler/src/org.graalvm.compiler.truffle.compiler.hotspot.libgraal => substratevm/src/com.oracle.svm.graal.hotspot.libgraal}/src/org/graalvm/compiler/truffle/compiler/hotspot/libgraal/LibGraalTruffleHostEnvironmentLookup.java (98%) rename {compiler/src/org.graalvm.compiler.truffle.compiler.hotspot.libgraal => substratevm/src/com.oracle.svm.graal.hotspot.libgraal}/src/org/graalvm/compiler/truffle/compiler/hotspot/libgraal/TruffleFromLibGraalCalls.java (94%) rename {compiler/src/org.graalvm.compiler.truffle.compiler.hotspot.libgraal => substratevm/src/com.oracle.svm.graal.hotspot.libgraal}/src/org/graalvm/compiler/truffle/compiler/hotspot/libgraal/TruffleLibGraalFeature.java (81%) rename {compiler/src/org.graalvm.compiler.truffle.compiler.hotspot.libgraal => substratevm/src/com.oracle.svm.graal.hotspot.libgraal}/src/org/graalvm/compiler/truffle/compiler/hotspot/libgraal/TruffleLibGraalShutdownHook.java (97%) rename {compiler/src/org.graalvm.compiler.truffle.compiler.hotspot.libgraal => substratevm/src/com.oracle.svm.graal.hotspot.libgraal}/src/org/graalvm/compiler/truffle/compiler/hotspot/libgraal/TruffleToLibGraalEntryPoints.java (99%) diff --git a/compiler/mx.compiler/suite.py b/compiler/mx.compiler/suite.py index 2deea249d270..afaa20c95ccf 100644 --- a/compiler/mx.compiler/suite.py +++ b/compiler/mx.compiler/suite.py @@ -421,31 +421,6 @@ # ------------- GraalTruffle ------------- - "org.graalvm.compiler.truffle.compiler.hotspot.libgraal" : { - "subDir" : "src", - "sourceDirs" : ["src"], - "dependencies" : [ - "jdk.internal.vm.compiler", - "truffle:TRUFFLE_COMPILER", - ], - "requiresConcealed" : { - "jdk.internal.vm.ci" : [ - "jdk.vm.ci.meta", - "jdk.vm.ci.code", - "jdk.vm.ci.runtime", - "jdk.vm.ci.hotspot", - "jdk.vm.ci.services", - ], - }, - "jacoco" : "exclude", # GR-13965 - "checkstyle" : "jdk.internal.vm.compiler", - "javaCompliance" : "17+", - "annotationProcessors" : [ - "GRAAL_PROCESSOR", - "truffle:TRUFFLE_LIBGRAAL_PROCESSOR", - ], - }, - "org.graalvm.compiler.truffle.test.jdk21" : { "subDir" : "src", "sourceDirs" : ["src"], @@ -532,19 +507,6 @@ "maven": False, }, - "GRAAL_TRUFFLE_COMPILER_LIBGRAAL": { - "subDir" : "src", - "dependencies" : [ - "org.graalvm.compiler.truffle.compiler.hotspot.libgraal", - ], - - "distDependencies" : [ - "GRAAL", - ], - "maven": False, - "javaCompliance" : "17+", - }, - "GRAAL_PROCESSOR" : { "subDir": "src", "dependencies" : [ diff --git a/compiler/src/jdk.internal.vm.compiler/src/org/graalvm/libgraal/jni/LibGraalUtil.java b/compiler/src/jdk.internal.vm.compiler/src/org/graalvm/libgraal/jni/LibGraalUtil.java index 60126df5fcf2..7dff332376bb 100644 --- a/compiler/src/jdk.internal.vm.compiler/src/org/graalvm/libgraal/jni/LibGraalUtil.java +++ b/compiler/src/jdk.internal.vm.compiler/src/org/graalvm/libgraal/jni/LibGraalUtil.java @@ -24,20 +24,10 @@ */ package org.graalvm.libgraal.jni; -import java.lang.annotation.Annotation; -import java.lang.reflect.Method; -import java.lang.reflect.Modifier; -import java.lang.reflect.Type; -import java.util.EnumSet; import java.util.Objects; -import java.util.Set; -import org.graalvm.jniutils.JNI; import org.graalvm.jniutils.JNI.JNIEnv; import org.graalvm.jniutils.JNIMethodScope; -import org.graalvm.nativeimage.Platform; -import org.graalvm.nativeimage.Platforms; -import org.graalvm.nativeimage.c.function.CEntryPoint; public final class LibGraalUtil { @@ -53,100 +43,4 @@ public static JNIMethodScope openScope(String scopeName, JNIEnv env) { return LibGraalJNIMethodScope.open(scopeName, env); } - /*----------------- CHECKING ------------------*/ - - /** - * Checks that all {@code ToLibGraal}s are implemented and their HotSpot/libgraal ends points - * match. - */ - @Platforms(Platform.HOSTED_ONLY.class) - public static void checkToLibGraalCalls(Class toLibGraalEntryPointsClass, Class toLibGraalCallsClass, Class annotationClass) throws InternalError { - try { - Method valueMethod = annotationClass.getDeclaredMethod("value"); - Type t = valueMethod.getGenericReturnType(); - check(t instanceof Class && ((Class) t).isEnum(), "Annotation value must be enum."); - @SuppressWarnings("unchecked") - Set> unimplemented = EnumSet.allOf(((Class) t).asSubclass(Enum.class)); - for (Method libGraalMethod : toLibGraalEntryPointsClass.getDeclaredMethods()) { - Annotation call = libGraalMethod.getAnnotation(annotationClass); - if (call != null) { - check(Modifier.isStatic(libGraalMethod.getModifiers()), "Method annotated by %s must be static: %s", annotationClass, libGraalMethod); - CEntryPoint ep = libGraalMethod.getAnnotation(CEntryPoint.class); - check(ep != null, "Method annotated by %s must also be annotated by %s: %s", annotationClass, CEntryPoint.class, libGraalMethod); - String name = ep.name(); - String prefix = "Java_" + toLibGraalCallsClass.getName().replace('.', '_') + '_'; - check(name.startsWith(prefix), "Method must be a JNI entry point for a method in %s: %s", toLibGraalCallsClass, libGraalMethod); - name = name.substring(prefix.length()); - Method hsMethod = findHSMethod(toLibGraalCallsClass, name, annotationClass); - Class[] libGraalParameters = libGraalMethod.getParameterTypes(); - Class[] hsParameters = hsMethod.getParameterTypes(); - check(hsParameters.length + 2 == libGraalParameters.length, "%s should have 2 more parameters than %s", libGraalMethod, hsMethod); - check(libGraalParameters.length >= 3, "Expect at least 3 parameters: %s", libGraalMethod); - check(libGraalParameters[0] == JNI.JNIEnv.class, "Parameter 0 must be of type %s: %s", JNI.JNIEnv.class, libGraalMethod); - check(libGraalParameters[1] == JNI.JClass.class, "Parameter 1 must be of type %s: %s", JNI.JClass.class, libGraalMethod); - check(libGraalParameters[2] == long.class, "Parameter 2 must be of type long: %s", libGraalMethod); - - check(hsParameters[0] == long.class, "Parameter 0 must be of type long: %s", hsMethod); - - for (int i = 3, j = 1; i < libGraalParameters.length; i++, j++) { - Class libgraal = libGraalParameters[i]; - Class hs = hsParameters[j]; - Class hsExpect; - if (hs.isPrimitive()) { - hsExpect = libgraal; - } else { - if (libgraal == JNI.JString.class) { - hsExpect = String.class; - } else if (libgraal == JNI.JByteArray.class) { - hsExpect = byte[].class; - } else if (libgraal == JNI.JLongArray.class) { - hsExpect = long[].class; - } else if (libgraal == JNI.JObjectArray.class) { - hsExpect = Object[].class; - } else if (libgraal == JNI.JObject.class) { - hsExpect = Object.class; - } else if (libgraal == JNI.JClass.class) { - hsExpect = Class.class; - } else { - throw fail("Method %s must only use supported parameters but uses unsupported class %s", libGraalMethod, libgraal.getName()); - } - } - check(hsExpect.isAssignableFrom(hs), "HotSpot parameter %d (%s) incompatible with libgraal parameter %d (%s): %s", j, hs.getName(), i, libgraal.getName(), hsMethod); - } - unimplemented.remove(valueMethod.invoke(call)); - } - } - check(unimplemented.isEmpty(), "Unimplemented libgraal calls: %s", unimplemented); - } catch (ReflectiveOperationException e) { - throw new InternalError(e); - } - } - - @Platforms(Platform.HOSTED_ONLY.class) - private static void check(boolean condition, String format, Object... args) { - if (!condition) { - throw fail(format, args); - } - } - - @Platforms(Platform.HOSTED_ONLY.class) - private static InternalError fail(String format, Object... args) { - return new InternalError(String.format(format, args)); - } - - @Platforms(Platform.HOSTED_ONLY.class) - private static Method findHSMethod(Class hsClass, String name, Class annotationClass) { - Method res = null; - for (Method m : hsClass.getDeclaredMethods()) { - if (m.getName().equals(name)) { - check(res == null, "More than one method named \"%s\" in %s", name, hsClass); - Annotation call = m.getAnnotation(annotationClass); - check(call != null, "Method must be annotated by %s: %s", annotationClass, m); - check(Modifier.isStatic(m.getModifiers()) && Modifier.isNative(m.getModifiers()), "Method must be static and native: %s", m); - res = m; - } - } - check(res != null, "Could not find method named \"%s\" in %s", name, hsClass); - return res; - } } diff --git a/substratevm/mx.substratevm/mx_substratevm.py b/substratevm/mx.substratevm/mx_substratevm.py index 6d8f17eece90..725573ff8537 100644 --- a/substratevm/mx.substratevm/mx_substratevm.py +++ b/substratevm/mx.substratevm/mx_substratevm.py @@ -1172,8 +1172,7 @@ def _native_image_launcher_extra_jvm_args(): )) libgraal_jar_distributions = [ - 'substratevm:GRAAL_HOTSPOT_LIBRARY', - 'compiler:GRAAL_TRUFFLE_COMPILER_LIBGRAAL'] + 'substratevm:GRAAL_HOTSPOT_LIBRARY'] libgraal_build_args = [ ## Pass via JVM args opening up of packages needed for image builder early on diff --git a/substratevm/mx.substratevm/suite.py b/substratevm/mx.substratevm/suite.py index d7bbe738846f..ba48a5c8ff48 100644 --- a/substratevm/mx.substratevm/suite.py +++ b/substratevm/mx.substratevm/suite.py @@ -1142,6 +1142,7 @@ "checkstyle" : "com.oracle.svm.hosted", "javaCompliance" : "17+", "annotationProcessors": [ + "truffle:TRUFFLE_LIBGRAAL_PROCESSOR", "compiler:GRAAL_PROCESSOR", "SVM_PROCESSOR", ], diff --git a/substratevm/src/com.oracle.svm.graal.hotspot.libgraal/src/com/oracle/svm/graal/hotspot/libgraal/LibGraalFeature.java b/substratevm/src/com.oracle.svm.graal.hotspot.libgraal/src/com/oracle/svm/graal/hotspot/libgraal/LibGraalFeature.java index e40a79ce5463..519be88523eb 100644 --- a/substratevm/src/com.oracle.svm.graal.hotspot.libgraal/src/com/oracle/svm/graal/hotspot/libgraal/LibGraalFeature.java +++ b/substratevm/src/com.oracle.svm.graal.hotspot.libgraal/src/com/oracle/svm/graal/hotspot/libgraal/LibGraalFeature.java @@ -95,8 +95,6 @@ import org.graalvm.compiler.truffle.compiler.substitutions.GraphDecoderInvocationPluginProvider; import org.graalvm.jniutils.JNI; import org.graalvm.jniutils.JNIMethodScope; -import org.graalvm.jniutils.NativeBridgeSupport; -import org.graalvm.libgraal.jni.LibGraalNativeBridgeSupport; import org.graalvm.libgraal.jni.LibGraalUtil; import org.graalvm.nativeimage.ImageSingletons; import org.graalvm.nativeimage.LogHandler; @@ -206,11 +204,6 @@ public boolean getAsBoolean() { } } - @Override - public void afterRegistration(AfterRegistrationAccess access) { - ImageSingletons.add(NativeBridgeSupport.class, new LibGraalNativeBridgeSupport()); - } - @Override public void duringSetup(DuringSetupAccess access) { ImageClassLoader imageClassLoader = ((DuringSetupAccessImpl) access).getImageClassLoader(); diff --git a/compiler/src/jdk.internal.vm.compiler/src/org/graalvm/libgraal/jni/FromLibGraalCalls.java b/substratevm/src/com.oracle.svm.graal.hotspot.libgraal/src/org/graalvm/compiler/truffle/compiler/hotspot/libgraal/FromLibGraalCalls.java similarity index 98% rename from compiler/src/jdk.internal.vm.compiler/src/org/graalvm/libgraal/jni/FromLibGraalCalls.java rename to substratevm/src/com.oracle.svm.graal.hotspot.libgraal/src/org/graalvm/compiler/truffle/compiler/hotspot/libgraal/FromLibGraalCalls.java index d09407ac14bb..6bdb25926f13 100644 --- a/compiler/src/jdk.internal.vm.compiler/src/org/graalvm/libgraal/jni/FromLibGraalCalls.java +++ b/substratevm/src/com.oracle.svm.graal.hotspot.libgraal/src/org/graalvm/compiler/truffle/compiler/hotspot/libgraal/FromLibGraalCalls.java @@ -22,7 +22,7 @@ * or visit www.oracle.com if you need additional information or have any * questions. */ -package org.graalvm.libgraal.jni; +package org.graalvm.compiler.truffle.compiler.hotspot.libgraal; import static org.graalvm.jniutils.JNIExceptionWrapper.wrapAndThrowPendingJNIException; import static org.graalvm.jniutils.JNIUtil.GetStaticMethodID; diff --git a/compiler/src/org.graalvm.compiler.truffle.compiler.hotspot.libgraal/src/org/graalvm/compiler/truffle/compiler/hotspot/libgraal/HSTruffleCompilable.java b/substratevm/src/com.oracle.svm.graal.hotspot.libgraal/src/org/graalvm/compiler/truffle/compiler/hotspot/libgraal/HSTruffleCompilable.java similarity index 100% rename from compiler/src/org.graalvm.compiler.truffle.compiler.hotspot.libgraal/src/org/graalvm/compiler/truffle/compiler/hotspot/libgraal/HSTruffleCompilable.java rename to substratevm/src/com.oracle.svm.graal.hotspot.libgraal/src/org/graalvm/compiler/truffle/compiler/hotspot/libgraal/HSTruffleCompilable.java diff --git a/compiler/src/org.graalvm.compiler.truffle.compiler.hotspot.libgraal/src/org/graalvm/compiler/truffle/compiler/hotspot/libgraal/HSTruffleCompilationTask.java b/substratevm/src/com.oracle.svm.graal.hotspot.libgraal/src/org/graalvm/compiler/truffle/compiler/hotspot/libgraal/HSTruffleCompilationTask.java similarity index 100% rename from compiler/src/org.graalvm.compiler.truffle.compiler.hotspot.libgraal/src/org/graalvm/compiler/truffle/compiler/hotspot/libgraal/HSTruffleCompilationTask.java rename to substratevm/src/com.oracle.svm.graal.hotspot.libgraal/src/org/graalvm/compiler/truffle/compiler/hotspot/libgraal/HSTruffleCompilationTask.java diff --git a/compiler/src/org.graalvm.compiler.truffle.compiler.hotspot.libgraal/src/org/graalvm/compiler/truffle/compiler/hotspot/libgraal/HSTruffleCompilerListener.java b/substratevm/src/com.oracle.svm.graal.hotspot.libgraal/src/org/graalvm/compiler/truffle/compiler/hotspot/libgraal/HSTruffleCompilerListener.java similarity index 100% rename from compiler/src/org.graalvm.compiler.truffle.compiler.hotspot.libgraal/src/org/graalvm/compiler/truffle/compiler/hotspot/libgraal/HSTruffleCompilerListener.java rename to substratevm/src/com.oracle.svm.graal.hotspot.libgraal/src/org/graalvm/compiler/truffle/compiler/hotspot/libgraal/HSTruffleCompilerListener.java diff --git a/compiler/src/org.graalvm.compiler.truffle.compiler.hotspot.libgraal/src/org/graalvm/compiler/truffle/compiler/hotspot/libgraal/HSTruffleCompilerRuntime.java b/substratevm/src/com.oracle.svm.graal.hotspot.libgraal/src/org/graalvm/compiler/truffle/compiler/hotspot/libgraal/HSTruffleCompilerRuntime.java similarity index 100% rename from compiler/src/org.graalvm.compiler.truffle.compiler.hotspot.libgraal/src/org/graalvm/compiler/truffle/compiler/hotspot/libgraal/HSTruffleCompilerRuntime.java rename to substratevm/src/com.oracle.svm.graal.hotspot.libgraal/src/org/graalvm/compiler/truffle/compiler/hotspot/libgraal/HSTruffleCompilerRuntime.java diff --git a/compiler/src/org.graalvm.compiler.truffle.compiler.hotspot.libgraal/src/org/graalvm/compiler/truffle/compiler/hotspot/libgraal/LibGraal.java b/substratevm/src/com.oracle.svm.graal.hotspot.libgraal/src/org/graalvm/compiler/truffle/compiler/hotspot/libgraal/LibGraal.java similarity index 100% rename from compiler/src/org.graalvm.compiler.truffle.compiler.hotspot.libgraal/src/org/graalvm/compiler/truffle/compiler/hotspot/libgraal/LibGraal.java rename to substratevm/src/com.oracle.svm.graal.hotspot.libgraal/src/org/graalvm/compiler/truffle/compiler/hotspot/libgraal/LibGraal.java diff --git a/substratevm/src/com.oracle.svm.graal.hotspot.libgraal/src/org/graalvm/compiler/truffle/compiler/hotspot/libgraal/LibGraalChecker.java b/substratevm/src/com.oracle.svm.graal.hotspot.libgraal/src/org/graalvm/compiler/truffle/compiler/hotspot/libgraal/LibGraalChecker.java new file mode 100644 index 000000000000..d98800b0499d --- /dev/null +++ b/substratevm/src/com.oracle.svm.graal.hotspot.libgraal/src/org/graalvm/compiler/truffle/compiler/hotspot/libgraal/LibGraalChecker.java @@ -0,0 +1,140 @@ +/* + * Copyright (c) 2021, 2023, 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. Oracle designates this + * particular file as subject to the "Classpath" exception as provided + * by Oracle in the LICENSE file that accompanied this code. + * + * 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 org.graalvm.compiler.truffle.compiler.hotspot.libgraal; + +import java.lang.annotation.Annotation; +import java.lang.reflect.Method; +import java.lang.reflect.Modifier; +import java.lang.reflect.Type; +import java.util.EnumSet; +import java.util.Set; + +import org.graalvm.jniutils.JNI; +import org.graalvm.nativeimage.Platform; +import org.graalvm.nativeimage.Platforms; +import org.graalvm.nativeimage.c.function.CEntryPoint; + +final class LibGraalChecker { + + private LibGraalChecker() { + } + + /*----------------- CHECKING ------------------*/ + + /** + * Checks that all {@code ToLibGraal}s are implemented and their HotSpot/libgraal ends points + * match. + */ + @Platforms(Platform.HOSTED_ONLY.class) + public static void checkToLibGraalCalls(Class toLibGraalEntryPointsClass, Class toLibGraalCallsClass, Class annotationClass) throws InternalError { + try { + Method valueMethod = annotationClass.getDeclaredMethod("value"); + Type t = valueMethod.getGenericReturnType(); + check(t instanceof Class && ((Class) t).isEnum(), "Annotation value must be enum."); + @SuppressWarnings("unchecked") + Set> unimplemented = EnumSet.allOf(((Class) t).asSubclass(Enum.class)); + for (Method libGraalMethod : toLibGraalEntryPointsClass.getDeclaredMethods()) { + Annotation call = libGraalMethod.getAnnotation(annotationClass); + if (call != null) { + check(Modifier.isStatic(libGraalMethod.getModifiers()), "Method annotated by %s must be static: %s", annotationClass, libGraalMethod); + CEntryPoint ep = libGraalMethod.getAnnotation(CEntryPoint.class); + check(ep != null, "Method annotated by %s must also be annotated by %s: %s", annotationClass, CEntryPoint.class, libGraalMethod); + String name = ep.name(); + String prefix = "Java_" + toLibGraalCallsClass.getName().replace('.', '_') + '_'; + check(name.startsWith(prefix), "Method must be a JNI entry point for a method in %s: %s", toLibGraalCallsClass, libGraalMethod); + name = name.substring(prefix.length()); + Method hsMethod = findHSMethod(toLibGraalCallsClass, name, annotationClass); + Class[] libGraalParameters = libGraalMethod.getParameterTypes(); + Class[] hsParameters = hsMethod.getParameterTypes(); + check(hsParameters.length + 2 == libGraalParameters.length, "%s should have 2 more parameters than %s", libGraalMethod, hsMethod); + check(libGraalParameters.length >= 3, "Expect at least 3 parameters: %s", libGraalMethod); + check(libGraalParameters[0] == JNI.JNIEnv.class, "Parameter 0 must be of type %s: %s", JNI.JNIEnv.class, libGraalMethod); + check(libGraalParameters[1] == JNI.JClass.class, "Parameter 1 must be of type %s: %s", JNI.JClass.class, libGraalMethod); + check(libGraalParameters[2] == long.class, "Parameter 2 must be of type long: %s", libGraalMethod); + + check(hsParameters[0] == long.class, "Parameter 0 must be of type long: %s", hsMethod); + + for (int i = 3, j = 1; i < libGraalParameters.length; i++, j++) { + Class libgraal = libGraalParameters[i]; + Class hs = hsParameters[j]; + Class hsExpect; + if (hs.isPrimitive()) { + hsExpect = libgraal; + } else { + if (libgraal == JNI.JString.class) { + hsExpect = String.class; + } else if (libgraal == JNI.JByteArray.class) { + hsExpect = byte[].class; + } else if (libgraal == JNI.JLongArray.class) { + hsExpect = long[].class; + } else if (libgraal == JNI.JObjectArray.class) { + hsExpect = Object[].class; + } else if (libgraal == JNI.JObject.class) { + hsExpect = Object.class; + } else if (libgraal == JNI.JClass.class) { + hsExpect = Class.class; + } else { + throw fail("Method %s must only use supported parameters but uses unsupported class %s", libGraalMethod, libgraal.getName()); + } + } + check(hsExpect.isAssignableFrom(hs), "HotSpot parameter %d (%s) incompatible with libgraal parameter %d (%s): %s", j, hs.getName(), i, libgraal.getName(), hsMethod); + } + unimplemented.remove(valueMethod.invoke(call)); + } + } + check(unimplemented.isEmpty(), "Unimplemented libgraal calls: %s", unimplemented); + } catch (ReflectiveOperationException e) { + throw new InternalError(e); + } + } + + @Platforms(Platform.HOSTED_ONLY.class) + private static void check(boolean condition, String format, Object... args) { + if (!condition) { + throw fail(format, args); + } + } + + @Platforms(Platform.HOSTED_ONLY.class) + private static InternalError fail(String format, Object... args) { + return new InternalError(String.format(format, args)); + } + + @Platforms(Platform.HOSTED_ONLY.class) + private static Method findHSMethod(Class hsClass, String name, Class annotationClass) { + Method res = null; + for (Method m : hsClass.getDeclaredMethods()) { + if (m.getName().equals(name)) { + check(res == null, "More than one method named \"%s\" in %s", name, hsClass); + Annotation call = m.getAnnotation(annotationClass); + check(call != null, "Method must be annotated by %s: %s", annotationClass, m); + check(Modifier.isStatic(m.getModifiers()) && Modifier.isNative(m.getModifiers()), "Method must be static and native: %s", m); + res = m; + } + } + check(res != null, "Could not find method named \"%s\" in %s", name, hsClass); + return res; + } +} diff --git a/compiler/src/jdk.internal.vm.compiler/src/org/graalvm/libgraal/jni/LibGraalNativeBridgeSupport.java b/substratevm/src/com.oracle.svm.graal.hotspot.libgraal/src/org/graalvm/compiler/truffle/compiler/hotspot/libgraal/LibGraalNativeBridgeSupport.java similarity index 95% rename from compiler/src/jdk.internal.vm.compiler/src/org/graalvm/libgraal/jni/LibGraalNativeBridgeSupport.java rename to substratevm/src/com.oracle.svm.graal.hotspot.libgraal/src/org/graalvm/compiler/truffle/compiler/hotspot/libgraal/LibGraalNativeBridgeSupport.java index ea9c383df087..5aced2f4c595 100644 --- a/compiler/src/jdk.internal.vm.compiler/src/org/graalvm/libgraal/jni/LibGraalNativeBridgeSupport.java +++ b/substratevm/src/com.oracle.svm.graal.hotspot.libgraal/src/org/graalvm/compiler/truffle/compiler/hotspot/libgraal/LibGraalNativeBridgeSupport.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2021, 2023, 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 @@ -22,7 +22,7 @@ * or visit www.oracle.com if you need additional information or have any * questions. */ -package org.graalvm.libgraal.jni; +package org.graalvm.compiler.truffle.compiler.hotspot.libgraal; import jdk.vm.ci.services.Services; import org.graalvm.compiler.debug.TTY; diff --git a/compiler/src/org.graalvm.compiler.truffle.compiler.hotspot.libgraal/src/org/graalvm/compiler/truffle/compiler/hotspot/libgraal/LibGraalObjectHandles.java b/substratevm/src/com.oracle.svm.graal.hotspot.libgraal/src/org/graalvm/compiler/truffle/compiler/hotspot/libgraal/LibGraalObjectHandles.java similarity index 100% rename from compiler/src/org.graalvm.compiler.truffle.compiler.hotspot.libgraal/src/org/graalvm/compiler/truffle/compiler/hotspot/libgraal/LibGraalObjectHandles.java rename to substratevm/src/com.oracle.svm.graal.hotspot.libgraal/src/org/graalvm/compiler/truffle/compiler/hotspot/libgraal/LibGraalObjectHandles.java diff --git a/compiler/src/org.graalvm.compiler.truffle.compiler.hotspot.libgraal/src/org/graalvm/compiler/truffle/compiler/hotspot/libgraal/LibGraalTruffleHostEnvironment.java b/substratevm/src/com.oracle.svm.graal.hotspot.libgraal/src/org/graalvm/compiler/truffle/compiler/hotspot/libgraal/LibGraalTruffleHostEnvironment.java similarity index 97% rename from compiler/src/org.graalvm.compiler.truffle.compiler.hotspot.libgraal/src/org/graalvm/compiler/truffle/compiler/hotspot/libgraal/LibGraalTruffleHostEnvironment.java rename to substratevm/src/com.oracle.svm.graal.hotspot.libgraal/src/org/graalvm/compiler/truffle/compiler/hotspot/libgraal/LibGraalTruffleHostEnvironment.java index 827199ffe098..44964a426f25 100644 --- a/compiler/src/org.graalvm.compiler.truffle.compiler.hotspot.libgraal/src/org/graalvm/compiler/truffle/compiler/hotspot/libgraal/LibGraalTruffleHostEnvironment.java +++ b/substratevm/src/com.oracle.svm.graal.hotspot.libgraal/src/org/graalvm/compiler/truffle/compiler/hotspot/libgraal/LibGraalTruffleHostEnvironment.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2023, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2023, 2023, 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 diff --git a/compiler/src/org.graalvm.compiler.truffle.compiler.hotspot.libgraal/src/org/graalvm/compiler/truffle/compiler/hotspot/libgraal/LibGraalTruffleHostEnvironmentLookup.java b/substratevm/src/com.oracle.svm.graal.hotspot.libgraal/src/org/graalvm/compiler/truffle/compiler/hotspot/libgraal/LibGraalTruffleHostEnvironmentLookup.java similarity index 98% rename from compiler/src/org.graalvm.compiler.truffle.compiler.hotspot.libgraal/src/org/graalvm/compiler/truffle/compiler/hotspot/libgraal/LibGraalTruffleHostEnvironmentLookup.java rename to substratevm/src/com.oracle.svm.graal.hotspot.libgraal/src/org/graalvm/compiler/truffle/compiler/hotspot/libgraal/LibGraalTruffleHostEnvironmentLookup.java index a57124be8a73..dbf02946269b 100644 --- a/compiler/src/org.graalvm.compiler.truffle.compiler.hotspot.libgraal/src/org/graalvm/compiler/truffle/compiler/hotspot/libgraal/LibGraalTruffleHostEnvironmentLookup.java +++ b/substratevm/src/com.oracle.svm.graal.hotspot.libgraal/src/org/graalvm/compiler/truffle/compiler/hotspot/libgraal/LibGraalTruffleHostEnvironmentLookup.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2023, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2023, 2023, 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 diff --git a/compiler/src/org.graalvm.compiler.truffle.compiler.hotspot.libgraal/src/org/graalvm/compiler/truffle/compiler/hotspot/libgraal/TruffleFromLibGraalCalls.java b/substratevm/src/com.oracle.svm.graal.hotspot.libgraal/src/org/graalvm/compiler/truffle/compiler/hotspot/libgraal/TruffleFromLibGraalCalls.java similarity index 94% rename from compiler/src/org.graalvm.compiler.truffle.compiler.hotspot.libgraal/src/org/graalvm/compiler/truffle/compiler/hotspot/libgraal/TruffleFromLibGraalCalls.java rename to substratevm/src/com.oracle.svm.graal.hotspot.libgraal/src/org/graalvm/compiler/truffle/compiler/hotspot/libgraal/TruffleFromLibGraalCalls.java index a65ae2f159ae..484381816e81 100644 --- a/compiler/src/org.graalvm.compiler.truffle.compiler.hotspot.libgraal/src/org/graalvm/compiler/truffle/compiler/hotspot/libgraal/TruffleFromLibGraalCalls.java +++ b/substratevm/src/com.oracle.svm.graal.hotspot.libgraal/src/org/graalvm/compiler/truffle/compiler/hotspot/libgraal/TruffleFromLibGraalCalls.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2023, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2023, 2023, 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 @@ -31,7 +31,6 @@ import static org.graalvm.jniutils.JNIUtil.NewGlobalRef; import org.graalvm.jniutils.JNIUtil; -import org.graalvm.libgraal.jni.FromLibGraalCalls; import com.oracle.truffle.compiler.hotspot.libgraal.TruffleFromLibGraal.Id; diff --git a/compiler/src/org.graalvm.compiler.truffle.compiler.hotspot.libgraal/src/org/graalvm/compiler/truffle/compiler/hotspot/libgraal/TruffleLibGraalFeature.java b/substratevm/src/com.oracle.svm.graal.hotspot.libgraal/src/org/graalvm/compiler/truffle/compiler/hotspot/libgraal/TruffleLibGraalFeature.java similarity index 81% rename from compiler/src/org.graalvm.compiler.truffle.compiler.hotspot.libgraal/src/org/graalvm/compiler/truffle/compiler/hotspot/libgraal/TruffleLibGraalFeature.java rename to substratevm/src/com.oracle.svm.graal.hotspot.libgraal/src/org/graalvm/compiler/truffle/compiler/hotspot/libgraal/TruffleLibGraalFeature.java index a67981463b12..416a2fa10292 100644 --- a/compiler/src/org.graalvm.compiler.truffle.compiler.hotspot.libgraal/src/org/graalvm/compiler/truffle/compiler/hotspot/libgraal/TruffleLibGraalFeature.java +++ b/substratevm/src/com.oracle.svm.graal.hotspot.libgraal/src/org/graalvm/compiler/truffle/compiler/hotspot/libgraal/TruffleLibGraalFeature.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2023, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2023, 2023, 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 @@ -25,6 +25,8 @@ package org.graalvm.compiler.truffle.compiler.hotspot.libgraal; import org.graalvm.compiler.truffle.compiler.host.TruffleHostEnvironment; +import org.graalvm.jniutils.NativeBridgeSupport; +import org.graalvm.nativeimage.ImageSingletons; import org.graalvm.nativeimage.hosted.Feature; public class TruffleLibGraalFeature implements Feature { @@ -34,4 +36,9 @@ public class TruffleLibGraalFeature implements Feature { public void beforeAnalysis(BeforeAnalysisAccess access) { TruffleHostEnvironment.overrideLookup(new LibGraalTruffleHostEnvironmentLookup()); } + + @Override + public void afterRegistration(AfterRegistrationAccess access) { + ImageSingletons.add(NativeBridgeSupport.class, new LibGraalNativeBridgeSupport()); + } } diff --git a/compiler/src/org.graalvm.compiler.truffle.compiler.hotspot.libgraal/src/org/graalvm/compiler/truffle/compiler/hotspot/libgraal/TruffleLibGraalShutdownHook.java b/substratevm/src/com.oracle.svm.graal.hotspot.libgraal/src/org/graalvm/compiler/truffle/compiler/hotspot/libgraal/TruffleLibGraalShutdownHook.java similarity index 97% rename from compiler/src/org.graalvm.compiler.truffle.compiler.hotspot.libgraal/src/org/graalvm/compiler/truffle/compiler/hotspot/libgraal/TruffleLibGraalShutdownHook.java rename to substratevm/src/com.oracle.svm.graal.hotspot.libgraal/src/org/graalvm/compiler/truffle/compiler/hotspot/libgraal/TruffleLibGraalShutdownHook.java index ef12004fffdd..6df838f01556 100644 --- a/compiler/src/org.graalvm.compiler.truffle.compiler.hotspot.libgraal/src/org/graalvm/compiler/truffle/compiler/hotspot/libgraal/TruffleLibGraalShutdownHook.java +++ b/substratevm/src/com.oracle.svm.graal.hotspot.libgraal/src/org/graalvm/compiler/truffle/compiler/hotspot/libgraal/TruffleLibGraalShutdownHook.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2023, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2023, 2023, 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 diff --git a/compiler/src/org.graalvm.compiler.truffle.compiler.hotspot.libgraal/src/org/graalvm/compiler/truffle/compiler/hotspot/libgraal/TruffleToLibGraalEntryPoints.java b/substratevm/src/com.oracle.svm.graal.hotspot.libgraal/src/org/graalvm/compiler/truffle/compiler/hotspot/libgraal/TruffleToLibGraalEntryPoints.java similarity index 99% rename from compiler/src/org.graalvm.compiler.truffle.compiler.hotspot.libgraal/src/org/graalvm/compiler/truffle/compiler/hotspot/libgraal/TruffleToLibGraalEntryPoints.java rename to substratevm/src/com.oracle.svm.graal.hotspot.libgraal/src/org/graalvm/compiler/truffle/compiler/hotspot/libgraal/TruffleToLibGraalEntryPoints.java index cd9f704ac787..91b27153365d 100644 --- a/compiler/src/org.graalvm.compiler.truffle.compiler.hotspot.libgraal/src/org/graalvm/compiler/truffle/compiler/hotspot/libgraal/TruffleToLibGraalEntryPoints.java +++ b/substratevm/src/com.oracle.svm.graal.hotspot.libgraal/src/org/graalvm/compiler/truffle/compiler/hotspot/libgraal/TruffleToLibGraalEntryPoints.java @@ -523,7 +523,7 @@ public static void purgePartialEvaluationCaches(JNIEnv env, JClass hsClass, @CEn static { try { Class callsClass = Class.forName("org.graalvm.compiler.truffle.runtime.hotspot.libgraal.TruffleToLibGraalCalls"); - LibGraalUtil.checkToLibGraalCalls(TruffleToLibGraalEntryPoints.class, callsClass, TruffleToLibGraal.class); + LibGraalChecker.checkToLibGraalCalls(TruffleToLibGraalEntryPoints.class, callsClass, TruffleToLibGraal.class); } catch (ClassNotFoundException e) { throw new InternalError(e); } From f68787801c44653a06c0e027d8a5829897b5d703 Mon Sep 17 00:00:00 2001 From: Christian Humer Date: Thu, 22 Jun 2023 18:57:38 +0200 Subject: [PATCH 10/43] Changes and cleanup after move org.graalvm.compiler.truffle.compiler.hotspot.libgraal to com.oracle.svm.graal.hotspot.libgraal project. --- compiler/mx.compiler/suite.py | 1 - .../HotSpotTruffleHostEnvironment.java | 2 +- truffle/mx.truffle/macro-truffle.properties | 2 ++ truffle/mx.truffle/suite.py | 23 ++++++++++++------- .../hotspot/HotSpotTruffleRuntime.java | 3 +++ 5 files changed, 21 insertions(+), 10 deletions(-) diff --git a/compiler/mx.compiler/suite.py b/compiler/mx.compiler/suite.py index afaa20c95ccf..2a47278b0958 100644 --- a/compiler/mx.compiler/suite.py +++ b/compiler/mx.compiler/suite.py @@ -222,7 +222,6 @@ "org.graalvm.compiler.truffle.jfr.impl", "org.graalvm.compiler.truffle.runtime", "org.graalvm.compiler.truffle.test", - "org.graalvm.compiler.truffle.compiler.hotspot.libgraal", ], }, diff --git a/compiler/src/jdk.internal.vm.compiler/src/org/graalvm/compiler/truffle/compiler/hotspot/HotSpotTruffleHostEnvironment.java b/compiler/src/jdk.internal.vm.compiler/src/org/graalvm/compiler/truffle/compiler/hotspot/HotSpotTruffleHostEnvironment.java index e0b050454422..c72c3faf20b9 100644 --- a/compiler/src/jdk.internal.vm.compiler/src/org/graalvm/compiler/truffle/compiler/hotspot/HotSpotTruffleHostEnvironment.java +++ b/compiler/src/jdk.internal.vm.compiler/src/org/graalvm/compiler/truffle/compiler/hotspot/HotSpotTruffleHostEnvironment.java @@ -57,7 +57,7 @@ protected TruffleCompilerImpl createCompiler(TruffleCompilable compilable) { */ TruffleCompilerRuntime runtime = runtime(); try { - return (TruffleCompilerImpl) runtime.getClass().getMethod("getCompiler", TruffleCompilable.class).invoke(runtime, compilable); + return (TruffleCompilerImpl) runtime.getClass().getMethod("getTruffleCompiler", TruffleCompilable.class).invoke(runtime, compilable); } catch (ReflectiveOperationException e) { throw GraalError.shouldNotReachHere(e); } diff --git a/truffle/mx.truffle/macro-truffle.properties b/truffle/mx.truffle/macro-truffle.properties index 0bad94cf3f5d..e078b60beeca 100644 --- a/truffle/mx.truffle/macro-truffle.properties +++ b/truffle/mx.truffle/macro-truffle.properties @@ -11,6 +11,8 @@ Args = -H:Features=com.oracle.svm.truffle.TruffleFeature,com.oracle.svm.truffle. # The `--add-exports` are a temporary solution for languages on classpath, will be fixed by languages modularization, GR-44217. JavaArgs = -Dtruffle.TruffleRuntime=com.oracle.svm.truffle.api.SubstrateTruffleRuntime \ -Dgraalvm.ForcePolyglotInvalid=false \ + --add-exports org.graalvm.truffle.runtime/org.graalvm.compiler.truffle.runtime=ALL-UNNAMED \ + --add-exports org.graalvm.truffle.compiler/com.oracle.truffle.compiler=ALL-UNNAMED \ --add-exports org.graalvm.truffle/com.oracle.truffle.api=ALL-UNNAMED \ --add-exports org.graalvm.truffle/com.oracle.truffle.api.debug=ALL-UNNAMED \ --add-exports org.graalvm.truffle/com.oracle.truffle.api.debug.impl=ALL-UNNAMED \ diff --git a/truffle/mx.truffle/suite.py b/truffle/mx.truffle/suite.py index 9a51230b448b..967efd2df1dc 100644 --- a/truffle/mx.truffle/suite.py +++ b/truffle/mx.truffle/suite.py @@ -1193,12 +1193,11 @@ "jdk.unsupported", # sun.misc.Unsafe "java.logging", "java.management", - "org.graalvm.truffle", - "org.graalvm.truffle.compiler", ], "exports" : [ # Qualified exports - "org.graalvm.compiler.truffle.runtime to jdk.internal.vm.compiler, com.oracle.graal.graal_enterprise, com.oracle.svm.svm_enterprise, org.graalvm.nativeimage.builder" + "org.graalvm.compiler.truffle.runtime to jdk.internal.vm.compiler, com.oracle.graal.graal_enterprise, com.oracle.svm.svm_enterprise, org.graalvm.nativeimage.builder", + "org.graalvm.compiler.truffle.runtime.hotspot to jdk.internal.vm.compiler" ], "uses" : [ "com.oracle.truffle.api.impl.TruffleLocator", @@ -1211,6 +1210,14 @@ "org.graalvm.home.HomeFinder", ], }, + "requiresConcealed" : { + "jdk.internal.vm.ci" : [ + "jdk.vm.ci.meta", + "jdk.vm.ci.code", + "jdk.vm.ci.code.stack", + "jdk.vm.ci.services", + ], + }, "subDir" : "src", "javaCompliance" : "17+", "dependencies" : [ @@ -1262,7 +1269,7 @@ # Qualified exports "com.oracle.truffle.api.impl to jdk.internal.vm.compiler, org.graalvm.locator, org.graalvm.truffle.runtime", - "com.oracle.truffle.object to jdk.internal.vm.compiler, com.oracle.graal.graal_enterprise", + "com.oracle.truffle.object to jdk.internal.vm.compiler, com.oracle.graal.graal_enterprise, org.graalvm.truffle.runtime", ], "uses" : [ "com.oracle.truffle.api.TruffleRuntimeAccess", @@ -1287,10 +1294,10 @@ "com.oracle.truffle.api.instrumentation.provider", "com.oracle.truffle.api.library.provider", # Qualified exports - "com.oracle.truffle.api* to jdk.internal.vm.compiler, jdk.internal.vm.compiler.truffle.jfr, com.oracle.graal.graal_enterprise, com.oracle.svm.svm_enterprise, org.graalvm.nativeimage.builder", - "com.oracle.truffle.api.impl to org.graalvm.locator", - "com.oracle.truffle.api to org.graalvm.locator, org.graalvm.nativeimage.builder", - "com.oracle.truffle.object to jdk.internal.vm.compiler, com.oracle.graal.graal_enterprise", + "com.oracle.truffle.api* to jdk.internal.vm.compiler, jdk.internal.vm.compiler.truffle.jfr, com.oracle.graal.graal_enterprise, com.oracle.svm.svm_enterprise, org.graalvm.nativeimage.builder, org.graalvm.truffle.runtime", + "com.oracle.truffle.api.impl to jdk.internal.vm.compiler,org.graalvm.locator, org.graalvm.truffle.runtime", + "com.oracle.truffle.api to org.graalvm.locator, org.graalvm.nativeimage.builder, org.graalvm.truffle.runtime", + "com.oracle.truffle.object to jdk.internal.vm.compiler, com.oracle.graal.graal_enterprise, org.graalvm.truffle.runtime", ], }, "subDir" : "src", diff --git a/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/hotspot/HotSpotTruffleRuntime.java b/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/hotspot/HotSpotTruffleRuntime.java index 4cb535bdf264..bf3111559199 100644 --- a/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/hotspot/HotSpotTruffleRuntime.java +++ b/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/hotspot/HotSpotTruffleRuntime.java @@ -228,6 +228,9 @@ protected StackIntrospection getStackIntrospection() { return l.stackIntrospection; } + /** + * This is called reflectively from the compiler side in HotSpotTruffleHostEnvironment. + */ @Override public TruffleCompiler getTruffleCompiler(TruffleCompilable compilable) { Objects.requireNonNull(compilable, "Compilable must be non null."); From 71cbaaabddcda8c910d55006aca0f07b85f9940e Mon Sep 17 00:00:00 2001 From: Christian Humer Date: Thu, 22 Jun 2023 21:07:32 +0200 Subject: [PATCH 11/43] Refactor package name from org.graalvm.compiler.truffle.compiler.hotspot.libgraal to com.oracle.svm.graal.hotspot.libgraal. --- .../libgraal/truffle}/FromLibGraalCalls.java | 2 +- .../truffle}/HSTruffleCompilable.java | 32 ++++++++--------- .../truffle}/HSTruffleCompilationTask.java | 34 +++++++++---------- .../truffle}/HSTruffleCompilerListener.java | 12 +++---- .../truffle}/HSTruffleCompilerRuntime.java | 18 +++++----- .../hotspot/libgraal/truffle}/LibGraal.java | 2 +- .../libgraal/truffle}/LibGraalChecker.java | 2 +- .../truffle}/LibGraalNativeBridgeSupport.java | 2 +- .../truffle}/LibGraalObjectHandles.java | 2 +- .../LibGraalTruffleHostEnvironment.java | 2 +- .../LibGraalTruffleHostEnvironmentLookup.java | 2 +- .../truffle}/TruffleFromLibGraalCalls.java | 2 +- .../truffle}/TruffleLibGraalFeature.java | 2 +- .../truffle}/TruffleLibGraalShutdownHook.java | 2 +- .../TruffleToLibGraalEntryPoints.java | 2 +- 15 files changed, 59 insertions(+), 59 deletions(-) rename substratevm/src/com.oracle.svm.graal.hotspot.libgraal/src/{org/graalvm/compiler/truffle/compiler/hotspot/libgraal => com/oracle/svm/graal/hotspot/libgraal/truffle}/FromLibGraalCalls.java (98%) rename substratevm/src/com.oracle.svm.graal.hotspot.libgraal/src/{org/graalvm/compiler/truffle/compiler/hotspot/libgraal => com/oracle/svm/graal/hotspot/libgraal/truffle}/HSTruffleCompilable.java (84%) rename substratevm/src/com.oracle.svm.graal.hotspot.libgraal/src/{org/graalvm/compiler/truffle/compiler/hotspot/libgraal => com/oracle/svm/graal/hotspot/libgraal/truffle}/HSTruffleCompilationTask.java (81%) rename substratevm/src/com.oracle.svm.graal.hotspot.libgraal/src/{org/graalvm/compiler/truffle/compiler/hotspot/libgraal => com/oracle/svm/graal/hotspot/libgraal/truffle}/HSTruffleCompilerListener.java (90%) rename substratevm/src/com.oracle.svm.graal.hotspot.libgraal/src/{org/graalvm/compiler/truffle/compiler/hotspot/libgraal => com/oracle/svm/graal/hotspot/libgraal/truffle}/HSTruffleCompilerRuntime.java (92%) rename substratevm/src/com.oracle.svm.graal.hotspot.libgraal/src/{org/graalvm/compiler/truffle/compiler/hotspot/libgraal => com/oracle/svm/graal/hotspot/libgraal/truffle}/LibGraal.java (98%) rename substratevm/src/com.oracle.svm.graal.hotspot.libgraal/src/{org/graalvm/compiler/truffle/compiler/hotspot/libgraal => com/oracle/svm/graal/hotspot/libgraal/truffle}/LibGraalChecker.java (99%) rename substratevm/src/com.oracle.svm.graal.hotspot.libgraal/src/{org/graalvm/compiler/truffle/compiler/hotspot/libgraal => com/oracle/svm/graal/hotspot/libgraal/truffle}/LibGraalNativeBridgeSupport.java (98%) rename substratevm/src/com.oracle.svm.graal.hotspot.libgraal/src/{org/graalvm/compiler/truffle/compiler/hotspot/libgraal => com/oracle/svm/graal/hotspot/libgraal/truffle}/LibGraalObjectHandles.java (97%) rename substratevm/src/com.oracle.svm.graal.hotspot.libgraal/src/{org/graalvm/compiler/truffle/compiler/hotspot/libgraal => com/oracle/svm/graal/hotspot/libgraal/truffle}/LibGraalTruffleHostEnvironment.java (98%) rename substratevm/src/com.oracle.svm.graal.hotspot.libgraal/src/{org/graalvm/compiler/truffle/compiler/hotspot/libgraal => com/oracle/svm/graal/hotspot/libgraal/truffle}/LibGraalTruffleHostEnvironmentLookup.java (98%) rename substratevm/src/com.oracle.svm.graal.hotspot.libgraal/src/{org/graalvm/compiler/truffle/compiler/hotspot/libgraal => com/oracle/svm/graal/hotspot/libgraal/truffle}/TruffleFromLibGraalCalls.java (97%) rename substratevm/src/com.oracle.svm.graal.hotspot.libgraal/src/{org/graalvm/compiler/truffle/compiler/hotspot/libgraal => com/oracle/svm/graal/hotspot/libgraal/truffle}/TruffleLibGraalFeature.java (96%) rename substratevm/src/com.oracle.svm.graal.hotspot.libgraal/src/{org/graalvm/compiler/truffle/compiler/hotspot/libgraal => com/oracle/svm/graal/hotspot/libgraal/truffle}/TruffleLibGraalShutdownHook.java (97%) rename substratevm/src/com.oracle.svm.graal.hotspot.libgraal/src/{org/graalvm/compiler/truffle/compiler/hotspot/libgraal => com/oracle/svm/graal/hotspot/libgraal/truffle}/TruffleToLibGraalEntryPoints.java (99%) diff --git a/substratevm/src/com.oracle.svm.graal.hotspot.libgraal/src/org/graalvm/compiler/truffle/compiler/hotspot/libgraal/FromLibGraalCalls.java b/substratevm/src/com.oracle.svm.graal.hotspot.libgraal/src/com/oracle/svm/graal/hotspot/libgraal/truffle/FromLibGraalCalls.java similarity index 98% rename from substratevm/src/com.oracle.svm.graal.hotspot.libgraal/src/org/graalvm/compiler/truffle/compiler/hotspot/libgraal/FromLibGraalCalls.java rename to substratevm/src/com.oracle.svm.graal.hotspot.libgraal/src/com/oracle/svm/graal/hotspot/libgraal/truffle/FromLibGraalCalls.java index 6bdb25926f13..e4fa8c45226d 100644 --- a/substratevm/src/com.oracle.svm.graal.hotspot.libgraal/src/org/graalvm/compiler/truffle/compiler/hotspot/libgraal/FromLibGraalCalls.java +++ b/substratevm/src/com.oracle.svm.graal.hotspot.libgraal/src/com/oracle/svm/graal/hotspot/libgraal/truffle/FromLibGraalCalls.java @@ -22,7 +22,7 @@ * or visit www.oracle.com if you need additional information or have any * questions. */ -package org.graalvm.compiler.truffle.compiler.hotspot.libgraal; +package com.oracle.svm.graal.hotspot.libgraal.truffle; import static org.graalvm.jniutils.JNIExceptionWrapper.wrapAndThrowPendingJNIException; import static org.graalvm.jniutils.JNIUtil.GetStaticMethodID; diff --git a/substratevm/src/com.oracle.svm.graal.hotspot.libgraal/src/org/graalvm/compiler/truffle/compiler/hotspot/libgraal/HSTruffleCompilable.java b/substratevm/src/com.oracle.svm.graal.hotspot.libgraal/src/com/oracle/svm/graal/hotspot/libgraal/truffle/HSTruffleCompilable.java similarity index 84% rename from substratevm/src/com.oracle.svm.graal.hotspot.libgraal/src/org/graalvm/compiler/truffle/compiler/hotspot/libgraal/HSTruffleCompilable.java rename to substratevm/src/com.oracle.svm.graal.hotspot.libgraal/src/com/oracle/svm/graal/hotspot/libgraal/truffle/HSTruffleCompilable.java index c1d1325372ce..bcac3530fe8c 100644 --- a/substratevm/src/com.oracle.svm.graal.hotspot.libgraal/src/org/graalvm/compiler/truffle/compiler/hotspot/libgraal/HSTruffleCompilable.java +++ b/substratevm/src/com.oracle.svm.graal.hotspot.libgraal/src/com/oracle/svm/graal/hotspot/libgraal/truffle/HSTruffleCompilable.java @@ -22,8 +22,22 @@ * or visit www.oracle.com if you need additional information or have any * questions. */ -package org.graalvm.compiler.truffle.compiler.hotspot.libgraal; - +package com.oracle.svm.graal.hotspot.libgraal.truffle; + +import static com.oracle.svm.graal.hotspot.libgraal.truffle.HSTruffleCompilableGen.callAsJavaConstant; +import static com.oracle.svm.graal.hotspot.libgraal.truffle.HSTruffleCompilableGen.callCancelCompilation; +import static com.oracle.svm.graal.hotspot.libgraal.truffle.HSTruffleCompilableGen.callCompilableToString; +import static com.oracle.svm.graal.hotspot.libgraal.truffle.HSTruffleCompilableGen.callCountDirectCallNodes; +import static com.oracle.svm.graal.hotspot.libgraal.truffle.HSTruffleCompilableGen.callCreateStringSupplier; +import static com.oracle.svm.graal.hotspot.libgraal.truffle.HSTruffleCompilableGen.callGetCompilableCallCount; +import static com.oracle.svm.graal.hotspot.libgraal.truffle.HSTruffleCompilableGen.callGetCompilableName; +import static com.oracle.svm.graal.hotspot.libgraal.truffle.HSTruffleCompilableGen.callGetFailedSpeculationsAddress; +import static com.oracle.svm.graal.hotspot.libgraal.truffle.HSTruffleCompilableGen.callGetKnownCallSiteCount; +import static com.oracle.svm.graal.hotspot.libgraal.truffle.HSTruffleCompilableGen.callGetNonTrivialNodeCount; +import static com.oracle.svm.graal.hotspot.libgraal.truffle.HSTruffleCompilableGen.callIsSameOrSplit; +import static com.oracle.svm.graal.hotspot.libgraal.truffle.HSTruffleCompilableGen.callIsTrivial; +import static com.oracle.svm.graal.hotspot.libgraal.truffle.HSTruffleCompilableGen.callOnCompilationFailed; +import static com.oracle.svm.graal.hotspot.libgraal.truffle.HSTruffleCompilableGen.callPrepareForCompilation; import static com.oracle.truffle.compiler.hotspot.libgraal.TruffleFromLibGraal.Id.AsJavaConstant; import static com.oracle.truffle.compiler.hotspot.libgraal.TruffleFromLibGraal.Id.CancelCompilation; import static com.oracle.truffle.compiler.hotspot.libgraal.TruffleFromLibGraal.Id.CompilableToString; @@ -36,20 +50,6 @@ import static com.oracle.truffle.compiler.hotspot.libgraal.TruffleFromLibGraal.Id.IsSameOrSplit; import static com.oracle.truffle.compiler.hotspot.libgraal.TruffleFromLibGraal.Id.IsTrivial; import static com.oracle.truffle.compiler.hotspot.libgraal.TruffleFromLibGraal.Id.OnCompilationFailed; -import static org.graalvm.compiler.truffle.compiler.hotspot.libgraal.HSTruffleCompilableGen.callAsJavaConstant; -import static org.graalvm.compiler.truffle.compiler.hotspot.libgraal.HSTruffleCompilableGen.callCancelCompilation; -import static org.graalvm.compiler.truffle.compiler.hotspot.libgraal.HSTruffleCompilableGen.callCompilableToString; -import static org.graalvm.compiler.truffle.compiler.hotspot.libgraal.HSTruffleCompilableGen.callCountDirectCallNodes; -import static org.graalvm.compiler.truffle.compiler.hotspot.libgraal.HSTruffleCompilableGen.callCreateStringSupplier; -import static org.graalvm.compiler.truffle.compiler.hotspot.libgraal.HSTruffleCompilableGen.callGetCompilableCallCount; -import static org.graalvm.compiler.truffle.compiler.hotspot.libgraal.HSTruffleCompilableGen.callGetCompilableName; -import static org.graalvm.compiler.truffle.compiler.hotspot.libgraal.HSTruffleCompilableGen.callGetFailedSpeculationsAddress; -import static org.graalvm.compiler.truffle.compiler.hotspot.libgraal.HSTruffleCompilableGen.callGetKnownCallSiteCount; -import static org.graalvm.compiler.truffle.compiler.hotspot.libgraal.HSTruffleCompilableGen.callGetNonTrivialNodeCount; -import static org.graalvm.compiler.truffle.compiler.hotspot.libgraal.HSTruffleCompilableGen.callIsSameOrSplit; -import static org.graalvm.compiler.truffle.compiler.hotspot.libgraal.HSTruffleCompilableGen.callIsTrivial; -import static org.graalvm.compiler.truffle.compiler.hotspot.libgraal.HSTruffleCompilableGen.callOnCompilationFailed; -import static org.graalvm.compiler.truffle.compiler.hotspot.libgraal.HSTruffleCompilableGen.callPrepareForCompilation; import static org.graalvm.jniutils.JNIMethodScope.env; import static org.graalvm.jniutils.JNIUtil.createString; diff --git a/substratevm/src/com.oracle.svm.graal.hotspot.libgraal/src/org/graalvm/compiler/truffle/compiler/hotspot/libgraal/HSTruffleCompilationTask.java b/substratevm/src/com.oracle.svm.graal.hotspot.libgraal/src/com/oracle/svm/graal/hotspot/libgraal/truffle/HSTruffleCompilationTask.java similarity index 81% rename from substratevm/src/com.oracle.svm.graal.hotspot.libgraal/src/org/graalvm/compiler/truffle/compiler/hotspot/libgraal/HSTruffleCompilationTask.java rename to substratevm/src/com.oracle.svm.graal.hotspot.libgraal/src/com/oracle/svm/graal/hotspot/libgraal/truffle/HSTruffleCompilationTask.java index 414e426db924..93a0d19b45d9 100644 --- a/substratevm/src/com.oracle.svm.graal.hotspot.libgraal/src/org/graalvm/compiler/truffle/compiler/hotspot/libgraal/HSTruffleCompilationTask.java +++ b/substratevm/src/com.oracle.svm.graal.hotspot.libgraal/src/com/oracle/svm/graal/hotspot/libgraal/truffle/HSTruffleCompilationTask.java @@ -22,7 +22,7 @@ * or visit www.oracle.com if you need additional information or have any * questions. */ -package org.graalvm.compiler.truffle.compiler.hotspot.libgraal; +package com.oracle.svm.graal.hotspot.libgraal.truffle; import static com.oracle.truffle.compiler.hotspot.libgraal.TruffleFromLibGraal.Id.AddInlinedTarget; import static com.oracle.truffle.compiler.hotspot.libgraal.TruffleFromLibGraal.Id.AddTargetToDequeue; @@ -39,22 +39,22 @@ import static com.oracle.truffle.compiler.hotspot.libgraal.TruffleFromLibGraal.Id.IsCancelled; import static com.oracle.truffle.compiler.hotspot.libgraal.TruffleFromLibGraal.Id.IsLastTier; import static com.oracle.truffle.compiler.hotspot.libgraal.TruffleFromLibGraal.Id.SetCallCounts; -import static org.graalvm.compiler.truffle.compiler.hotspot.libgraal.HSTruffleCompilationTaskGen.callAddInlinedTarget; -import static org.graalvm.compiler.truffle.compiler.hotspot.libgraal.HSTruffleCompilationTaskGen.callAddTargetToDequeue; -import static org.graalvm.compiler.truffle.compiler.hotspot.libgraal.HSTruffleCompilationTaskGen.callGetDebugProperties; -import static org.graalvm.compiler.truffle.compiler.hotspot.libgraal.HSTruffleCompilationTaskGen.callGetDescription; -import static org.graalvm.compiler.truffle.compiler.hotspot.libgraal.HSTruffleCompilationTaskGen.callGetLanguage; -import static org.graalvm.compiler.truffle.compiler.hotspot.libgraal.HSTruffleCompilationTaskGen.callGetLineNumber; -import static org.graalvm.compiler.truffle.compiler.hotspot.libgraal.HSTruffleCompilationTaskGen.callGetNodeClassName; -import static org.graalvm.compiler.truffle.compiler.hotspot.libgraal.HSTruffleCompilationTaskGen.callGetNodeId; -import static org.graalvm.compiler.truffle.compiler.hotspot.libgraal.HSTruffleCompilationTaskGen.callGetOffsetEnd; -import static org.graalvm.compiler.truffle.compiler.hotspot.libgraal.HSTruffleCompilationTaskGen.callGetOffsetStart; -import static org.graalvm.compiler.truffle.compiler.hotspot.libgraal.HSTruffleCompilationTaskGen.callGetPosition; -import static org.graalvm.compiler.truffle.compiler.hotspot.libgraal.HSTruffleCompilationTaskGen.callGetURI; -import static org.graalvm.compiler.truffle.compiler.hotspot.libgraal.HSTruffleCompilationTaskGen.callHasNextTier; -import static org.graalvm.compiler.truffle.compiler.hotspot.libgraal.HSTruffleCompilationTaskGen.callIsCancelled; -import static org.graalvm.compiler.truffle.compiler.hotspot.libgraal.HSTruffleCompilationTaskGen.callIsLastTier; -import static org.graalvm.compiler.truffle.compiler.hotspot.libgraal.HSTruffleCompilationTaskGen.callSetCallCounts; +import static com.oracle.svm.graal.hotspot.libgraal.truffle.HSTruffleCompilationTaskGen.callAddInlinedTarget; +import static com.oracle.svm.graal.hotspot.libgraal.truffle.HSTruffleCompilationTaskGen.callAddTargetToDequeue; +import static com.oracle.svm.graal.hotspot.libgraal.truffle.HSTruffleCompilationTaskGen.callGetDebugProperties; +import static com.oracle.svm.graal.hotspot.libgraal.truffle.HSTruffleCompilationTaskGen.callGetDescription; +import static com.oracle.svm.graal.hotspot.libgraal.truffle.HSTruffleCompilationTaskGen.callGetLanguage; +import static com.oracle.svm.graal.hotspot.libgraal.truffle.HSTruffleCompilationTaskGen.callGetLineNumber; +import static com.oracle.svm.graal.hotspot.libgraal.truffle.HSTruffleCompilationTaskGen.callGetNodeClassName; +import static com.oracle.svm.graal.hotspot.libgraal.truffle.HSTruffleCompilationTaskGen.callGetNodeId; +import static com.oracle.svm.graal.hotspot.libgraal.truffle.HSTruffleCompilationTaskGen.callGetOffsetEnd; +import static com.oracle.svm.graal.hotspot.libgraal.truffle.HSTruffleCompilationTaskGen.callGetOffsetStart; +import static com.oracle.svm.graal.hotspot.libgraal.truffle.HSTruffleCompilationTaskGen.callGetPosition; +import static com.oracle.svm.graal.hotspot.libgraal.truffle.HSTruffleCompilationTaskGen.callGetURI; +import static com.oracle.svm.graal.hotspot.libgraal.truffle.HSTruffleCompilationTaskGen.callHasNextTier; +import static com.oracle.svm.graal.hotspot.libgraal.truffle.HSTruffleCompilationTaskGen.callIsCancelled; +import static com.oracle.svm.graal.hotspot.libgraal.truffle.HSTruffleCompilationTaskGen.callIsLastTier; +import static com.oracle.svm.graal.hotspot.libgraal.truffle.HSTruffleCompilationTaskGen.callSetCallCounts; import static org.graalvm.jniutils.JNIMethodScope.env; import static org.graalvm.jniutils.JNIUtil.createString; diff --git a/substratevm/src/com.oracle.svm.graal.hotspot.libgraal/src/org/graalvm/compiler/truffle/compiler/hotspot/libgraal/HSTruffleCompilerListener.java b/substratevm/src/com.oracle.svm.graal.hotspot.libgraal/src/com/oracle/svm/graal/hotspot/libgraal/truffle/HSTruffleCompilerListener.java similarity index 90% rename from substratevm/src/com.oracle.svm.graal.hotspot.libgraal/src/org/graalvm/compiler/truffle/compiler/hotspot/libgraal/HSTruffleCompilerListener.java rename to substratevm/src/com.oracle.svm.graal.hotspot.libgraal/src/com/oracle/svm/graal/hotspot/libgraal/truffle/HSTruffleCompilerListener.java index b0d35d219850..3498168d4fbc 100644 --- a/substratevm/src/com.oracle.svm.graal.hotspot.libgraal/src/org/graalvm/compiler/truffle/compiler/hotspot/libgraal/HSTruffleCompilerListener.java +++ b/substratevm/src/com.oracle.svm.graal.hotspot.libgraal/src/com/oracle/svm/graal/hotspot/libgraal/truffle/HSTruffleCompilerListener.java @@ -22,18 +22,18 @@ * or visit www.oracle.com if you need additional information or have any * questions. */ -package org.graalvm.compiler.truffle.compiler.hotspot.libgraal; +package com.oracle.svm.graal.hotspot.libgraal.truffle; import static com.oracle.truffle.compiler.hotspot.libgraal.TruffleFromLibGraal.Id.OnCompilationRetry; import static com.oracle.truffle.compiler.hotspot.libgraal.TruffleFromLibGraal.Id.OnFailure; import static com.oracle.truffle.compiler.hotspot.libgraal.TruffleFromLibGraal.Id.OnGraalTierFinished; import static com.oracle.truffle.compiler.hotspot.libgraal.TruffleFromLibGraal.Id.OnSuccess; import static com.oracle.truffle.compiler.hotspot.libgraal.TruffleFromLibGraal.Id.OnTruffleTierFinished; -import static org.graalvm.compiler.truffle.compiler.hotspot.libgraal.HSTruffleCompilerListenerGen.callOnCompilationRetry; -import static org.graalvm.compiler.truffle.compiler.hotspot.libgraal.HSTruffleCompilerListenerGen.callOnFailure; -import static org.graalvm.compiler.truffle.compiler.hotspot.libgraal.HSTruffleCompilerListenerGen.callOnGraalTierFinished; -import static org.graalvm.compiler.truffle.compiler.hotspot.libgraal.HSTruffleCompilerListenerGen.callOnSuccess; -import static org.graalvm.compiler.truffle.compiler.hotspot.libgraal.HSTruffleCompilerListenerGen.callOnTruffleTierFinished; +import static com.oracle.svm.graal.hotspot.libgraal.truffle.HSTruffleCompilerListenerGen.callOnCompilationRetry; +import static com.oracle.svm.graal.hotspot.libgraal.truffle.HSTruffleCompilerListenerGen.callOnFailure; +import static com.oracle.svm.graal.hotspot.libgraal.truffle.HSTruffleCompilerListenerGen.callOnGraalTierFinished; +import static com.oracle.svm.graal.hotspot.libgraal.truffle.HSTruffleCompilerListenerGen.callOnSuccess; +import static com.oracle.svm.graal.hotspot.libgraal.truffle.HSTruffleCompilerListenerGen.callOnTruffleTierFinished; import static org.graalvm.jniutils.JNIUtil.createHSString; import java.io.Closeable; diff --git a/substratevm/src/com.oracle.svm.graal.hotspot.libgraal/src/org/graalvm/compiler/truffle/compiler/hotspot/libgraal/HSTruffleCompilerRuntime.java b/substratevm/src/com.oracle.svm.graal.hotspot.libgraal/src/com/oracle/svm/graal/hotspot/libgraal/truffle/HSTruffleCompilerRuntime.java similarity index 92% rename from substratevm/src/com.oracle.svm.graal.hotspot.libgraal/src/org/graalvm/compiler/truffle/compiler/hotspot/libgraal/HSTruffleCompilerRuntime.java rename to substratevm/src/com.oracle.svm.graal.hotspot.libgraal/src/com/oracle/svm/graal/hotspot/libgraal/truffle/HSTruffleCompilerRuntime.java index d6ea5012f02f..11996b5a3bcd 100644 --- a/substratevm/src/com.oracle.svm.graal.hotspot.libgraal/src/org/graalvm/compiler/truffle/compiler/hotspot/libgraal/HSTruffleCompilerRuntime.java +++ b/substratevm/src/com.oracle.svm.graal.hotspot.libgraal/src/com/oracle/svm/graal/hotspot/libgraal/truffle/HSTruffleCompilerRuntime.java @@ -22,8 +22,16 @@ * or visit www.oracle.com if you need additional information or have any * questions. */ -package org.graalvm.compiler.truffle.compiler.hotspot.libgraal; +package com.oracle.svm.graal.hotspot.libgraal.truffle; +import static com.oracle.svm.graal.hotspot.libgraal.truffle.HSTruffleCompilerRuntimeGen.callConsumeOptimizedAssumptionDependency; +import static com.oracle.svm.graal.hotspot.libgraal.truffle.HSTruffleCompilerRuntimeGen.callCreateStringSupplier; +import static com.oracle.svm.graal.hotspot.libgraal.truffle.HSTruffleCompilerRuntimeGen.callGetConstantFieldInfo; +import static com.oracle.svm.graal.hotspot.libgraal.truffle.HSTruffleCompilerRuntimeGen.callIsSuppressedFailure; +import static com.oracle.svm.graal.hotspot.libgraal.truffle.HSTruffleCompilerRuntimeGen.callIsValueType; +import static com.oracle.svm.graal.hotspot.libgraal.truffle.HSTruffleCompilerRuntimeGen.callLog; +import static com.oracle.svm.graal.hotspot.libgraal.truffle.HSTruffleCompilerRuntimeGen.callOnCodeInstallation; +import static com.oracle.svm.graal.hotspot.libgraal.truffle.HSTruffleCompilerRuntimeGen.callRegisterOptimizedAssumptionDependency; import static com.oracle.truffle.compiler.hotspot.libgraal.TruffleFromLibGraal.Id.ConsumeOptimizedAssumptionDependency; import static com.oracle.truffle.compiler.hotspot.libgraal.TruffleFromLibGraal.Id.CreateStringSupplier; import static com.oracle.truffle.compiler.hotspot.libgraal.TruffleFromLibGraal.Id.GetConstantFieldInfo; @@ -34,14 +42,6 @@ import static com.oracle.truffle.compiler.hotspot.libgraal.TruffleFromLibGraal.Id.OnCodeInstallation; import static com.oracle.truffle.compiler.hotspot.libgraal.TruffleFromLibGraal.Id.RegisterOptimizedAssumptionDependency; import static jdk.vm.ci.hotspot.HotSpotJVMCIRuntime.runtime; -import static org.graalvm.compiler.truffle.compiler.hotspot.libgraal.HSTruffleCompilerRuntimeGen.callConsumeOptimizedAssumptionDependency; -import static org.graalvm.compiler.truffle.compiler.hotspot.libgraal.HSTruffleCompilerRuntimeGen.callCreateStringSupplier; -import static org.graalvm.compiler.truffle.compiler.hotspot.libgraal.HSTruffleCompilerRuntimeGen.callGetConstantFieldInfo; -import static org.graalvm.compiler.truffle.compiler.hotspot.libgraal.HSTruffleCompilerRuntimeGen.callIsSuppressedFailure; -import static org.graalvm.compiler.truffle.compiler.hotspot.libgraal.HSTruffleCompilerRuntimeGen.callIsValueType; -import static org.graalvm.compiler.truffle.compiler.hotspot.libgraal.HSTruffleCompilerRuntimeGen.callLog; -import static org.graalvm.compiler.truffle.compiler.hotspot.libgraal.HSTruffleCompilerRuntimeGen.callOnCodeInstallation; -import static org.graalvm.compiler.truffle.compiler.hotspot.libgraal.HSTruffleCompilerRuntimeGen.callRegisterOptimizedAssumptionDependency; import static org.graalvm.jniutils.JNIMethodScope.env; import static org.graalvm.jniutils.JNIMethodScope.scope; import static org.graalvm.jniutils.JNIUtil.getInternalName; diff --git a/substratevm/src/com.oracle.svm.graal.hotspot.libgraal/src/org/graalvm/compiler/truffle/compiler/hotspot/libgraal/LibGraal.java b/substratevm/src/com.oracle.svm.graal.hotspot.libgraal/src/com/oracle/svm/graal/hotspot/libgraal/truffle/LibGraal.java similarity index 98% rename from substratevm/src/com.oracle.svm.graal.hotspot.libgraal/src/org/graalvm/compiler/truffle/compiler/hotspot/libgraal/LibGraal.java rename to substratevm/src/com.oracle.svm.graal.hotspot.libgraal/src/com/oracle/svm/graal/hotspot/libgraal/truffle/LibGraal.java index 30483dff3db7..45181c73bbf5 100644 --- a/substratevm/src/com.oracle.svm.graal.hotspot.libgraal/src/org/graalvm/compiler/truffle/compiler/hotspot/libgraal/LibGraal.java +++ b/substratevm/src/com.oracle.svm.graal.hotspot.libgraal/src/com/oracle/svm/graal/hotspot/libgraal/truffle/LibGraal.java @@ -22,7 +22,7 @@ * or visit www.oracle.com if you need additional information or have any * questions. */ -package org.graalvm.compiler.truffle.compiler.hotspot.libgraal; +package com.oracle.svm.graal.hotspot.libgraal.truffle; import org.graalvm.word.PointerBase; import org.graalvm.word.WordFactory; diff --git a/substratevm/src/com.oracle.svm.graal.hotspot.libgraal/src/org/graalvm/compiler/truffle/compiler/hotspot/libgraal/LibGraalChecker.java b/substratevm/src/com.oracle.svm.graal.hotspot.libgraal/src/com/oracle/svm/graal/hotspot/libgraal/truffle/LibGraalChecker.java similarity index 99% rename from substratevm/src/com.oracle.svm.graal.hotspot.libgraal/src/org/graalvm/compiler/truffle/compiler/hotspot/libgraal/LibGraalChecker.java rename to substratevm/src/com.oracle.svm.graal.hotspot.libgraal/src/com/oracle/svm/graal/hotspot/libgraal/truffle/LibGraalChecker.java index d98800b0499d..1271ee40f08e 100644 --- a/substratevm/src/com.oracle.svm.graal.hotspot.libgraal/src/org/graalvm/compiler/truffle/compiler/hotspot/libgraal/LibGraalChecker.java +++ b/substratevm/src/com.oracle.svm.graal.hotspot.libgraal/src/com/oracle/svm/graal/hotspot/libgraal/truffle/LibGraalChecker.java @@ -22,7 +22,7 @@ * or visit www.oracle.com if you need additional information or have any * questions. */ -package org.graalvm.compiler.truffle.compiler.hotspot.libgraal; +package com.oracle.svm.graal.hotspot.libgraal.truffle; import java.lang.annotation.Annotation; import java.lang.reflect.Method; diff --git a/substratevm/src/com.oracle.svm.graal.hotspot.libgraal/src/org/graalvm/compiler/truffle/compiler/hotspot/libgraal/LibGraalNativeBridgeSupport.java b/substratevm/src/com.oracle.svm.graal.hotspot.libgraal/src/com/oracle/svm/graal/hotspot/libgraal/truffle/LibGraalNativeBridgeSupport.java similarity index 98% rename from substratevm/src/com.oracle.svm.graal.hotspot.libgraal/src/org/graalvm/compiler/truffle/compiler/hotspot/libgraal/LibGraalNativeBridgeSupport.java rename to substratevm/src/com.oracle.svm.graal.hotspot.libgraal/src/com/oracle/svm/graal/hotspot/libgraal/truffle/LibGraalNativeBridgeSupport.java index 5aced2f4c595..07def2600708 100644 --- a/substratevm/src/com.oracle.svm.graal.hotspot.libgraal/src/org/graalvm/compiler/truffle/compiler/hotspot/libgraal/LibGraalNativeBridgeSupport.java +++ b/substratevm/src/com.oracle.svm.graal.hotspot.libgraal/src/com/oracle/svm/graal/hotspot/libgraal/truffle/LibGraalNativeBridgeSupport.java @@ -22,7 +22,7 @@ * or visit www.oracle.com if you need additional information or have any * questions. */ -package org.graalvm.compiler.truffle.compiler.hotspot.libgraal; +package com.oracle.svm.graal.hotspot.libgraal.truffle; import jdk.vm.ci.services.Services; import org.graalvm.compiler.debug.TTY; diff --git a/substratevm/src/com.oracle.svm.graal.hotspot.libgraal/src/org/graalvm/compiler/truffle/compiler/hotspot/libgraal/LibGraalObjectHandles.java b/substratevm/src/com.oracle.svm.graal.hotspot.libgraal/src/com/oracle/svm/graal/hotspot/libgraal/truffle/LibGraalObjectHandles.java similarity index 97% rename from substratevm/src/com.oracle.svm.graal.hotspot.libgraal/src/org/graalvm/compiler/truffle/compiler/hotspot/libgraal/LibGraalObjectHandles.java rename to substratevm/src/com.oracle.svm.graal.hotspot.libgraal/src/com/oracle/svm/graal/hotspot/libgraal/truffle/LibGraalObjectHandles.java index 1d1a93563955..8d5b4ed54947 100644 --- a/substratevm/src/com.oracle.svm.graal.hotspot.libgraal/src/org/graalvm/compiler/truffle/compiler/hotspot/libgraal/LibGraalObjectHandles.java +++ b/substratevm/src/com.oracle.svm.graal.hotspot.libgraal/src/com/oracle/svm/graal/hotspot/libgraal/truffle/LibGraalObjectHandles.java @@ -22,7 +22,7 @@ * or visit www.oracle.com if you need additional information or have any * questions. */ -package org.graalvm.compiler.truffle.compiler.hotspot.libgraal; +package com.oracle.svm.graal.hotspot.libgraal.truffle; import org.graalvm.nativeimage.ObjectHandles; import org.graalvm.word.WordFactory; diff --git a/substratevm/src/com.oracle.svm.graal.hotspot.libgraal/src/org/graalvm/compiler/truffle/compiler/hotspot/libgraal/LibGraalTruffleHostEnvironment.java b/substratevm/src/com.oracle.svm.graal.hotspot.libgraal/src/com/oracle/svm/graal/hotspot/libgraal/truffle/LibGraalTruffleHostEnvironment.java similarity index 98% rename from substratevm/src/com.oracle.svm.graal.hotspot.libgraal/src/org/graalvm/compiler/truffle/compiler/hotspot/libgraal/LibGraalTruffleHostEnvironment.java rename to substratevm/src/com.oracle.svm.graal.hotspot.libgraal/src/com/oracle/svm/graal/hotspot/libgraal/truffle/LibGraalTruffleHostEnvironment.java index 44964a426f25..c462c2ae8991 100644 --- a/substratevm/src/com.oracle.svm.graal.hotspot.libgraal/src/org/graalvm/compiler/truffle/compiler/hotspot/libgraal/LibGraalTruffleHostEnvironment.java +++ b/substratevm/src/com.oracle.svm.graal.hotspot.libgraal/src/com/oracle/svm/graal/hotspot/libgraal/truffle/LibGraalTruffleHostEnvironment.java @@ -22,7 +22,7 @@ * or visit www.oracle.com if you need additional information or have any * questions. */ -package org.graalvm.compiler.truffle.compiler.hotspot.libgraal; +package com.oracle.svm.graal.hotspot.libgraal.truffle; import org.graalvm.compiler.core.common.util.MethodKey; import org.graalvm.compiler.truffle.compiler.TruffleCompilerImpl; diff --git a/substratevm/src/com.oracle.svm.graal.hotspot.libgraal/src/org/graalvm/compiler/truffle/compiler/hotspot/libgraal/LibGraalTruffleHostEnvironmentLookup.java b/substratevm/src/com.oracle.svm.graal.hotspot.libgraal/src/com/oracle/svm/graal/hotspot/libgraal/truffle/LibGraalTruffleHostEnvironmentLookup.java similarity index 98% rename from substratevm/src/com.oracle.svm.graal.hotspot.libgraal/src/org/graalvm/compiler/truffle/compiler/hotspot/libgraal/LibGraalTruffleHostEnvironmentLookup.java rename to substratevm/src/com.oracle.svm.graal.hotspot.libgraal/src/com/oracle/svm/graal/hotspot/libgraal/truffle/LibGraalTruffleHostEnvironmentLookup.java index dbf02946269b..d2872e0ee4ea 100644 --- a/substratevm/src/com.oracle.svm.graal.hotspot.libgraal/src/org/graalvm/compiler/truffle/compiler/hotspot/libgraal/LibGraalTruffleHostEnvironmentLookup.java +++ b/substratevm/src/com.oracle.svm.graal.hotspot.libgraal/src/com/oracle/svm/graal/hotspot/libgraal/truffle/LibGraalTruffleHostEnvironmentLookup.java @@ -22,7 +22,7 @@ * or visit www.oracle.com if you need additional information or have any * questions. */ -package org.graalvm.compiler.truffle.compiler.hotspot.libgraal; +package com.oracle.svm.graal.hotspot.libgraal.truffle; import org.graalvm.compiler.debug.GraalError; import org.graalvm.compiler.serviceprovider.GlobalAtomicLong; diff --git a/substratevm/src/com.oracle.svm.graal.hotspot.libgraal/src/org/graalvm/compiler/truffle/compiler/hotspot/libgraal/TruffleFromLibGraalCalls.java b/substratevm/src/com.oracle.svm.graal.hotspot.libgraal/src/com/oracle/svm/graal/hotspot/libgraal/truffle/TruffleFromLibGraalCalls.java similarity index 97% rename from substratevm/src/com.oracle.svm.graal.hotspot.libgraal/src/org/graalvm/compiler/truffle/compiler/hotspot/libgraal/TruffleFromLibGraalCalls.java rename to substratevm/src/com.oracle.svm.graal.hotspot.libgraal/src/com/oracle/svm/graal/hotspot/libgraal/truffle/TruffleFromLibGraalCalls.java index 484381816e81..a0bcb0e700e2 100644 --- a/substratevm/src/com.oracle.svm.graal.hotspot.libgraal/src/org/graalvm/compiler/truffle/compiler/hotspot/libgraal/TruffleFromLibGraalCalls.java +++ b/substratevm/src/com.oracle.svm.graal.hotspot.libgraal/src/com/oracle/svm/graal/hotspot/libgraal/truffle/TruffleFromLibGraalCalls.java @@ -22,7 +22,7 @@ * or visit www.oracle.com if you need additional information or have any * questions. */ -package org.graalvm.compiler.truffle.compiler.hotspot.libgraal; +package com.oracle.svm.graal.hotspot.libgraal.truffle; import org.graalvm.jniutils.JNI.JClass; import org.graalvm.jniutils.JNI.JNIEnv; diff --git a/substratevm/src/com.oracle.svm.graal.hotspot.libgraal/src/org/graalvm/compiler/truffle/compiler/hotspot/libgraal/TruffleLibGraalFeature.java b/substratevm/src/com.oracle.svm.graal.hotspot.libgraal/src/com/oracle/svm/graal/hotspot/libgraal/truffle/TruffleLibGraalFeature.java similarity index 96% rename from substratevm/src/com.oracle.svm.graal.hotspot.libgraal/src/org/graalvm/compiler/truffle/compiler/hotspot/libgraal/TruffleLibGraalFeature.java rename to substratevm/src/com.oracle.svm.graal.hotspot.libgraal/src/com/oracle/svm/graal/hotspot/libgraal/truffle/TruffleLibGraalFeature.java index 416a2fa10292..1eae250612a4 100644 --- a/substratevm/src/com.oracle.svm.graal.hotspot.libgraal/src/org/graalvm/compiler/truffle/compiler/hotspot/libgraal/TruffleLibGraalFeature.java +++ b/substratevm/src/com.oracle.svm.graal.hotspot.libgraal/src/com/oracle/svm/graal/hotspot/libgraal/truffle/TruffleLibGraalFeature.java @@ -22,7 +22,7 @@ * or visit www.oracle.com if you need additional information or have any * questions. */ -package org.graalvm.compiler.truffle.compiler.hotspot.libgraal; +package com.oracle.svm.graal.hotspot.libgraal.truffle; import org.graalvm.compiler.truffle.compiler.host.TruffleHostEnvironment; import org.graalvm.jniutils.NativeBridgeSupport; diff --git a/substratevm/src/com.oracle.svm.graal.hotspot.libgraal/src/org/graalvm/compiler/truffle/compiler/hotspot/libgraal/TruffleLibGraalShutdownHook.java b/substratevm/src/com.oracle.svm.graal.hotspot.libgraal/src/com/oracle/svm/graal/hotspot/libgraal/truffle/TruffleLibGraalShutdownHook.java similarity index 97% rename from substratevm/src/com.oracle.svm.graal.hotspot.libgraal/src/org/graalvm/compiler/truffle/compiler/hotspot/libgraal/TruffleLibGraalShutdownHook.java rename to substratevm/src/com.oracle.svm.graal.hotspot.libgraal/src/com/oracle/svm/graal/hotspot/libgraal/truffle/TruffleLibGraalShutdownHook.java index 6df838f01556..9d82b49ecf82 100644 --- a/substratevm/src/com.oracle.svm.graal.hotspot.libgraal/src/org/graalvm/compiler/truffle/compiler/hotspot/libgraal/TruffleLibGraalShutdownHook.java +++ b/substratevm/src/com.oracle.svm.graal.hotspot.libgraal/src/com/oracle/svm/graal/hotspot/libgraal/truffle/TruffleLibGraalShutdownHook.java @@ -22,7 +22,7 @@ * or visit www.oracle.com if you need additional information or have any * questions. */ -package org.graalvm.compiler.truffle.compiler.hotspot.libgraal; +package com.oracle.svm.graal.hotspot.libgraal.truffle; import org.graalvm.compiler.serviceprovider.IsolateUtil; import org.graalvm.compiler.serviceprovider.ServiceProvider; diff --git a/substratevm/src/com.oracle.svm.graal.hotspot.libgraal/src/org/graalvm/compiler/truffle/compiler/hotspot/libgraal/TruffleToLibGraalEntryPoints.java b/substratevm/src/com.oracle.svm.graal.hotspot.libgraal/src/com/oracle/svm/graal/hotspot/libgraal/truffle/TruffleToLibGraalEntryPoints.java similarity index 99% rename from substratevm/src/com.oracle.svm.graal.hotspot.libgraal/src/org/graalvm/compiler/truffle/compiler/hotspot/libgraal/TruffleToLibGraalEntryPoints.java rename to substratevm/src/com.oracle.svm.graal.hotspot.libgraal/src/com/oracle/svm/graal/hotspot/libgraal/truffle/TruffleToLibGraalEntryPoints.java index 91b27153365d..939a7021987e 100644 --- a/substratevm/src/com.oracle.svm.graal.hotspot.libgraal/src/org/graalvm/compiler/truffle/compiler/hotspot/libgraal/TruffleToLibGraalEntryPoints.java +++ b/substratevm/src/com.oracle.svm.graal.hotspot.libgraal/src/com/oracle/svm/graal/hotspot/libgraal/truffle/TruffleToLibGraalEntryPoints.java @@ -22,7 +22,7 @@ * or visit www.oracle.com if you need additional information or have any * questions. */ -package org.graalvm.compiler.truffle.compiler.hotspot.libgraal; +package com.oracle.svm.graal.hotspot.libgraal.truffle; import static com.oracle.truffle.compiler.hotspot.libgraal.TruffleToLibGraal.Id.DoCompile; import static com.oracle.truffle.compiler.hotspot.libgraal.TruffleToLibGraal.Id.GetCompilerConfigurationFactoryName; From 2a22217ac42bc5c4f4ffb0df0c0a10dc73a6b339 Mon Sep 17 00:00:00 2001 From: Christian Humer Date: Thu, 22 Jun 2023 22:06:27 +0200 Subject: [PATCH 12/43] Cleanup code in com.oracle.svm.graal.hotspot.libgraal; cleanup annotation processors. --- .../processor/AbstractProcessor.java | 356 ++++++++++++++++++ .../processor/NativeBridgeProcessor.java | 1 - .../processor/SuppressFBWarnings.java | 44 +++ substratevm/mx.substratevm/mx_substratevm.py | 2 +- .../svm/graal/hotspot/libgraal/LibGraal.java | 183 ++------- .../hotspot/libgraal/LibGraalFeature.java | 14 +- .../libgraal/truffle/HSTruffleCompilable.java | 1 + .../truffle/HSTruffleCompilationTask.java | 31 +- .../truffle/HSTruffleCompilerRuntime.java | 1 + .../hotspot/libgraal/truffle/LibGraal.java | 79 ---- .../LibGraalTruffleHostEnvironmentLookup.java | 1 + .../truffle/TruffleToLibGraalEntryPoints.java | 12 +- 12 files changed, 452 insertions(+), 273 deletions(-) create mode 100644 compiler/src/org.graalvm.nativebridge.processor/src/org/graalvm/nativebridge/processor/AbstractProcessor.java create mode 100644 compiler/src/org.graalvm.nativebridge.processor/src/org/graalvm/nativebridge/processor/SuppressFBWarnings.java delete mode 100644 substratevm/src/com.oracle.svm.graal.hotspot.libgraal/src/com/oracle/svm/graal/hotspot/libgraal/truffle/LibGraal.java diff --git a/compiler/src/org.graalvm.nativebridge.processor/src/org/graalvm/nativebridge/processor/AbstractProcessor.java b/compiler/src/org.graalvm.nativebridge.processor/src/org/graalvm/nativebridge/processor/AbstractProcessor.java new file mode 100644 index 000000000000..59ece11696d4 --- /dev/null +++ b/compiler/src/org.graalvm.nativebridge.processor/src/org/graalvm/nativebridge/processor/AbstractProcessor.java @@ -0,0 +1,356 @@ +/* + * Copyright (c) 2018, 2022, 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. Oracle designates this + * particular file as subject to the "Classpath" exception as provided + * by Oracle in the LICENSE file that accompanied this code. + * + * 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 org.graalvm.nativebridge.processor; + +import java.io.IOException; +import java.io.OutputStreamWriter; +import java.io.PrintWriter; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.NoSuchElementException; +import java.util.Set; +import java.util.regex.Matcher; +import java.util.regex.Pattern; + +import javax.annotation.processing.Filer; +import javax.annotation.processing.FilerException; +import javax.annotation.processing.ProcessingEnvironment; +import javax.annotation.processing.RoundEnvironment; +import javax.lang.model.SourceVersion; +import javax.lang.model.element.AnnotationMirror; +import javax.lang.model.element.AnnotationValue; +import javax.lang.model.element.Element; +import javax.lang.model.element.ElementKind; +import javax.lang.model.element.ExecutableElement; +import javax.lang.model.element.PackageElement; +import javax.lang.model.element.TypeElement; +import javax.lang.model.type.TypeKind; +import javax.lang.model.type.TypeMirror; +import javax.lang.model.util.ElementFilter; +import javax.tools.Diagnostic.Kind; +import javax.tools.FileObject; +import javax.tools.JavaFileObject; +import javax.tools.StandardLocation; + +/** + * {@link javax.annotation.processing.AbstractProcessor} subclass that provides extra functionality. + */ +@SuppressFBWarnings(value = "NM_SAME_SIMPLE_NAME_AS_SUPERCLASS", // + justification = "We want this type to be found when someone is writing a new Graal annotation processor") +public abstract class AbstractProcessor extends javax.annotation.processing.AbstractProcessor { + + /** + * Gets the processing environment available to this processor. + */ + public ProcessingEnvironment env() { + return processingEnv; + } + + @Override + public final SourceVersion getSupportedSourceVersion() { + return SourceVersion.latest(); + } + + @Override + public boolean process(Set annotations, RoundEnvironment roundEnv) { + return doProcess(annotations, roundEnv); + } + + protected abstract boolean doProcess(Set annotations, RoundEnvironment roundEnv); + + private final Map types = new HashMap<>(); + + /** + * Gets the {@link TypeMirror} for a given class name. + * + * @throws NoClassDefFoundError if the class cannot be resolved + */ + public TypeMirror getType(String className) { + return getTypeElement(className).asType(); + } + + public TypeMirror getType(Class element) { + if (element.isArray()) { + return processingEnv.getTypeUtils().getArrayType(getType(element.getComponentType())); + } + if (element.isPrimitive()) { + if (element == void.class) { + return processingEnv.getTypeUtils().getNoType(TypeKind.VOID); + } + TypeKind typeKind; + if (element == boolean.class) { + typeKind = TypeKind.BOOLEAN; + } else if (element == byte.class) { + typeKind = TypeKind.BYTE; + } else if (element == short.class) { + typeKind = TypeKind.SHORT; + } else if (element == char.class) { + typeKind = TypeKind.CHAR; + } else if (element == int.class) { + typeKind = TypeKind.INT; + } else if (element == long.class) { + typeKind = TypeKind.LONG; + } else if (element == float.class) { + typeKind = TypeKind.FLOAT; + } else if (element == double.class) { + typeKind = TypeKind.DOUBLE; + } else { + assert false; + return null; + } + return processingEnv.getTypeUtils().getPrimitiveType(typeKind); + } else { + TypeElement typeElement = getTypeElement(element.getCanonicalName()); + if (typeElement == null) { + return null; + } + return processingEnv.getTypeUtils().erasure(typeElement.asType()); + } + } + + /** + * Gets the {@link TypeMirror} for a given class name. + * + * @return {@code null} if the class cannot be resolved + */ + public TypeMirror getTypeOrNull(String className) { + TypeElement element = getTypeElementOrNull(className); + if (element == null) { + return null; + } + return element.asType(); + } + + /** + * Gets the {@link TypeElement} for a given class name. + * + * @throws NoClassDefFoundError if the class cannot be resolved + */ + public TypeElement getTypeElement(String className) { + TypeElement type = getTypeElementOrNull(className); + if (type == null) { + throw new NoClassDefFoundError(className); + } + return type; + } + + /** + * Gets the {@link TypeElement} for a given class name. + * + * @returns {@code null} if the class cannot be resolved + */ + public TypeElement getTypeElementOrNull(String className) { + TypeElement type = types.get(className); + if (type == null) { + type = processingEnv.getElementUtils().getTypeElement(className); + if (type == null) { + return null; + } + types.put(className, type); + } + return type; + } + + /** + * Converts a given {@link TypeMirror} to a {@link TypeElement}. + * + * @throws ClassCastException if type cannot be converted to a {@link TypeElement} + */ + public TypeElement asTypeElement(TypeMirror type) { + Element element = processingEnv.getTypeUtils().asElement(type); + if (element == null) { + throw new ClassCastException(type + " cannot be converted to a " + TypeElement.class.getName()); + } + return (TypeElement) element; + } + + /** + * Regular expression for a qualified class name that assumes package names start with lowercase + * and non-package components start with uppercase. + */ + private static final Pattern QUALIFIED_CLASS_NAME_RE = Pattern.compile("(?:[a-z]\\w*\\.)+([A-Z].*)"); + + /** + * Gets the non-package component of a qualified class name. + * + * @throws IllegalArgumentException if {@code className} does not match + * {@link #QUALIFIED_CLASS_NAME_RE} + */ + public static String getSimpleName(String className) { + Matcher m = QUALIFIED_CLASS_NAME_RE.matcher(className); + if (m.matches()) { + return m.group(1); + } + throw new IllegalArgumentException("Class name \"" + className + "\" does not match pattern " + QUALIFIED_CLASS_NAME_RE); + } + + /** + * Gets the package component of a qualified class name. + * + * @throws IllegalArgumentException if {@code className} does not match + * {@link #QUALIFIED_CLASS_NAME_RE} + */ + public static String getPackageName(String className) { + String simpleName = getSimpleName(className); + return className.substring(0, className.length() - simpleName.length() - 1); + } + + /** + * Gets the annotation of type {@code annotationType} directly present on {@code element}. + * + * @return {@code null} if an annotation of type {@code annotationType} is not on + * {@code element} + */ + public AnnotationMirror getAnnotation(Element element, TypeMirror annotationType) { + List mirrors = getAnnotations(element, annotationType); + return mirrors.isEmpty() ? null : mirrors.get(0); + } + + /** + * Gets all annotations directly present on {@code element}. + */ + public List getAnnotations(Element element, TypeMirror typeMirror) { + List result = new ArrayList<>(); + for (AnnotationMirror mirror : element.getAnnotationMirrors()) { + if (processingEnv.getTypeUtils().isSameType(mirror.getAnnotationType(), typeMirror)) { + result.add(mirror); + } + } + return result; + } + + /** + * Gets the value of the {@code name} element of {@code annotation} and converts it to a value + * of type {@code type}. + * + * @param type the expected type of the element value. This must be a subclass of one of the + * types described by {@link AnnotationValue}. + * @throws NoSuchElementException if {@code annotation} has no element named {@code name} + * @throws ClassCastException if the value of the specified element cannot be converted to + * {@code type} + */ + public static T getAnnotationValue(AnnotationMirror annotation, String name, Class type) { + ExecutableElement valueMethod = null; + for (ExecutableElement method : ElementFilter.methodsIn(annotation.getAnnotationType().asElement().getEnclosedElements())) { + if (method.getSimpleName().toString().equals(name)) { + valueMethod = method; + break; + } + } + + if (valueMethod == null) { + return null; + } + + AnnotationValue value = annotation.getElementValues().get(valueMethod); + if (value == null) { + value = valueMethod.getDefaultValue(); + } + + return type.cast(value.getValue()); + } + + /** + * Gets the value of the {@code name} array-typed element of {@code annotation} and converts it + * to list of values of type {@code type}. + * + * @param componentType the expected component type of the element value. This must be a + * subclass of one of the types described by {@link AnnotationValue}. + * @throws NoSuchElementException if {@code annotation} has no element named {@code name} + * @throws ClassCastException if the value of the specified element is not an array whose + * components cannot be converted to {@code componentType} + */ + @SuppressWarnings("unchecked") + public static List getAnnotationValueList(AnnotationMirror annotation, String name, Class componentType) { + List values = getAnnotationValue(annotation, name, List.class); + List result = new ArrayList<>(); + + if (values != null) { + for (AnnotationValue value : values) { + result.add(componentType.cast(value.getValue())); + } + } + return result; + } + + public static PackageElement getPackage(Element element) { + Element e = element.getEnclosingElement(); + while (e != null && e.getKind() != ElementKind.PACKAGE) { + e = e.getEnclosingElement(); + } + return (PackageElement) e; + } + + public static PrintWriter createSourceFile(String pkg, String relativeName, Filer filer, Element... originatingElements) { + try { + /* Ensure Unix line endings to comply with code style guide checked by Checkstyle. */ + String className = pkg + "." + relativeName; + JavaFileObject sourceFile = filer.createSourceFile(className, originatingElements); + return new PrintWriter(sourceFile.openWriter()) { + @Override + public void println() { + print("\n"); + } + }; + } catch (IOException e) { + throw new RuntimeException(e); + } + } + + /** + * Creates a {@code META-INF/providers/} file whose contents are a single + * line containing {@code serviceClassName}. + */ + public void createProviderFile(String providerClassName, String serviceClassName, Element... originatingElements) { + assert originatingElements.length > 0; + String filename = "META-INF/providers/" + providerClassName; + try { + FileObject file = processingEnv.getFiler().createResource(StandardLocation.CLASS_OUTPUT, "", filename, originatingElements); + PrintWriter writer = new PrintWriter(new OutputStreamWriter(file.openOutputStream(), "UTF-8")); + writer.println(serviceClassName); + writer.close(); + } catch (IOException e) { + processingEnv.getMessager().printMessage(isBug367599(e) ? Kind.NOTE : Kind.ERROR, e.getMessage(), originatingElements[0]); + } + } + + /** + * Determines if a given exception is (most likely) caused by + * Bug 367599. + */ + private static boolean isBug367599(Throwable t) { + if (t instanceof FilerException) { + for (StackTraceElement ste : t.getStackTrace()) { + if (ste.toString().contains("org.eclipse.jdt.internal.apt.pluggable.core.filer.IdeFilerImpl.create")) { + // See: https://bugs.eclipse.org/bugs/show_bug.cgi?id=367599 + return true; + } + } + } + return t.getCause() != null && isBug367599(t.getCause()); + } +} diff --git a/compiler/src/org.graalvm.nativebridge.processor/src/org/graalvm/nativebridge/processor/NativeBridgeProcessor.java b/compiler/src/org.graalvm.nativebridge.processor/src/org/graalvm/nativebridge/processor/NativeBridgeProcessor.java index 31290220b279..710d9b1b062c 100644 --- a/compiler/src/org.graalvm.nativebridge.processor/src/org/graalvm/nativebridge/processor/NativeBridgeProcessor.java +++ b/compiler/src/org.graalvm.nativebridge.processor/src/org/graalvm/nativebridge/processor/NativeBridgeProcessor.java @@ -45,7 +45,6 @@ import javax.tools.Diagnostic; import javax.tools.JavaFileObject; -import org.graalvm.compiler.processor.AbstractProcessor; import org.graalvm.nativebridge.processor.AbstractBridgeParser.AbstractTypeCache; import org.graalvm.nativebridge.processor.AbstractBridgeParser.DefinitionData; diff --git a/compiler/src/org.graalvm.nativebridge.processor/src/org/graalvm/nativebridge/processor/SuppressFBWarnings.java b/compiler/src/org.graalvm.nativebridge.processor/src/org/graalvm/nativebridge/processor/SuppressFBWarnings.java new file mode 100644 index 000000000000..255559f4e804 --- /dev/null +++ b/compiler/src/org.graalvm.nativebridge.processor/src/org/graalvm/nativebridge/processor/SuppressFBWarnings.java @@ -0,0 +1,44 @@ +/* + * Copyright (c) 2021, 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. Oracle designates this + * particular file as subject to the "Classpath" exception as provided + * by Oracle in the LICENSE file that accompanied this code. + * + * 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 org.graalvm.nativebridge.processor; + +import java.lang.annotation.Retention; +import java.lang.annotation.RetentionPolicy; + +/** + * Used to suppress SpotBugs warnings. + */ +@Retention(RetentionPolicy.CLASS) +@interface SuppressFBWarnings { + /** + * @see "https://spotbugs.readthedocs.io/en/latest/bugDescriptions.html" + */ + String[] value(); + + /** + * Reason why the warning is suppressed. Use a SpotBugs issue id where appropriate. + */ + String justification(); +} diff --git a/substratevm/mx.substratevm/mx_substratevm.py b/substratevm/mx.substratevm/mx_substratevm.py index 725573ff8537..4cab248b0ca4 100644 --- a/substratevm/mx.substratevm/mx_substratevm.py +++ b/substratevm/mx.substratevm/mx_substratevm.py @@ -1236,7 +1236,7 @@ def _native_image_launcher_extra_jvm_args(): destination="", jvm_library=True, jar_distributions=libgraal_jar_distributions, - build_args=libgraal_build_args + ['--features=com.oracle.svm.graal.hotspot.libgraal.LibGraalFeature,org.graalvm.compiler.truffle.compiler.hotspot.libgraal.TruffleLibGraalFeature'], + build_args=libgraal_build_args + ['--features=com.oracle.svm.graal.hotspot.libgraal.LibGraalFeature,com.oracle.svm.graal.hotspot.libgraal.truffle.TruffleLibGraalFeature'], add_to_module='java.base', headers=False, ), diff --git a/substratevm/src/com.oracle.svm.graal.hotspot.libgraal/src/com/oracle/svm/graal/hotspot/libgraal/LibGraal.java b/substratevm/src/com.oracle.svm.graal.hotspot.libgraal/src/com/oracle/svm/graal/hotspot/libgraal/LibGraal.java index e00b22be464d..bbee756d7f02 100644 --- a/substratevm/src/com.oracle.svm.graal.hotspot.libgraal/src/com/oracle/svm/graal/hotspot/libgraal/LibGraal.java +++ b/substratevm/src/com.oracle.svm.graal.hotspot.libgraal/src/com/oracle/svm/graal/hotspot/libgraal/LibGraal.java @@ -24,14 +24,12 @@ */ package com.oracle.svm.graal.hotspot.libgraal; -import static jdk.vm.ci.hotspot.HotSpotJVMCIRuntime.runtime; - -import java.lang.reflect.InvocationTargetException; -import java.lang.reflect.Method; -import java.util.Arrays; +import org.graalvm.word.PointerBase; +import org.graalvm.word.WordFactory; import jdk.vm.ci.hotspot.HotSpotJVMCIRuntime; -import jdk.vm.ci.hotspot.HotSpotSpeculationLog; +import jdk.vm.ci.hotspot.HotSpotObjectConstant; +import jdk.vm.ci.hotspot.HotSpotResolvedJavaType; import jdk.vm.ci.services.Services; /** @@ -52,9 +50,11 @@ *
  • {@link #translate(Object)}
  • *
  • {@link #unhand(Class, long)}
  • * - * */ -final class LibGraal { +public final class LibGraal { + + static final long initialIsolate = Services.IS_BUILDING_NATIVE_IMAGE ? 0L : initializeLibgraal(); + static final boolean available = initialIsolate != 0L; // NOTE: The use of reflection to access JVMCI API is to support // compiling on JDKs with varying versions of JVMCI. @@ -64,13 +64,6 @@ final class LibGraal { Services.initializeJVMCI(); } - private static final Method unhand = methodOrNull(HotSpotJVMCIRuntime.class, "unhand", sig(Class.class, Long.TYPE)); - private static final Method translate = methodIf(unhand, HotSpotJVMCIRuntime.class, "translate", sig(Object.class)); - private static final Method registerNativeMethods = methodIf(unhand, HotSpotJVMCIRuntime.class, "registerNativeMethods", sig(Class.class)); - private static final Method attachCurrentThread = methodIf(unhand, HotSpotJVMCIRuntime.class, "attachCurrentThread", sig(Boolean.TYPE, long[].class), sig(Boolean.TYPE)); - private static final Method detachCurrentThread = methodIf(unhand, HotSpotJVMCIRuntime.class, "detachCurrentThread", sig(Boolean.TYPE), sig()); - private static final Method getFailedSpeculationsAddress = methodIf(unhand, HotSpotSpeculationLog.class, "getFailedSpeculationsAddress"); - /** * Determines if libgraal is available for use. */ @@ -78,13 +71,6 @@ public static boolean isAvailable() { return inLibGraal() || available; } - /** - * Determines if the current runtime supports building a libgraal image. - */ - public static boolean isSupported() { - return getFailedSpeculationsAddress != null; - } - /** * Determines if the current runtime is libgraal. */ @@ -104,14 +90,7 @@ public static boolean inLibGraal() { * @throws IllegalArgumentException if {@code obj} is not of a translatable type */ public static long translate(Object obj) { - if (!isAvailable()) { - throw new IllegalStateException(); - } - try { - return (long) translate.invoke(runtime(), obj); - } catch (Throwable throwable) { - throw new InternalError(throwable); - } + return HotSpotJVMCIRuntime.runtime().translate(obj); } /** @@ -125,63 +104,36 @@ public static long translate(Object obj) { */ @SuppressWarnings("unchecked") public static T unhand(Class type, long handle) { - if (!isAvailable()) { - throw new IllegalStateException(); - } - try { - return (T) unhand.invoke(runtime(), type, handle); - } catch (Throwable throwable) { - throw new InternalError(throwable); - } + return HotSpotJVMCIRuntime.runtime().unhand(type, handle); } - private static long initializeLibgraal() { - if (registerNativeMethods == null) { - return 0L; - } - try { - long[] javaVMInfo = (long[]) registerNativeMethods.invoke(runtime(), LibGraal.class); - long isolate = javaVMInfo[1]; - return isolate; - } catch (InvocationTargetException e) { - if (e.getTargetException() instanceof UnsupportedOperationException) { - return 0L; - } - throw new InternalError(e); - } catch (Throwable throwable) { - throw new InternalError(throwable); - } + /** + * @see HotSpotJVMCIRuntime#getJObjectValue(HotSpotObjectConstant) + */ + public static T getJObjectValue(HotSpotObjectConstant constant) { + return WordFactory.pointer(HotSpotJVMCIRuntime.runtime().getJObjectValue(constant)); } - static final long initialIsolate = Services.IS_BUILDING_NATIVE_IMAGE ? 0L : initializeLibgraal(); - static final boolean available = initialIsolate != 0L; + /** + * @see HotSpotJVMCIRuntime#asResolvedJavaType(long) + */ + public static HotSpotResolvedJavaType asResolvedJavaType(PointerBase pointer) { + return HotSpotJVMCIRuntime.runtime().asResolvedJavaType(pointer.rawValue()); + } + + private static long initializeLibgraal() { + return HotSpotJVMCIRuntime.runtime().registerNativeMethods(LibGraal.class)[1]; + } /** * Ensures the current thread is attached to the peer runtime. * * @param isDaemon if the thread is not yet attached, should it be attached as a daemon - * @param isolate if non-null, the isolate for the current thread is returned in element 0 * @return {@code true} if this call attached the current thread, {@code false} if the current * thread was already attached */ - public static boolean attachCurrentThread(boolean isDaemon, long[] isolate) { - try { - if (attachCurrentThread.getParameterCount() == 2) { - long[] javaVMInfo = isolate != null ? new long[4] : null; - boolean res = (boolean) attachCurrentThread.invoke(runtime(), isDaemon, javaVMInfo); - if (isolate != null) { - isolate[0] = javaVMInfo[1]; - } - return res; - } else { - if (isolate != null) { - isolate[0] = initialIsolate; - } - return (boolean) attachCurrentThread.invoke(runtime(), isDaemon); - } - } catch (Throwable throwable) { - throw new InternalError(throwable); - } + public static boolean attachCurrentThread(boolean isDaemon) { + return HotSpotJVMCIRuntime.runtime().attachCurrentThread(isDaemon, null); } /** @@ -195,86 +147,7 @@ public static boolean attachCurrentThread(boolean isDaemon, long[] isolate) { * as a result of this call */ public static boolean detachCurrentThread(boolean release) { - try { - if (detachCurrentThread.getParameterCount() == 1) { - return (Boolean) detachCurrentThread.invoke(runtime(), release); - } else { - detachCurrentThread.invoke(runtime()); - return false; - } - } catch (Throwable throwable) { - throw new InternalError(throwable); - } - } - - /** - * Convenience function for wrapping varargs into an array for use in calls to - * {@link #method(Class, String, Class[][])}. - */ - private static Class[] sig(Class... types) { - return types; - } - - /** - * Gets the method in {@code declaringClass} with the unique name {@code name}. - * - * @param sigs the signatures the method may have - */ - private static Method method(Class declaringClass, String name, Class[]... sigs) { - if (sigs.length == 1 || sigs.length == 0) { - try { - Class[] sig = sigs.length == 1 ? sigs[0] : new Class[0]; - return declaringClass.getDeclaredMethod(name, sig); - } catch (NoSuchMethodException | SecurityException e) { - throw (NoSuchMethodError) new NoSuchMethodError(name).initCause(e); - } - } - Method match = null; - for (Method m : declaringClass.getDeclaredMethods()) { - if (m.getName().equals(name)) { - if (match != null) { - throw new InternalError(String.format("Expected single method named %s, found %s and %s", - name, match, m)); - } - match = m; - } - } - if (match == null) { - throw new NoSuchMethodError("Cannot find method " + name + " in " + declaringClass.getName()); - } - Class[] parameterTypes = match.getParameterTypes(); - for (Class[] sig : sigs) { - if (Arrays.equals(parameterTypes, sig)) { - return match; - } - } - throw new NoSuchMethodError(String.format("Unexpected signature for %s: %s", name, Arrays.toString(parameterTypes))); + return HotSpotJVMCIRuntime.runtime().detachCurrentThread(release); } - /** - * Gets the method in {@code declaringClass} with the unique name {@code name} or {@code null} - * if not found. - * - * @param sigs the signatures the method may have - */ - private static Method methodOrNull(Class declaringClass, String name, Class[]... sigs) { - try { - return method(declaringClass, name, sigs); - } catch (NoSuchMethodError e) { - return null; - } - } - - /** - * Gets the method in {@code declaringClass} with the unique name {@code name} or {@code null} - * if {@code guard == null}. - * - * @param sigs the signatures the method may have - */ - private static Method methodIf(Object guard, Class declaringClass, String name, Class[]... sigs) { - if (guard == null) { - return null; - } - return method(declaringClass, name, sigs); - } } diff --git a/substratevm/src/com.oracle.svm.graal.hotspot.libgraal/src/com/oracle/svm/graal/hotspot/libgraal/LibGraalFeature.java b/substratevm/src/com.oracle.svm.graal.hotspot.libgraal/src/com/oracle/svm/graal/hotspot/libgraal/LibGraalFeature.java index 519be88523eb..c9cddfde6f55 100644 --- a/substratevm/src/com.oracle.svm.graal.hotspot.libgraal/src/com/oracle/svm/graal/hotspot/libgraal/LibGraalFeature.java +++ b/substratevm/src/com.oracle.svm.graal.hotspot.libgraal/src/com/oracle/svm/graal/hotspot/libgraal/LibGraalFeature.java @@ -186,9 +186,6 @@ public void afterImageWrite(AfterImageWriteAccess access) { @Override public boolean isInConfiguration(IsInConfigurationAccess access) { - if (!LibGraal.isSupported()) { - throw new InternalError("LibGraalFeature is not supported by the current JDK"); - } return true; } @@ -779,7 +776,7 @@ final class Target_org_graalvm_compiler_core_GraalServiceThread { @Substitute() void beforeRun() { GraalServiceThread thread = SubstrateUtil.cast(this, GraalServiceThread.class); - if (!LibGraal.attachCurrentThread(thread.isDaemon(), null)) { + if (!LibGraal.attachCurrentThread(thread.isDaemon())) { throw new InternalError("Couldn't attach to HotSpot runtime"); } } @@ -812,15 +809,6 @@ private static void notifyCrash(String crashMessage) { final class Target_org_graalvm_compiler_hotspot_SymbolicSnippetEncoder { } -@TargetClass(className = "org.graalvm.compiler.truffle.compiler.hotspot.libgraal.TruffleToLibGraalEntryPoints", onlyWith = LibGraalFeature.IsEnabled.class) -final class Target_org_graalvm_compiler_truffle_compiler_hotspot_libgraal_TruffleToLibGraalEntryPoints { - @SuppressWarnings("unused") - @Substitute - private static void doReferenceHandling() { - Heap.getHeap().doReferenceHandling(); - } -} - @TargetClass(value = HotSpotForeignCallLinkageImpl.class, onlyWith = LibGraalFeature.IsEnabled.class) final class Target_org_graalvm_compiler_hotspot_HotSpotForeignCallLinkageImpl { /** diff --git a/substratevm/src/com.oracle.svm.graal.hotspot.libgraal/src/com/oracle/svm/graal/hotspot/libgraal/truffle/HSTruffleCompilable.java b/substratevm/src/com.oracle.svm.graal.hotspot.libgraal/src/com/oracle/svm/graal/hotspot/libgraal/truffle/HSTruffleCompilable.java index bcac3530fe8c..185e29384448 100644 --- a/substratevm/src/com.oracle.svm.graal.hotspot.libgraal/src/com/oracle/svm/graal/hotspot/libgraal/truffle/HSTruffleCompilable.java +++ b/substratevm/src/com.oracle.svm.graal.hotspot.libgraal/src/com/oracle/svm/graal/hotspot/libgraal/truffle/HSTruffleCompilable.java @@ -68,6 +68,7 @@ import org.graalvm.jniutils.JNIUtil; import org.graalvm.nativebridge.BinaryInput; +import com.oracle.svm.graal.hotspot.libgraal.LibGraal; import com.oracle.truffle.compiler.TruffleCompilable; import com.oracle.truffle.compiler.hotspot.libgraal.TruffleFromLibGraal; import com.oracle.truffle.compiler.hotspot.libgraal.TruffleFromLibGraal.Id; diff --git a/substratevm/src/com.oracle.svm.graal.hotspot.libgraal/src/com/oracle/svm/graal/hotspot/libgraal/truffle/HSTruffleCompilationTask.java b/substratevm/src/com.oracle.svm.graal.hotspot.libgraal/src/com/oracle/svm/graal/hotspot/libgraal/truffle/HSTruffleCompilationTask.java index 93a0d19b45d9..8e3893584c6d 100644 --- a/substratevm/src/com.oracle.svm.graal.hotspot.libgraal/src/com/oracle/svm/graal/hotspot/libgraal/truffle/HSTruffleCompilationTask.java +++ b/substratevm/src/com.oracle.svm.graal.hotspot.libgraal/src/com/oracle/svm/graal/hotspot/libgraal/truffle/HSTruffleCompilationTask.java @@ -24,21 +24,6 @@ */ package com.oracle.svm.graal.hotspot.libgraal.truffle; -import static com.oracle.truffle.compiler.hotspot.libgraal.TruffleFromLibGraal.Id.AddInlinedTarget; -import static com.oracle.truffle.compiler.hotspot.libgraal.TruffleFromLibGraal.Id.AddTargetToDequeue; -import static com.oracle.truffle.compiler.hotspot.libgraal.TruffleFromLibGraal.Id.GetDescription; -import static com.oracle.truffle.compiler.hotspot.libgraal.TruffleFromLibGraal.Id.GetLanguage; -import static com.oracle.truffle.compiler.hotspot.libgraal.TruffleFromLibGraal.Id.GetLineNumber; -import static com.oracle.truffle.compiler.hotspot.libgraal.TruffleFromLibGraal.Id.GetNodeClassName; -import static com.oracle.truffle.compiler.hotspot.libgraal.TruffleFromLibGraal.Id.GetNodeId; -import static com.oracle.truffle.compiler.hotspot.libgraal.TruffleFromLibGraal.Id.GetOffsetEnd; -import static com.oracle.truffle.compiler.hotspot.libgraal.TruffleFromLibGraal.Id.GetOffsetStart; -import static com.oracle.truffle.compiler.hotspot.libgraal.TruffleFromLibGraal.Id.GetPosition; -import static com.oracle.truffle.compiler.hotspot.libgraal.TruffleFromLibGraal.Id.GetURI; -import static com.oracle.truffle.compiler.hotspot.libgraal.TruffleFromLibGraal.Id.HasNextTier; -import static com.oracle.truffle.compiler.hotspot.libgraal.TruffleFromLibGraal.Id.IsCancelled; -import static com.oracle.truffle.compiler.hotspot.libgraal.TruffleFromLibGraal.Id.IsLastTier; -import static com.oracle.truffle.compiler.hotspot.libgraal.TruffleFromLibGraal.Id.SetCallCounts; import static com.oracle.svm.graal.hotspot.libgraal.truffle.HSTruffleCompilationTaskGen.callAddInlinedTarget; import static com.oracle.svm.graal.hotspot.libgraal.truffle.HSTruffleCompilationTaskGen.callAddTargetToDequeue; import static com.oracle.svm.graal.hotspot.libgraal.truffle.HSTruffleCompilationTaskGen.callGetDebugProperties; @@ -55,6 +40,21 @@ import static com.oracle.svm.graal.hotspot.libgraal.truffle.HSTruffleCompilationTaskGen.callIsCancelled; import static com.oracle.svm.graal.hotspot.libgraal.truffle.HSTruffleCompilationTaskGen.callIsLastTier; import static com.oracle.svm.graal.hotspot.libgraal.truffle.HSTruffleCompilationTaskGen.callSetCallCounts; +import static com.oracle.truffle.compiler.hotspot.libgraal.TruffleFromLibGraal.Id.AddInlinedTarget; +import static com.oracle.truffle.compiler.hotspot.libgraal.TruffleFromLibGraal.Id.AddTargetToDequeue; +import static com.oracle.truffle.compiler.hotspot.libgraal.TruffleFromLibGraal.Id.GetDescription; +import static com.oracle.truffle.compiler.hotspot.libgraal.TruffleFromLibGraal.Id.GetLanguage; +import static com.oracle.truffle.compiler.hotspot.libgraal.TruffleFromLibGraal.Id.GetLineNumber; +import static com.oracle.truffle.compiler.hotspot.libgraal.TruffleFromLibGraal.Id.GetNodeClassName; +import static com.oracle.truffle.compiler.hotspot.libgraal.TruffleFromLibGraal.Id.GetNodeId; +import static com.oracle.truffle.compiler.hotspot.libgraal.TruffleFromLibGraal.Id.GetOffsetEnd; +import static com.oracle.truffle.compiler.hotspot.libgraal.TruffleFromLibGraal.Id.GetOffsetStart; +import static com.oracle.truffle.compiler.hotspot.libgraal.TruffleFromLibGraal.Id.GetPosition; +import static com.oracle.truffle.compiler.hotspot.libgraal.TruffleFromLibGraal.Id.GetURI; +import static com.oracle.truffle.compiler.hotspot.libgraal.TruffleFromLibGraal.Id.HasNextTier; +import static com.oracle.truffle.compiler.hotspot.libgraal.TruffleFromLibGraal.Id.IsCancelled; +import static com.oracle.truffle.compiler.hotspot.libgraal.TruffleFromLibGraal.Id.IsLastTier; +import static com.oracle.truffle.compiler.hotspot.libgraal.TruffleFromLibGraal.Id.SetCallCounts; import static org.graalvm.jniutils.JNIMethodScope.env; import static org.graalvm.jniutils.JNIUtil.createString; @@ -71,6 +71,7 @@ import org.graalvm.jniutils.JNIUtil; import org.graalvm.nativebridge.BinaryInput; +import com.oracle.svm.graal.hotspot.libgraal.LibGraal; import com.oracle.truffle.compiler.TruffleCompilable; import com.oracle.truffle.compiler.TruffleCompilationTask; import com.oracle.truffle.compiler.TruffleSourceLanguagePosition; diff --git a/substratevm/src/com.oracle.svm.graal.hotspot.libgraal/src/com/oracle/svm/graal/hotspot/libgraal/truffle/HSTruffleCompilerRuntime.java b/substratevm/src/com.oracle.svm.graal.hotspot.libgraal/src/com/oracle/svm/graal/hotspot/libgraal/truffle/HSTruffleCompilerRuntime.java index 11996b5a3bcd..690e015835f7 100644 --- a/substratevm/src/com.oracle.svm.graal.hotspot.libgraal/src/com/oracle/svm/graal/hotspot/libgraal/truffle/HSTruffleCompilerRuntime.java +++ b/substratevm/src/com.oracle.svm.graal.hotspot.libgraal/src/com/oracle/svm/graal/hotspot/libgraal/truffle/HSTruffleCompilerRuntime.java @@ -63,6 +63,7 @@ import org.graalvm.nativeimage.c.type.CCharPointer; import org.graalvm.word.WordFactory; +import com.oracle.svm.graal.hotspot.libgraal.LibGraal; import com.oracle.truffle.compiler.ConstantFieldInfo; import com.oracle.truffle.compiler.HostMethodInfo; import com.oracle.truffle.compiler.OptimizedAssumptionDependency; diff --git a/substratevm/src/com.oracle.svm.graal.hotspot.libgraal/src/com/oracle/svm/graal/hotspot/libgraal/truffle/LibGraal.java b/substratevm/src/com.oracle.svm.graal.hotspot.libgraal/src/com/oracle/svm/graal/hotspot/libgraal/truffle/LibGraal.java deleted file mode 100644 index 45181c73bbf5..000000000000 --- a/substratevm/src/com.oracle.svm.graal.hotspot.libgraal/src/com/oracle/svm/graal/hotspot/libgraal/truffle/LibGraal.java +++ /dev/null @@ -1,79 +0,0 @@ -/* - * Copyright (c) 2019, 2020, 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. Oracle designates this - * particular file as subject to the "Classpath" exception as provided - * by Oracle in the LICENSE file that accompanied this code. - * - * 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.svm.graal.hotspot.libgraal.truffle; - -import org.graalvm.word.PointerBase; -import org.graalvm.word.WordFactory; - -import jdk.vm.ci.hotspot.HotSpotJVMCIRuntime; -import jdk.vm.ci.hotspot.HotSpotObjectConstant; -import jdk.vm.ci.hotspot.HotSpotResolvedJavaType; - -final class LibGraal { - - /** - * Creates or retrieves an object in the peer runtime that mirrors {@code obj}. - * - * This mechanism can be used to pass and return values between the HotSpot and libgraal - * runtimes. In the receiving runtime, the value can be converted back to an object with - * {@link #unhand}. - * - * @param obj an object for which an equivalent instance in the peer runtime is requested - * @return a JNI global reference to the mirror of {@code obj} in the peer runtime - * @throws IllegalArgumentException if {@code obj} is not of a translatable type - */ - static long translate(Object obj) { - return HotSpotJVMCIRuntime.runtime().translate(obj); - } - - /** - * Dereferences and returns the object referred to by the JNI global reference {@code handle}. - * The global reference is deleted prior to returning. Any further use of {@code handle} is - * invalid. - * - * @param handle a JNI global reference to an object in the current runtime - * @return the object referred to by {@code handle} - * @throws ClassCastException if the returned object cannot be cast to {@code type} - */ - @SuppressWarnings("unchecked") - static T unhand(Class type, long handle) { - return HotSpotJVMCIRuntime.runtime().unhand(type, handle); - } - - /** - * @see HotSpotJVMCIRuntime#getJObjectValue(HotSpotObjectConstant) - */ - static T getJObjectValue(HotSpotObjectConstant constant) { - return WordFactory.pointer(HotSpotJVMCIRuntime.runtime().getJObjectValue(constant)); - } - - /** - * @see HotSpotJVMCIRuntime#asResolvedJavaType(long) - */ - static HotSpotResolvedJavaType asResolvedJavaType(PointerBase pointer) { - return HotSpotJVMCIRuntime.runtime().asResolvedJavaType(pointer.rawValue()); - } - -} diff --git a/substratevm/src/com.oracle.svm.graal.hotspot.libgraal/src/com/oracle/svm/graal/hotspot/libgraal/truffle/LibGraalTruffleHostEnvironmentLookup.java b/substratevm/src/com.oracle.svm.graal.hotspot.libgraal/src/com/oracle/svm/graal/hotspot/libgraal/truffle/LibGraalTruffleHostEnvironmentLookup.java index d2872e0ee4ea..86177c3e6463 100644 --- a/substratevm/src/com.oracle.svm.graal.hotspot.libgraal/src/com/oracle/svm/graal/hotspot/libgraal/truffle/LibGraalTruffleHostEnvironmentLookup.java +++ b/substratevm/src/com.oracle.svm.graal.hotspot.libgraal/src/com/oracle/svm/graal/hotspot/libgraal/truffle/LibGraalTruffleHostEnvironmentLookup.java @@ -37,6 +37,7 @@ import com.oracle.svm.core.annotate.RecomputeFieldValue; import com.oracle.svm.core.annotate.RecomputeFieldValue.Kind; +import com.oracle.svm.graal.hotspot.libgraal.LibGraal; import jdk.vm.ci.hotspot.HotSpotJVMCIRuntime; import jdk.vm.ci.meta.ResolvedJavaType; diff --git a/substratevm/src/com.oracle.svm.graal.hotspot.libgraal/src/com/oracle/svm/graal/hotspot/libgraal/truffle/TruffleToLibGraalEntryPoints.java b/substratevm/src/com.oracle.svm.graal.hotspot.libgraal/src/com/oracle/svm/graal/hotspot/libgraal/truffle/TruffleToLibGraalEntryPoints.java index 939a7021987e..99ffca179737 100644 --- a/substratevm/src/com.oracle.svm.graal.hotspot.libgraal/src/com/oracle/svm/graal/hotspot/libgraal/truffle/TruffleToLibGraalEntryPoints.java +++ b/substratevm/src/com.oracle.svm.graal.hotspot.libgraal/src/com/oracle/svm/graal/hotspot/libgraal/truffle/TruffleToLibGraalEntryPoints.java @@ -77,6 +77,8 @@ import org.graalvm.word.PointerBase; import org.graalvm.word.WordFactory; +import com.oracle.svm.core.heap.Heap; +import com.oracle.svm.graal.hotspot.libgraal.LibGraal; import com.oracle.truffle.compiler.TruffleCompilable; import com.oracle.truffle.compiler.TruffleCompilationTask; import com.oracle.truffle.compiler.TruffleCompilerListener; @@ -239,21 +241,13 @@ public static void doCompile(JNIEnv env, TruffleCompilerListener listener = hsListener.isNull() ? null : new HSTruffleCompilerListener(scope, hsListener, runtime); compiler.doCompile(task, compilable, listener); } finally { - doReferenceHandling(); + Heap.getHeap().doReferenceHandling(); } } catch (Throwable t) { JNIExceptionWrapper.throwInHotSpot(env, t); } } - /* - * To avoid reference handling threads in the compiler isolate we explicitly call into reference - * handling after each compilation. - */ - private static void doReferenceHandling() { - // Substituted in LibGraalFeature. - } - @TruffleToLibGraal(Shutdown) @SuppressWarnings({"unused", "try"}) @CEntryPoint(name = "Java_org_graalvm_compiler_truffle_runtime_hotspot_libgraal_TruffleToLibGraalCalls_shutdown") From 0c6b6e76a935cc78eeb0871df1371abca12a5bee Mon Sep 17 00:00:00 2001 From: Christian Humer Date: Thu, 22 Jun 2023 22:27:18 +0200 Subject: [PATCH 13/43] Move native bridge, jniutils to sdk; Move rest of the libgraal utils to svm.graal.hotspot. --- compiler/mx.compiler/suite.py | 47 -------- sdk/mx.sdk/suite.py | 109 ++++++++++++++++++ .../src/org/graalvm/jniutils/HSObject.java | 0 .../src/org/graalvm/jniutils/JNI.java | 0 .../src/org/graalvm/jniutils/JNICalls.java | 0 .../org/graalvm/jniutils/JNIEntryPoint.java | 0 .../graalvm/jniutils/JNIExceptionWrapper.java | 0 .../JNIExceptionWrapperEntryPoints.java | 0 .../org/graalvm/jniutils/JNIMethodScope.java | 0 .../src/org/graalvm/jniutils/JNIUtil.java | 0 .../graalvm/jniutils/NativeBridgeSupport.java | 0 .../processor/test/AbstractService.java | 0 .../processor/test/BinaryOutputTest.java | 0 .../test/CustomMarshallerService.java | 0 .../processor/test/CustomReceiverService.java | 0 .../processor/test/ExpectError.java | 0 .../processor/test/OutParameterService.java | 0 .../nativebridge/processor/test/Service.java | 0 .../processor/test/ServiceAPI.java | 0 .../processor/test/TestJNIConfig.java | 0 .../processor/test/common/InnerClassTest.java | 0 .../test/common/InvalidBaseType1Test.java | 0 .../test/common/InvalidBaseType2Test.java | 0 .../test/common/InvalidBaseType3Test.java | 0 .../test/common/InvalidConstructorTest.java | 0 .../InvalidCustomDispatchAccessor1Test.java | 0 .../InvalidCustomDispatchAccessor2Test.java | 0 .../InvalidCustomDispatchAccessor3Test.java | 0 .../InvalidCustomDispatchAccessor4Test.java | 0 .../InvalidCustomDispatchAccessor5Test.java | 0 .../InvalidCustomDispatchAccessor6Test.java | 0 .../InvalidCustomDispatchAccessor7Test.java | 0 .../InvalidCustomDispatchFactory1Test.java | 0 .../InvalidCustomDispatchFactory2Test.java | 0 .../InvalidCustomDispatchFactory3Test.java | 0 .../InvalidCustomDispatchFactory4Test.java | 0 .../InvalidCustomDispatchFactory5Test.java | 0 .../InvalidCustomDispatchFactory6Test.java | 0 .../InvalidCustomDispatchFactory7Test.java | 0 .../InvalidCustomDispatchFactory8Test.java | 0 .../InvalidCustomReceiverAccessor1Test.java | 0 .../InvalidCustomReceiverAccessor2Test.java | 0 .../InvalidCustomReceiverAccessor3Test.java | 0 .../InvalidCustomReceiverAccessor4Test.java | 0 .../InvalidCustomReceiverAccessor5Test.java | 0 .../InvalidCustomReceiverAccessor6Test.java | 0 .../InvalidCustomReceiverAccessor7Test.java | 0 .../InvalidCustomReceiverAccessor8Test.java | 0 .../common/InvalidEndPointHandle1Test.java | 0 .../common/InvalidEndPointHandle2Test.java | 0 .../test/common/InvalidIdempotentTest.java | 0 .../test/common/InvalidJNIConfig1Test.java | 0 .../test/common/InvalidJNIConfig2Test.java | 0 .../test/common/InvalidJNIConfig3Test.java | 0 .../test/common/InvalidJNIConfig4Test.java | 0 .../test/common/InvalidJNIConfig5Test.java | 0 .../test/common/InvalidMethod1Test.java | 0 .../test/common/InvalidMethod2Test.java | 0 .../test/common/InvalidMethod3Test.java | 0 .../test/common/InvalidMethod4Test.java | 0 .../test/common/InvalidMethod5Test.java | 0 .../test/common/TestAnnotation1.java | 0 .../test/common/TestAnnotation2.java | 0 .../test/hstonative/NativeClassImlTest.java | 0 .../NativeCustomMarshallerTest.java | 0 .../NativeCustomReceiverImplTest.java | 0 .../hstonative/NativeInterfaceImplTest.java | 0 .../hstonative/NativeInvalidBaseTypeTest.java | 0 .../NativeInvalidConstructor1Test.java | 0 .../NativeInvalidConstructor2Test.java | 0 .../NativeInvalidEndPointHandleTest.java | 0 .../hstonative/NativeOutParameterService.java | 0 .../test/nativetohs/HSClassImplTest.java | 0 .../nativetohs/HSCustomMarshallerTest.java | 0 .../nativetohs/HSCustomReceiverImplTest.java | 0 .../test/nativetohs/HSInterfaceImplTest.java | 0 .../nativetohs/HSInvalidBaseTypeTest.java | 0 .../nativetohs/HSInvalidConstructor1Test.java | 0 .../nativetohs/HSInvalidConstructor2Test.java | 0 .../HSInvalidEndPointHandleTest.java | 0 .../nativetohs/HSOutParameterService.java | 0 ...NativeToNativeServiceDifferentConfigs.java | 0 .../MixedNativeToNativeServiceSameConfig.java | 0 .../PureNativeToNativeService.java | 0 .../processor/test/references/Context.java | 0 .../references/CustomLanguageDispatch.java | 0 .../HSAlwaysByReferenceHandler.java | 0 .../processor/test/references/HSHandler.java | 0 .../HSReferenceArrayOperations.java | 0 .../processor/test/references/Handler.java | 0 .../test/references/LanguageAPI.java | 0 .../test/references/NativeContext.java | 0 .../NativeCustomLanguageDispatch.java | 0 .../test/references/NativeRecord.java | 0 .../NativeReferenceArrayOperations.java | 0 .../test/references/NativeService.java | 0 .../processor/test/references/Record.java | 0 .../references/ReferenceArrayOperations.java | 0 .../processor/test/references/Service.java | 0 .../javax.annotation.processing.Processor | 0 .../processor/AbstractBridgeGenerator.java | 0 .../processor/AbstractBridgeParser.java | 0 .../processor/AbstractProcessor.java | 0 .../nativebridge/processor/CodeBuilder.java | 0 .../nativebridge/processor/ExpectError.java | 0 .../HotSpotToNativeBridgeGenerator.java | 0 .../HotSpotToNativeBridgeParser.java | 0 .../processor/NativeBridgeProcessor.java | 0 .../NativeToHotSpotBridgeGenerator.java | 0 .../NativeToHotSpotBridgeParser.java | 0 .../NativeToNativeBridgeGenerator.java | 0 .../processor/NativeToNativeBridgeParser.java | 0 .../processor/SuppressFBWarnings.java | 0 .../nativebridge/processor/Utilities.java | 0 .../nativebridge/AlwaysByReference.java | 0 .../AlwaysByReferenceRepeated.java | 0 .../org/graalvm/nativebridge/BinaryInput.java | 0 .../nativebridge/BinaryMarshaller.java | 0 .../graalvm/nativebridge/BinaryOutput.java | 0 .../org/graalvm/nativebridge/ByReference.java | 0 .../nativebridge/CustomDispatchAccessor.java | 0 .../nativebridge/CustomDispatchFactory.java | 0 .../nativebridge/CustomReceiverAccessor.java | 0 .../DefaultStackTraceMarshaller.java | 0 .../DefaultThrowableMarshaller.java | 0 .../graalvm/nativebridge/EndPointHandle.java | 0 .../nativebridge/ForeignException.java | 0 .../ForeignExceptionEndPoints.java | 0 .../GenerateHotSpotToNativeBridge.java | 0 .../GenerateNativeToHotSpotBridge.java | 0 .../GenerateNativeToNativeBridge.java | 0 .../org/graalvm/nativebridge/Idempotent.java | 0 .../src/org/graalvm/nativebridge/In.java | 0 .../graalvm/nativebridge/JNIClassCache.java | 0 .../org/graalvm/nativebridge/JNIConfig.java | 0 .../nativebridge/MarshalledException.java | 0 .../nativebridge/MarshallerAnnotation.java | 0 .../graalvm/nativebridge/NativeIsolate.java | 0 .../nativebridge/NativeIsolateThread.java | 0 .../graalvm/nativebridge/NativeObject.java | 0 .../nativebridge/NativeObjectCleaner.java | 0 .../nativebridge/NativeObjectHandles.java | 0 .../NullableBinaryMarshaller.java | 0 .../src/org/graalvm/nativebridge/Out.java | 0 .../graalvm/nativebridge/RawReference.java | 0 .../graalvm/nativebridge/ReceiverMethod.java | 0 .../StackTraceElementMarshaller.java | 0 .../nativebridge/StringMarshaller.java | 0 substratevm/mx.substratevm/suite.py | 8 +- .../libgraal/jni/LibGraalJNIMethodScope.java | 0 .../graalvm/libgraal/jni/LibGraalUtil.java | 0 truffle/mx.truffle/suite.py | 44 +++---- 152 files changed, 138 insertions(+), 70 deletions(-) rename {compiler/src/jdk.internal.vm.compiler => sdk/src/org.graalvm.jniutils}/src/org/graalvm/jniutils/HSObject.java (100%) rename {compiler/src/jdk.internal.vm.compiler => sdk/src/org.graalvm.jniutils}/src/org/graalvm/jniutils/JNI.java (100%) rename {compiler/src/jdk.internal.vm.compiler => sdk/src/org.graalvm.jniutils}/src/org/graalvm/jniutils/JNICalls.java (100%) rename {compiler/src/jdk.internal.vm.compiler => sdk/src/org.graalvm.jniutils}/src/org/graalvm/jniutils/JNIEntryPoint.java (100%) rename {compiler/src/jdk.internal.vm.compiler => sdk/src/org.graalvm.jniutils}/src/org/graalvm/jniutils/JNIExceptionWrapper.java (100%) rename {compiler/src/jdk.internal.vm.compiler => sdk/src/org.graalvm.jniutils}/src/org/graalvm/jniutils/JNIExceptionWrapperEntryPoints.java (100%) rename {compiler/src/jdk.internal.vm.compiler => sdk/src/org.graalvm.jniutils}/src/org/graalvm/jniutils/JNIMethodScope.java (100%) rename {compiler/src/jdk.internal.vm.compiler => sdk/src/org.graalvm.jniutils}/src/org/graalvm/jniutils/JNIUtil.java (100%) rename {compiler/src/jdk.internal.vm.compiler => sdk/src/org.graalvm.jniutils}/src/org/graalvm/jniutils/NativeBridgeSupport.java (100%) rename {compiler => sdk}/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/AbstractService.java (100%) rename {compiler => sdk}/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/BinaryOutputTest.java (100%) rename {compiler => sdk}/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/CustomMarshallerService.java (100%) rename {compiler => sdk}/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/CustomReceiverService.java (100%) rename {compiler => sdk}/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/ExpectError.java (100%) rename {compiler => sdk}/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/OutParameterService.java (100%) rename {compiler => sdk}/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/Service.java (100%) rename {compiler => sdk}/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/ServiceAPI.java (100%) rename {compiler => sdk}/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/TestJNIConfig.java (100%) rename {compiler => sdk}/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/common/InnerClassTest.java (100%) rename {compiler => sdk}/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/common/InvalidBaseType1Test.java (100%) rename {compiler => sdk}/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/common/InvalidBaseType2Test.java (100%) rename {compiler => sdk}/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/common/InvalidBaseType3Test.java (100%) rename {compiler => sdk}/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/common/InvalidConstructorTest.java (100%) rename {compiler => sdk}/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/common/InvalidCustomDispatchAccessor1Test.java (100%) rename {compiler => sdk}/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/common/InvalidCustomDispatchAccessor2Test.java (100%) rename {compiler => sdk}/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/common/InvalidCustomDispatchAccessor3Test.java (100%) rename {compiler => sdk}/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/common/InvalidCustomDispatchAccessor4Test.java (100%) rename {compiler => sdk}/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/common/InvalidCustomDispatchAccessor5Test.java (100%) rename {compiler => sdk}/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/common/InvalidCustomDispatchAccessor6Test.java (100%) rename {compiler => sdk}/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/common/InvalidCustomDispatchAccessor7Test.java (100%) rename {compiler => sdk}/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/common/InvalidCustomDispatchFactory1Test.java (100%) rename {compiler => sdk}/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/common/InvalidCustomDispatchFactory2Test.java (100%) rename {compiler => sdk}/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/common/InvalidCustomDispatchFactory3Test.java (100%) rename {compiler => sdk}/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/common/InvalidCustomDispatchFactory4Test.java (100%) rename {compiler => sdk}/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/common/InvalidCustomDispatchFactory5Test.java (100%) rename {compiler => sdk}/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/common/InvalidCustomDispatchFactory6Test.java (100%) rename {compiler => sdk}/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/common/InvalidCustomDispatchFactory7Test.java (100%) rename {compiler => sdk}/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/common/InvalidCustomDispatchFactory8Test.java (100%) rename {compiler => sdk}/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/common/InvalidCustomReceiverAccessor1Test.java (100%) rename {compiler => sdk}/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/common/InvalidCustomReceiverAccessor2Test.java (100%) rename {compiler => sdk}/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/common/InvalidCustomReceiverAccessor3Test.java (100%) rename {compiler => sdk}/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/common/InvalidCustomReceiverAccessor4Test.java (100%) rename {compiler => sdk}/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/common/InvalidCustomReceiverAccessor5Test.java (100%) rename {compiler => sdk}/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/common/InvalidCustomReceiverAccessor6Test.java (100%) rename {compiler => sdk}/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/common/InvalidCustomReceiverAccessor7Test.java (100%) rename {compiler => sdk}/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/common/InvalidCustomReceiverAccessor8Test.java (100%) rename {compiler => sdk}/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/common/InvalidEndPointHandle1Test.java (100%) rename {compiler => sdk}/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/common/InvalidEndPointHandle2Test.java (100%) rename {compiler => sdk}/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/common/InvalidIdempotentTest.java (100%) rename {compiler => sdk}/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/common/InvalidJNIConfig1Test.java (100%) rename {compiler => sdk}/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/common/InvalidJNIConfig2Test.java (100%) rename {compiler => sdk}/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/common/InvalidJNIConfig3Test.java (100%) rename {compiler => sdk}/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/common/InvalidJNIConfig4Test.java (100%) rename {compiler => sdk}/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/common/InvalidJNIConfig5Test.java (100%) rename {compiler => sdk}/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/common/InvalidMethod1Test.java (100%) rename {compiler => sdk}/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/common/InvalidMethod2Test.java (100%) rename {compiler => sdk}/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/common/InvalidMethod3Test.java (100%) rename {compiler => sdk}/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/common/InvalidMethod4Test.java (100%) rename {compiler => sdk}/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/common/InvalidMethod5Test.java (100%) rename {compiler => sdk}/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/common/TestAnnotation1.java (100%) rename {compiler => sdk}/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/common/TestAnnotation2.java (100%) rename {compiler => sdk}/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/hstonative/NativeClassImlTest.java (100%) rename {compiler => sdk}/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/hstonative/NativeCustomMarshallerTest.java (100%) rename {compiler => sdk}/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/hstonative/NativeCustomReceiverImplTest.java (100%) rename {compiler => sdk}/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/hstonative/NativeInterfaceImplTest.java (100%) rename {compiler => sdk}/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/hstonative/NativeInvalidBaseTypeTest.java (100%) rename {compiler => sdk}/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/hstonative/NativeInvalidConstructor1Test.java (100%) rename {compiler => sdk}/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/hstonative/NativeInvalidConstructor2Test.java (100%) rename {compiler => sdk}/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/hstonative/NativeInvalidEndPointHandleTest.java (100%) rename {compiler => sdk}/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/hstonative/NativeOutParameterService.java (100%) rename {compiler => sdk}/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/nativetohs/HSClassImplTest.java (100%) rename {compiler => sdk}/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/nativetohs/HSCustomMarshallerTest.java (100%) rename {compiler => sdk}/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/nativetohs/HSCustomReceiverImplTest.java (100%) rename {compiler => sdk}/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/nativetohs/HSInterfaceImplTest.java (100%) rename {compiler => sdk}/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/nativetohs/HSInvalidBaseTypeTest.java (100%) rename {compiler => sdk}/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/nativetohs/HSInvalidConstructor1Test.java (100%) rename {compiler => sdk}/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/nativetohs/HSInvalidConstructor2Test.java (100%) rename {compiler => sdk}/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/nativetohs/HSInvalidEndPointHandleTest.java (100%) rename {compiler => sdk}/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/nativetohs/HSOutParameterService.java (100%) rename {compiler => sdk}/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/nativetonative/MixedNativeToNativeServiceDifferentConfigs.java (100%) rename {compiler => sdk}/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/nativetonative/MixedNativeToNativeServiceSameConfig.java (100%) rename {compiler => sdk}/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/nativetonative/PureNativeToNativeService.java (100%) rename {compiler => sdk}/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/references/Context.java (100%) rename {compiler => sdk}/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/references/CustomLanguageDispatch.java (100%) rename {compiler => sdk}/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/references/HSAlwaysByReferenceHandler.java (100%) rename {compiler => sdk}/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/references/HSHandler.java (100%) rename {compiler => sdk}/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/references/HSReferenceArrayOperations.java (100%) rename {compiler => sdk}/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/references/Handler.java (100%) rename {compiler => sdk}/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/references/LanguageAPI.java (100%) rename {compiler => sdk}/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/references/NativeContext.java (100%) rename {compiler => sdk}/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/references/NativeCustomLanguageDispatch.java (100%) rename {compiler => sdk}/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/references/NativeRecord.java (100%) rename {compiler => sdk}/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/references/NativeReferenceArrayOperations.java (100%) rename {compiler => sdk}/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/references/NativeService.java (100%) rename {compiler => sdk}/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/references/Record.java (100%) rename {compiler => sdk}/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/references/ReferenceArrayOperations.java (100%) rename {compiler => sdk}/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/references/Service.java (100%) rename {compiler => sdk}/src/org.graalvm.nativebridge.processor/src/META-INF/services/javax.annotation.processing.Processor (100%) rename {compiler => sdk}/src/org.graalvm.nativebridge.processor/src/org/graalvm/nativebridge/processor/AbstractBridgeGenerator.java (100%) rename {compiler => sdk}/src/org.graalvm.nativebridge.processor/src/org/graalvm/nativebridge/processor/AbstractBridgeParser.java (100%) rename {compiler => sdk}/src/org.graalvm.nativebridge.processor/src/org/graalvm/nativebridge/processor/AbstractProcessor.java (100%) rename {compiler => sdk}/src/org.graalvm.nativebridge.processor/src/org/graalvm/nativebridge/processor/CodeBuilder.java (100%) rename {compiler => sdk}/src/org.graalvm.nativebridge.processor/src/org/graalvm/nativebridge/processor/ExpectError.java (100%) rename {compiler => sdk}/src/org.graalvm.nativebridge.processor/src/org/graalvm/nativebridge/processor/HotSpotToNativeBridgeGenerator.java (100%) rename {compiler => sdk}/src/org.graalvm.nativebridge.processor/src/org/graalvm/nativebridge/processor/HotSpotToNativeBridgeParser.java (100%) rename {compiler => sdk}/src/org.graalvm.nativebridge.processor/src/org/graalvm/nativebridge/processor/NativeBridgeProcessor.java (100%) rename {compiler => sdk}/src/org.graalvm.nativebridge.processor/src/org/graalvm/nativebridge/processor/NativeToHotSpotBridgeGenerator.java (100%) rename {compiler => sdk}/src/org.graalvm.nativebridge.processor/src/org/graalvm/nativebridge/processor/NativeToHotSpotBridgeParser.java (100%) rename {compiler => sdk}/src/org.graalvm.nativebridge.processor/src/org/graalvm/nativebridge/processor/NativeToNativeBridgeGenerator.java (100%) rename {compiler => sdk}/src/org.graalvm.nativebridge.processor/src/org/graalvm/nativebridge/processor/NativeToNativeBridgeParser.java (100%) rename {compiler => sdk}/src/org.graalvm.nativebridge.processor/src/org/graalvm/nativebridge/processor/SuppressFBWarnings.java (100%) rename {compiler => sdk}/src/org.graalvm.nativebridge.processor/src/org/graalvm/nativebridge/processor/Utilities.java (100%) rename {compiler/src/jdk.internal.vm.compiler => sdk/src/org.graalvm.nativebridge}/src/org/graalvm/nativebridge/AlwaysByReference.java (100%) rename {compiler/src/jdk.internal.vm.compiler => sdk/src/org.graalvm.nativebridge}/src/org/graalvm/nativebridge/AlwaysByReferenceRepeated.java (100%) rename {compiler/src/jdk.internal.vm.compiler => sdk/src/org.graalvm.nativebridge}/src/org/graalvm/nativebridge/BinaryInput.java (100%) rename {compiler/src/jdk.internal.vm.compiler => sdk/src/org.graalvm.nativebridge}/src/org/graalvm/nativebridge/BinaryMarshaller.java (100%) rename {compiler/src/jdk.internal.vm.compiler => sdk/src/org.graalvm.nativebridge}/src/org/graalvm/nativebridge/BinaryOutput.java (100%) rename {compiler/src/jdk.internal.vm.compiler => sdk/src/org.graalvm.nativebridge}/src/org/graalvm/nativebridge/ByReference.java (100%) rename {compiler/src/jdk.internal.vm.compiler => sdk/src/org.graalvm.nativebridge}/src/org/graalvm/nativebridge/CustomDispatchAccessor.java (100%) rename {compiler/src/jdk.internal.vm.compiler => sdk/src/org.graalvm.nativebridge}/src/org/graalvm/nativebridge/CustomDispatchFactory.java (100%) rename {compiler/src/jdk.internal.vm.compiler => sdk/src/org.graalvm.nativebridge}/src/org/graalvm/nativebridge/CustomReceiverAccessor.java (100%) rename {compiler/src/jdk.internal.vm.compiler => sdk/src/org.graalvm.nativebridge}/src/org/graalvm/nativebridge/DefaultStackTraceMarshaller.java (100%) rename {compiler/src/jdk.internal.vm.compiler => sdk/src/org.graalvm.nativebridge}/src/org/graalvm/nativebridge/DefaultThrowableMarshaller.java (100%) rename {compiler/src/jdk.internal.vm.compiler => sdk/src/org.graalvm.nativebridge}/src/org/graalvm/nativebridge/EndPointHandle.java (100%) rename {compiler/src/jdk.internal.vm.compiler => sdk/src/org.graalvm.nativebridge}/src/org/graalvm/nativebridge/ForeignException.java (100%) rename {compiler/src/jdk.internal.vm.compiler => sdk/src/org.graalvm.nativebridge}/src/org/graalvm/nativebridge/ForeignExceptionEndPoints.java (100%) rename {compiler/src/jdk.internal.vm.compiler => sdk/src/org.graalvm.nativebridge}/src/org/graalvm/nativebridge/GenerateHotSpotToNativeBridge.java (100%) rename {compiler/src/jdk.internal.vm.compiler => sdk/src/org.graalvm.nativebridge}/src/org/graalvm/nativebridge/GenerateNativeToHotSpotBridge.java (100%) rename {compiler/src/jdk.internal.vm.compiler => sdk/src/org.graalvm.nativebridge}/src/org/graalvm/nativebridge/GenerateNativeToNativeBridge.java (100%) rename {compiler/src/jdk.internal.vm.compiler => sdk/src/org.graalvm.nativebridge}/src/org/graalvm/nativebridge/Idempotent.java (100%) rename {compiler/src/jdk.internal.vm.compiler => sdk/src/org.graalvm.nativebridge}/src/org/graalvm/nativebridge/In.java (100%) rename {compiler/src/jdk.internal.vm.compiler => sdk/src/org.graalvm.nativebridge}/src/org/graalvm/nativebridge/JNIClassCache.java (100%) rename {compiler/src/jdk.internal.vm.compiler => sdk/src/org.graalvm.nativebridge}/src/org/graalvm/nativebridge/JNIConfig.java (100%) rename {compiler/src/jdk.internal.vm.compiler => sdk/src/org.graalvm.nativebridge}/src/org/graalvm/nativebridge/MarshalledException.java (100%) rename {compiler/src/jdk.internal.vm.compiler => sdk/src/org.graalvm.nativebridge}/src/org/graalvm/nativebridge/MarshallerAnnotation.java (100%) rename {compiler/src/jdk.internal.vm.compiler => sdk/src/org.graalvm.nativebridge}/src/org/graalvm/nativebridge/NativeIsolate.java (100%) rename {compiler/src/jdk.internal.vm.compiler => sdk/src/org.graalvm.nativebridge}/src/org/graalvm/nativebridge/NativeIsolateThread.java (100%) rename {compiler/src/jdk.internal.vm.compiler => sdk/src/org.graalvm.nativebridge}/src/org/graalvm/nativebridge/NativeObject.java (100%) rename {compiler/src/jdk.internal.vm.compiler => sdk/src/org.graalvm.nativebridge}/src/org/graalvm/nativebridge/NativeObjectCleaner.java (100%) rename {compiler/src/jdk.internal.vm.compiler => sdk/src/org.graalvm.nativebridge}/src/org/graalvm/nativebridge/NativeObjectHandles.java (100%) rename {compiler/src/jdk.internal.vm.compiler => sdk/src/org.graalvm.nativebridge}/src/org/graalvm/nativebridge/NullableBinaryMarshaller.java (100%) rename {compiler/src/jdk.internal.vm.compiler => sdk/src/org.graalvm.nativebridge}/src/org/graalvm/nativebridge/Out.java (100%) rename {compiler/src/jdk.internal.vm.compiler => sdk/src/org.graalvm.nativebridge}/src/org/graalvm/nativebridge/RawReference.java (100%) rename {compiler/src/jdk.internal.vm.compiler => sdk/src/org.graalvm.nativebridge}/src/org/graalvm/nativebridge/ReceiverMethod.java (100%) rename {compiler/src/jdk.internal.vm.compiler => sdk/src/org.graalvm.nativebridge}/src/org/graalvm/nativebridge/StackTraceElementMarshaller.java (100%) rename {compiler/src/jdk.internal.vm.compiler => sdk/src/org.graalvm.nativebridge}/src/org/graalvm/nativebridge/StringMarshaller.java (100%) rename {compiler/src/jdk.internal.vm.compiler => substratevm/src/com.oracle.svm.graal.hotspot.libgraal}/src/org/graalvm/libgraal/jni/LibGraalJNIMethodScope.java (100%) rename {compiler/src/jdk.internal.vm.compiler => substratevm/src/com.oracle.svm.graal.hotspot.libgraal}/src/org/graalvm/libgraal/jni/LibGraalUtil.java (100%) diff --git a/compiler/mx.compiler/suite.py b/compiler/mx.compiler/suite.py index 2a47278b0958..a17faf7f13b6 100644 --- a/compiler/mx.compiler/suite.py +++ b/compiler/mx.compiler/suite.py @@ -194,8 +194,6 @@ "org.graalvm.compiler.truffle.compiler.phases.inlining.InliningPolicyProvider", ], "annotationProcessors" : [ - "truffle:TRUFFLE_DSL_PROCESSOR", - "truffle:TRUFFLE_LIBGRAAL_PROCESSOR", "GRAAL_PROCESSOR" ], "checkPackagePrefix": "false", @@ -208,7 +206,6 @@ "org.graalvm.libgraal.jni", "org.graalvm.compiler.replacements", "org.graalvm.compiler.hotspot.test", - "org.graalvm.nativebridge.processor.test", "org.graalvm.compiler.replacements.test", "org.graalvm.compiler.api.directives.test", "org.graalvm.compiler.test", @@ -225,7 +222,6 @@ ], }, - "jdk.internal.vm.compiler.processor" : { "subDir" : "src", "sourceDirs" : ["src"], @@ -290,39 +286,6 @@ "jacoco" : "exclude", }, - "org.graalvm.nativebridge.processor" : { - "subDir" : "src", - "sourceDirs" : ["src"], - "dependencies" : [ - "jdk.internal.vm.compiler.processor", - ], - "requires" : [ - "java.compiler" - ], - "annotationProcessors" : [ - ], - "checkstyle" : "jdk.internal.vm.compiler", - "javaCompliance" : "17+", - "workingSets" : "API,Graal", - }, - - "org.graalvm.nativebridge.processor.test" : { - "subDir" : "src", - "sourceDirs" : ["src"], - "dependencies" : [ - "jdk.internal.vm.compiler", - "mx:JUNIT", - ], - "annotationProcessors" : [ - "GRAAL_NATIVEBRIDGE_PROCESSOR", - ], - "checkstyle" : "jdk.internal.vm.compiler", - "javaCompliance" : "17+", - "workingSets" : "Graal,Test", - "jacoco" : "exclude", - "testProject" : True, - }, - "org.graalvm.compiler.management" : { "subDir" : "src", "sourceDirs" : ["src"], @@ -486,7 +449,6 @@ "subDir" : "src", "dependencies" : [ "jdk.internal.vm.compiler.test", - "org.graalvm.nativebridge.processor.test", "org.graalvm.compiler.hotspot.jdk20.test", "org.graalvm.compiler.hotspot.jdk21.test", ], @@ -514,15 +476,6 @@ "maven": False, }, - "GRAAL_NATIVEBRIDGE_PROCESSOR" : { - "subDir" : "src", - "dependencies" : [ - "org.graalvm.nativebridge.processor" - ], - "distDependencies" : ["GRAAL_PROCESSOR"], - "maven": False, - }, - "GRAAL" : { # This distribution defines a module. "moduleInfo" : { diff --git a/sdk/mx.sdk/suite.py b/sdk/mx.sdk/suite.py index 3ad81153d087..a40b74c4e84a 100644 --- a/sdk/mx.sdk/suite.py +++ b/sdk/mx.sdk/suite.py @@ -346,6 +346,58 @@ "javaCompliance" : "17+", "workingSets" : "API,SDK", }, + "org.graalvm.jniutils" : { + "subDir" : "src", + "sourceDirs" : ["src"], + "dependencies" : [ + "GRAAL_SDK", + ], + "requires" : [ + ], + "checkstyle" : "org.graalvm.word", + "javaCompliance" : "17+", + }, + "org.graalvm.nativebridge" : { + "subDir" : "src", + "sourceDirs" : ["src"], + "dependencies" : [ + "JNIUTILS" + ], + "requires" : [ + ], + "checkstyle" : "org.graalvm.word", + "javaCompliance" : "17+", + }, + "org.graalvm.nativebridge.processor" : { + "subDir" : "src", + "sourceDirs" : ["src"], + "dependencies" : [ + ], + "requires" : [ + "java.compiler" + ], + "annotationProcessors" : [ + ], + "checkstyle" : "org.graalvm.word", + "javaCompliance" : "17+", + "workingSets" : "API,Graal", + }, + "org.graalvm.nativebridge.processor.test" : { + "subDir" : "src", + "sourceDirs" : ["src"], + "dependencies" : [ + "mx:JUNIT", + "NATIVEBRIDGE", + ], + "annotationProcessors" : [ + "NATIVEBRIDGE_PROCESSOR", + ], + "checkstyle" : "org.graalvm.word", + "javaCompliance" : "17+", + "workingSets" : "Graal,Test", + "jacoco" : "exclude", + "testProject" : True, + }, "org.graalvm.toolchain.test" : { "class" : "ToolchainTestProject", "subDir" : "src", @@ -471,6 +523,63 @@ "javadocType": "api", "description" : """GraalVM TCK SPI""", }, + "JNIUTILS" : { + "moduleInfo" : { + "name" : "org.graalvm.jniutils", + "exports" : [ + "org.graalvm.jniutils", + ], + "requiresConcealed" : { + "jdk.internal.vm.ci" : [ + "jdk.vm.ci.meta", + "jdk.vm.ci.code", + "jdk.vm.ci.services", + ], + }, + }, + "subDir" : "src", + "dependencies" : ["org.graalvm.jniutils"], + "distDependencies" : ["GRAAL_SDK"], + "description" : "Utilities for JNI calls from within native-image.", + "allowsJavadocWarnings": True, + }, + "NATIVEBRIDGE" : { + "moduleInfo" : { + "name" : "org.graalvm.nativebridge", + "exports" : [ + "org.graalvm.nativebridge", + ], + "requiresConcealed" : { + "jdk.internal.vm.ci" : [ + "jdk.vm.ci.meta", + "jdk.vm.ci.code", + "jdk.vm.ci.services", + ], + }, + }, + "subDir" : "src", + "dependencies" : ["org.graalvm.nativebridge"], + "distDependencies" : ["JNIUTILS"], + "description" : "API and utility classes for nativebridge.", + "allowsJavadocWarnings": True, + }, + "NATIVEBRIDGE_PROCESSOR" : { + "subDir" : "src", + "dependencies" : [ + "org.graalvm.nativebridge.processor" + ], + "distDependencies" : [], + "maven": False, + }, + "NATIVEBRIDGE_PROCESSOR_TEST" : { + "subDir" : "src", + "dependencies" : [ + "org.graalvm.nativebridge.processor.test" + ], + "distDependencies" : ["NATIVEBRIDGE"], + "maven": False, + "testDistribution" : True, + }, "LLVM_TOOLCHAIN": { "native": True, "description": "LLVM with general purpose patches used by Sulong and Native Image", diff --git a/compiler/src/jdk.internal.vm.compiler/src/org/graalvm/jniutils/HSObject.java b/sdk/src/org.graalvm.jniutils/src/org/graalvm/jniutils/HSObject.java similarity index 100% rename from compiler/src/jdk.internal.vm.compiler/src/org/graalvm/jniutils/HSObject.java rename to sdk/src/org.graalvm.jniutils/src/org/graalvm/jniutils/HSObject.java diff --git a/compiler/src/jdk.internal.vm.compiler/src/org/graalvm/jniutils/JNI.java b/sdk/src/org.graalvm.jniutils/src/org/graalvm/jniutils/JNI.java similarity index 100% rename from compiler/src/jdk.internal.vm.compiler/src/org/graalvm/jniutils/JNI.java rename to sdk/src/org.graalvm.jniutils/src/org/graalvm/jniutils/JNI.java diff --git a/compiler/src/jdk.internal.vm.compiler/src/org/graalvm/jniutils/JNICalls.java b/sdk/src/org.graalvm.jniutils/src/org/graalvm/jniutils/JNICalls.java similarity index 100% rename from compiler/src/jdk.internal.vm.compiler/src/org/graalvm/jniutils/JNICalls.java rename to sdk/src/org.graalvm.jniutils/src/org/graalvm/jniutils/JNICalls.java diff --git a/compiler/src/jdk.internal.vm.compiler/src/org/graalvm/jniutils/JNIEntryPoint.java b/sdk/src/org.graalvm.jniutils/src/org/graalvm/jniutils/JNIEntryPoint.java similarity index 100% rename from compiler/src/jdk.internal.vm.compiler/src/org/graalvm/jniutils/JNIEntryPoint.java rename to sdk/src/org.graalvm.jniutils/src/org/graalvm/jniutils/JNIEntryPoint.java diff --git a/compiler/src/jdk.internal.vm.compiler/src/org/graalvm/jniutils/JNIExceptionWrapper.java b/sdk/src/org.graalvm.jniutils/src/org/graalvm/jniutils/JNIExceptionWrapper.java similarity index 100% rename from compiler/src/jdk.internal.vm.compiler/src/org/graalvm/jniutils/JNIExceptionWrapper.java rename to sdk/src/org.graalvm.jniutils/src/org/graalvm/jniutils/JNIExceptionWrapper.java diff --git a/compiler/src/jdk.internal.vm.compiler/src/org/graalvm/jniutils/JNIExceptionWrapperEntryPoints.java b/sdk/src/org.graalvm.jniutils/src/org/graalvm/jniutils/JNIExceptionWrapperEntryPoints.java similarity index 100% rename from compiler/src/jdk.internal.vm.compiler/src/org/graalvm/jniutils/JNIExceptionWrapperEntryPoints.java rename to sdk/src/org.graalvm.jniutils/src/org/graalvm/jniutils/JNIExceptionWrapperEntryPoints.java diff --git a/compiler/src/jdk.internal.vm.compiler/src/org/graalvm/jniutils/JNIMethodScope.java b/sdk/src/org.graalvm.jniutils/src/org/graalvm/jniutils/JNIMethodScope.java similarity index 100% rename from compiler/src/jdk.internal.vm.compiler/src/org/graalvm/jniutils/JNIMethodScope.java rename to sdk/src/org.graalvm.jniutils/src/org/graalvm/jniutils/JNIMethodScope.java diff --git a/compiler/src/jdk.internal.vm.compiler/src/org/graalvm/jniutils/JNIUtil.java b/sdk/src/org.graalvm.jniutils/src/org/graalvm/jniutils/JNIUtil.java similarity index 100% rename from compiler/src/jdk.internal.vm.compiler/src/org/graalvm/jniutils/JNIUtil.java rename to sdk/src/org.graalvm.jniutils/src/org/graalvm/jniutils/JNIUtil.java diff --git a/compiler/src/jdk.internal.vm.compiler/src/org/graalvm/jniutils/NativeBridgeSupport.java b/sdk/src/org.graalvm.jniutils/src/org/graalvm/jniutils/NativeBridgeSupport.java similarity index 100% rename from compiler/src/jdk.internal.vm.compiler/src/org/graalvm/jniutils/NativeBridgeSupport.java rename to sdk/src/org.graalvm.jniutils/src/org/graalvm/jniutils/NativeBridgeSupport.java diff --git a/compiler/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/AbstractService.java b/sdk/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/AbstractService.java similarity index 100% rename from compiler/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/AbstractService.java rename to sdk/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/AbstractService.java diff --git a/compiler/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/BinaryOutputTest.java b/sdk/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/BinaryOutputTest.java similarity index 100% rename from compiler/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/BinaryOutputTest.java rename to sdk/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/BinaryOutputTest.java diff --git a/compiler/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/CustomMarshallerService.java b/sdk/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/CustomMarshallerService.java similarity index 100% rename from compiler/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/CustomMarshallerService.java rename to sdk/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/CustomMarshallerService.java diff --git a/compiler/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/CustomReceiverService.java b/sdk/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/CustomReceiverService.java similarity index 100% rename from compiler/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/CustomReceiverService.java rename to sdk/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/CustomReceiverService.java diff --git a/compiler/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/ExpectError.java b/sdk/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/ExpectError.java similarity index 100% rename from compiler/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/ExpectError.java rename to sdk/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/ExpectError.java diff --git a/compiler/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/OutParameterService.java b/sdk/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/OutParameterService.java similarity index 100% rename from compiler/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/OutParameterService.java rename to sdk/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/OutParameterService.java diff --git a/compiler/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/Service.java b/sdk/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/Service.java similarity index 100% rename from compiler/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/Service.java rename to sdk/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/Service.java diff --git a/compiler/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/ServiceAPI.java b/sdk/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/ServiceAPI.java similarity index 100% rename from compiler/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/ServiceAPI.java rename to sdk/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/ServiceAPI.java diff --git a/compiler/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/TestJNIConfig.java b/sdk/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/TestJNIConfig.java similarity index 100% rename from compiler/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/TestJNIConfig.java rename to sdk/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/TestJNIConfig.java diff --git a/compiler/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/common/InnerClassTest.java b/sdk/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/common/InnerClassTest.java similarity index 100% rename from compiler/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/common/InnerClassTest.java rename to sdk/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/common/InnerClassTest.java diff --git a/compiler/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/common/InvalidBaseType1Test.java b/sdk/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/common/InvalidBaseType1Test.java similarity index 100% rename from compiler/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/common/InvalidBaseType1Test.java rename to sdk/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/common/InvalidBaseType1Test.java diff --git a/compiler/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/common/InvalidBaseType2Test.java b/sdk/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/common/InvalidBaseType2Test.java similarity index 100% rename from compiler/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/common/InvalidBaseType2Test.java rename to sdk/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/common/InvalidBaseType2Test.java diff --git a/compiler/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/common/InvalidBaseType3Test.java b/sdk/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/common/InvalidBaseType3Test.java similarity index 100% rename from compiler/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/common/InvalidBaseType3Test.java rename to sdk/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/common/InvalidBaseType3Test.java diff --git a/compiler/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/common/InvalidConstructorTest.java b/sdk/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/common/InvalidConstructorTest.java similarity index 100% rename from compiler/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/common/InvalidConstructorTest.java rename to sdk/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/common/InvalidConstructorTest.java diff --git a/compiler/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/common/InvalidCustomDispatchAccessor1Test.java b/sdk/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/common/InvalidCustomDispatchAccessor1Test.java similarity index 100% rename from compiler/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/common/InvalidCustomDispatchAccessor1Test.java rename to sdk/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/common/InvalidCustomDispatchAccessor1Test.java diff --git a/compiler/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/common/InvalidCustomDispatchAccessor2Test.java b/sdk/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/common/InvalidCustomDispatchAccessor2Test.java similarity index 100% rename from compiler/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/common/InvalidCustomDispatchAccessor2Test.java rename to sdk/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/common/InvalidCustomDispatchAccessor2Test.java diff --git a/compiler/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/common/InvalidCustomDispatchAccessor3Test.java b/sdk/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/common/InvalidCustomDispatchAccessor3Test.java similarity index 100% rename from compiler/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/common/InvalidCustomDispatchAccessor3Test.java rename to sdk/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/common/InvalidCustomDispatchAccessor3Test.java diff --git a/compiler/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/common/InvalidCustomDispatchAccessor4Test.java b/sdk/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/common/InvalidCustomDispatchAccessor4Test.java similarity index 100% rename from compiler/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/common/InvalidCustomDispatchAccessor4Test.java rename to sdk/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/common/InvalidCustomDispatchAccessor4Test.java diff --git a/compiler/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/common/InvalidCustomDispatchAccessor5Test.java b/sdk/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/common/InvalidCustomDispatchAccessor5Test.java similarity index 100% rename from compiler/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/common/InvalidCustomDispatchAccessor5Test.java rename to sdk/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/common/InvalidCustomDispatchAccessor5Test.java diff --git a/compiler/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/common/InvalidCustomDispatchAccessor6Test.java b/sdk/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/common/InvalidCustomDispatchAccessor6Test.java similarity index 100% rename from compiler/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/common/InvalidCustomDispatchAccessor6Test.java rename to sdk/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/common/InvalidCustomDispatchAccessor6Test.java diff --git a/compiler/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/common/InvalidCustomDispatchAccessor7Test.java b/sdk/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/common/InvalidCustomDispatchAccessor7Test.java similarity index 100% rename from compiler/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/common/InvalidCustomDispatchAccessor7Test.java rename to sdk/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/common/InvalidCustomDispatchAccessor7Test.java diff --git a/compiler/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/common/InvalidCustomDispatchFactory1Test.java b/sdk/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/common/InvalidCustomDispatchFactory1Test.java similarity index 100% rename from compiler/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/common/InvalidCustomDispatchFactory1Test.java rename to sdk/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/common/InvalidCustomDispatchFactory1Test.java diff --git a/compiler/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/common/InvalidCustomDispatchFactory2Test.java b/sdk/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/common/InvalidCustomDispatchFactory2Test.java similarity index 100% rename from compiler/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/common/InvalidCustomDispatchFactory2Test.java rename to sdk/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/common/InvalidCustomDispatchFactory2Test.java diff --git a/compiler/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/common/InvalidCustomDispatchFactory3Test.java b/sdk/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/common/InvalidCustomDispatchFactory3Test.java similarity index 100% rename from compiler/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/common/InvalidCustomDispatchFactory3Test.java rename to sdk/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/common/InvalidCustomDispatchFactory3Test.java diff --git a/compiler/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/common/InvalidCustomDispatchFactory4Test.java b/sdk/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/common/InvalidCustomDispatchFactory4Test.java similarity index 100% rename from compiler/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/common/InvalidCustomDispatchFactory4Test.java rename to sdk/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/common/InvalidCustomDispatchFactory4Test.java diff --git a/compiler/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/common/InvalidCustomDispatchFactory5Test.java b/sdk/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/common/InvalidCustomDispatchFactory5Test.java similarity index 100% rename from compiler/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/common/InvalidCustomDispatchFactory5Test.java rename to sdk/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/common/InvalidCustomDispatchFactory5Test.java diff --git a/compiler/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/common/InvalidCustomDispatchFactory6Test.java b/sdk/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/common/InvalidCustomDispatchFactory6Test.java similarity index 100% rename from compiler/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/common/InvalidCustomDispatchFactory6Test.java rename to sdk/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/common/InvalidCustomDispatchFactory6Test.java diff --git a/compiler/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/common/InvalidCustomDispatchFactory7Test.java b/sdk/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/common/InvalidCustomDispatchFactory7Test.java similarity index 100% rename from compiler/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/common/InvalidCustomDispatchFactory7Test.java rename to sdk/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/common/InvalidCustomDispatchFactory7Test.java diff --git a/compiler/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/common/InvalidCustomDispatchFactory8Test.java b/sdk/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/common/InvalidCustomDispatchFactory8Test.java similarity index 100% rename from compiler/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/common/InvalidCustomDispatchFactory8Test.java rename to sdk/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/common/InvalidCustomDispatchFactory8Test.java diff --git a/compiler/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/common/InvalidCustomReceiverAccessor1Test.java b/sdk/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/common/InvalidCustomReceiverAccessor1Test.java similarity index 100% rename from compiler/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/common/InvalidCustomReceiverAccessor1Test.java rename to sdk/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/common/InvalidCustomReceiverAccessor1Test.java diff --git a/compiler/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/common/InvalidCustomReceiverAccessor2Test.java b/sdk/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/common/InvalidCustomReceiverAccessor2Test.java similarity index 100% rename from compiler/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/common/InvalidCustomReceiverAccessor2Test.java rename to sdk/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/common/InvalidCustomReceiverAccessor2Test.java diff --git a/compiler/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/common/InvalidCustomReceiverAccessor3Test.java b/sdk/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/common/InvalidCustomReceiverAccessor3Test.java similarity index 100% rename from compiler/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/common/InvalidCustomReceiverAccessor3Test.java rename to sdk/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/common/InvalidCustomReceiverAccessor3Test.java diff --git a/compiler/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/common/InvalidCustomReceiverAccessor4Test.java b/sdk/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/common/InvalidCustomReceiverAccessor4Test.java similarity index 100% rename from compiler/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/common/InvalidCustomReceiverAccessor4Test.java rename to sdk/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/common/InvalidCustomReceiverAccessor4Test.java diff --git a/compiler/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/common/InvalidCustomReceiverAccessor5Test.java b/sdk/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/common/InvalidCustomReceiverAccessor5Test.java similarity index 100% rename from compiler/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/common/InvalidCustomReceiverAccessor5Test.java rename to sdk/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/common/InvalidCustomReceiverAccessor5Test.java diff --git a/compiler/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/common/InvalidCustomReceiverAccessor6Test.java b/sdk/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/common/InvalidCustomReceiverAccessor6Test.java similarity index 100% rename from compiler/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/common/InvalidCustomReceiverAccessor6Test.java rename to sdk/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/common/InvalidCustomReceiverAccessor6Test.java diff --git a/compiler/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/common/InvalidCustomReceiverAccessor7Test.java b/sdk/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/common/InvalidCustomReceiverAccessor7Test.java similarity index 100% rename from compiler/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/common/InvalidCustomReceiverAccessor7Test.java rename to sdk/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/common/InvalidCustomReceiverAccessor7Test.java diff --git a/compiler/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/common/InvalidCustomReceiverAccessor8Test.java b/sdk/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/common/InvalidCustomReceiverAccessor8Test.java similarity index 100% rename from compiler/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/common/InvalidCustomReceiverAccessor8Test.java rename to sdk/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/common/InvalidCustomReceiverAccessor8Test.java diff --git a/compiler/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/common/InvalidEndPointHandle1Test.java b/sdk/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/common/InvalidEndPointHandle1Test.java similarity index 100% rename from compiler/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/common/InvalidEndPointHandle1Test.java rename to sdk/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/common/InvalidEndPointHandle1Test.java diff --git a/compiler/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/common/InvalidEndPointHandle2Test.java b/sdk/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/common/InvalidEndPointHandle2Test.java similarity index 100% rename from compiler/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/common/InvalidEndPointHandle2Test.java rename to sdk/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/common/InvalidEndPointHandle2Test.java diff --git a/compiler/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/common/InvalidIdempotentTest.java b/sdk/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/common/InvalidIdempotentTest.java similarity index 100% rename from compiler/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/common/InvalidIdempotentTest.java rename to sdk/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/common/InvalidIdempotentTest.java diff --git a/compiler/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/common/InvalidJNIConfig1Test.java b/sdk/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/common/InvalidJNIConfig1Test.java similarity index 100% rename from compiler/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/common/InvalidJNIConfig1Test.java rename to sdk/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/common/InvalidJNIConfig1Test.java diff --git a/compiler/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/common/InvalidJNIConfig2Test.java b/sdk/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/common/InvalidJNIConfig2Test.java similarity index 100% rename from compiler/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/common/InvalidJNIConfig2Test.java rename to sdk/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/common/InvalidJNIConfig2Test.java diff --git a/compiler/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/common/InvalidJNIConfig3Test.java b/sdk/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/common/InvalidJNIConfig3Test.java similarity index 100% rename from compiler/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/common/InvalidJNIConfig3Test.java rename to sdk/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/common/InvalidJNIConfig3Test.java diff --git a/compiler/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/common/InvalidJNIConfig4Test.java b/sdk/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/common/InvalidJNIConfig4Test.java similarity index 100% rename from compiler/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/common/InvalidJNIConfig4Test.java rename to sdk/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/common/InvalidJNIConfig4Test.java diff --git a/compiler/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/common/InvalidJNIConfig5Test.java b/sdk/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/common/InvalidJNIConfig5Test.java similarity index 100% rename from compiler/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/common/InvalidJNIConfig5Test.java rename to sdk/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/common/InvalidJNIConfig5Test.java diff --git a/compiler/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/common/InvalidMethod1Test.java b/sdk/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/common/InvalidMethod1Test.java similarity index 100% rename from compiler/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/common/InvalidMethod1Test.java rename to sdk/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/common/InvalidMethod1Test.java diff --git a/compiler/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/common/InvalidMethod2Test.java b/sdk/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/common/InvalidMethod2Test.java similarity index 100% rename from compiler/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/common/InvalidMethod2Test.java rename to sdk/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/common/InvalidMethod2Test.java diff --git a/compiler/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/common/InvalidMethod3Test.java b/sdk/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/common/InvalidMethod3Test.java similarity index 100% rename from compiler/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/common/InvalidMethod3Test.java rename to sdk/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/common/InvalidMethod3Test.java diff --git a/compiler/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/common/InvalidMethod4Test.java b/sdk/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/common/InvalidMethod4Test.java similarity index 100% rename from compiler/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/common/InvalidMethod4Test.java rename to sdk/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/common/InvalidMethod4Test.java diff --git a/compiler/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/common/InvalidMethod5Test.java b/sdk/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/common/InvalidMethod5Test.java similarity index 100% rename from compiler/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/common/InvalidMethod5Test.java rename to sdk/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/common/InvalidMethod5Test.java diff --git a/compiler/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/common/TestAnnotation1.java b/sdk/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/common/TestAnnotation1.java similarity index 100% rename from compiler/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/common/TestAnnotation1.java rename to sdk/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/common/TestAnnotation1.java diff --git a/compiler/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/common/TestAnnotation2.java b/sdk/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/common/TestAnnotation2.java similarity index 100% rename from compiler/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/common/TestAnnotation2.java rename to sdk/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/common/TestAnnotation2.java diff --git a/compiler/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/hstonative/NativeClassImlTest.java b/sdk/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/hstonative/NativeClassImlTest.java similarity index 100% rename from compiler/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/hstonative/NativeClassImlTest.java rename to sdk/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/hstonative/NativeClassImlTest.java diff --git a/compiler/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/hstonative/NativeCustomMarshallerTest.java b/sdk/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/hstonative/NativeCustomMarshallerTest.java similarity index 100% rename from compiler/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/hstonative/NativeCustomMarshallerTest.java rename to sdk/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/hstonative/NativeCustomMarshallerTest.java diff --git a/compiler/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/hstonative/NativeCustomReceiverImplTest.java b/sdk/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/hstonative/NativeCustomReceiverImplTest.java similarity index 100% rename from compiler/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/hstonative/NativeCustomReceiverImplTest.java rename to sdk/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/hstonative/NativeCustomReceiverImplTest.java diff --git a/compiler/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/hstonative/NativeInterfaceImplTest.java b/sdk/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/hstonative/NativeInterfaceImplTest.java similarity index 100% rename from compiler/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/hstonative/NativeInterfaceImplTest.java rename to sdk/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/hstonative/NativeInterfaceImplTest.java diff --git a/compiler/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/hstonative/NativeInvalidBaseTypeTest.java b/sdk/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/hstonative/NativeInvalidBaseTypeTest.java similarity index 100% rename from compiler/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/hstonative/NativeInvalidBaseTypeTest.java rename to sdk/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/hstonative/NativeInvalidBaseTypeTest.java diff --git a/compiler/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/hstonative/NativeInvalidConstructor1Test.java b/sdk/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/hstonative/NativeInvalidConstructor1Test.java similarity index 100% rename from compiler/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/hstonative/NativeInvalidConstructor1Test.java rename to sdk/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/hstonative/NativeInvalidConstructor1Test.java diff --git a/compiler/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/hstonative/NativeInvalidConstructor2Test.java b/sdk/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/hstonative/NativeInvalidConstructor2Test.java similarity index 100% rename from compiler/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/hstonative/NativeInvalidConstructor2Test.java rename to sdk/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/hstonative/NativeInvalidConstructor2Test.java diff --git a/compiler/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/hstonative/NativeInvalidEndPointHandleTest.java b/sdk/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/hstonative/NativeInvalidEndPointHandleTest.java similarity index 100% rename from compiler/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/hstonative/NativeInvalidEndPointHandleTest.java rename to sdk/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/hstonative/NativeInvalidEndPointHandleTest.java diff --git a/compiler/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/hstonative/NativeOutParameterService.java b/sdk/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/hstonative/NativeOutParameterService.java similarity index 100% rename from compiler/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/hstonative/NativeOutParameterService.java rename to sdk/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/hstonative/NativeOutParameterService.java diff --git a/compiler/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/nativetohs/HSClassImplTest.java b/sdk/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/nativetohs/HSClassImplTest.java similarity index 100% rename from compiler/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/nativetohs/HSClassImplTest.java rename to sdk/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/nativetohs/HSClassImplTest.java diff --git a/compiler/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/nativetohs/HSCustomMarshallerTest.java b/sdk/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/nativetohs/HSCustomMarshallerTest.java similarity index 100% rename from compiler/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/nativetohs/HSCustomMarshallerTest.java rename to sdk/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/nativetohs/HSCustomMarshallerTest.java diff --git a/compiler/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/nativetohs/HSCustomReceiverImplTest.java b/sdk/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/nativetohs/HSCustomReceiverImplTest.java similarity index 100% rename from compiler/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/nativetohs/HSCustomReceiverImplTest.java rename to sdk/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/nativetohs/HSCustomReceiverImplTest.java diff --git a/compiler/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/nativetohs/HSInterfaceImplTest.java b/sdk/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/nativetohs/HSInterfaceImplTest.java similarity index 100% rename from compiler/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/nativetohs/HSInterfaceImplTest.java rename to sdk/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/nativetohs/HSInterfaceImplTest.java diff --git a/compiler/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/nativetohs/HSInvalidBaseTypeTest.java b/sdk/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/nativetohs/HSInvalidBaseTypeTest.java similarity index 100% rename from compiler/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/nativetohs/HSInvalidBaseTypeTest.java rename to sdk/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/nativetohs/HSInvalidBaseTypeTest.java diff --git a/compiler/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/nativetohs/HSInvalidConstructor1Test.java b/sdk/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/nativetohs/HSInvalidConstructor1Test.java similarity index 100% rename from compiler/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/nativetohs/HSInvalidConstructor1Test.java rename to sdk/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/nativetohs/HSInvalidConstructor1Test.java diff --git a/compiler/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/nativetohs/HSInvalidConstructor2Test.java b/sdk/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/nativetohs/HSInvalidConstructor2Test.java similarity index 100% rename from compiler/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/nativetohs/HSInvalidConstructor2Test.java rename to sdk/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/nativetohs/HSInvalidConstructor2Test.java diff --git a/compiler/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/nativetohs/HSInvalidEndPointHandleTest.java b/sdk/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/nativetohs/HSInvalidEndPointHandleTest.java similarity index 100% rename from compiler/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/nativetohs/HSInvalidEndPointHandleTest.java rename to sdk/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/nativetohs/HSInvalidEndPointHandleTest.java diff --git a/compiler/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/nativetohs/HSOutParameterService.java b/sdk/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/nativetohs/HSOutParameterService.java similarity index 100% rename from compiler/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/nativetohs/HSOutParameterService.java rename to sdk/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/nativetohs/HSOutParameterService.java diff --git a/compiler/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/nativetonative/MixedNativeToNativeServiceDifferentConfigs.java b/sdk/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/nativetonative/MixedNativeToNativeServiceDifferentConfigs.java similarity index 100% rename from compiler/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/nativetonative/MixedNativeToNativeServiceDifferentConfigs.java rename to sdk/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/nativetonative/MixedNativeToNativeServiceDifferentConfigs.java diff --git a/compiler/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/nativetonative/MixedNativeToNativeServiceSameConfig.java b/sdk/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/nativetonative/MixedNativeToNativeServiceSameConfig.java similarity index 100% rename from compiler/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/nativetonative/MixedNativeToNativeServiceSameConfig.java rename to sdk/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/nativetonative/MixedNativeToNativeServiceSameConfig.java diff --git a/compiler/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/nativetonative/PureNativeToNativeService.java b/sdk/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/nativetonative/PureNativeToNativeService.java similarity index 100% rename from compiler/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/nativetonative/PureNativeToNativeService.java rename to sdk/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/nativetonative/PureNativeToNativeService.java diff --git a/compiler/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/references/Context.java b/sdk/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/references/Context.java similarity index 100% rename from compiler/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/references/Context.java rename to sdk/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/references/Context.java diff --git a/compiler/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/references/CustomLanguageDispatch.java b/sdk/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/references/CustomLanguageDispatch.java similarity index 100% rename from compiler/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/references/CustomLanguageDispatch.java rename to sdk/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/references/CustomLanguageDispatch.java diff --git a/compiler/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/references/HSAlwaysByReferenceHandler.java b/sdk/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/references/HSAlwaysByReferenceHandler.java similarity index 100% rename from compiler/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/references/HSAlwaysByReferenceHandler.java rename to sdk/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/references/HSAlwaysByReferenceHandler.java diff --git a/compiler/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/references/HSHandler.java b/sdk/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/references/HSHandler.java similarity index 100% rename from compiler/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/references/HSHandler.java rename to sdk/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/references/HSHandler.java diff --git a/compiler/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/references/HSReferenceArrayOperations.java b/sdk/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/references/HSReferenceArrayOperations.java similarity index 100% rename from compiler/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/references/HSReferenceArrayOperations.java rename to sdk/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/references/HSReferenceArrayOperations.java diff --git a/compiler/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/references/Handler.java b/sdk/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/references/Handler.java similarity index 100% rename from compiler/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/references/Handler.java rename to sdk/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/references/Handler.java diff --git a/compiler/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/references/LanguageAPI.java b/sdk/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/references/LanguageAPI.java similarity index 100% rename from compiler/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/references/LanguageAPI.java rename to sdk/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/references/LanguageAPI.java diff --git a/compiler/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/references/NativeContext.java b/sdk/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/references/NativeContext.java similarity index 100% rename from compiler/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/references/NativeContext.java rename to sdk/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/references/NativeContext.java diff --git a/compiler/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/references/NativeCustomLanguageDispatch.java b/sdk/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/references/NativeCustomLanguageDispatch.java similarity index 100% rename from compiler/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/references/NativeCustomLanguageDispatch.java rename to sdk/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/references/NativeCustomLanguageDispatch.java diff --git a/compiler/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/references/NativeRecord.java b/sdk/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/references/NativeRecord.java similarity index 100% rename from compiler/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/references/NativeRecord.java rename to sdk/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/references/NativeRecord.java diff --git a/compiler/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/references/NativeReferenceArrayOperations.java b/sdk/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/references/NativeReferenceArrayOperations.java similarity index 100% rename from compiler/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/references/NativeReferenceArrayOperations.java rename to sdk/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/references/NativeReferenceArrayOperations.java diff --git a/compiler/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/references/NativeService.java b/sdk/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/references/NativeService.java similarity index 100% rename from compiler/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/references/NativeService.java rename to sdk/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/references/NativeService.java diff --git a/compiler/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/references/Record.java b/sdk/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/references/Record.java similarity index 100% rename from compiler/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/references/Record.java rename to sdk/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/references/Record.java diff --git a/compiler/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/references/ReferenceArrayOperations.java b/sdk/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/references/ReferenceArrayOperations.java similarity index 100% rename from compiler/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/references/ReferenceArrayOperations.java rename to sdk/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/references/ReferenceArrayOperations.java diff --git a/compiler/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/references/Service.java b/sdk/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/references/Service.java similarity index 100% rename from compiler/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/references/Service.java rename to sdk/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/references/Service.java diff --git a/compiler/src/org.graalvm.nativebridge.processor/src/META-INF/services/javax.annotation.processing.Processor b/sdk/src/org.graalvm.nativebridge.processor/src/META-INF/services/javax.annotation.processing.Processor similarity index 100% rename from compiler/src/org.graalvm.nativebridge.processor/src/META-INF/services/javax.annotation.processing.Processor rename to sdk/src/org.graalvm.nativebridge.processor/src/META-INF/services/javax.annotation.processing.Processor diff --git a/compiler/src/org.graalvm.nativebridge.processor/src/org/graalvm/nativebridge/processor/AbstractBridgeGenerator.java b/sdk/src/org.graalvm.nativebridge.processor/src/org/graalvm/nativebridge/processor/AbstractBridgeGenerator.java similarity index 100% rename from compiler/src/org.graalvm.nativebridge.processor/src/org/graalvm/nativebridge/processor/AbstractBridgeGenerator.java rename to sdk/src/org.graalvm.nativebridge.processor/src/org/graalvm/nativebridge/processor/AbstractBridgeGenerator.java diff --git a/compiler/src/org.graalvm.nativebridge.processor/src/org/graalvm/nativebridge/processor/AbstractBridgeParser.java b/sdk/src/org.graalvm.nativebridge.processor/src/org/graalvm/nativebridge/processor/AbstractBridgeParser.java similarity index 100% rename from compiler/src/org.graalvm.nativebridge.processor/src/org/graalvm/nativebridge/processor/AbstractBridgeParser.java rename to sdk/src/org.graalvm.nativebridge.processor/src/org/graalvm/nativebridge/processor/AbstractBridgeParser.java diff --git a/compiler/src/org.graalvm.nativebridge.processor/src/org/graalvm/nativebridge/processor/AbstractProcessor.java b/sdk/src/org.graalvm.nativebridge.processor/src/org/graalvm/nativebridge/processor/AbstractProcessor.java similarity index 100% rename from compiler/src/org.graalvm.nativebridge.processor/src/org/graalvm/nativebridge/processor/AbstractProcessor.java rename to sdk/src/org.graalvm.nativebridge.processor/src/org/graalvm/nativebridge/processor/AbstractProcessor.java diff --git a/compiler/src/org.graalvm.nativebridge.processor/src/org/graalvm/nativebridge/processor/CodeBuilder.java b/sdk/src/org.graalvm.nativebridge.processor/src/org/graalvm/nativebridge/processor/CodeBuilder.java similarity index 100% rename from compiler/src/org.graalvm.nativebridge.processor/src/org/graalvm/nativebridge/processor/CodeBuilder.java rename to sdk/src/org.graalvm.nativebridge.processor/src/org/graalvm/nativebridge/processor/CodeBuilder.java diff --git a/compiler/src/org.graalvm.nativebridge.processor/src/org/graalvm/nativebridge/processor/ExpectError.java b/sdk/src/org.graalvm.nativebridge.processor/src/org/graalvm/nativebridge/processor/ExpectError.java similarity index 100% rename from compiler/src/org.graalvm.nativebridge.processor/src/org/graalvm/nativebridge/processor/ExpectError.java rename to sdk/src/org.graalvm.nativebridge.processor/src/org/graalvm/nativebridge/processor/ExpectError.java diff --git a/compiler/src/org.graalvm.nativebridge.processor/src/org/graalvm/nativebridge/processor/HotSpotToNativeBridgeGenerator.java b/sdk/src/org.graalvm.nativebridge.processor/src/org/graalvm/nativebridge/processor/HotSpotToNativeBridgeGenerator.java similarity index 100% rename from compiler/src/org.graalvm.nativebridge.processor/src/org/graalvm/nativebridge/processor/HotSpotToNativeBridgeGenerator.java rename to sdk/src/org.graalvm.nativebridge.processor/src/org/graalvm/nativebridge/processor/HotSpotToNativeBridgeGenerator.java diff --git a/compiler/src/org.graalvm.nativebridge.processor/src/org/graalvm/nativebridge/processor/HotSpotToNativeBridgeParser.java b/sdk/src/org.graalvm.nativebridge.processor/src/org/graalvm/nativebridge/processor/HotSpotToNativeBridgeParser.java similarity index 100% rename from compiler/src/org.graalvm.nativebridge.processor/src/org/graalvm/nativebridge/processor/HotSpotToNativeBridgeParser.java rename to sdk/src/org.graalvm.nativebridge.processor/src/org/graalvm/nativebridge/processor/HotSpotToNativeBridgeParser.java diff --git a/compiler/src/org.graalvm.nativebridge.processor/src/org/graalvm/nativebridge/processor/NativeBridgeProcessor.java b/sdk/src/org.graalvm.nativebridge.processor/src/org/graalvm/nativebridge/processor/NativeBridgeProcessor.java similarity index 100% rename from compiler/src/org.graalvm.nativebridge.processor/src/org/graalvm/nativebridge/processor/NativeBridgeProcessor.java rename to sdk/src/org.graalvm.nativebridge.processor/src/org/graalvm/nativebridge/processor/NativeBridgeProcessor.java diff --git a/compiler/src/org.graalvm.nativebridge.processor/src/org/graalvm/nativebridge/processor/NativeToHotSpotBridgeGenerator.java b/sdk/src/org.graalvm.nativebridge.processor/src/org/graalvm/nativebridge/processor/NativeToHotSpotBridgeGenerator.java similarity index 100% rename from compiler/src/org.graalvm.nativebridge.processor/src/org/graalvm/nativebridge/processor/NativeToHotSpotBridgeGenerator.java rename to sdk/src/org.graalvm.nativebridge.processor/src/org/graalvm/nativebridge/processor/NativeToHotSpotBridgeGenerator.java diff --git a/compiler/src/org.graalvm.nativebridge.processor/src/org/graalvm/nativebridge/processor/NativeToHotSpotBridgeParser.java b/sdk/src/org.graalvm.nativebridge.processor/src/org/graalvm/nativebridge/processor/NativeToHotSpotBridgeParser.java similarity index 100% rename from compiler/src/org.graalvm.nativebridge.processor/src/org/graalvm/nativebridge/processor/NativeToHotSpotBridgeParser.java rename to sdk/src/org.graalvm.nativebridge.processor/src/org/graalvm/nativebridge/processor/NativeToHotSpotBridgeParser.java diff --git a/compiler/src/org.graalvm.nativebridge.processor/src/org/graalvm/nativebridge/processor/NativeToNativeBridgeGenerator.java b/sdk/src/org.graalvm.nativebridge.processor/src/org/graalvm/nativebridge/processor/NativeToNativeBridgeGenerator.java similarity index 100% rename from compiler/src/org.graalvm.nativebridge.processor/src/org/graalvm/nativebridge/processor/NativeToNativeBridgeGenerator.java rename to sdk/src/org.graalvm.nativebridge.processor/src/org/graalvm/nativebridge/processor/NativeToNativeBridgeGenerator.java diff --git a/compiler/src/org.graalvm.nativebridge.processor/src/org/graalvm/nativebridge/processor/NativeToNativeBridgeParser.java b/sdk/src/org.graalvm.nativebridge.processor/src/org/graalvm/nativebridge/processor/NativeToNativeBridgeParser.java similarity index 100% rename from compiler/src/org.graalvm.nativebridge.processor/src/org/graalvm/nativebridge/processor/NativeToNativeBridgeParser.java rename to sdk/src/org.graalvm.nativebridge.processor/src/org/graalvm/nativebridge/processor/NativeToNativeBridgeParser.java diff --git a/compiler/src/org.graalvm.nativebridge.processor/src/org/graalvm/nativebridge/processor/SuppressFBWarnings.java b/sdk/src/org.graalvm.nativebridge.processor/src/org/graalvm/nativebridge/processor/SuppressFBWarnings.java similarity index 100% rename from compiler/src/org.graalvm.nativebridge.processor/src/org/graalvm/nativebridge/processor/SuppressFBWarnings.java rename to sdk/src/org.graalvm.nativebridge.processor/src/org/graalvm/nativebridge/processor/SuppressFBWarnings.java diff --git a/compiler/src/org.graalvm.nativebridge.processor/src/org/graalvm/nativebridge/processor/Utilities.java b/sdk/src/org.graalvm.nativebridge.processor/src/org/graalvm/nativebridge/processor/Utilities.java similarity index 100% rename from compiler/src/org.graalvm.nativebridge.processor/src/org/graalvm/nativebridge/processor/Utilities.java rename to sdk/src/org.graalvm.nativebridge.processor/src/org/graalvm/nativebridge/processor/Utilities.java diff --git a/compiler/src/jdk.internal.vm.compiler/src/org/graalvm/nativebridge/AlwaysByReference.java b/sdk/src/org.graalvm.nativebridge/src/org/graalvm/nativebridge/AlwaysByReference.java similarity index 100% rename from compiler/src/jdk.internal.vm.compiler/src/org/graalvm/nativebridge/AlwaysByReference.java rename to sdk/src/org.graalvm.nativebridge/src/org/graalvm/nativebridge/AlwaysByReference.java diff --git a/compiler/src/jdk.internal.vm.compiler/src/org/graalvm/nativebridge/AlwaysByReferenceRepeated.java b/sdk/src/org.graalvm.nativebridge/src/org/graalvm/nativebridge/AlwaysByReferenceRepeated.java similarity index 100% rename from compiler/src/jdk.internal.vm.compiler/src/org/graalvm/nativebridge/AlwaysByReferenceRepeated.java rename to sdk/src/org.graalvm.nativebridge/src/org/graalvm/nativebridge/AlwaysByReferenceRepeated.java diff --git a/compiler/src/jdk.internal.vm.compiler/src/org/graalvm/nativebridge/BinaryInput.java b/sdk/src/org.graalvm.nativebridge/src/org/graalvm/nativebridge/BinaryInput.java similarity index 100% rename from compiler/src/jdk.internal.vm.compiler/src/org/graalvm/nativebridge/BinaryInput.java rename to sdk/src/org.graalvm.nativebridge/src/org/graalvm/nativebridge/BinaryInput.java diff --git a/compiler/src/jdk.internal.vm.compiler/src/org/graalvm/nativebridge/BinaryMarshaller.java b/sdk/src/org.graalvm.nativebridge/src/org/graalvm/nativebridge/BinaryMarshaller.java similarity index 100% rename from compiler/src/jdk.internal.vm.compiler/src/org/graalvm/nativebridge/BinaryMarshaller.java rename to sdk/src/org.graalvm.nativebridge/src/org/graalvm/nativebridge/BinaryMarshaller.java diff --git a/compiler/src/jdk.internal.vm.compiler/src/org/graalvm/nativebridge/BinaryOutput.java b/sdk/src/org.graalvm.nativebridge/src/org/graalvm/nativebridge/BinaryOutput.java similarity index 100% rename from compiler/src/jdk.internal.vm.compiler/src/org/graalvm/nativebridge/BinaryOutput.java rename to sdk/src/org.graalvm.nativebridge/src/org/graalvm/nativebridge/BinaryOutput.java diff --git a/compiler/src/jdk.internal.vm.compiler/src/org/graalvm/nativebridge/ByReference.java b/sdk/src/org.graalvm.nativebridge/src/org/graalvm/nativebridge/ByReference.java similarity index 100% rename from compiler/src/jdk.internal.vm.compiler/src/org/graalvm/nativebridge/ByReference.java rename to sdk/src/org.graalvm.nativebridge/src/org/graalvm/nativebridge/ByReference.java diff --git a/compiler/src/jdk.internal.vm.compiler/src/org/graalvm/nativebridge/CustomDispatchAccessor.java b/sdk/src/org.graalvm.nativebridge/src/org/graalvm/nativebridge/CustomDispatchAccessor.java similarity index 100% rename from compiler/src/jdk.internal.vm.compiler/src/org/graalvm/nativebridge/CustomDispatchAccessor.java rename to sdk/src/org.graalvm.nativebridge/src/org/graalvm/nativebridge/CustomDispatchAccessor.java diff --git a/compiler/src/jdk.internal.vm.compiler/src/org/graalvm/nativebridge/CustomDispatchFactory.java b/sdk/src/org.graalvm.nativebridge/src/org/graalvm/nativebridge/CustomDispatchFactory.java similarity index 100% rename from compiler/src/jdk.internal.vm.compiler/src/org/graalvm/nativebridge/CustomDispatchFactory.java rename to sdk/src/org.graalvm.nativebridge/src/org/graalvm/nativebridge/CustomDispatchFactory.java diff --git a/compiler/src/jdk.internal.vm.compiler/src/org/graalvm/nativebridge/CustomReceiverAccessor.java b/sdk/src/org.graalvm.nativebridge/src/org/graalvm/nativebridge/CustomReceiverAccessor.java similarity index 100% rename from compiler/src/jdk.internal.vm.compiler/src/org/graalvm/nativebridge/CustomReceiverAccessor.java rename to sdk/src/org.graalvm.nativebridge/src/org/graalvm/nativebridge/CustomReceiverAccessor.java diff --git a/compiler/src/jdk.internal.vm.compiler/src/org/graalvm/nativebridge/DefaultStackTraceMarshaller.java b/sdk/src/org.graalvm.nativebridge/src/org/graalvm/nativebridge/DefaultStackTraceMarshaller.java similarity index 100% rename from compiler/src/jdk.internal.vm.compiler/src/org/graalvm/nativebridge/DefaultStackTraceMarshaller.java rename to sdk/src/org.graalvm.nativebridge/src/org/graalvm/nativebridge/DefaultStackTraceMarshaller.java diff --git a/compiler/src/jdk.internal.vm.compiler/src/org/graalvm/nativebridge/DefaultThrowableMarshaller.java b/sdk/src/org.graalvm.nativebridge/src/org/graalvm/nativebridge/DefaultThrowableMarshaller.java similarity index 100% rename from compiler/src/jdk.internal.vm.compiler/src/org/graalvm/nativebridge/DefaultThrowableMarshaller.java rename to sdk/src/org.graalvm.nativebridge/src/org/graalvm/nativebridge/DefaultThrowableMarshaller.java diff --git a/compiler/src/jdk.internal.vm.compiler/src/org/graalvm/nativebridge/EndPointHandle.java b/sdk/src/org.graalvm.nativebridge/src/org/graalvm/nativebridge/EndPointHandle.java similarity index 100% rename from compiler/src/jdk.internal.vm.compiler/src/org/graalvm/nativebridge/EndPointHandle.java rename to sdk/src/org.graalvm.nativebridge/src/org/graalvm/nativebridge/EndPointHandle.java diff --git a/compiler/src/jdk.internal.vm.compiler/src/org/graalvm/nativebridge/ForeignException.java b/sdk/src/org.graalvm.nativebridge/src/org/graalvm/nativebridge/ForeignException.java similarity index 100% rename from compiler/src/jdk.internal.vm.compiler/src/org/graalvm/nativebridge/ForeignException.java rename to sdk/src/org.graalvm.nativebridge/src/org/graalvm/nativebridge/ForeignException.java diff --git a/compiler/src/jdk.internal.vm.compiler/src/org/graalvm/nativebridge/ForeignExceptionEndPoints.java b/sdk/src/org.graalvm.nativebridge/src/org/graalvm/nativebridge/ForeignExceptionEndPoints.java similarity index 100% rename from compiler/src/jdk.internal.vm.compiler/src/org/graalvm/nativebridge/ForeignExceptionEndPoints.java rename to sdk/src/org.graalvm.nativebridge/src/org/graalvm/nativebridge/ForeignExceptionEndPoints.java diff --git a/compiler/src/jdk.internal.vm.compiler/src/org/graalvm/nativebridge/GenerateHotSpotToNativeBridge.java b/sdk/src/org.graalvm.nativebridge/src/org/graalvm/nativebridge/GenerateHotSpotToNativeBridge.java similarity index 100% rename from compiler/src/jdk.internal.vm.compiler/src/org/graalvm/nativebridge/GenerateHotSpotToNativeBridge.java rename to sdk/src/org.graalvm.nativebridge/src/org/graalvm/nativebridge/GenerateHotSpotToNativeBridge.java diff --git a/compiler/src/jdk.internal.vm.compiler/src/org/graalvm/nativebridge/GenerateNativeToHotSpotBridge.java b/sdk/src/org.graalvm.nativebridge/src/org/graalvm/nativebridge/GenerateNativeToHotSpotBridge.java similarity index 100% rename from compiler/src/jdk.internal.vm.compiler/src/org/graalvm/nativebridge/GenerateNativeToHotSpotBridge.java rename to sdk/src/org.graalvm.nativebridge/src/org/graalvm/nativebridge/GenerateNativeToHotSpotBridge.java diff --git a/compiler/src/jdk.internal.vm.compiler/src/org/graalvm/nativebridge/GenerateNativeToNativeBridge.java b/sdk/src/org.graalvm.nativebridge/src/org/graalvm/nativebridge/GenerateNativeToNativeBridge.java similarity index 100% rename from compiler/src/jdk.internal.vm.compiler/src/org/graalvm/nativebridge/GenerateNativeToNativeBridge.java rename to sdk/src/org.graalvm.nativebridge/src/org/graalvm/nativebridge/GenerateNativeToNativeBridge.java diff --git a/compiler/src/jdk.internal.vm.compiler/src/org/graalvm/nativebridge/Idempotent.java b/sdk/src/org.graalvm.nativebridge/src/org/graalvm/nativebridge/Idempotent.java similarity index 100% rename from compiler/src/jdk.internal.vm.compiler/src/org/graalvm/nativebridge/Idempotent.java rename to sdk/src/org.graalvm.nativebridge/src/org/graalvm/nativebridge/Idempotent.java diff --git a/compiler/src/jdk.internal.vm.compiler/src/org/graalvm/nativebridge/In.java b/sdk/src/org.graalvm.nativebridge/src/org/graalvm/nativebridge/In.java similarity index 100% rename from compiler/src/jdk.internal.vm.compiler/src/org/graalvm/nativebridge/In.java rename to sdk/src/org.graalvm.nativebridge/src/org/graalvm/nativebridge/In.java diff --git a/compiler/src/jdk.internal.vm.compiler/src/org/graalvm/nativebridge/JNIClassCache.java b/sdk/src/org.graalvm.nativebridge/src/org/graalvm/nativebridge/JNIClassCache.java similarity index 100% rename from compiler/src/jdk.internal.vm.compiler/src/org/graalvm/nativebridge/JNIClassCache.java rename to sdk/src/org.graalvm.nativebridge/src/org/graalvm/nativebridge/JNIClassCache.java diff --git a/compiler/src/jdk.internal.vm.compiler/src/org/graalvm/nativebridge/JNIConfig.java b/sdk/src/org.graalvm.nativebridge/src/org/graalvm/nativebridge/JNIConfig.java similarity index 100% rename from compiler/src/jdk.internal.vm.compiler/src/org/graalvm/nativebridge/JNIConfig.java rename to sdk/src/org.graalvm.nativebridge/src/org/graalvm/nativebridge/JNIConfig.java diff --git a/compiler/src/jdk.internal.vm.compiler/src/org/graalvm/nativebridge/MarshalledException.java b/sdk/src/org.graalvm.nativebridge/src/org/graalvm/nativebridge/MarshalledException.java similarity index 100% rename from compiler/src/jdk.internal.vm.compiler/src/org/graalvm/nativebridge/MarshalledException.java rename to sdk/src/org.graalvm.nativebridge/src/org/graalvm/nativebridge/MarshalledException.java diff --git a/compiler/src/jdk.internal.vm.compiler/src/org/graalvm/nativebridge/MarshallerAnnotation.java b/sdk/src/org.graalvm.nativebridge/src/org/graalvm/nativebridge/MarshallerAnnotation.java similarity index 100% rename from compiler/src/jdk.internal.vm.compiler/src/org/graalvm/nativebridge/MarshallerAnnotation.java rename to sdk/src/org.graalvm.nativebridge/src/org/graalvm/nativebridge/MarshallerAnnotation.java diff --git a/compiler/src/jdk.internal.vm.compiler/src/org/graalvm/nativebridge/NativeIsolate.java b/sdk/src/org.graalvm.nativebridge/src/org/graalvm/nativebridge/NativeIsolate.java similarity index 100% rename from compiler/src/jdk.internal.vm.compiler/src/org/graalvm/nativebridge/NativeIsolate.java rename to sdk/src/org.graalvm.nativebridge/src/org/graalvm/nativebridge/NativeIsolate.java diff --git a/compiler/src/jdk.internal.vm.compiler/src/org/graalvm/nativebridge/NativeIsolateThread.java b/sdk/src/org.graalvm.nativebridge/src/org/graalvm/nativebridge/NativeIsolateThread.java similarity index 100% rename from compiler/src/jdk.internal.vm.compiler/src/org/graalvm/nativebridge/NativeIsolateThread.java rename to sdk/src/org.graalvm.nativebridge/src/org/graalvm/nativebridge/NativeIsolateThread.java diff --git a/compiler/src/jdk.internal.vm.compiler/src/org/graalvm/nativebridge/NativeObject.java b/sdk/src/org.graalvm.nativebridge/src/org/graalvm/nativebridge/NativeObject.java similarity index 100% rename from compiler/src/jdk.internal.vm.compiler/src/org/graalvm/nativebridge/NativeObject.java rename to sdk/src/org.graalvm.nativebridge/src/org/graalvm/nativebridge/NativeObject.java diff --git a/compiler/src/jdk.internal.vm.compiler/src/org/graalvm/nativebridge/NativeObjectCleaner.java b/sdk/src/org.graalvm.nativebridge/src/org/graalvm/nativebridge/NativeObjectCleaner.java similarity index 100% rename from compiler/src/jdk.internal.vm.compiler/src/org/graalvm/nativebridge/NativeObjectCleaner.java rename to sdk/src/org.graalvm.nativebridge/src/org/graalvm/nativebridge/NativeObjectCleaner.java diff --git a/compiler/src/jdk.internal.vm.compiler/src/org/graalvm/nativebridge/NativeObjectHandles.java b/sdk/src/org.graalvm.nativebridge/src/org/graalvm/nativebridge/NativeObjectHandles.java similarity index 100% rename from compiler/src/jdk.internal.vm.compiler/src/org/graalvm/nativebridge/NativeObjectHandles.java rename to sdk/src/org.graalvm.nativebridge/src/org/graalvm/nativebridge/NativeObjectHandles.java diff --git a/compiler/src/jdk.internal.vm.compiler/src/org/graalvm/nativebridge/NullableBinaryMarshaller.java b/sdk/src/org.graalvm.nativebridge/src/org/graalvm/nativebridge/NullableBinaryMarshaller.java similarity index 100% rename from compiler/src/jdk.internal.vm.compiler/src/org/graalvm/nativebridge/NullableBinaryMarshaller.java rename to sdk/src/org.graalvm.nativebridge/src/org/graalvm/nativebridge/NullableBinaryMarshaller.java diff --git a/compiler/src/jdk.internal.vm.compiler/src/org/graalvm/nativebridge/Out.java b/sdk/src/org.graalvm.nativebridge/src/org/graalvm/nativebridge/Out.java similarity index 100% rename from compiler/src/jdk.internal.vm.compiler/src/org/graalvm/nativebridge/Out.java rename to sdk/src/org.graalvm.nativebridge/src/org/graalvm/nativebridge/Out.java diff --git a/compiler/src/jdk.internal.vm.compiler/src/org/graalvm/nativebridge/RawReference.java b/sdk/src/org.graalvm.nativebridge/src/org/graalvm/nativebridge/RawReference.java similarity index 100% rename from compiler/src/jdk.internal.vm.compiler/src/org/graalvm/nativebridge/RawReference.java rename to sdk/src/org.graalvm.nativebridge/src/org/graalvm/nativebridge/RawReference.java diff --git a/compiler/src/jdk.internal.vm.compiler/src/org/graalvm/nativebridge/ReceiverMethod.java b/sdk/src/org.graalvm.nativebridge/src/org/graalvm/nativebridge/ReceiverMethod.java similarity index 100% rename from compiler/src/jdk.internal.vm.compiler/src/org/graalvm/nativebridge/ReceiverMethod.java rename to sdk/src/org.graalvm.nativebridge/src/org/graalvm/nativebridge/ReceiverMethod.java diff --git a/compiler/src/jdk.internal.vm.compiler/src/org/graalvm/nativebridge/StackTraceElementMarshaller.java b/sdk/src/org.graalvm.nativebridge/src/org/graalvm/nativebridge/StackTraceElementMarshaller.java similarity index 100% rename from compiler/src/jdk.internal.vm.compiler/src/org/graalvm/nativebridge/StackTraceElementMarshaller.java rename to sdk/src/org.graalvm.nativebridge/src/org/graalvm/nativebridge/StackTraceElementMarshaller.java diff --git a/compiler/src/jdk.internal.vm.compiler/src/org/graalvm/nativebridge/StringMarshaller.java b/sdk/src/org.graalvm.nativebridge/src/org/graalvm/nativebridge/StringMarshaller.java similarity index 100% rename from compiler/src/jdk.internal.vm.compiler/src/org/graalvm/nativebridge/StringMarshaller.java rename to sdk/src/org.graalvm.nativebridge/src/org/graalvm/nativebridge/StringMarshaller.java diff --git a/substratevm/mx.substratevm/suite.py b/substratevm/mx.substratevm/suite.py index ba48a5c8ff48..e50d9208857a 100644 --- a/substratevm/mx.substratevm/suite.py +++ b/substratevm/mx.substratevm/suite.py @@ -1003,6 +1003,7 @@ "com.oracle.svm.graal", "truffle:TRUFFLE_API", "truffle:TRUFFLE_RUNTIME", + "sdk:NATIVEBRIDGE", ], "requiresConcealed" : { "java.base" : [ @@ -1124,7 +1125,9 @@ "sourceDirs": ["src"], "dependencies": [ "com.oracle.svm.graal", - "compiler:GRAAL" + "compiler:GRAAL", + "sdk:JNIUTILS", + "sdk:NATIVEBRIDGE", ], "requires" : [ "jdk.management" @@ -1308,6 +1311,7 @@ "NATIVE_IMAGE_BASE", "truffle:TRUFFLE_API", "truffle:TRUFFLE_RUNTIME", + "sdk:NATIVEBRIDGE", ], "moduleInfo" : { "name" : "org.graalvm.nativeimage.builder", @@ -1491,6 +1495,8 @@ "description" : "SubstrateVM HotSpot Graal library support", "javaCompliance" : "17+", "dependencies": [ + "sdk:JNIUTILS", + "sdk:NATIVEBRIDGE", "com.oracle.svm.graal.hotspot.libgraal", ], "overlaps" : [ diff --git a/compiler/src/jdk.internal.vm.compiler/src/org/graalvm/libgraal/jni/LibGraalJNIMethodScope.java b/substratevm/src/com.oracle.svm.graal.hotspot.libgraal/src/org/graalvm/libgraal/jni/LibGraalJNIMethodScope.java similarity index 100% rename from compiler/src/jdk.internal.vm.compiler/src/org/graalvm/libgraal/jni/LibGraalJNIMethodScope.java rename to substratevm/src/com.oracle.svm.graal.hotspot.libgraal/src/org/graalvm/libgraal/jni/LibGraalJNIMethodScope.java diff --git a/compiler/src/jdk.internal.vm.compiler/src/org/graalvm/libgraal/jni/LibGraalUtil.java b/substratevm/src/com.oracle.svm.graal.hotspot.libgraal/src/org/graalvm/libgraal/jni/LibGraalUtil.java similarity index 100% rename from compiler/src/jdk.internal.vm.compiler/src/org/graalvm/libgraal/jni/LibGraalUtil.java rename to substratevm/src/com.oracle.svm.graal.hotspot.libgraal/src/org/graalvm/libgraal/jni/LibGraalUtil.java diff --git a/truffle/mx.truffle/suite.py b/truffle/mx.truffle/suite.py index 967efd2df1dc..9b2e7b0d68d9 100644 --- a/truffle/mx.truffle/suite.py +++ b/truffle/mx.truffle/suite.py @@ -457,21 +457,6 @@ "workingSets" : "Truffle,Codegen", }, - "com.oracle.truffle.libgraal.processor" : { - "subDir" : "src", - "sourceDirs" : ["src"], - "dependencies" : [ - "truffle:ANTLR4" - ], - "requires" : [ - "java.compiler", - "jdk.management" - ], - "checkstyle" : "com.oracle.truffle.api", - "javaCompliance" : "17+", - "workingSets" : "Truffle,Codegen", - }, - "com.oracle.truffle.api.interop" : { "subDir" : "src", "sourceDirs" : ["src"], @@ -1128,6 +1113,20 @@ }, }, }, + + "com.oracle.truffle.libgraal.processor" : { + "subDir" : "src", + "sourceDirs" : ["src"], + "dependencies" : [ + "truffle:ANTLR4" + ], + "requires" : [ + "java.compiler", + "jdk.management" + ], + "checkstyle" : "com.oracle.truffle.api", + "javaCompliance" : "17+", + }, }, }, @@ -1167,13 +1166,14 @@ ], "uses" : [ ], + "requiresConcealed" : { + "jdk.internal.vm.ci" : [ + "jdk.vm.ci.meta", + "jdk.vm.ci.code", + ], + }, }, - "requiresConcealed" : { - "jdk.internal.vm.ci" : [ - "jdk.vm.ci.meta", - "jdk.vm.ci.code", - ], - }, + "subDir" : "src", "javaCompliance" : "17+", "dependencies" : [ @@ -1508,7 +1508,7 @@ "description" : "The Truffle libgraal processor is shared across Truffle and the compiler to generate code for the compiler bridge.", "allowsJavadocWarnings": True, }, - + "TRUFFLE_SL" : { "subDir" : "src", "moduleInfo" : { From 3af4f3540bcad14be665d13e43c34548f07da79e Mon Sep 17 00:00:00 2001 From: Christian Humer Date: Fri, 23 Jun 2023 14:59:43 +0200 Subject: [PATCH 14/43] Update license headers from jniutils and nativebridge to UPL. --- .../src/org/graalvm/jniutils/HSObject.java | 50 +++++++++++------ .../src/org/graalvm/jniutils/JNI.java | 50 +++++++++++------ .../src/org/graalvm/jniutils/JNICalls.java | 50 +++++++++++------ .../org/graalvm/jniutils/JNIEntryPoint.java | 56 ++++++++++++------- .../graalvm/jniutils/JNIExceptionWrapper.java | 48 ++++++++++------ .../JNIExceptionWrapperEntryPoints.java | 50 +++++++++++------ .../org/graalvm/jniutils/JNIMethodScope.java | 50 +++++++++++------ .../src/org/graalvm/jniutils/JNIUtil.java | 50 +++++++++++------ .../graalvm/jniutils/NativeBridgeSupport.java | 56 ++++++++++++------- .../processor/test/AbstractService.java | 56 ++++++++++++------- .../processor/test/BinaryOutputTest.java | 50 +++++++++++------ .../test/CustomMarshallerService.java | 56 ++++++++++++------- .../processor/test/CustomReceiverService.java | 56 ++++++++++++------- .../processor/test/ExpectError.java | 56 ++++++++++++------- .../processor/test/OutParameterService.java | 56 ++++++++++++------- .../nativebridge/processor/test/Service.java | 56 ++++++++++++------- .../processor/test/ServiceAPI.java | 56 ++++++++++++------- .../processor/test/TestJNIConfig.java | 50 +++++++++++------ .../processor/test/common/InnerClassTest.java | 56 ++++++++++++------- .../test/common/InvalidBaseType1Test.java | 56 ++++++++++++------- .../test/common/InvalidBaseType2Test.java | 56 ++++++++++++------- .../test/common/InvalidBaseType3Test.java | 56 ++++++++++++------- .../test/common/InvalidConstructorTest.java | 56 ++++++++++++------- .../InvalidCustomDispatchAccessor1Test.java | 56 ++++++++++++------- .../InvalidCustomDispatchAccessor2Test.java | 56 ++++++++++++------- .../InvalidCustomDispatchAccessor3Test.java | 56 ++++++++++++------- .../InvalidCustomDispatchAccessor4Test.java | 56 ++++++++++++------- .../InvalidCustomDispatchAccessor5Test.java | 56 ++++++++++++------- .../InvalidCustomDispatchAccessor6Test.java | 56 ++++++++++++------- .../InvalidCustomDispatchAccessor7Test.java | 56 ++++++++++++------- .../InvalidCustomDispatchFactory1Test.java | 56 ++++++++++++------- .../InvalidCustomDispatchFactory2Test.java | 56 ++++++++++++------- .../InvalidCustomDispatchFactory3Test.java | 56 ++++++++++++------- .../InvalidCustomDispatchFactory4Test.java | 56 ++++++++++++------- .../InvalidCustomDispatchFactory5Test.java | 56 ++++++++++++------- .../InvalidCustomDispatchFactory6Test.java | 56 ++++++++++++------- .../InvalidCustomDispatchFactory7Test.java | 56 ++++++++++++------- .../InvalidCustomDispatchFactory8Test.java | 56 ++++++++++++------- .../InvalidCustomReceiverAccessor1Test.java | 56 ++++++++++++------- .../InvalidCustomReceiverAccessor2Test.java | 56 ++++++++++++------- .../InvalidCustomReceiverAccessor3Test.java | 56 ++++++++++++------- .../InvalidCustomReceiverAccessor4Test.java | 56 ++++++++++++------- .../InvalidCustomReceiverAccessor5Test.java | 56 ++++++++++++------- .../InvalidCustomReceiverAccessor6Test.java | 56 ++++++++++++------- .../InvalidCustomReceiverAccessor7Test.java | 56 ++++++++++++------- .../InvalidCustomReceiverAccessor8Test.java | 56 ++++++++++++------- .../common/InvalidEndPointHandle1Test.java | 56 ++++++++++++------- .../common/InvalidEndPointHandle2Test.java | 56 ++++++++++++------- .../test/common/InvalidIdempotentTest.java | 56 ++++++++++++------- .../test/common/InvalidJNIConfig1Test.java | 56 ++++++++++++------- .../test/common/InvalidJNIConfig2Test.java | 56 ++++++++++++------- .../test/common/InvalidJNIConfig3Test.java | 56 ++++++++++++------- .../test/common/InvalidJNIConfig4Test.java | 56 ++++++++++++------- .../test/common/InvalidJNIConfig5Test.java | 56 ++++++++++++------- .../test/common/InvalidMethod1Test.java | 56 ++++++++++++------- .../test/common/InvalidMethod2Test.java | 56 ++++++++++++------- .../test/common/InvalidMethod3Test.java | 56 ++++++++++++------- .../test/common/InvalidMethod4Test.java | 56 ++++++++++++------- .../test/common/InvalidMethod5Test.java | 56 ++++++++++++------- .../test/common/TestAnnotation1.java | 56 ++++++++++++------- .../test/common/TestAnnotation2.java | 56 ++++++++++++------- .../test/hstonative/NativeClassImlTest.java | 56 ++++++++++++------- .../NativeCustomMarshallerTest.java | 56 ++++++++++++------- .../NativeCustomReceiverImplTest.java | 56 ++++++++++++------- .../hstonative/NativeInterfaceImplTest.java | 56 ++++++++++++------- .../hstonative/NativeInvalidBaseTypeTest.java | 56 ++++++++++++------- .../NativeInvalidConstructor1Test.java | 56 ++++++++++++------- .../NativeInvalidConstructor2Test.java | 56 ++++++++++++------- .../NativeInvalidEndPointHandleTest.java | 56 ++++++++++++------- .../hstonative/NativeOutParameterService.java | 50 +++++++++++------ .../test/nativetohs/HSClassImplTest.java | 56 ++++++++++++------- .../nativetohs/HSCustomMarshallerTest.java | 56 ++++++++++++------- .../nativetohs/HSCustomReceiverImplTest.java | 56 ++++++++++++------- .../test/nativetohs/HSInterfaceImplTest.java | 56 ++++++++++++------- .../nativetohs/HSInvalidBaseTypeTest.java | 56 ++++++++++++------- .../nativetohs/HSInvalidConstructor1Test.java | 56 ++++++++++++------- .../nativetohs/HSInvalidConstructor2Test.java | 56 ++++++++++++------- .../HSInvalidEndPointHandleTest.java | 56 ++++++++++++------- .../nativetohs/HSOutParameterService.java | 50 +++++++++++------ ...NativeToNativeServiceDifferentConfigs.java | 56 ++++++++++++------- .../MixedNativeToNativeServiceSameConfig.java | 56 ++++++++++++------- .../PureNativeToNativeService.java | 56 ++++++++++++------- .../processor/test/references/Context.java | 56 ++++++++++++------- .../references/CustomLanguageDispatch.java | 56 ++++++++++++------- .../HSAlwaysByReferenceHandler.java | 56 ++++++++++++------- .../processor/test/references/HSHandler.java | 56 ++++++++++++------- .../HSReferenceArrayOperations.java | 50 +++++++++++------ .../processor/test/references/Handler.java | 56 ++++++++++++------- .../test/references/LanguageAPI.java | 56 ++++++++++++------- .../test/references/NativeContext.java | 56 ++++++++++++------- .../NativeCustomLanguageDispatch.java | 56 ++++++++++++------- .../test/references/NativeRecord.java | 56 ++++++++++++------- .../NativeReferenceArrayOperations.java | 50 +++++++++++------ .../test/references/NativeService.java | 56 ++++++++++++------- .../processor/test/references/Record.java | 56 ++++++++++++------- .../references/ReferenceArrayOperations.java | 50 +++++++++++------ .../processor/test/references/Service.java | 56 ++++++++++++------- .../processor/AbstractBridgeGenerator.java | 50 +++++++++++------ .../processor/AbstractBridgeParser.java | 50 +++++++++++------ .../processor/AbstractProcessor.java | 50 +++++++++++------ .../nativebridge/processor/CodeBuilder.java | 50 +++++++++++------ .../nativebridge/processor/ExpectError.java | 50 +++++++++++------ .../HotSpotToNativeBridgeGenerator.java | 50 +++++++++++------ .../HotSpotToNativeBridgeParser.java | 50 +++++++++++------ .../processor/NativeBridgeProcessor.java | 50 +++++++++++------ .../NativeToHotSpotBridgeGenerator.java | 50 +++++++++++------ .../NativeToHotSpotBridgeParser.java | 50 +++++++++++------ .../NativeToNativeBridgeGenerator.java | 50 +++++++++++------ .../processor/NativeToNativeBridgeParser.java | 50 +++++++++++------ .../processor/SuppressFBWarnings.java | 56 ++++++++++++------- .../nativebridge/processor/Utilities.java | 50 +++++++++++------ .../nativebridge/AlwaysByReference.java | 56 ++++++++++++------- .../AlwaysByReferenceRepeated.java | 56 ++++++++++++------- .../org/graalvm/nativebridge/BinaryInput.java | 50 +++++++++++------ .../nativebridge/BinaryMarshaller.java | 50 +++++++++++------ .../graalvm/nativebridge/BinaryOutput.java | 50 +++++++++++------ .../org/graalvm/nativebridge/ByReference.java | 50 +++++++++++------ .../nativebridge/CustomDispatchAccessor.java | 56 ++++++++++++------- .../nativebridge/CustomDispatchFactory.java | 56 ++++++++++++------- .../nativebridge/CustomReceiverAccessor.java | 56 ++++++++++++------- .../DefaultStackTraceMarshaller.java | 56 ++++++++++++------- .../DefaultThrowableMarshaller.java | 56 ++++++++++++------- .../graalvm/nativebridge/EndPointHandle.java | 56 ++++++++++++------- .../nativebridge/ForeignException.java | 50 +++++++++++------ .../ForeignExceptionEndPoints.java | 56 ++++++++++++------- .../GenerateHotSpotToNativeBridge.java | 56 ++++++++++++------- .../GenerateNativeToHotSpotBridge.java | 56 ++++++++++++------- .../GenerateNativeToNativeBridge.java | 56 ++++++++++++------- .../org/graalvm/nativebridge/Idempotent.java | 56 ++++++++++++------- .../src/org/graalvm/nativebridge/In.java | 56 ++++++++++++------- .../graalvm/nativebridge/JNIClassCache.java | 50 +++++++++++------ .../org/graalvm/nativebridge/JNIConfig.java | 50 +++++++++++------ .../nativebridge/MarshalledException.java | 50 +++++++++++------ .../nativebridge/MarshallerAnnotation.java | 56 ++++++++++++------- .../graalvm/nativebridge/NativeIsolate.java | 50 +++++++++++------ .../nativebridge/NativeIsolateThread.java | 50 +++++++++++------ .../graalvm/nativebridge/NativeObject.java | 50 +++++++++++------ .../nativebridge/NativeObjectCleaner.java | 50 +++++++++++------ .../nativebridge/NativeObjectHandles.java | 50 +++++++++++------ .../NullableBinaryMarshaller.java | 50 +++++++++++------ .../src/org/graalvm/nativebridge/Out.java | 50 +++++++++++------ .../graalvm/nativebridge/RawReference.java | 56 ++++++++++++------- .../graalvm/nativebridge/ReceiverMethod.java | 56 ++++++++++++------- .../StackTraceElementMarshaller.java | 56 ++++++++++++------- .../nativebridge/StringMarshaller.java | 56 ++++++++++++------- .../libgraal/jni/LibGraalJNIMethodScope.java | 2 +- .../graalvm/libgraal/jni/LibGraalUtil.java | 4 +- 147 files changed, 5096 insertions(+), 2776 deletions(-) diff --git a/sdk/src/org.graalvm.jniutils/src/org/graalvm/jniutils/HSObject.java b/sdk/src/org.graalvm.jniutils/src/org/graalvm/jniutils/HSObject.java index ff53282ee728..2219d3a0a562 100644 --- a/sdk/src/org.graalvm.jniutils/src/org/graalvm/jniutils/HSObject.java +++ b/sdk/src/org.graalvm.jniutils/src/org/graalvm/jniutils/HSObject.java @@ -1,26 +1,42 @@ /* - * Copyright (c) 2018, 2021, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2018, 2023, 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. Oracle designates this - * particular file as subject to the "Classpath" exception as provided - * by Oracle in the LICENSE file that accompanied this code. + * The Universal Permissive License (UPL), Version 1.0 * - * 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). + * Subject to the condition set forth below, permission is hereby granted to any + * person obtaining a copy of this software, associated documentation and/or + * data (collectively the "Software"), free of charge and under any and all + * copyright rights in the Software, and any and all patent rights owned or + * freely licensable by each licensor hereunder covering either (i) the + * unmodified Software as contributed to or provided by such licensor, or (ii) + * the Larger Works (as defined below), to deal in both * - * 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. + * (a) the Software, and * - * 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. + * (b) any piece of software and/or hardware listed in the lrgrwrks.txt file if + * one is included with the Software each a "Larger Work" to which the Software + * is contributed by such licensors), + * + * without restriction, including without limitation the rights to copy, create + * derivative works of, display, perform, and distribute the Software and make, + * use, sell, offer for sale, import, export, have made, and have sold the + * Software and the Larger Work(s), and to sublicense the foregoing rights on + * either these or other terms. + * + * This license is subject to the following condition: + * + * The above copyright notice and either this complete permission notice or at a + * minimum a reference to the UPL must be included in all copies or substantial + * portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. */ package org.graalvm.jniutils; diff --git a/sdk/src/org.graalvm.jniutils/src/org/graalvm/jniutils/JNI.java b/sdk/src/org.graalvm.jniutils/src/org/graalvm/jniutils/JNI.java index ad8153cedd7e..9155c7df2d13 100644 --- a/sdk/src/org.graalvm.jniutils/src/org/graalvm/jniutils/JNI.java +++ b/sdk/src/org.graalvm.jniutils/src/org/graalvm/jniutils/JNI.java @@ -1,26 +1,42 @@ /* - * Copyright (c) 2018, 2021, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2018, 2023, 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. Oracle designates this - * particular file as subject to the "Classpath" exception as provided - * by Oracle in the LICENSE file that accompanied this code. + * The Universal Permissive License (UPL), Version 1.0 * - * 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). + * Subject to the condition set forth below, permission is hereby granted to any + * person obtaining a copy of this software, associated documentation and/or + * data (collectively the "Software"), free of charge and under any and all + * copyright rights in the Software, and any and all patent rights owned or + * freely licensable by each licensor hereunder covering either (i) the + * unmodified Software as contributed to or provided by such licensor, or (ii) + * the Larger Works (as defined below), to deal in both * - * 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. + * (a) the Software, and * - * 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. + * (b) any piece of software and/or hardware listed in the lrgrwrks.txt file if + * one is included with the Software each a "Larger Work" to which the Software + * is contributed by such licensors), + * + * without restriction, including without limitation the rights to copy, create + * derivative works of, display, perform, and distribute the Software and make, + * use, sell, offer for sale, import, export, have made, and have sold the + * Software and the Larger Work(s), and to sublicense the foregoing rights on + * either these or other terms. + * + * This license is subject to the following condition: + * + * The above copyright notice and either this complete permission notice or at a + * minimum a reference to the UPL must be included in all copies or substantial + * portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. */ package org.graalvm.jniutils; diff --git a/sdk/src/org.graalvm.jniutils/src/org/graalvm/jniutils/JNICalls.java b/sdk/src/org.graalvm.jniutils/src/org/graalvm/jniutils/JNICalls.java index daab397a4e8d..bad6bfe74adb 100644 --- a/sdk/src/org.graalvm.jniutils/src/org/graalvm/jniutils/JNICalls.java +++ b/sdk/src/org.graalvm.jniutils/src/org/graalvm/jniutils/JNICalls.java @@ -1,26 +1,42 @@ /* - * Copyright (c) 2021, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2018, 2023, 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. Oracle designates this - * particular file as subject to the "Classpath" exception as provided - * by Oracle in the LICENSE file that accompanied this code. + * The Universal Permissive License (UPL), Version 1.0 * - * 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). + * Subject to the condition set forth below, permission is hereby granted to any + * person obtaining a copy of this software, associated documentation and/or + * data (collectively the "Software"), free of charge and under any and all + * copyright rights in the Software, and any and all patent rights owned or + * freely licensable by each licensor hereunder covering either (i) the + * unmodified Software as contributed to or provided by such licensor, or (ii) + * the Larger Works (as defined below), to deal in both * - * 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. + * (a) the Software, and * - * 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. + * (b) any piece of software and/or hardware listed in the lrgrwrks.txt file if + * one is included with the Software each a "Larger Work" to which the Software + * is contributed by such licensors), + * + * without restriction, including without limitation the rights to copy, create + * derivative works of, display, perform, and distribute the Software and make, + * use, sell, offer for sale, import, export, have made, and have sold the + * Software and the Larger Work(s), and to sublicense the foregoing rights on + * either these or other terms. + * + * This license is subject to the following condition: + * + * The above copyright notice and either this complete permission notice or at a + * minimum a reference to the UPL must be included in all copies or substantial + * portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. */ package org.graalvm.jniutils; diff --git a/sdk/src/org.graalvm.jniutils/src/org/graalvm/jniutils/JNIEntryPoint.java b/sdk/src/org.graalvm.jniutils/src/org/graalvm/jniutils/JNIEntryPoint.java index 76e33a44e24a..0ff61e23a86b 100644 --- a/sdk/src/org.graalvm.jniutils/src/org/graalvm/jniutils/JNIEntryPoint.java +++ b/sdk/src/org.graalvm.jniutils/src/org/graalvm/jniutils/JNIEntryPoint.java @@ -1,26 +1,42 @@ /* - * Copyright (c) 2018, 2021, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2018, 2023, 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. Oracle designates this - * particular file as subject to the "Classpath" exception as provided - * by Oracle in the LICENSE file that accompanied this code. - * - * 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. + * The Universal Permissive License (UPL), Version 1.0 + * + * Subject to the condition set forth below, permission is hereby granted to any + * person obtaining a copy of this software, associated documentation and/or + * data (collectively the "Software"), free of charge and under any and all + * copyright rights in the Software, and any and all patent rights owned or + * freely licensable by each licensor hereunder covering either (i) the + * unmodified Software as contributed to or provided by such licensor, or (ii) + * the Larger Works (as defined below), to deal in both + * + * (a) the Software, and + * + * (b) any piece of software and/or hardware listed in the lrgrwrks.txt file if + * one is included with the Software each a "Larger Work" to which the Software + * is contributed by such licensors), + * + * without restriction, including without limitation the rights to copy, create + * derivative works of, display, perform, and distribute the Software and make, + * use, sell, offer for sale, import, export, have made, and have sold the + * Software and the Larger Work(s), and to sublicense the foregoing rights on + * either these or other terms. + * + * This license is subject to the following condition: + * + * The above copyright notice and either this complete permission notice or at a + * minimum a reference to the UPL must be included in all copies or substantial + * portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. */ package org.graalvm.jniutils; diff --git a/sdk/src/org.graalvm.jniutils/src/org/graalvm/jniutils/JNIExceptionWrapper.java b/sdk/src/org.graalvm.jniutils/src/org/graalvm/jniutils/JNIExceptionWrapper.java index 113ba75b3881..bf1fbb3d543f 100644 --- a/sdk/src/org.graalvm.jniutils/src/org/graalvm/jniutils/JNIExceptionWrapper.java +++ b/sdk/src/org.graalvm.jniutils/src/org/graalvm/jniutils/JNIExceptionWrapper.java @@ -2,25 +2,41 @@ * Copyright (c) 2018, 2023, 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. Oracle designates this - * particular file as subject to the "Classpath" exception as provided - * by Oracle in the LICENSE file that accompanied this code. + * The Universal Permissive License (UPL), Version 1.0 * - * 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). + * Subject to the condition set forth below, permission is hereby granted to any + * person obtaining a copy of this software, associated documentation and/or + * data (collectively the "Software"), free of charge and under any and all + * copyright rights in the Software, and any and all patent rights owned or + * freely licensable by each licensor hereunder covering either (i) the + * unmodified Software as contributed to or provided by such licensor, or (ii) + * the Larger Works (as defined below), to deal in both * - * 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. + * (a) the Software, and * - * 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. + * (b) any piece of software and/or hardware listed in the lrgrwrks.txt file if + * one is included with the Software each a "Larger Work" to which the Software + * is contributed by such licensors), + * + * without restriction, including without limitation the rights to copy, create + * derivative works of, display, perform, and distribute the Software and make, + * use, sell, offer for sale, import, export, have made, and have sold the + * Software and the Larger Work(s), and to sublicense the foregoing rights on + * either these or other terms. + * + * This license is subject to the following condition: + * + * The above copyright notice and either this complete permission notice or at a + * minimum a reference to the UPL must be included in all copies or substantial + * portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. */ package org.graalvm.jniutils; diff --git a/sdk/src/org.graalvm.jniutils/src/org/graalvm/jniutils/JNIExceptionWrapperEntryPoints.java b/sdk/src/org.graalvm.jniutils/src/org/graalvm/jniutils/JNIExceptionWrapperEntryPoints.java index b4c45c2f8ee8..e7211d1c559c 100644 --- a/sdk/src/org.graalvm.jniutils/src/org/graalvm/jniutils/JNIExceptionWrapperEntryPoints.java +++ b/sdk/src/org.graalvm.jniutils/src/org/graalvm/jniutils/JNIExceptionWrapperEntryPoints.java @@ -1,26 +1,42 @@ /* - * Copyright (c) 2020, 2022, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2020, 2023, 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. Oracle designates this - * particular file as subject to the "Classpath" exception as provided - * by Oracle in the LICENSE file that accompanied this code. + * The Universal Permissive License (UPL), Version 1.0 * - * 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). + * Subject to the condition set forth below, permission is hereby granted to any + * person obtaining a copy of this software, associated documentation and/or + * data (collectively the "Software"), free of charge and under any and all + * copyright rights in the Software, and any and all patent rights owned or + * freely licensable by each licensor hereunder covering either (i) the + * unmodified Software as contributed to or provided by such licensor, or (ii) + * the Larger Works (as defined below), to deal in both * - * 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. + * (a) the Software, and * - * 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. + * (b) any piece of software and/or hardware listed in the lrgrwrks.txt file if + * one is included with the Software each a "Larger Work" to which the Software + * is contributed by such licensors), + * + * without restriction, including without limitation the rights to copy, create + * derivative works of, display, perform, and distribute the Software and make, + * use, sell, offer for sale, import, export, have made, and have sold the + * Software and the Larger Work(s), and to sublicense the foregoing rights on + * either these or other terms. + * + * This license is subject to the following condition: + * + * The above copyright notice and either this complete permission notice or at a + * minimum a reference to the UPL must be included in all copies or substantial + * portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. */ package org.graalvm.jniutils; diff --git a/sdk/src/org.graalvm.jniutils/src/org/graalvm/jniutils/JNIMethodScope.java b/sdk/src/org.graalvm.jniutils/src/org/graalvm/jniutils/JNIMethodScope.java index ce2fd4481c37..b3122d3c6065 100644 --- a/sdk/src/org.graalvm.jniutils/src/org/graalvm/jniutils/JNIMethodScope.java +++ b/sdk/src/org.graalvm.jniutils/src/org/graalvm/jniutils/JNIMethodScope.java @@ -1,26 +1,42 @@ /* - * Copyright (c) 2018, 2021, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2018, 2023, 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. Oracle designates this - * particular file as subject to the "Classpath" exception as provided - * by Oracle in the LICENSE file that accompanied this code. + * The Universal Permissive License (UPL), Version 1.0 * - * 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). + * Subject to the condition set forth below, permission is hereby granted to any + * person obtaining a copy of this software, associated documentation and/or + * data (collectively the "Software"), free of charge and under any and all + * copyright rights in the Software, and any and all patent rights owned or + * freely licensable by each licensor hereunder covering either (i) the + * unmodified Software as contributed to or provided by such licensor, or (ii) + * the Larger Works (as defined below), to deal in both * - * 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. + * (a) the Software, and * - * 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. + * (b) any piece of software and/or hardware listed in the lrgrwrks.txt file if + * one is included with the Software each a "Larger Work" to which the Software + * is contributed by such licensors), + * + * without restriction, including without limitation the rights to copy, create + * derivative works of, display, perform, and distribute the Software and make, + * use, sell, offer for sale, import, export, have made, and have sold the + * Software and the Larger Work(s), and to sublicense the foregoing rights on + * either these or other terms. + * + * This license is subject to the following condition: + * + * The above copyright notice and either this complete permission notice or at a + * minimum a reference to the UPL must be included in all copies or substantial + * portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. */ package org.graalvm.jniutils; diff --git a/sdk/src/org.graalvm.jniutils/src/org/graalvm/jniutils/JNIUtil.java b/sdk/src/org.graalvm.jniutils/src/org/graalvm/jniutils/JNIUtil.java index dcf16d8d1cec..a786df09d3ce 100644 --- a/sdk/src/org.graalvm.jniutils/src/org/graalvm/jniutils/JNIUtil.java +++ b/sdk/src/org.graalvm.jniutils/src/org/graalvm/jniutils/JNIUtil.java @@ -1,26 +1,42 @@ /* - * Copyright (c) 2018, 2021, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2018, 2023, 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. Oracle designates this - * particular file as subject to the "Classpath" exception as provided - * by Oracle in the LICENSE file that accompanied this code. + * The Universal Permissive License (UPL), Version 1.0 * - * 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). + * Subject to the condition set forth below, permission is hereby granted to any + * person obtaining a copy of this software, associated documentation and/or + * data (collectively the "Software"), free of charge and under any and all + * copyright rights in the Software, and any and all patent rights owned or + * freely licensable by each licensor hereunder covering either (i) the + * unmodified Software as contributed to or provided by such licensor, or (ii) + * the Larger Works (as defined below), to deal in both * - * 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. + * (a) the Software, and * - * 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. + * (b) any piece of software and/or hardware listed in the lrgrwrks.txt file if + * one is included with the Software each a "Larger Work" to which the Software + * is contributed by such licensors), + * + * without restriction, including without limitation the rights to copy, create + * derivative works of, display, perform, and distribute the Software and make, + * use, sell, offer for sale, import, export, have made, and have sold the + * Software and the Larger Work(s), and to sublicense the foregoing rights on + * either these or other terms. + * + * This license is subject to the following condition: + * + * The above copyright notice and either this complete permission notice or at a + * minimum a reference to the UPL must be included in all copies or substantial + * portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. */ package org.graalvm.jniutils; diff --git a/sdk/src/org.graalvm.jniutils/src/org/graalvm/jniutils/NativeBridgeSupport.java b/sdk/src/org.graalvm.jniutils/src/org/graalvm/jniutils/NativeBridgeSupport.java index eaefa2507742..5e8424e92754 100644 --- a/sdk/src/org.graalvm.jniutils/src/org/graalvm/jniutils/NativeBridgeSupport.java +++ b/sdk/src/org.graalvm.jniutils/src/org/graalvm/jniutils/NativeBridgeSupport.java @@ -1,26 +1,42 @@ /* - * Copyright (c) 2021, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2021, 2023, 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. Oracle designates this - * particular file as subject to the "Classpath" exception as provided - * by Oracle in the LICENSE file that accompanied this code. - * - * 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. + * The Universal Permissive License (UPL), Version 1.0 + * + * Subject to the condition set forth below, permission is hereby granted to any + * person obtaining a copy of this software, associated documentation and/or + * data (collectively the "Software"), free of charge and under any and all + * copyright rights in the Software, and any and all patent rights owned or + * freely licensable by each licensor hereunder covering either (i) the + * unmodified Software as contributed to or provided by such licensor, or (ii) + * the Larger Works (as defined below), to deal in both + * + * (a) the Software, and + * + * (b) any piece of software and/or hardware listed in the lrgrwrks.txt file if + * one is included with the Software each a "Larger Work" to which the Software + * is contributed by such licensors), + * + * without restriction, including without limitation the rights to copy, create + * derivative works of, display, perform, and distribute the Software and make, + * use, sell, offer for sale, import, export, have made, and have sold the + * Software and the Larger Work(s), and to sublicense the foregoing rights on + * either these or other terms. + * + * This license is subject to the following condition: + * + * The above copyright notice and either this complete permission notice or at a + * minimum a reference to the UPL must be included in all copies or substantial + * portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. */ package org.graalvm.jniutils; diff --git a/sdk/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/AbstractService.java b/sdk/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/AbstractService.java index ca66998c984c..02c50e7ee0e7 100644 --- a/sdk/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/AbstractService.java +++ b/sdk/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/AbstractService.java @@ -1,26 +1,42 @@ /* - * Copyright (c) 2022, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2021, 2023, 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. Oracle designates this - * particular file as subject to the "Classpath" exception as provided - * by Oracle in the LICENSE file that accompanied this code. - * - * 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. + * The Universal Permissive License (UPL), Version 1.0 + * + * Subject to the condition set forth below, permission is hereby granted to any + * person obtaining a copy of this software, associated documentation and/or + * data (collectively the "Software"), free of charge and under any and all + * copyright rights in the Software, and any and all patent rights owned or + * freely licensable by each licensor hereunder covering either (i) the + * unmodified Software as contributed to or provided by such licensor, or (ii) + * the Larger Works (as defined below), to deal in both + * + * (a) the Software, and + * + * (b) any piece of software and/or hardware listed in the lrgrwrks.txt file if + * one is included with the Software each a "Larger Work" to which the Software + * is contributed by such licensors), + * + * without restriction, including without limitation the rights to copy, create + * derivative works of, display, perform, and distribute the Software and make, + * use, sell, offer for sale, import, export, have made, and have sold the + * Software and the Larger Work(s), and to sublicense the foregoing rights on + * either these or other terms. + * + * This license is subject to the following condition: + * + * The above copyright notice and either this complete permission notice or at a + * minimum a reference to the UPL must be included in all copies or substantial + * portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. */ package org.graalvm.nativebridge.processor.test; diff --git a/sdk/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/BinaryOutputTest.java b/sdk/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/BinaryOutputTest.java index 120999b66446..3e17308536db 100644 --- a/sdk/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/BinaryOutputTest.java +++ b/sdk/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/BinaryOutputTest.java @@ -1,26 +1,42 @@ /* - * Copyright (c) 2022, 2023, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2021, 2023, 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. Oracle designates this - * particular file as subject to the "Classpath" exception as provided - * by Oracle in the LICENSE file that accompanied this code. + * The Universal Permissive License (UPL), Version 1.0 * - * 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). + * Subject to the condition set forth below, permission is hereby granted to any + * person obtaining a copy of this software, associated documentation and/or + * data (collectively the "Software"), free of charge and under any and all + * copyright rights in the Software, and any and all patent rights owned or + * freely licensable by each licensor hereunder covering either (i) the + * unmodified Software as contributed to or provided by such licensor, or (ii) + * the Larger Works (as defined below), to deal in both * - * 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. + * (a) the Software, and * - * 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. + * (b) any piece of software and/or hardware listed in the lrgrwrks.txt file if + * one is included with the Software each a "Larger Work" to which the Software + * is contributed by such licensors), + * + * without restriction, including without limitation the rights to copy, create + * derivative works of, display, perform, and distribute the Software and make, + * use, sell, offer for sale, import, export, have made, and have sold the + * Software and the Larger Work(s), and to sublicense the foregoing rights on + * either these or other terms. + * + * This license is subject to the following condition: + * + * The above copyright notice and either this complete permission notice or at a + * minimum a reference to the UPL must be included in all copies or substantial + * portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. */ package org.graalvm.nativebridge.processor.test; diff --git a/sdk/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/CustomMarshallerService.java b/sdk/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/CustomMarshallerService.java index cc4e42d9eff5..c5b6393e4b61 100644 --- a/sdk/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/CustomMarshallerService.java +++ b/sdk/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/CustomMarshallerService.java @@ -1,26 +1,42 @@ /* - * Copyright (c) 2022, 2023, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2021, 2023, 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. Oracle designates this - * particular file as subject to the "Classpath" exception as provided - * by Oracle in the LICENSE file that accompanied this code. - * - * 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. + * The Universal Permissive License (UPL), Version 1.0 + * + * Subject to the condition set forth below, permission is hereby granted to any + * person obtaining a copy of this software, associated documentation and/or + * data (collectively the "Software"), free of charge and under any and all + * copyright rights in the Software, and any and all patent rights owned or + * freely licensable by each licensor hereunder covering either (i) the + * unmodified Software as contributed to or provided by such licensor, or (ii) + * the Larger Works (as defined below), to deal in both + * + * (a) the Software, and + * + * (b) any piece of software and/or hardware listed in the lrgrwrks.txt file if + * one is included with the Software each a "Larger Work" to which the Software + * is contributed by such licensors), + * + * without restriction, including without limitation the rights to copy, create + * derivative works of, display, perform, and distribute the Software and make, + * use, sell, offer for sale, import, export, have made, and have sold the + * Software and the Larger Work(s), and to sublicense the foregoing rights on + * either these or other terms. + * + * This license is subject to the following condition: + * + * The above copyright notice and either this complete permission notice or at a + * minimum a reference to the UPL must be included in all copies or substantial + * portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. */ package org.graalvm.nativebridge.processor.test; diff --git a/sdk/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/CustomReceiverService.java b/sdk/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/CustomReceiverService.java index d95498926c34..e971cf93d986 100644 --- a/sdk/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/CustomReceiverService.java +++ b/sdk/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/CustomReceiverService.java @@ -1,26 +1,42 @@ /* - * Copyright (c) 2022, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2021, 2023, 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. Oracle designates this - * particular file as subject to the "Classpath" exception as provided - * by Oracle in the LICENSE file that accompanied this code. - * - * 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. + * The Universal Permissive License (UPL), Version 1.0 + * + * Subject to the condition set forth below, permission is hereby granted to any + * person obtaining a copy of this software, associated documentation and/or + * data (collectively the "Software"), free of charge and under any and all + * copyright rights in the Software, and any and all patent rights owned or + * freely licensable by each licensor hereunder covering either (i) the + * unmodified Software as contributed to or provided by such licensor, or (ii) + * the Larger Works (as defined below), to deal in both + * + * (a) the Software, and + * + * (b) any piece of software and/or hardware listed in the lrgrwrks.txt file if + * one is included with the Software each a "Larger Work" to which the Software + * is contributed by such licensors), + * + * without restriction, including without limitation the rights to copy, create + * derivative works of, display, perform, and distribute the Software and make, + * use, sell, offer for sale, import, export, have made, and have sold the + * Software and the Larger Work(s), and to sublicense the foregoing rights on + * either these or other terms. + * + * This license is subject to the following condition: + * + * The above copyright notice and either this complete permission notice or at a + * minimum a reference to the UPL must be included in all copies or substantial + * portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. */ package org.graalvm.nativebridge.processor.test; diff --git a/sdk/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/ExpectError.java b/sdk/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/ExpectError.java index fc101ef5a91a..19f7bae2f2dc 100644 --- a/sdk/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/ExpectError.java +++ b/sdk/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/ExpectError.java @@ -1,26 +1,42 @@ /* - * Copyright (c) 2022, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2021, 2023, 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. Oracle designates this - * particular file as subject to the "Classpath" exception as provided - * by Oracle in the LICENSE file that accompanied this code. - * - * 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. + * The Universal Permissive License (UPL), Version 1.0 + * + * Subject to the condition set forth below, permission is hereby granted to any + * person obtaining a copy of this software, associated documentation and/or + * data (collectively the "Software"), free of charge and under any and all + * copyright rights in the Software, and any and all patent rights owned or + * freely licensable by each licensor hereunder covering either (i) the + * unmodified Software as contributed to or provided by such licensor, or (ii) + * the Larger Works (as defined below), to deal in both + * + * (a) the Software, and + * + * (b) any piece of software and/or hardware listed in the lrgrwrks.txt file if + * one is included with the Software each a "Larger Work" to which the Software + * is contributed by such licensors), + * + * without restriction, including without limitation the rights to copy, create + * derivative works of, display, perform, and distribute the Software and make, + * use, sell, offer for sale, import, export, have made, and have sold the + * Software and the Larger Work(s), and to sublicense the foregoing rights on + * either these or other terms. + * + * This license is subject to the following condition: + * + * The above copyright notice and either this complete permission notice or at a + * minimum a reference to the UPL must be included in all copies or substantial + * portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. */ package org.graalvm.nativebridge.processor.test; diff --git a/sdk/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/OutParameterService.java b/sdk/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/OutParameterService.java index ed2b5ae164ef..fc11ae2997e8 100644 --- a/sdk/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/OutParameterService.java +++ b/sdk/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/OutParameterService.java @@ -1,26 +1,42 @@ /* - * Copyright (c) 2022, 2023, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2021, 2023, 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. Oracle designates this - * particular file as subject to the "Classpath" exception as provided - * by Oracle in the LICENSE file that accompanied this code. - * - * 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. + * The Universal Permissive License (UPL), Version 1.0 + * + * Subject to the condition set forth below, permission is hereby granted to any + * person obtaining a copy of this software, associated documentation and/or + * data (collectively the "Software"), free of charge and under any and all + * copyright rights in the Software, and any and all patent rights owned or + * freely licensable by each licensor hereunder covering either (i) the + * unmodified Software as contributed to or provided by such licensor, or (ii) + * the Larger Works (as defined below), to deal in both + * + * (a) the Software, and + * + * (b) any piece of software and/or hardware listed in the lrgrwrks.txt file if + * one is included with the Software each a "Larger Work" to which the Software + * is contributed by such licensors), + * + * without restriction, including without limitation the rights to copy, create + * derivative works of, display, perform, and distribute the Software and make, + * use, sell, offer for sale, import, export, have made, and have sold the + * Software and the Larger Work(s), and to sublicense the foregoing rights on + * either these or other terms. + * + * This license is subject to the following condition: + * + * The above copyright notice and either this complete permission notice or at a + * minimum a reference to the UPL must be included in all copies or substantial + * portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. */ package org.graalvm.nativebridge.processor.test; diff --git a/sdk/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/Service.java b/sdk/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/Service.java index c1220c6ba133..085d03a177bf 100644 --- a/sdk/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/Service.java +++ b/sdk/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/Service.java @@ -1,26 +1,42 @@ /* - * Copyright (c) 2022, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2021, 2023, 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. Oracle designates this - * particular file as subject to the "Classpath" exception as provided - * by Oracle in the LICENSE file that accompanied this code. - * - * 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. + * The Universal Permissive License (UPL), Version 1.0 + * + * Subject to the condition set forth below, permission is hereby granted to any + * person obtaining a copy of this software, associated documentation and/or + * data (collectively the "Software"), free of charge and under any and all + * copyright rights in the Software, and any and all patent rights owned or + * freely licensable by each licensor hereunder covering either (i) the + * unmodified Software as contributed to or provided by such licensor, or (ii) + * the Larger Works (as defined below), to deal in both + * + * (a) the Software, and + * + * (b) any piece of software and/or hardware listed in the lrgrwrks.txt file if + * one is included with the Software each a "Larger Work" to which the Software + * is contributed by such licensors), + * + * without restriction, including without limitation the rights to copy, create + * derivative works of, display, perform, and distribute the Software and make, + * use, sell, offer for sale, import, export, have made, and have sold the + * Software and the Larger Work(s), and to sublicense the foregoing rights on + * either these or other terms. + * + * This license is subject to the following condition: + * + * The above copyright notice and either this complete permission notice or at a + * minimum a reference to the UPL must be included in all copies or substantial + * portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. */ package org.graalvm.nativebridge.processor.test; diff --git a/sdk/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/ServiceAPI.java b/sdk/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/ServiceAPI.java index ea10125753dc..a047f0d85902 100644 --- a/sdk/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/ServiceAPI.java +++ b/sdk/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/ServiceAPI.java @@ -1,26 +1,42 @@ /* - * Copyright (c) 2022, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2021, 2023, 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. Oracle designates this - * particular file as subject to the "Classpath" exception as provided - * by Oracle in the LICENSE file that accompanied this code. - * - * 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. + * The Universal Permissive License (UPL), Version 1.0 + * + * Subject to the condition set forth below, permission is hereby granted to any + * person obtaining a copy of this software, associated documentation and/or + * data (collectively the "Software"), free of charge and under any and all + * copyright rights in the Software, and any and all patent rights owned or + * freely licensable by each licensor hereunder covering either (i) the + * unmodified Software as contributed to or provided by such licensor, or (ii) + * the Larger Works (as defined below), to deal in both + * + * (a) the Software, and + * + * (b) any piece of software and/or hardware listed in the lrgrwrks.txt file if + * one is included with the Software each a "Larger Work" to which the Software + * is contributed by such licensors), + * + * without restriction, including without limitation the rights to copy, create + * derivative works of, display, perform, and distribute the Software and make, + * use, sell, offer for sale, import, export, have made, and have sold the + * Software and the Larger Work(s), and to sublicense the foregoing rights on + * either these or other terms. + * + * This license is subject to the following condition: + * + * The above copyright notice and either this complete permission notice or at a + * minimum a reference to the UPL must be included in all copies or substantial + * portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. */ package org.graalvm.nativebridge.processor.test; diff --git a/sdk/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/TestJNIConfig.java b/sdk/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/TestJNIConfig.java index 2635c1e12aac..a8301d659d58 100644 --- a/sdk/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/TestJNIConfig.java +++ b/sdk/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/TestJNIConfig.java @@ -1,26 +1,42 @@ /* - * Copyright (c) 2022, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2021, 2023, 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. Oracle designates this - * particular file as subject to the "Classpath" exception as provided - * by Oracle in the LICENSE file that accompanied this code. + * The Universal Permissive License (UPL), Version 1.0 * - * 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). + * Subject to the condition set forth below, permission is hereby granted to any + * person obtaining a copy of this software, associated documentation and/or + * data (collectively the "Software"), free of charge and under any and all + * copyright rights in the Software, and any and all patent rights owned or + * freely licensable by each licensor hereunder covering either (i) the + * unmodified Software as contributed to or provided by such licensor, or (ii) + * the Larger Works (as defined below), to deal in both * - * 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. + * (a) the Software, and * - * 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. + * (b) any piece of software and/or hardware listed in the lrgrwrks.txt file if + * one is included with the Software each a "Larger Work" to which the Software + * is contributed by such licensors), + * + * without restriction, including without limitation the rights to copy, create + * derivative works of, display, perform, and distribute the Software and make, + * use, sell, offer for sale, import, export, have made, and have sold the + * Software and the Larger Work(s), and to sublicense the foregoing rights on + * either these or other terms. + * + * This license is subject to the following condition: + * + * The above copyright notice and either this complete permission notice or at a + * minimum a reference to the UPL must be included in all copies or substantial + * portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. */ package org.graalvm.nativebridge.processor.test; diff --git a/sdk/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/common/InnerClassTest.java b/sdk/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/common/InnerClassTest.java index 7a3e2b3ac18e..c3063b26bcc7 100644 --- a/sdk/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/common/InnerClassTest.java +++ b/sdk/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/common/InnerClassTest.java @@ -1,26 +1,42 @@ /* - * Copyright (c) 2022, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2021, 2023, 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. Oracle designates this - * particular file as subject to the "Classpath" exception as provided - * by Oracle in the LICENSE file that accompanied this code. - * - * 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. + * The Universal Permissive License (UPL), Version 1.0 + * + * Subject to the condition set forth below, permission is hereby granted to any + * person obtaining a copy of this software, associated documentation and/or + * data (collectively the "Software"), free of charge and under any and all + * copyright rights in the Software, and any and all patent rights owned or + * freely licensable by each licensor hereunder covering either (i) the + * unmodified Software as contributed to or provided by such licensor, or (ii) + * the Larger Works (as defined below), to deal in both + * + * (a) the Software, and + * + * (b) any piece of software and/or hardware listed in the lrgrwrks.txt file if + * one is included with the Software each a "Larger Work" to which the Software + * is contributed by such licensors), + * + * without restriction, including without limitation the rights to copy, create + * derivative works of, display, perform, and distribute the Software and make, + * use, sell, offer for sale, import, export, have made, and have sold the + * Software and the Larger Work(s), and to sublicense the foregoing rights on + * either these or other terms. + * + * This license is subject to the following condition: + * + * The above copyright notice and either this complete permission notice or at a + * minimum a reference to the UPL must be included in all copies or substantial + * portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. */ package org.graalvm.nativebridge.processor.test.common; diff --git a/sdk/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/common/InvalidBaseType1Test.java b/sdk/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/common/InvalidBaseType1Test.java index 4bbef538ab4b..03e14490db7e 100644 --- a/sdk/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/common/InvalidBaseType1Test.java +++ b/sdk/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/common/InvalidBaseType1Test.java @@ -1,26 +1,42 @@ /* - * Copyright (c) 2022, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2021, 2023, 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. Oracle designates this - * particular file as subject to the "Classpath" exception as provided - * by Oracle in the LICENSE file that accompanied this code. - * - * 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. + * The Universal Permissive License (UPL), Version 1.0 + * + * Subject to the condition set forth below, permission is hereby granted to any + * person obtaining a copy of this software, associated documentation and/or + * data (collectively the "Software"), free of charge and under any and all + * copyright rights in the Software, and any and all patent rights owned or + * freely licensable by each licensor hereunder covering either (i) the + * unmodified Software as contributed to or provided by such licensor, or (ii) + * the Larger Works (as defined below), to deal in both + * + * (a) the Software, and + * + * (b) any piece of software and/or hardware listed in the lrgrwrks.txt file if + * one is included with the Software each a "Larger Work" to which the Software + * is contributed by such licensors), + * + * without restriction, including without limitation the rights to copy, create + * derivative works of, display, perform, and distribute the Software and make, + * use, sell, offer for sale, import, export, have made, and have sold the + * Software and the Larger Work(s), and to sublicense the foregoing rights on + * either these or other terms. + * + * This license is subject to the following condition: + * + * The above copyright notice and either this complete permission notice or at a + * minimum a reference to the UPL must be included in all copies or substantial + * portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. */ package org.graalvm.nativebridge.processor.test.common; diff --git a/sdk/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/common/InvalidBaseType2Test.java b/sdk/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/common/InvalidBaseType2Test.java index 7304b9cb208f..2143768ae6f4 100644 --- a/sdk/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/common/InvalidBaseType2Test.java +++ b/sdk/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/common/InvalidBaseType2Test.java @@ -1,26 +1,42 @@ /* - * Copyright (c) 2022, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2021, 2023, 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. Oracle designates this - * particular file as subject to the "Classpath" exception as provided - * by Oracle in the LICENSE file that accompanied this code. - * - * 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. + * The Universal Permissive License (UPL), Version 1.0 + * + * Subject to the condition set forth below, permission is hereby granted to any + * person obtaining a copy of this software, associated documentation and/or + * data (collectively the "Software"), free of charge and under any and all + * copyright rights in the Software, and any and all patent rights owned or + * freely licensable by each licensor hereunder covering either (i) the + * unmodified Software as contributed to or provided by such licensor, or (ii) + * the Larger Works (as defined below), to deal in both + * + * (a) the Software, and + * + * (b) any piece of software and/or hardware listed in the lrgrwrks.txt file if + * one is included with the Software each a "Larger Work" to which the Software + * is contributed by such licensors), + * + * without restriction, including without limitation the rights to copy, create + * derivative works of, display, perform, and distribute the Software and make, + * use, sell, offer for sale, import, export, have made, and have sold the + * Software and the Larger Work(s), and to sublicense the foregoing rights on + * either these or other terms. + * + * This license is subject to the following condition: + * + * The above copyright notice and either this complete permission notice or at a + * minimum a reference to the UPL must be included in all copies or substantial + * portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. */ package org.graalvm.nativebridge.processor.test.common; diff --git a/sdk/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/common/InvalidBaseType3Test.java b/sdk/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/common/InvalidBaseType3Test.java index 6f1f9e3ab2ff..eb82a9e1193d 100644 --- a/sdk/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/common/InvalidBaseType3Test.java +++ b/sdk/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/common/InvalidBaseType3Test.java @@ -1,26 +1,42 @@ /* - * Copyright (c) 2022, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2021, 2023, 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. Oracle designates this - * particular file as subject to the "Classpath" exception as provided - * by Oracle in the LICENSE file that accompanied this code. - * - * 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. + * The Universal Permissive License (UPL), Version 1.0 + * + * Subject to the condition set forth below, permission is hereby granted to any + * person obtaining a copy of this software, associated documentation and/or + * data (collectively the "Software"), free of charge and under any and all + * copyright rights in the Software, and any and all patent rights owned or + * freely licensable by each licensor hereunder covering either (i) the + * unmodified Software as contributed to or provided by such licensor, or (ii) + * the Larger Works (as defined below), to deal in both + * + * (a) the Software, and + * + * (b) any piece of software and/or hardware listed in the lrgrwrks.txt file if + * one is included with the Software each a "Larger Work" to which the Software + * is contributed by such licensors), + * + * without restriction, including without limitation the rights to copy, create + * derivative works of, display, perform, and distribute the Software and make, + * use, sell, offer for sale, import, export, have made, and have sold the + * Software and the Larger Work(s), and to sublicense the foregoing rights on + * either these or other terms. + * + * This license is subject to the following condition: + * + * The above copyright notice and either this complete permission notice or at a + * minimum a reference to the UPL must be included in all copies or substantial + * portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. */ package org.graalvm.nativebridge.processor.test.common; diff --git a/sdk/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/common/InvalidConstructorTest.java b/sdk/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/common/InvalidConstructorTest.java index bf77e8b93ddd..a58e6c7bdc96 100644 --- a/sdk/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/common/InvalidConstructorTest.java +++ b/sdk/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/common/InvalidConstructorTest.java @@ -1,26 +1,42 @@ /* - * Copyright (c) 2022, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2021, 2023, 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. Oracle designates this - * particular file as subject to the "Classpath" exception as provided - * by Oracle in the LICENSE file that accompanied this code. - * - * 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. + * The Universal Permissive License (UPL), Version 1.0 + * + * Subject to the condition set forth below, permission is hereby granted to any + * person obtaining a copy of this software, associated documentation and/or + * data (collectively the "Software"), free of charge and under any and all + * copyright rights in the Software, and any and all patent rights owned or + * freely licensable by each licensor hereunder covering either (i) the + * unmodified Software as contributed to or provided by such licensor, or (ii) + * the Larger Works (as defined below), to deal in both + * + * (a) the Software, and + * + * (b) any piece of software and/or hardware listed in the lrgrwrks.txt file if + * one is included with the Software each a "Larger Work" to which the Software + * is contributed by such licensors), + * + * without restriction, including without limitation the rights to copy, create + * derivative works of, display, perform, and distribute the Software and make, + * use, sell, offer for sale, import, export, have made, and have sold the + * Software and the Larger Work(s), and to sublicense the foregoing rights on + * either these or other terms. + * + * This license is subject to the following condition: + * + * The above copyright notice and either this complete permission notice or at a + * minimum a reference to the UPL must be included in all copies or substantial + * portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. */ package org.graalvm.nativebridge.processor.test.common; diff --git a/sdk/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/common/InvalidCustomDispatchAccessor1Test.java b/sdk/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/common/InvalidCustomDispatchAccessor1Test.java index ba7f1c2df8dd..3dc100513bdf 100644 --- a/sdk/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/common/InvalidCustomDispatchAccessor1Test.java +++ b/sdk/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/common/InvalidCustomDispatchAccessor1Test.java @@ -1,26 +1,42 @@ /* - * Copyright (c) 2022, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2021, 2023, 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. Oracle designates this - * particular file as subject to the "Classpath" exception as provided - * by Oracle in the LICENSE file that accompanied this code. - * - * 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. + * The Universal Permissive License (UPL), Version 1.0 + * + * Subject to the condition set forth below, permission is hereby granted to any + * person obtaining a copy of this software, associated documentation and/or + * data (collectively the "Software"), free of charge and under any and all + * copyright rights in the Software, and any and all patent rights owned or + * freely licensable by each licensor hereunder covering either (i) the + * unmodified Software as contributed to or provided by such licensor, or (ii) + * the Larger Works (as defined below), to deal in both + * + * (a) the Software, and + * + * (b) any piece of software and/or hardware listed in the lrgrwrks.txt file if + * one is included with the Software each a "Larger Work" to which the Software + * is contributed by such licensors), + * + * without restriction, including without limitation the rights to copy, create + * derivative works of, display, perform, and distribute the Software and make, + * use, sell, offer for sale, import, export, have made, and have sold the + * Software and the Larger Work(s), and to sublicense the foregoing rights on + * either these or other terms. + * + * This license is subject to the following condition: + * + * The above copyright notice and either this complete permission notice or at a + * minimum a reference to the UPL must be included in all copies or substantial + * portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. */ package org.graalvm.nativebridge.processor.test.common; diff --git a/sdk/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/common/InvalidCustomDispatchAccessor2Test.java b/sdk/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/common/InvalidCustomDispatchAccessor2Test.java index 71bd89d472f7..94558c509bc0 100644 --- a/sdk/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/common/InvalidCustomDispatchAccessor2Test.java +++ b/sdk/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/common/InvalidCustomDispatchAccessor2Test.java @@ -1,26 +1,42 @@ /* - * Copyright (c) 2022, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2021, 2023, 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. Oracle designates this - * particular file as subject to the "Classpath" exception as provided - * by Oracle in the LICENSE file that accompanied this code. - * - * 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. + * The Universal Permissive License (UPL), Version 1.0 + * + * Subject to the condition set forth below, permission is hereby granted to any + * person obtaining a copy of this software, associated documentation and/or + * data (collectively the "Software"), free of charge and under any and all + * copyright rights in the Software, and any and all patent rights owned or + * freely licensable by each licensor hereunder covering either (i) the + * unmodified Software as contributed to or provided by such licensor, or (ii) + * the Larger Works (as defined below), to deal in both + * + * (a) the Software, and + * + * (b) any piece of software and/or hardware listed in the lrgrwrks.txt file if + * one is included with the Software each a "Larger Work" to which the Software + * is contributed by such licensors), + * + * without restriction, including without limitation the rights to copy, create + * derivative works of, display, perform, and distribute the Software and make, + * use, sell, offer for sale, import, export, have made, and have sold the + * Software and the Larger Work(s), and to sublicense the foregoing rights on + * either these or other terms. + * + * This license is subject to the following condition: + * + * The above copyright notice and either this complete permission notice or at a + * minimum a reference to the UPL must be included in all copies or substantial + * portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. */ package org.graalvm.nativebridge.processor.test.common; diff --git a/sdk/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/common/InvalidCustomDispatchAccessor3Test.java b/sdk/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/common/InvalidCustomDispatchAccessor3Test.java index 2a235900dd99..13a3ff5da8a3 100644 --- a/sdk/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/common/InvalidCustomDispatchAccessor3Test.java +++ b/sdk/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/common/InvalidCustomDispatchAccessor3Test.java @@ -1,26 +1,42 @@ /* - * Copyright (c) 2022, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2021, 2023, 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. Oracle designates this - * particular file as subject to the "Classpath" exception as provided - * by Oracle in the LICENSE file that accompanied this code. - * - * 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. + * The Universal Permissive License (UPL), Version 1.0 + * + * Subject to the condition set forth below, permission is hereby granted to any + * person obtaining a copy of this software, associated documentation and/or + * data (collectively the "Software"), free of charge and under any and all + * copyright rights in the Software, and any and all patent rights owned or + * freely licensable by each licensor hereunder covering either (i) the + * unmodified Software as contributed to or provided by such licensor, or (ii) + * the Larger Works (as defined below), to deal in both + * + * (a) the Software, and + * + * (b) any piece of software and/or hardware listed in the lrgrwrks.txt file if + * one is included with the Software each a "Larger Work" to which the Software + * is contributed by such licensors), + * + * without restriction, including without limitation the rights to copy, create + * derivative works of, display, perform, and distribute the Software and make, + * use, sell, offer for sale, import, export, have made, and have sold the + * Software and the Larger Work(s), and to sublicense the foregoing rights on + * either these or other terms. + * + * This license is subject to the following condition: + * + * The above copyright notice and either this complete permission notice or at a + * minimum a reference to the UPL must be included in all copies or substantial + * portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. */ package org.graalvm.nativebridge.processor.test.common; diff --git a/sdk/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/common/InvalidCustomDispatchAccessor4Test.java b/sdk/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/common/InvalidCustomDispatchAccessor4Test.java index b83f3e35c2bc..673f88024af8 100644 --- a/sdk/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/common/InvalidCustomDispatchAccessor4Test.java +++ b/sdk/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/common/InvalidCustomDispatchAccessor4Test.java @@ -1,26 +1,42 @@ /* - * Copyright (c) 2022, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2021, 2023, 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. Oracle designates this - * particular file as subject to the "Classpath" exception as provided - * by Oracle in the LICENSE file that accompanied this code. - * - * 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. + * The Universal Permissive License (UPL), Version 1.0 + * + * Subject to the condition set forth below, permission is hereby granted to any + * person obtaining a copy of this software, associated documentation and/or + * data (collectively the "Software"), free of charge and under any and all + * copyright rights in the Software, and any and all patent rights owned or + * freely licensable by each licensor hereunder covering either (i) the + * unmodified Software as contributed to or provided by such licensor, or (ii) + * the Larger Works (as defined below), to deal in both + * + * (a) the Software, and + * + * (b) any piece of software and/or hardware listed in the lrgrwrks.txt file if + * one is included with the Software each a "Larger Work" to which the Software + * is contributed by such licensors), + * + * without restriction, including without limitation the rights to copy, create + * derivative works of, display, perform, and distribute the Software and make, + * use, sell, offer for sale, import, export, have made, and have sold the + * Software and the Larger Work(s), and to sublicense the foregoing rights on + * either these or other terms. + * + * This license is subject to the following condition: + * + * The above copyright notice and either this complete permission notice or at a + * minimum a reference to the UPL must be included in all copies or substantial + * portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. */ package org.graalvm.nativebridge.processor.test.common; diff --git a/sdk/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/common/InvalidCustomDispatchAccessor5Test.java b/sdk/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/common/InvalidCustomDispatchAccessor5Test.java index e5ee3e69a2c0..667f9f9480db 100644 --- a/sdk/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/common/InvalidCustomDispatchAccessor5Test.java +++ b/sdk/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/common/InvalidCustomDispatchAccessor5Test.java @@ -1,26 +1,42 @@ /* - * Copyright (c) 2022, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2021, 2023, 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. Oracle designates this - * particular file as subject to the "Classpath" exception as provided - * by Oracle in the LICENSE file that accompanied this code. - * - * 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. + * The Universal Permissive License (UPL), Version 1.0 + * + * Subject to the condition set forth below, permission is hereby granted to any + * person obtaining a copy of this software, associated documentation and/or + * data (collectively the "Software"), free of charge and under any and all + * copyright rights in the Software, and any and all patent rights owned or + * freely licensable by each licensor hereunder covering either (i) the + * unmodified Software as contributed to or provided by such licensor, or (ii) + * the Larger Works (as defined below), to deal in both + * + * (a) the Software, and + * + * (b) any piece of software and/or hardware listed in the lrgrwrks.txt file if + * one is included with the Software each a "Larger Work" to which the Software + * is contributed by such licensors), + * + * without restriction, including without limitation the rights to copy, create + * derivative works of, display, perform, and distribute the Software and make, + * use, sell, offer for sale, import, export, have made, and have sold the + * Software and the Larger Work(s), and to sublicense the foregoing rights on + * either these or other terms. + * + * This license is subject to the following condition: + * + * The above copyright notice and either this complete permission notice or at a + * minimum a reference to the UPL must be included in all copies or substantial + * portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. */ package org.graalvm.nativebridge.processor.test.common; diff --git a/sdk/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/common/InvalidCustomDispatchAccessor6Test.java b/sdk/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/common/InvalidCustomDispatchAccessor6Test.java index 0ac95e2ce0a4..d963bab8c224 100644 --- a/sdk/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/common/InvalidCustomDispatchAccessor6Test.java +++ b/sdk/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/common/InvalidCustomDispatchAccessor6Test.java @@ -1,26 +1,42 @@ /* - * Copyright (c) 2022, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2021, 2023, 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. Oracle designates this - * particular file as subject to the "Classpath" exception as provided - * by Oracle in the LICENSE file that accompanied this code. - * - * 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. + * The Universal Permissive License (UPL), Version 1.0 + * + * Subject to the condition set forth below, permission is hereby granted to any + * person obtaining a copy of this software, associated documentation and/or + * data (collectively the "Software"), free of charge and under any and all + * copyright rights in the Software, and any and all patent rights owned or + * freely licensable by each licensor hereunder covering either (i) the + * unmodified Software as contributed to or provided by such licensor, or (ii) + * the Larger Works (as defined below), to deal in both + * + * (a) the Software, and + * + * (b) any piece of software and/or hardware listed in the lrgrwrks.txt file if + * one is included with the Software each a "Larger Work" to which the Software + * is contributed by such licensors), + * + * without restriction, including without limitation the rights to copy, create + * derivative works of, display, perform, and distribute the Software and make, + * use, sell, offer for sale, import, export, have made, and have sold the + * Software and the Larger Work(s), and to sublicense the foregoing rights on + * either these or other terms. + * + * This license is subject to the following condition: + * + * The above copyright notice and either this complete permission notice or at a + * minimum a reference to the UPL must be included in all copies or substantial + * portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. */ package org.graalvm.nativebridge.processor.test.common; diff --git a/sdk/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/common/InvalidCustomDispatchAccessor7Test.java b/sdk/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/common/InvalidCustomDispatchAccessor7Test.java index 1c8670572320..8e65ba7b3bdc 100644 --- a/sdk/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/common/InvalidCustomDispatchAccessor7Test.java +++ b/sdk/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/common/InvalidCustomDispatchAccessor7Test.java @@ -1,26 +1,42 @@ /* - * Copyright (c) 2022, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2021, 2023, 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. Oracle designates this - * particular file as subject to the "Classpath" exception as provided - * by Oracle in the LICENSE file that accompanied this code. - * - * 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. + * The Universal Permissive License (UPL), Version 1.0 + * + * Subject to the condition set forth below, permission is hereby granted to any + * person obtaining a copy of this software, associated documentation and/or + * data (collectively the "Software"), free of charge and under any and all + * copyright rights in the Software, and any and all patent rights owned or + * freely licensable by each licensor hereunder covering either (i) the + * unmodified Software as contributed to or provided by such licensor, or (ii) + * the Larger Works (as defined below), to deal in both + * + * (a) the Software, and + * + * (b) any piece of software and/or hardware listed in the lrgrwrks.txt file if + * one is included with the Software each a "Larger Work" to which the Software + * is contributed by such licensors), + * + * without restriction, including without limitation the rights to copy, create + * derivative works of, display, perform, and distribute the Software and make, + * use, sell, offer for sale, import, export, have made, and have sold the + * Software and the Larger Work(s), and to sublicense the foregoing rights on + * either these or other terms. + * + * This license is subject to the following condition: + * + * The above copyright notice and either this complete permission notice or at a + * minimum a reference to the UPL must be included in all copies or substantial + * portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. */ package org.graalvm.nativebridge.processor.test.common; diff --git a/sdk/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/common/InvalidCustomDispatchFactory1Test.java b/sdk/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/common/InvalidCustomDispatchFactory1Test.java index d7731bbaebb6..0720ff86b516 100644 --- a/sdk/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/common/InvalidCustomDispatchFactory1Test.java +++ b/sdk/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/common/InvalidCustomDispatchFactory1Test.java @@ -1,26 +1,42 @@ /* - * Copyright (c) 2022, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2021, 2023, 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. Oracle designates this - * particular file as subject to the "Classpath" exception as provided - * by Oracle in the LICENSE file that accompanied this code. - * - * 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. + * The Universal Permissive License (UPL), Version 1.0 + * + * Subject to the condition set forth below, permission is hereby granted to any + * person obtaining a copy of this software, associated documentation and/or + * data (collectively the "Software"), free of charge and under any and all + * copyright rights in the Software, and any and all patent rights owned or + * freely licensable by each licensor hereunder covering either (i) the + * unmodified Software as contributed to or provided by such licensor, or (ii) + * the Larger Works (as defined below), to deal in both + * + * (a) the Software, and + * + * (b) any piece of software and/or hardware listed in the lrgrwrks.txt file if + * one is included with the Software each a "Larger Work" to which the Software + * is contributed by such licensors), + * + * without restriction, including without limitation the rights to copy, create + * derivative works of, display, perform, and distribute the Software and make, + * use, sell, offer for sale, import, export, have made, and have sold the + * Software and the Larger Work(s), and to sublicense the foregoing rights on + * either these or other terms. + * + * This license is subject to the following condition: + * + * The above copyright notice and either this complete permission notice or at a + * minimum a reference to the UPL must be included in all copies or substantial + * portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. */ package org.graalvm.nativebridge.processor.test.common; diff --git a/sdk/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/common/InvalidCustomDispatchFactory2Test.java b/sdk/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/common/InvalidCustomDispatchFactory2Test.java index 4491b70bbe61..65f31d8b5818 100644 --- a/sdk/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/common/InvalidCustomDispatchFactory2Test.java +++ b/sdk/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/common/InvalidCustomDispatchFactory2Test.java @@ -1,26 +1,42 @@ /* - * Copyright (c) 2022, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2021, 2023, 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. Oracle designates this - * particular file as subject to the "Classpath" exception as provided - * by Oracle in the LICENSE file that accompanied this code. - * - * 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. + * The Universal Permissive License (UPL), Version 1.0 + * + * Subject to the condition set forth below, permission is hereby granted to any + * person obtaining a copy of this software, associated documentation and/or + * data (collectively the "Software"), free of charge and under any and all + * copyright rights in the Software, and any and all patent rights owned or + * freely licensable by each licensor hereunder covering either (i) the + * unmodified Software as contributed to or provided by such licensor, or (ii) + * the Larger Works (as defined below), to deal in both + * + * (a) the Software, and + * + * (b) any piece of software and/or hardware listed in the lrgrwrks.txt file if + * one is included with the Software each a "Larger Work" to which the Software + * is contributed by such licensors), + * + * without restriction, including without limitation the rights to copy, create + * derivative works of, display, perform, and distribute the Software and make, + * use, sell, offer for sale, import, export, have made, and have sold the + * Software and the Larger Work(s), and to sublicense the foregoing rights on + * either these or other terms. + * + * This license is subject to the following condition: + * + * The above copyright notice and either this complete permission notice or at a + * minimum a reference to the UPL must be included in all copies or substantial + * portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. */ package org.graalvm.nativebridge.processor.test.common; diff --git a/sdk/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/common/InvalidCustomDispatchFactory3Test.java b/sdk/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/common/InvalidCustomDispatchFactory3Test.java index 7d48810cc511..c59c30865412 100644 --- a/sdk/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/common/InvalidCustomDispatchFactory3Test.java +++ b/sdk/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/common/InvalidCustomDispatchFactory3Test.java @@ -1,26 +1,42 @@ /* - * Copyright (c) 2022, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2021, 2023, 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. Oracle designates this - * particular file as subject to the "Classpath" exception as provided - * by Oracle in the LICENSE file that accompanied this code. - * - * 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. + * The Universal Permissive License (UPL), Version 1.0 + * + * Subject to the condition set forth below, permission is hereby granted to any + * person obtaining a copy of this software, associated documentation and/or + * data (collectively the "Software"), free of charge and under any and all + * copyright rights in the Software, and any and all patent rights owned or + * freely licensable by each licensor hereunder covering either (i) the + * unmodified Software as contributed to or provided by such licensor, or (ii) + * the Larger Works (as defined below), to deal in both + * + * (a) the Software, and + * + * (b) any piece of software and/or hardware listed in the lrgrwrks.txt file if + * one is included with the Software each a "Larger Work" to which the Software + * is contributed by such licensors), + * + * without restriction, including without limitation the rights to copy, create + * derivative works of, display, perform, and distribute the Software and make, + * use, sell, offer for sale, import, export, have made, and have sold the + * Software and the Larger Work(s), and to sublicense the foregoing rights on + * either these or other terms. + * + * This license is subject to the following condition: + * + * The above copyright notice and either this complete permission notice or at a + * minimum a reference to the UPL must be included in all copies or substantial + * portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. */ package org.graalvm.nativebridge.processor.test.common; diff --git a/sdk/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/common/InvalidCustomDispatchFactory4Test.java b/sdk/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/common/InvalidCustomDispatchFactory4Test.java index b3a5209189e1..96e64549903c 100644 --- a/sdk/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/common/InvalidCustomDispatchFactory4Test.java +++ b/sdk/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/common/InvalidCustomDispatchFactory4Test.java @@ -1,26 +1,42 @@ /* - * Copyright (c) 2022, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2021, 2023, 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. Oracle designates this - * particular file as subject to the "Classpath" exception as provided - * by Oracle in the LICENSE file that accompanied this code. - * - * 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. + * The Universal Permissive License (UPL), Version 1.0 + * + * Subject to the condition set forth below, permission is hereby granted to any + * person obtaining a copy of this software, associated documentation and/or + * data (collectively the "Software"), free of charge and under any and all + * copyright rights in the Software, and any and all patent rights owned or + * freely licensable by each licensor hereunder covering either (i) the + * unmodified Software as contributed to or provided by such licensor, or (ii) + * the Larger Works (as defined below), to deal in both + * + * (a) the Software, and + * + * (b) any piece of software and/or hardware listed in the lrgrwrks.txt file if + * one is included with the Software each a "Larger Work" to which the Software + * is contributed by such licensors), + * + * without restriction, including without limitation the rights to copy, create + * derivative works of, display, perform, and distribute the Software and make, + * use, sell, offer for sale, import, export, have made, and have sold the + * Software and the Larger Work(s), and to sublicense the foregoing rights on + * either these or other terms. + * + * This license is subject to the following condition: + * + * The above copyright notice and either this complete permission notice or at a + * minimum a reference to the UPL must be included in all copies or substantial + * portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. */ package org.graalvm.nativebridge.processor.test.common; diff --git a/sdk/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/common/InvalidCustomDispatchFactory5Test.java b/sdk/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/common/InvalidCustomDispatchFactory5Test.java index 167375bb9989..2be887a7bfb5 100644 --- a/sdk/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/common/InvalidCustomDispatchFactory5Test.java +++ b/sdk/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/common/InvalidCustomDispatchFactory5Test.java @@ -1,26 +1,42 @@ /* - * Copyright (c) 2022, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2021, 2023, 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. Oracle designates this - * particular file as subject to the "Classpath" exception as provided - * by Oracle in the LICENSE file that accompanied this code. - * - * 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. + * The Universal Permissive License (UPL), Version 1.0 + * + * Subject to the condition set forth below, permission is hereby granted to any + * person obtaining a copy of this software, associated documentation and/or + * data (collectively the "Software"), free of charge and under any and all + * copyright rights in the Software, and any and all patent rights owned or + * freely licensable by each licensor hereunder covering either (i) the + * unmodified Software as contributed to or provided by such licensor, or (ii) + * the Larger Works (as defined below), to deal in both + * + * (a) the Software, and + * + * (b) any piece of software and/or hardware listed in the lrgrwrks.txt file if + * one is included with the Software each a "Larger Work" to which the Software + * is contributed by such licensors), + * + * without restriction, including without limitation the rights to copy, create + * derivative works of, display, perform, and distribute the Software and make, + * use, sell, offer for sale, import, export, have made, and have sold the + * Software and the Larger Work(s), and to sublicense the foregoing rights on + * either these or other terms. + * + * This license is subject to the following condition: + * + * The above copyright notice and either this complete permission notice or at a + * minimum a reference to the UPL must be included in all copies or substantial + * portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. */ package org.graalvm.nativebridge.processor.test.common; diff --git a/sdk/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/common/InvalidCustomDispatchFactory6Test.java b/sdk/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/common/InvalidCustomDispatchFactory6Test.java index b7b94f9dffd3..5af2c6c4b1e8 100644 --- a/sdk/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/common/InvalidCustomDispatchFactory6Test.java +++ b/sdk/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/common/InvalidCustomDispatchFactory6Test.java @@ -1,26 +1,42 @@ /* - * Copyright (c) 2022, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2021, 2023, 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. Oracle designates this - * particular file as subject to the "Classpath" exception as provided - * by Oracle in the LICENSE file that accompanied this code. - * - * 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. + * The Universal Permissive License (UPL), Version 1.0 + * + * Subject to the condition set forth below, permission is hereby granted to any + * person obtaining a copy of this software, associated documentation and/or + * data (collectively the "Software"), free of charge and under any and all + * copyright rights in the Software, and any and all patent rights owned or + * freely licensable by each licensor hereunder covering either (i) the + * unmodified Software as contributed to or provided by such licensor, or (ii) + * the Larger Works (as defined below), to deal in both + * + * (a) the Software, and + * + * (b) any piece of software and/or hardware listed in the lrgrwrks.txt file if + * one is included with the Software each a "Larger Work" to which the Software + * is contributed by such licensors), + * + * without restriction, including without limitation the rights to copy, create + * derivative works of, display, perform, and distribute the Software and make, + * use, sell, offer for sale, import, export, have made, and have sold the + * Software and the Larger Work(s), and to sublicense the foregoing rights on + * either these or other terms. + * + * This license is subject to the following condition: + * + * The above copyright notice and either this complete permission notice or at a + * minimum a reference to the UPL must be included in all copies or substantial + * portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. */ package org.graalvm.nativebridge.processor.test.common; diff --git a/sdk/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/common/InvalidCustomDispatchFactory7Test.java b/sdk/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/common/InvalidCustomDispatchFactory7Test.java index 89af7013ca04..4ae336c36fab 100644 --- a/sdk/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/common/InvalidCustomDispatchFactory7Test.java +++ b/sdk/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/common/InvalidCustomDispatchFactory7Test.java @@ -1,26 +1,42 @@ /* - * Copyright (c) 2022, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2021, 2023, 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. Oracle designates this - * particular file as subject to the "Classpath" exception as provided - * by Oracle in the LICENSE file that accompanied this code. - * - * 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. + * The Universal Permissive License (UPL), Version 1.0 + * + * Subject to the condition set forth below, permission is hereby granted to any + * person obtaining a copy of this software, associated documentation and/or + * data (collectively the "Software"), free of charge and under any and all + * copyright rights in the Software, and any and all patent rights owned or + * freely licensable by each licensor hereunder covering either (i) the + * unmodified Software as contributed to or provided by such licensor, or (ii) + * the Larger Works (as defined below), to deal in both + * + * (a) the Software, and + * + * (b) any piece of software and/or hardware listed in the lrgrwrks.txt file if + * one is included with the Software each a "Larger Work" to which the Software + * is contributed by such licensors), + * + * without restriction, including without limitation the rights to copy, create + * derivative works of, display, perform, and distribute the Software and make, + * use, sell, offer for sale, import, export, have made, and have sold the + * Software and the Larger Work(s), and to sublicense the foregoing rights on + * either these or other terms. + * + * This license is subject to the following condition: + * + * The above copyright notice and either this complete permission notice or at a + * minimum a reference to the UPL must be included in all copies or substantial + * portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. */ package org.graalvm.nativebridge.processor.test.common; diff --git a/sdk/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/common/InvalidCustomDispatchFactory8Test.java b/sdk/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/common/InvalidCustomDispatchFactory8Test.java index 471d0ee39702..b5980dd3f589 100644 --- a/sdk/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/common/InvalidCustomDispatchFactory8Test.java +++ b/sdk/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/common/InvalidCustomDispatchFactory8Test.java @@ -1,26 +1,42 @@ /* - * Copyright (c) 2022, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2021, 2023, 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. Oracle designates this - * particular file as subject to the "Classpath" exception as provided - * by Oracle in the LICENSE file that accompanied this code. - * - * 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. + * The Universal Permissive License (UPL), Version 1.0 + * + * Subject to the condition set forth below, permission is hereby granted to any + * person obtaining a copy of this software, associated documentation and/or + * data (collectively the "Software"), free of charge and under any and all + * copyright rights in the Software, and any and all patent rights owned or + * freely licensable by each licensor hereunder covering either (i) the + * unmodified Software as contributed to or provided by such licensor, or (ii) + * the Larger Works (as defined below), to deal in both + * + * (a) the Software, and + * + * (b) any piece of software and/or hardware listed in the lrgrwrks.txt file if + * one is included with the Software each a "Larger Work" to which the Software + * is contributed by such licensors), + * + * without restriction, including without limitation the rights to copy, create + * derivative works of, display, perform, and distribute the Software and make, + * use, sell, offer for sale, import, export, have made, and have sold the + * Software and the Larger Work(s), and to sublicense the foregoing rights on + * either these or other terms. + * + * This license is subject to the following condition: + * + * The above copyright notice and either this complete permission notice or at a + * minimum a reference to the UPL must be included in all copies or substantial + * portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. */ package org.graalvm.nativebridge.processor.test.common; diff --git a/sdk/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/common/InvalidCustomReceiverAccessor1Test.java b/sdk/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/common/InvalidCustomReceiverAccessor1Test.java index 77ac0f522010..500d90cf1888 100644 --- a/sdk/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/common/InvalidCustomReceiverAccessor1Test.java +++ b/sdk/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/common/InvalidCustomReceiverAccessor1Test.java @@ -1,26 +1,42 @@ /* - * Copyright (c) 2022, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2021, 2023, 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. Oracle designates this - * particular file as subject to the "Classpath" exception as provided - * by Oracle in the LICENSE file that accompanied this code. - * - * 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. + * The Universal Permissive License (UPL), Version 1.0 + * + * Subject to the condition set forth below, permission is hereby granted to any + * person obtaining a copy of this software, associated documentation and/or + * data (collectively the "Software"), free of charge and under any and all + * copyright rights in the Software, and any and all patent rights owned or + * freely licensable by each licensor hereunder covering either (i) the + * unmodified Software as contributed to or provided by such licensor, or (ii) + * the Larger Works (as defined below), to deal in both + * + * (a) the Software, and + * + * (b) any piece of software and/or hardware listed in the lrgrwrks.txt file if + * one is included with the Software each a "Larger Work" to which the Software + * is contributed by such licensors), + * + * without restriction, including without limitation the rights to copy, create + * derivative works of, display, perform, and distribute the Software and make, + * use, sell, offer for sale, import, export, have made, and have sold the + * Software and the Larger Work(s), and to sublicense the foregoing rights on + * either these or other terms. + * + * This license is subject to the following condition: + * + * The above copyright notice and either this complete permission notice or at a + * minimum a reference to the UPL must be included in all copies or substantial + * portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. */ package org.graalvm.nativebridge.processor.test.common; diff --git a/sdk/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/common/InvalidCustomReceiverAccessor2Test.java b/sdk/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/common/InvalidCustomReceiverAccessor2Test.java index 169aad173cc1..cf91d2310412 100644 --- a/sdk/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/common/InvalidCustomReceiverAccessor2Test.java +++ b/sdk/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/common/InvalidCustomReceiverAccessor2Test.java @@ -1,26 +1,42 @@ /* - * Copyright (c) 2022, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2021, 2023, 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. Oracle designates this - * particular file as subject to the "Classpath" exception as provided - * by Oracle in the LICENSE file that accompanied this code. - * - * 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. + * The Universal Permissive License (UPL), Version 1.0 + * + * Subject to the condition set forth below, permission is hereby granted to any + * person obtaining a copy of this software, associated documentation and/or + * data (collectively the "Software"), free of charge and under any and all + * copyright rights in the Software, and any and all patent rights owned or + * freely licensable by each licensor hereunder covering either (i) the + * unmodified Software as contributed to or provided by such licensor, or (ii) + * the Larger Works (as defined below), to deal in both + * + * (a) the Software, and + * + * (b) any piece of software and/or hardware listed in the lrgrwrks.txt file if + * one is included with the Software each a "Larger Work" to which the Software + * is contributed by such licensors), + * + * without restriction, including without limitation the rights to copy, create + * derivative works of, display, perform, and distribute the Software and make, + * use, sell, offer for sale, import, export, have made, and have sold the + * Software and the Larger Work(s), and to sublicense the foregoing rights on + * either these or other terms. + * + * This license is subject to the following condition: + * + * The above copyright notice and either this complete permission notice or at a + * minimum a reference to the UPL must be included in all copies or substantial + * portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. */ package org.graalvm.nativebridge.processor.test.common; diff --git a/sdk/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/common/InvalidCustomReceiverAccessor3Test.java b/sdk/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/common/InvalidCustomReceiverAccessor3Test.java index 7548a8056904..17bff1802a48 100644 --- a/sdk/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/common/InvalidCustomReceiverAccessor3Test.java +++ b/sdk/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/common/InvalidCustomReceiverAccessor3Test.java @@ -1,26 +1,42 @@ /* - * Copyright (c) 2022, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2021, 2023, 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. Oracle designates this - * particular file as subject to the "Classpath" exception as provided - * by Oracle in the LICENSE file that accompanied this code. - * - * 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. + * The Universal Permissive License (UPL), Version 1.0 + * + * Subject to the condition set forth below, permission is hereby granted to any + * person obtaining a copy of this software, associated documentation and/or + * data (collectively the "Software"), free of charge and under any and all + * copyright rights in the Software, and any and all patent rights owned or + * freely licensable by each licensor hereunder covering either (i) the + * unmodified Software as contributed to or provided by such licensor, or (ii) + * the Larger Works (as defined below), to deal in both + * + * (a) the Software, and + * + * (b) any piece of software and/or hardware listed in the lrgrwrks.txt file if + * one is included with the Software each a "Larger Work" to which the Software + * is contributed by such licensors), + * + * without restriction, including without limitation the rights to copy, create + * derivative works of, display, perform, and distribute the Software and make, + * use, sell, offer for sale, import, export, have made, and have sold the + * Software and the Larger Work(s), and to sublicense the foregoing rights on + * either these or other terms. + * + * This license is subject to the following condition: + * + * The above copyright notice and either this complete permission notice or at a + * minimum a reference to the UPL must be included in all copies or substantial + * portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. */ package org.graalvm.nativebridge.processor.test.common; diff --git a/sdk/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/common/InvalidCustomReceiverAccessor4Test.java b/sdk/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/common/InvalidCustomReceiverAccessor4Test.java index 3288fa533ee7..dc1a787fcea4 100644 --- a/sdk/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/common/InvalidCustomReceiverAccessor4Test.java +++ b/sdk/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/common/InvalidCustomReceiverAccessor4Test.java @@ -1,26 +1,42 @@ /* - * Copyright (c) 2022, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2021, 2023, 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. Oracle designates this - * particular file as subject to the "Classpath" exception as provided - * by Oracle in the LICENSE file that accompanied this code. - * - * 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. + * The Universal Permissive License (UPL), Version 1.0 + * + * Subject to the condition set forth below, permission is hereby granted to any + * person obtaining a copy of this software, associated documentation and/or + * data (collectively the "Software"), free of charge and under any and all + * copyright rights in the Software, and any and all patent rights owned or + * freely licensable by each licensor hereunder covering either (i) the + * unmodified Software as contributed to or provided by such licensor, or (ii) + * the Larger Works (as defined below), to deal in both + * + * (a) the Software, and + * + * (b) any piece of software and/or hardware listed in the lrgrwrks.txt file if + * one is included with the Software each a "Larger Work" to which the Software + * is contributed by such licensors), + * + * without restriction, including without limitation the rights to copy, create + * derivative works of, display, perform, and distribute the Software and make, + * use, sell, offer for sale, import, export, have made, and have sold the + * Software and the Larger Work(s), and to sublicense the foregoing rights on + * either these or other terms. + * + * This license is subject to the following condition: + * + * The above copyright notice and either this complete permission notice or at a + * minimum a reference to the UPL must be included in all copies or substantial + * portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. */ package org.graalvm.nativebridge.processor.test.common; diff --git a/sdk/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/common/InvalidCustomReceiverAccessor5Test.java b/sdk/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/common/InvalidCustomReceiverAccessor5Test.java index 106944fbc237..42090f06e207 100644 --- a/sdk/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/common/InvalidCustomReceiverAccessor5Test.java +++ b/sdk/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/common/InvalidCustomReceiverAccessor5Test.java @@ -1,26 +1,42 @@ /* - * Copyright (c) 2022, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2021, 2023, 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. Oracle designates this - * particular file as subject to the "Classpath" exception as provided - * by Oracle in the LICENSE file that accompanied this code. - * - * 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. + * The Universal Permissive License (UPL), Version 1.0 + * + * Subject to the condition set forth below, permission is hereby granted to any + * person obtaining a copy of this software, associated documentation and/or + * data (collectively the "Software"), free of charge and under any and all + * copyright rights in the Software, and any and all patent rights owned or + * freely licensable by each licensor hereunder covering either (i) the + * unmodified Software as contributed to or provided by such licensor, or (ii) + * the Larger Works (as defined below), to deal in both + * + * (a) the Software, and + * + * (b) any piece of software and/or hardware listed in the lrgrwrks.txt file if + * one is included with the Software each a "Larger Work" to which the Software + * is contributed by such licensors), + * + * without restriction, including without limitation the rights to copy, create + * derivative works of, display, perform, and distribute the Software and make, + * use, sell, offer for sale, import, export, have made, and have sold the + * Software and the Larger Work(s), and to sublicense the foregoing rights on + * either these or other terms. + * + * This license is subject to the following condition: + * + * The above copyright notice and either this complete permission notice or at a + * minimum a reference to the UPL must be included in all copies or substantial + * portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. */ package org.graalvm.nativebridge.processor.test.common; diff --git a/sdk/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/common/InvalidCustomReceiverAccessor6Test.java b/sdk/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/common/InvalidCustomReceiverAccessor6Test.java index 591a9b65235e..7eb995b4a9e1 100644 --- a/sdk/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/common/InvalidCustomReceiverAccessor6Test.java +++ b/sdk/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/common/InvalidCustomReceiverAccessor6Test.java @@ -1,26 +1,42 @@ /* - * Copyright (c) 2022, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2021, 2023, 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. Oracle designates this - * particular file as subject to the "Classpath" exception as provided - * by Oracle in the LICENSE file that accompanied this code. - * - * 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. + * The Universal Permissive License (UPL), Version 1.0 + * + * Subject to the condition set forth below, permission is hereby granted to any + * person obtaining a copy of this software, associated documentation and/or + * data (collectively the "Software"), free of charge and under any and all + * copyright rights in the Software, and any and all patent rights owned or + * freely licensable by each licensor hereunder covering either (i) the + * unmodified Software as contributed to or provided by such licensor, or (ii) + * the Larger Works (as defined below), to deal in both + * + * (a) the Software, and + * + * (b) any piece of software and/or hardware listed in the lrgrwrks.txt file if + * one is included with the Software each a "Larger Work" to which the Software + * is contributed by such licensors), + * + * without restriction, including without limitation the rights to copy, create + * derivative works of, display, perform, and distribute the Software and make, + * use, sell, offer for sale, import, export, have made, and have sold the + * Software and the Larger Work(s), and to sublicense the foregoing rights on + * either these or other terms. + * + * This license is subject to the following condition: + * + * The above copyright notice and either this complete permission notice or at a + * minimum a reference to the UPL must be included in all copies or substantial + * portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. */ package org.graalvm.nativebridge.processor.test.common; diff --git a/sdk/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/common/InvalidCustomReceiverAccessor7Test.java b/sdk/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/common/InvalidCustomReceiverAccessor7Test.java index 24a9f217142e..5591b215ad08 100644 --- a/sdk/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/common/InvalidCustomReceiverAccessor7Test.java +++ b/sdk/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/common/InvalidCustomReceiverAccessor7Test.java @@ -1,26 +1,42 @@ /* - * Copyright (c) 2022, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2021, 2023, 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. Oracle designates this - * particular file as subject to the "Classpath" exception as provided - * by Oracle in the LICENSE file that accompanied this code. - * - * 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. + * The Universal Permissive License (UPL), Version 1.0 + * + * Subject to the condition set forth below, permission is hereby granted to any + * person obtaining a copy of this software, associated documentation and/or + * data (collectively the "Software"), free of charge and under any and all + * copyright rights in the Software, and any and all patent rights owned or + * freely licensable by each licensor hereunder covering either (i) the + * unmodified Software as contributed to or provided by such licensor, or (ii) + * the Larger Works (as defined below), to deal in both + * + * (a) the Software, and + * + * (b) any piece of software and/or hardware listed in the lrgrwrks.txt file if + * one is included with the Software each a "Larger Work" to which the Software + * is contributed by such licensors), + * + * without restriction, including without limitation the rights to copy, create + * derivative works of, display, perform, and distribute the Software and make, + * use, sell, offer for sale, import, export, have made, and have sold the + * Software and the Larger Work(s), and to sublicense the foregoing rights on + * either these or other terms. + * + * This license is subject to the following condition: + * + * The above copyright notice and either this complete permission notice or at a + * minimum a reference to the UPL must be included in all copies or substantial + * portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. */ package org.graalvm.nativebridge.processor.test.common; diff --git a/sdk/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/common/InvalidCustomReceiverAccessor8Test.java b/sdk/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/common/InvalidCustomReceiverAccessor8Test.java index ddc098cde7b1..5d2a2ea9ee3b 100644 --- a/sdk/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/common/InvalidCustomReceiverAccessor8Test.java +++ b/sdk/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/common/InvalidCustomReceiverAccessor8Test.java @@ -1,26 +1,42 @@ /* - * Copyright (c) 2022, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2021, 2023, 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. Oracle designates this - * particular file as subject to the "Classpath" exception as provided - * by Oracle in the LICENSE file that accompanied this code. - * - * 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. + * The Universal Permissive License (UPL), Version 1.0 + * + * Subject to the condition set forth below, permission is hereby granted to any + * person obtaining a copy of this software, associated documentation and/or + * data (collectively the "Software"), free of charge and under any and all + * copyright rights in the Software, and any and all patent rights owned or + * freely licensable by each licensor hereunder covering either (i) the + * unmodified Software as contributed to or provided by such licensor, or (ii) + * the Larger Works (as defined below), to deal in both + * + * (a) the Software, and + * + * (b) any piece of software and/or hardware listed in the lrgrwrks.txt file if + * one is included with the Software each a "Larger Work" to which the Software + * is contributed by such licensors), + * + * without restriction, including without limitation the rights to copy, create + * derivative works of, display, perform, and distribute the Software and make, + * use, sell, offer for sale, import, export, have made, and have sold the + * Software and the Larger Work(s), and to sublicense the foregoing rights on + * either these or other terms. + * + * This license is subject to the following condition: + * + * The above copyright notice and either this complete permission notice or at a + * minimum a reference to the UPL must be included in all copies or substantial + * portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. */ package org.graalvm.nativebridge.processor.test.common; diff --git a/sdk/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/common/InvalidEndPointHandle1Test.java b/sdk/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/common/InvalidEndPointHandle1Test.java index e0710bc56077..ef79fae6438f 100644 --- a/sdk/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/common/InvalidEndPointHandle1Test.java +++ b/sdk/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/common/InvalidEndPointHandle1Test.java @@ -1,26 +1,42 @@ /* - * Copyright (c) 2022, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2021, 2023, 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. Oracle designates this - * particular file as subject to the "Classpath" exception as provided - * by Oracle in the LICENSE file that accompanied this code. - * - * 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. + * The Universal Permissive License (UPL), Version 1.0 + * + * Subject to the condition set forth below, permission is hereby granted to any + * person obtaining a copy of this software, associated documentation and/or + * data (collectively the "Software"), free of charge and under any and all + * copyright rights in the Software, and any and all patent rights owned or + * freely licensable by each licensor hereunder covering either (i) the + * unmodified Software as contributed to or provided by such licensor, or (ii) + * the Larger Works (as defined below), to deal in both + * + * (a) the Software, and + * + * (b) any piece of software and/or hardware listed in the lrgrwrks.txt file if + * one is included with the Software each a "Larger Work" to which the Software + * is contributed by such licensors), + * + * without restriction, including without limitation the rights to copy, create + * derivative works of, display, perform, and distribute the Software and make, + * use, sell, offer for sale, import, export, have made, and have sold the + * Software and the Larger Work(s), and to sublicense the foregoing rights on + * either these or other terms. + * + * This license is subject to the following condition: + * + * The above copyright notice and either this complete permission notice or at a + * minimum a reference to the UPL must be included in all copies or substantial + * portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. */ package org.graalvm.nativebridge.processor.test.common; diff --git a/sdk/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/common/InvalidEndPointHandle2Test.java b/sdk/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/common/InvalidEndPointHandle2Test.java index 9c7e4aa0e961..954d1a652ecc 100644 --- a/sdk/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/common/InvalidEndPointHandle2Test.java +++ b/sdk/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/common/InvalidEndPointHandle2Test.java @@ -1,26 +1,42 @@ /* - * Copyright (c) 2022, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2021, 2023, 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. Oracle designates this - * particular file as subject to the "Classpath" exception as provided - * by Oracle in the LICENSE file that accompanied this code. - * - * 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. + * The Universal Permissive License (UPL), Version 1.0 + * + * Subject to the condition set forth below, permission is hereby granted to any + * person obtaining a copy of this software, associated documentation and/or + * data (collectively the "Software"), free of charge and under any and all + * copyright rights in the Software, and any and all patent rights owned or + * freely licensable by each licensor hereunder covering either (i) the + * unmodified Software as contributed to or provided by such licensor, or (ii) + * the Larger Works (as defined below), to deal in both + * + * (a) the Software, and + * + * (b) any piece of software and/or hardware listed in the lrgrwrks.txt file if + * one is included with the Software each a "Larger Work" to which the Software + * is contributed by such licensors), + * + * without restriction, including without limitation the rights to copy, create + * derivative works of, display, perform, and distribute the Software and make, + * use, sell, offer for sale, import, export, have made, and have sold the + * Software and the Larger Work(s), and to sublicense the foregoing rights on + * either these or other terms. + * + * This license is subject to the following condition: + * + * The above copyright notice and either this complete permission notice or at a + * minimum a reference to the UPL must be included in all copies or substantial + * portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. */ package org.graalvm.nativebridge.processor.test.common; diff --git a/sdk/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/common/InvalidIdempotentTest.java b/sdk/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/common/InvalidIdempotentTest.java index 7d065bbe5d1d..406104020b05 100644 --- a/sdk/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/common/InvalidIdempotentTest.java +++ b/sdk/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/common/InvalidIdempotentTest.java @@ -1,26 +1,42 @@ /* - * Copyright (c) 2023, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2021, 2023, 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. Oracle designates this - * particular file as subject to the "Classpath" exception as provided - * by Oracle in the LICENSE file that accompanied this code. - * - * 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. + * The Universal Permissive License (UPL), Version 1.0 + * + * Subject to the condition set forth below, permission is hereby granted to any + * person obtaining a copy of this software, associated documentation and/or + * data (collectively the "Software"), free of charge and under any and all + * copyright rights in the Software, and any and all patent rights owned or + * freely licensable by each licensor hereunder covering either (i) the + * unmodified Software as contributed to or provided by such licensor, or (ii) + * the Larger Works (as defined below), to deal in both + * + * (a) the Software, and + * + * (b) any piece of software and/or hardware listed in the lrgrwrks.txt file if + * one is included with the Software each a "Larger Work" to which the Software + * is contributed by such licensors), + * + * without restriction, including without limitation the rights to copy, create + * derivative works of, display, perform, and distribute the Software and make, + * use, sell, offer for sale, import, export, have made, and have sold the + * Software and the Larger Work(s), and to sublicense the foregoing rights on + * either these or other terms. + * + * This license is subject to the following condition: + * + * The above copyright notice and either this complete permission notice or at a + * minimum a reference to the UPL must be included in all copies or substantial + * portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. */ package org.graalvm.nativebridge.processor.test.common; diff --git a/sdk/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/common/InvalidJNIConfig1Test.java b/sdk/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/common/InvalidJNIConfig1Test.java index 10e2dcce021b..a641109bb917 100644 --- a/sdk/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/common/InvalidJNIConfig1Test.java +++ b/sdk/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/common/InvalidJNIConfig1Test.java @@ -1,26 +1,42 @@ /* - * Copyright (c) 2022, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2021, 2023, 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. Oracle designates this - * particular file as subject to the "Classpath" exception as provided - * by Oracle in the LICENSE file that accompanied this code. - * - * 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. + * The Universal Permissive License (UPL), Version 1.0 + * + * Subject to the condition set forth below, permission is hereby granted to any + * person obtaining a copy of this software, associated documentation and/or + * data (collectively the "Software"), free of charge and under any and all + * copyright rights in the Software, and any and all patent rights owned or + * freely licensable by each licensor hereunder covering either (i) the + * unmodified Software as contributed to or provided by such licensor, or (ii) + * the Larger Works (as defined below), to deal in both + * + * (a) the Software, and + * + * (b) any piece of software and/or hardware listed in the lrgrwrks.txt file if + * one is included with the Software each a "Larger Work" to which the Software + * is contributed by such licensors), + * + * without restriction, including without limitation the rights to copy, create + * derivative works of, display, perform, and distribute the Software and make, + * use, sell, offer for sale, import, export, have made, and have sold the + * Software and the Larger Work(s), and to sublicense the foregoing rights on + * either these or other terms. + * + * This license is subject to the following condition: + * + * The above copyright notice and either this complete permission notice or at a + * minimum a reference to the UPL must be included in all copies or substantial + * portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. */ package org.graalvm.nativebridge.processor.test.common; diff --git a/sdk/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/common/InvalidJNIConfig2Test.java b/sdk/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/common/InvalidJNIConfig2Test.java index 3d34ac2f9d34..ca6afb302209 100644 --- a/sdk/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/common/InvalidJNIConfig2Test.java +++ b/sdk/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/common/InvalidJNIConfig2Test.java @@ -1,26 +1,42 @@ /* - * Copyright (c) 2022, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2021, 2023, 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. Oracle designates this - * particular file as subject to the "Classpath" exception as provided - * by Oracle in the LICENSE file that accompanied this code. - * - * 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. + * The Universal Permissive License (UPL), Version 1.0 + * + * Subject to the condition set forth below, permission is hereby granted to any + * person obtaining a copy of this software, associated documentation and/or + * data (collectively the "Software"), free of charge and under any and all + * copyright rights in the Software, and any and all patent rights owned or + * freely licensable by each licensor hereunder covering either (i) the + * unmodified Software as contributed to or provided by such licensor, or (ii) + * the Larger Works (as defined below), to deal in both + * + * (a) the Software, and + * + * (b) any piece of software and/or hardware listed in the lrgrwrks.txt file if + * one is included with the Software each a "Larger Work" to which the Software + * is contributed by such licensors), + * + * without restriction, including without limitation the rights to copy, create + * derivative works of, display, perform, and distribute the Software and make, + * use, sell, offer for sale, import, export, have made, and have sold the + * Software and the Larger Work(s), and to sublicense the foregoing rights on + * either these or other terms. + * + * This license is subject to the following condition: + * + * The above copyright notice and either this complete permission notice or at a + * minimum a reference to the UPL must be included in all copies or substantial + * portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. */ package org.graalvm.nativebridge.processor.test.common; diff --git a/sdk/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/common/InvalidJNIConfig3Test.java b/sdk/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/common/InvalidJNIConfig3Test.java index 2db1f95bce52..fbe66afcccf7 100644 --- a/sdk/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/common/InvalidJNIConfig3Test.java +++ b/sdk/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/common/InvalidJNIConfig3Test.java @@ -1,26 +1,42 @@ /* - * Copyright (c) 2022, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2021, 2023, 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. Oracle designates this - * particular file as subject to the "Classpath" exception as provided - * by Oracle in the LICENSE file that accompanied this code. - * - * 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. + * The Universal Permissive License (UPL), Version 1.0 + * + * Subject to the condition set forth below, permission is hereby granted to any + * person obtaining a copy of this software, associated documentation and/or + * data (collectively the "Software"), free of charge and under any and all + * copyright rights in the Software, and any and all patent rights owned or + * freely licensable by each licensor hereunder covering either (i) the + * unmodified Software as contributed to or provided by such licensor, or (ii) + * the Larger Works (as defined below), to deal in both + * + * (a) the Software, and + * + * (b) any piece of software and/or hardware listed in the lrgrwrks.txt file if + * one is included with the Software each a "Larger Work" to which the Software + * is contributed by such licensors), + * + * without restriction, including without limitation the rights to copy, create + * derivative works of, display, perform, and distribute the Software and make, + * use, sell, offer for sale, import, export, have made, and have sold the + * Software and the Larger Work(s), and to sublicense the foregoing rights on + * either these or other terms. + * + * This license is subject to the following condition: + * + * The above copyright notice and either this complete permission notice or at a + * minimum a reference to the UPL must be included in all copies or substantial + * portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. */ package org.graalvm.nativebridge.processor.test.common; diff --git a/sdk/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/common/InvalidJNIConfig4Test.java b/sdk/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/common/InvalidJNIConfig4Test.java index a10daa5bf8b3..466cafecefa0 100644 --- a/sdk/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/common/InvalidJNIConfig4Test.java +++ b/sdk/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/common/InvalidJNIConfig4Test.java @@ -1,26 +1,42 @@ /* - * Copyright (c) 2022, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2021, 2023, 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. Oracle designates this - * particular file as subject to the "Classpath" exception as provided - * by Oracle in the LICENSE file that accompanied this code. - * - * 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. + * The Universal Permissive License (UPL), Version 1.0 + * + * Subject to the condition set forth below, permission is hereby granted to any + * person obtaining a copy of this software, associated documentation and/or + * data (collectively the "Software"), free of charge and under any and all + * copyright rights in the Software, and any and all patent rights owned or + * freely licensable by each licensor hereunder covering either (i) the + * unmodified Software as contributed to or provided by such licensor, or (ii) + * the Larger Works (as defined below), to deal in both + * + * (a) the Software, and + * + * (b) any piece of software and/or hardware listed in the lrgrwrks.txt file if + * one is included with the Software each a "Larger Work" to which the Software + * is contributed by such licensors), + * + * without restriction, including without limitation the rights to copy, create + * derivative works of, display, perform, and distribute the Software and make, + * use, sell, offer for sale, import, export, have made, and have sold the + * Software and the Larger Work(s), and to sublicense the foregoing rights on + * either these or other terms. + * + * This license is subject to the following condition: + * + * The above copyright notice and either this complete permission notice or at a + * minimum a reference to the UPL must be included in all copies or substantial + * portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. */ package org.graalvm.nativebridge.processor.test.common; diff --git a/sdk/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/common/InvalidJNIConfig5Test.java b/sdk/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/common/InvalidJNIConfig5Test.java index 80d4b5747b1c..8542bbf140db 100644 --- a/sdk/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/common/InvalidJNIConfig5Test.java +++ b/sdk/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/common/InvalidJNIConfig5Test.java @@ -1,26 +1,42 @@ /* - * Copyright (c) 2022, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2021, 2023, 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. Oracle designates this - * particular file as subject to the "Classpath" exception as provided - * by Oracle in the LICENSE file that accompanied this code. - * - * 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. + * The Universal Permissive License (UPL), Version 1.0 + * + * Subject to the condition set forth below, permission is hereby granted to any + * person obtaining a copy of this software, associated documentation and/or + * data (collectively the "Software"), free of charge and under any and all + * copyright rights in the Software, and any and all patent rights owned or + * freely licensable by each licensor hereunder covering either (i) the + * unmodified Software as contributed to or provided by such licensor, or (ii) + * the Larger Works (as defined below), to deal in both + * + * (a) the Software, and + * + * (b) any piece of software and/or hardware listed in the lrgrwrks.txt file if + * one is included with the Software each a "Larger Work" to which the Software + * is contributed by such licensors), + * + * without restriction, including without limitation the rights to copy, create + * derivative works of, display, perform, and distribute the Software and make, + * use, sell, offer for sale, import, export, have made, and have sold the + * Software and the Larger Work(s), and to sublicense the foregoing rights on + * either these or other terms. + * + * This license is subject to the following condition: + * + * The above copyright notice and either this complete permission notice or at a + * minimum a reference to the UPL must be included in all copies or substantial + * portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. */ package org.graalvm.nativebridge.processor.test.common; diff --git a/sdk/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/common/InvalidMethod1Test.java b/sdk/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/common/InvalidMethod1Test.java index 463f304a0f3e..fcc67ced0d13 100644 --- a/sdk/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/common/InvalidMethod1Test.java +++ b/sdk/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/common/InvalidMethod1Test.java @@ -1,26 +1,42 @@ /* - * Copyright (c) 2022, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2021, 2023, 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. Oracle designates this - * particular file as subject to the "Classpath" exception as provided - * by Oracle in the LICENSE file that accompanied this code. - * - * 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. + * The Universal Permissive License (UPL), Version 1.0 + * + * Subject to the condition set forth below, permission is hereby granted to any + * person obtaining a copy of this software, associated documentation and/or + * data (collectively the "Software"), free of charge and under any and all + * copyright rights in the Software, and any and all patent rights owned or + * freely licensable by each licensor hereunder covering either (i) the + * unmodified Software as contributed to or provided by such licensor, or (ii) + * the Larger Works (as defined below), to deal in both + * + * (a) the Software, and + * + * (b) any piece of software and/or hardware listed in the lrgrwrks.txt file if + * one is included with the Software each a "Larger Work" to which the Software + * is contributed by such licensors), + * + * without restriction, including without limitation the rights to copy, create + * derivative works of, display, perform, and distribute the Software and make, + * use, sell, offer for sale, import, export, have made, and have sold the + * Software and the Larger Work(s), and to sublicense the foregoing rights on + * either these or other terms. + * + * This license is subject to the following condition: + * + * The above copyright notice and either this complete permission notice or at a + * minimum a reference to the UPL must be included in all copies or substantial + * portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. */ package org.graalvm.nativebridge.processor.test.common; diff --git a/sdk/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/common/InvalidMethod2Test.java b/sdk/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/common/InvalidMethod2Test.java index 4471788959db..ad5d3e85ef51 100644 --- a/sdk/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/common/InvalidMethod2Test.java +++ b/sdk/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/common/InvalidMethod2Test.java @@ -1,26 +1,42 @@ /* - * Copyright (c) 2022, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2021, 2023, 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. Oracle designates this - * particular file as subject to the "Classpath" exception as provided - * by Oracle in the LICENSE file that accompanied this code. - * - * 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. + * The Universal Permissive License (UPL), Version 1.0 + * + * Subject to the condition set forth below, permission is hereby granted to any + * person obtaining a copy of this software, associated documentation and/or + * data (collectively the "Software"), free of charge and under any and all + * copyright rights in the Software, and any and all patent rights owned or + * freely licensable by each licensor hereunder covering either (i) the + * unmodified Software as contributed to or provided by such licensor, or (ii) + * the Larger Works (as defined below), to deal in both + * + * (a) the Software, and + * + * (b) any piece of software and/or hardware listed in the lrgrwrks.txt file if + * one is included with the Software each a "Larger Work" to which the Software + * is contributed by such licensors), + * + * without restriction, including without limitation the rights to copy, create + * derivative works of, display, perform, and distribute the Software and make, + * use, sell, offer for sale, import, export, have made, and have sold the + * Software and the Larger Work(s), and to sublicense the foregoing rights on + * either these or other terms. + * + * This license is subject to the following condition: + * + * The above copyright notice and either this complete permission notice or at a + * minimum a reference to the UPL must be included in all copies or substantial + * portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. */ package org.graalvm.nativebridge.processor.test.common; diff --git a/sdk/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/common/InvalidMethod3Test.java b/sdk/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/common/InvalidMethod3Test.java index da99b0283aef..885c15ff76a3 100644 --- a/sdk/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/common/InvalidMethod3Test.java +++ b/sdk/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/common/InvalidMethod3Test.java @@ -1,26 +1,42 @@ /* - * Copyright (c) 2022, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2021, 2023, 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. Oracle designates this - * particular file as subject to the "Classpath" exception as provided - * by Oracle in the LICENSE file that accompanied this code. - * - * 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. + * The Universal Permissive License (UPL), Version 1.0 + * + * Subject to the condition set forth below, permission is hereby granted to any + * person obtaining a copy of this software, associated documentation and/or + * data (collectively the "Software"), free of charge and under any and all + * copyright rights in the Software, and any and all patent rights owned or + * freely licensable by each licensor hereunder covering either (i) the + * unmodified Software as contributed to or provided by such licensor, or (ii) + * the Larger Works (as defined below), to deal in both + * + * (a) the Software, and + * + * (b) any piece of software and/or hardware listed in the lrgrwrks.txt file if + * one is included with the Software each a "Larger Work" to which the Software + * is contributed by such licensors), + * + * without restriction, including without limitation the rights to copy, create + * derivative works of, display, perform, and distribute the Software and make, + * use, sell, offer for sale, import, export, have made, and have sold the + * Software and the Larger Work(s), and to sublicense the foregoing rights on + * either these or other terms. + * + * This license is subject to the following condition: + * + * The above copyright notice and either this complete permission notice or at a + * minimum a reference to the UPL must be included in all copies or substantial + * portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. */ package org.graalvm.nativebridge.processor.test.common; diff --git a/sdk/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/common/InvalidMethod4Test.java b/sdk/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/common/InvalidMethod4Test.java index 5cd14dae48fc..580ec91ba139 100644 --- a/sdk/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/common/InvalidMethod4Test.java +++ b/sdk/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/common/InvalidMethod4Test.java @@ -1,26 +1,42 @@ /* - * Copyright (c) 2022, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2021, 2023, 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. Oracle designates this - * particular file as subject to the "Classpath" exception as provided - * by Oracle in the LICENSE file that accompanied this code. - * - * 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. + * The Universal Permissive License (UPL), Version 1.0 + * + * Subject to the condition set forth below, permission is hereby granted to any + * person obtaining a copy of this software, associated documentation and/or + * data (collectively the "Software"), free of charge and under any and all + * copyright rights in the Software, and any and all patent rights owned or + * freely licensable by each licensor hereunder covering either (i) the + * unmodified Software as contributed to or provided by such licensor, or (ii) + * the Larger Works (as defined below), to deal in both + * + * (a) the Software, and + * + * (b) any piece of software and/or hardware listed in the lrgrwrks.txt file if + * one is included with the Software each a "Larger Work" to which the Software + * is contributed by such licensors), + * + * without restriction, including without limitation the rights to copy, create + * derivative works of, display, perform, and distribute the Software and make, + * use, sell, offer for sale, import, export, have made, and have sold the + * Software and the Larger Work(s), and to sublicense the foregoing rights on + * either these or other terms. + * + * This license is subject to the following condition: + * + * The above copyright notice and either this complete permission notice or at a + * minimum a reference to the UPL must be included in all copies or substantial + * portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. */ package org.graalvm.nativebridge.processor.test.common; diff --git a/sdk/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/common/InvalidMethod5Test.java b/sdk/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/common/InvalidMethod5Test.java index bc7352e71f00..a0ee2e635ed3 100644 --- a/sdk/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/common/InvalidMethod5Test.java +++ b/sdk/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/common/InvalidMethod5Test.java @@ -1,26 +1,42 @@ /* - * Copyright (c) 2022, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2021, 2023, 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. Oracle designates this - * particular file as subject to the "Classpath" exception as provided - * by Oracle in the LICENSE file that accompanied this code. - * - * 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. + * The Universal Permissive License (UPL), Version 1.0 + * + * Subject to the condition set forth below, permission is hereby granted to any + * person obtaining a copy of this software, associated documentation and/or + * data (collectively the "Software"), free of charge and under any and all + * copyright rights in the Software, and any and all patent rights owned or + * freely licensable by each licensor hereunder covering either (i) the + * unmodified Software as contributed to or provided by such licensor, or (ii) + * the Larger Works (as defined below), to deal in both + * + * (a) the Software, and + * + * (b) any piece of software and/or hardware listed in the lrgrwrks.txt file if + * one is included with the Software each a "Larger Work" to which the Software + * is contributed by such licensors), + * + * without restriction, including without limitation the rights to copy, create + * derivative works of, display, perform, and distribute the Software and make, + * use, sell, offer for sale, import, export, have made, and have sold the + * Software and the Larger Work(s), and to sublicense the foregoing rights on + * either these or other terms. + * + * This license is subject to the following condition: + * + * The above copyright notice and either this complete permission notice or at a + * minimum a reference to the UPL must be included in all copies or substantial + * portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. */ package org.graalvm.nativebridge.processor.test.common; diff --git a/sdk/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/common/TestAnnotation1.java b/sdk/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/common/TestAnnotation1.java index 71bdc1ded699..4d377a1d6bb8 100644 --- a/sdk/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/common/TestAnnotation1.java +++ b/sdk/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/common/TestAnnotation1.java @@ -1,26 +1,42 @@ /* - * Copyright (c) 2022, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2021, 2023, 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. Oracle designates this - * particular file as subject to the "Classpath" exception as provided - * by Oracle in the LICENSE file that accompanied this code. - * - * 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. + * The Universal Permissive License (UPL), Version 1.0 + * + * Subject to the condition set forth below, permission is hereby granted to any + * person obtaining a copy of this software, associated documentation and/or + * data (collectively the "Software"), free of charge and under any and all + * copyright rights in the Software, and any and all patent rights owned or + * freely licensable by each licensor hereunder covering either (i) the + * unmodified Software as contributed to or provided by such licensor, or (ii) + * the Larger Works (as defined below), to deal in both + * + * (a) the Software, and + * + * (b) any piece of software and/or hardware listed in the lrgrwrks.txt file if + * one is included with the Software each a "Larger Work" to which the Software + * is contributed by such licensors), + * + * without restriction, including without limitation the rights to copy, create + * derivative works of, display, perform, and distribute the Software and make, + * use, sell, offer for sale, import, export, have made, and have sold the + * Software and the Larger Work(s), and to sublicense the foregoing rights on + * either these or other terms. + * + * This license is subject to the following condition: + * + * The above copyright notice and either this complete permission notice or at a + * minimum a reference to the UPL must be included in all copies or substantial + * portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. */ package org.graalvm.nativebridge.processor.test.common; diff --git a/sdk/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/common/TestAnnotation2.java b/sdk/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/common/TestAnnotation2.java index efee75e9aa00..01a3da0a69ab 100644 --- a/sdk/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/common/TestAnnotation2.java +++ b/sdk/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/common/TestAnnotation2.java @@ -1,26 +1,42 @@ /* - * Copyright (c) 2022, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2021, 2023, 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. Oracle designates this - * particular file as subject to the "Classpath" exception as provided - * by Oracle in the LICENSE file that accompanied this code. - * - * 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. + * The Universal Permissive License (UPL), Version 1.0 + * + * Subject to the condition set forth below, permission is hereby granted to any + * person obtaining a copy of this software, associated documentation and/or + * data (collectively the "Software"), free of charge and under any and all + * copyright rights in the Software, and any and all patent rights owned or + * freely licensable by each licensor hereunder covering either (i) the + * unmodified Software as contributed to or provided by such licensor, or (ii) + * the Larger Works (as defined below), to deal in both + * + * (a) the Software, and + * + * (b) any piece of software and/or hardware listed in the lrgrwrks.txt file if + * one is included with the Software each a "Larger Work" to which the Software + * is contributed by such licensors), + * + * without restriction, including without limitation the rights to copy, create + * derivative works of, display, perform, and distribute the Software and make, + * use, sell, offer for sale, import, export, have made, and have sold the + * Software and the Larger Work(s), and to sublicense the foregoing rights on + * either these or other terms. + * + * This license is subject to the following condition: + * + * The above copyright notice and either this complete permission notice or at a + * minimum a reference to the UPL must be included in all copies or substantial + * portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. */ package org.graalvm.nativebridge.processor.test.common; diff --git a/sdk/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/hstonative/NativeClassImlTest.java b/sdk/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/hstonative/NativeClassImlTest.java index 02fe29590663..eba86345c51e 100644 --- a/sdk/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/hstonative/NativeClassImlTest.java +++ b/sdk/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/hstonative/NativeClassImlTest.java @@ -1,26 +1,42 @@ /* - * Copyright (c) 2022, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2021, 2023, 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. Oracle designates this - * particular file as subject to the "Classpath" exception as provided - * by Oracle in the LICENSE file that accompanied this code. - * - * 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. + * The Universal Permissive License (UPL), Version 1.0 + * + * Subject to the condition set forth below, permission is hereby granted to any + * person obtaining a copy of this software, associated documentation and/or + * data (collectively the "Software"), free of charge and under any and all + * copyright rights in the Software, and any and all patent rights owned or + * freely licensable by each licensor hereunder covering either (i) the + * unmodified Software as contributed to or provided by such licensor, or (ii) + * the Larger Works (as defined below), to deal in both + * + * (a) the Software, and + * + * (b) any piece of software and/or hardware listed in the lrgrwrks.txt file if + * one is included with the Software each a "Larger Work" to which the Software + * is contributed by such licensors), + * + * without restriction, including without limitation the rights to copy, create + * derivative works of, display, perform, and distribute the Software and make, + * use, sell, offer for sale, import, export, have made, and have sold the + * Software and the Larger Work(s), and to sublicense the foregoing rights on + * either these or other terms. + * + * This license is subject to the following condition: + * + * The above copyright notice and either this complete permission notice or at a + * minimum a reference to the UPL must be included in all copies or substantial + * portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. */ package org.graalvm.nativebridge.processor.test.hstonative; diff --git a/sdk/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/hstonative/NativeCustomMarshallerTest.java b/sdk/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/hstonative/NativeCustomMarshallerTest.java index ae2e76896e86..e828eac28d85 100644 --- a/sdk/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/hstonative/NativeCustomMarshallerTest.java +++ b/sdk/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/hstonative/NativeCustomMarshallerTest.java @@ -1,26 +1,42 @@ /* - * Copyright (c) 2022, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2021, 2023, 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. Oracle designates this - * particular file as subject to the "Classpath" exception as provided - * by Oracle in the LICENSE file that accompanied this code. - * - * 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. + * The Universal Permissive License (UPL), Version 1.0 + * + * Subject to the condition set forth below, permission is hereby granted to any + * person obtaining a copy of this software, associated documentation and/or + * data (collectively the "Software"), free of charge and under any and all + * copyright rights in the Software, and any and all patent rights owned or + * freely licensable by each licensor hereunder covering either (i) the + * unmodified Software as contributed to or provided by such licensor, or (ii) + * the Larger Works (as defined below), to deal in both + * + * (a) the Software, and + * + * (b) any piece of software and/or hardware listed in the lrgrwrks.txt file if + * one is included with the Software each a "Larger Work" to which the Software + * is contributed by such licensors), + * + * without restriction, including without limitation the rights to copy, create + * derivative works of, display, perform, and distribute the Software and make, + * use, sell, offer for sale, import, export, have made, and have sold the + * Software and the Larger Work(s), and to sublicense the foregoing rights on + * either these or other terms. + * + * This license is subject to the following condition: + * + * The above copyright notice and either this complete permission notice or at a + * minimum a reference to the UPL must be included in all copies or substantial + * portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. */ package org.graalvm.nativebridge.processor.test.hstonative; diff --git a/sdk/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/hstonative/NativeCustomReceiverImplTest.java b/sdk/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/hstonative/NativeCustomReceiverImplTest.java index d7cfdd4d8358..81b3f120e236 100644 --- a/sdk/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/hstonative/NativeCustomReceiverImplTest.java +++ b/sdk/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/hstonative/NativeCustomReceiverImplTest.java @@ -1,26 +1,42 @@ /* - * Copyright (c) 2022, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2021, 2023, 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. Oracle designates this - * particular file as subject to the "Classpath" exception as provided - * by Oracle in the LICENSE file that accompanied this code. - * - * 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. + * The Universal Permissive License (UPL), Version 1.0 + * + * Subject to the condition set forth below, permission is hereby granted to any + * person obtaining a copy of this software, associated documentation and/or + * data (collectively the "Software"), free of charge and under any and all + * copyright rights in the Software, and any and all patent rights owned or + * freely licensable by each licensor hereunder covering either (i) the + * unmodified Software as contributed to or provided by such licensor, or (ii) + * the Larger Works (as defined below), to deal in both + * + * (a) the Software, and + * + * (b) any piece of software and/or hardware listed in the lrgrwrks.txt file if + * one is included with the Software each a "Larger Work" to which the Software + * is contributed by such licensors), + * + * without restriction, including without limitation the rights to copy, create + * derivative works of, display, perform, and distribute the Software and make, + * use, sell, offer for sale, import, export, have made, and have sold the + * Software and the Larger Work(s), and to sublicense the foregoing rights on + * either these or other terms. + * + * This license is subject to the following condition: + * + * The above copyright notice and either this complete permission notice or at a + * minimum a reference to the UPL must be included in all copies or substantial + * portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. */ package org.graalvm.nativebridge.processor.test.hstonative; diff --git a/sdk/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/hstonative/NativeInterfaceImplTest.java b/sdk/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/hstonative/NativeInterfaceImplTest.java index bb78676482c7..6e3f7f47e726 100644 --- a/sdk/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/hstonative/NativeInterfaceImplTest.java +++ b/sdk/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/hstonative/NativeInterfaceImplTest.java @@ -1,26 +1,42 @@ /* - * Copyright (c) 2022, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2021, 2023, 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. Oracle designates this - * particular file as subject to the "Classpath" exception as provided - * by Oracle in the LICENSE file that accompanied this code. - * - * 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. + * The Universal Permissive License (UPL), Version 1.0 + * + * Subject to the condition set forth below, permission is hereby granted to any + * person obtaining a copy of this software, associated documentation and/or + * data (collectively the "Software"), free of charge and under any and all + * copyright rights in the Software, and any and all patent rights owned or + * freely licensable by each licensor hereunder covering either (i) the + * unmodified Software as contributed to or provided by such licensor, or (ii) + * the Larger Works (as defined below), to deal in both + * + * (a) the Software, and + * + * (b) any piece of software and/or hardware listed in the lrgrwrks.txt file if + * one is included with the Software each a "Larger Work" to which the Software + * is contributed by such licensors), + * + * without restriction, including without limitation the rights to copy, create + * derivative works of, display, perform, and distribute the Software and make, + * use, sell, offer for sale, import, export, have made, and have sold the + * Software and the Larger Work(s), and to sublicense the foregoing rights on + * either these or other terms. + * + * This license is subject to the following condition: + * + * The above copyright notice and either this complete permission notice or at a + * minimum a reference to the UPL must be included in all copies or substantial + * portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. */ package org.graalvm.nativebridge.processor.test.hstonative; diff --git a/sdk/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/hstonative/NativeInvalidBaseTypeTest.java b/sdk/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/hstonative/NativeInvalidBaseTypeTest.java index ad5e816eaf2b..955a19caf8c7 100644 --- a/sdk/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/hstonative/NativeInvalidBaseTypeTest.java +++ b/sdk/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/hstonative/NativeInvalidBaseTypeTest.java @@ -1,26 +1,42 @@ /* - * Copyright (c) 2022, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2021, 2023, 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. Oracle designates this - * particular file as subject to the "Classpath" exception as provided - * by Oracle in the LICENSE file that accompanied this code. - * - * 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. + * The Universal Permissive License (UPL), Version 1.0 + * + * Subject to the condition set forth below, permission is hereby granted to any + * person obtaining a copy of this software, associated documentation and/or + * data (collectively the "Software"), free of charge and under any and all + * copyright rights in the Software, and any and all patent rights owned or + * freely licensable by each licensor hereunder covering either (i) the + * unmodified Software as contributed to or provided by such licensor, or (ii) + * the Larger Works (as defined below), to deal in both + * + * (a) the Software, and + * + * (b) any piece of software and/or hardware listed in the lrgrwrks.txt file if + * one is included with the Software each a "Larger Work" to which the Software + * is contributed by such licensors), + * + * without restriction, including without limitation the rights to copy, create + * derivative works of, display, perform, and distribute the Software and make, + * use, sell, offer for sale, import, export, have made, and have sold the + * Software and the Larger Work(s), and to sublicense the foregoing rights on + * either these or other terms. + * + * This license is subject to the following condition: + * + * The above copyright notice and either this complete permission notice or at a + * minimum a reference to the UPL must be included in all copies or substantial + * portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. */ package org.graalvm.nativebridge.processor.test.hstonative; diff --git a/sdk/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/hstonative/NativeInvalidConstructor1Test.java b/sdk/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/hstonative/NativeInvalidConstructor1Test.java index 08cf62d69614..ea3fbb34eff9 100644 --- a/sdk/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/hstonative/NativeInvalidConstructor1Test.java +++ b/sdk/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/hstonative/NativeInvalidConstructor1Test.java @@ -1,26 +1,42 @@ /* - * Copyright (c) 2022, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2021, 2023, 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. Oracle designates this - * particular file as subject to the "Classpath" exception as provided - * by Oracle in the LICENSE file that accompanied this code. - * - * 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. + * The Universal Permissive License (UPL), Version 1.0 + * + * Subject to the condition set forth below, permission is hereby granted to any + * person obtaining a copy of this software, associated documentation and/or + * data (collectively the "Software"), free of charge and under any and all + * copyright rights in the Software, and any and all patent rights owned or + * freely licensable by each licensor hereunder covering either (i) the + * unmodified Software as contributed to or provided by such licensor, or (ii) + * the Larger Works (as defined below), to deal in both + * + * (a) the Software, and + * + * (b) any piece of software and/or hardware listed in the lrgrwrks.txt file if + * one is included with the Software each a "Larger Work" to which the Software + * is contributed by such licensors), + * + * without restriction, including without limitation the rights to copy, create + * derivative works of, display, perform, and distribute the Software and make, + * use, sell, offer for sale, import, export, have made, and have sold the + * Software and the Larger Work(s), and to sublicense the foregoing rights on + * either these or other terms. + * + * This license is subject to the following condition: + * + * The above copyright notice and either this complete permission notice or at a + * minimum a reference to the UPL must be included in all copies or substantial + * portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. */ package org.graalvm.nativebridge.processor.test.hstonative; diff --git a/sdk/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/hstonative/NativeInvalidConstructor2Test.java b/sdk/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/hstonative/NativeInvalidConstructor2Test.java index 57b1275a186b..8c3bbfa9abf9 100644 --- a/sdk/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/hstonative/NativeInvalidConstructor2Test.java +++ b/sdk/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/hstonative/NativeInvalidConstructor2Test.java @@ -1,26 +1,42 @@ /* - * Copyright (c) 2022, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2021, 2023, 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. Oracle designates this - * particular file as subject to the "Classpath" exception as provided - * by Oracle in the LICENSE file that accompanied this code. - * - * 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. + * The Universal Permissive License (UPL), Version 1.0 + * + * Subject to the condition set forth below, permission is hereby granted to any + * person obtaining a copy of this software, associated documentation and/or + * data (collectively the "Software"), free of charge and under any and all + * copyright rights in the Software, and any and all patent rights owned or + * freely licensable by each licensor hereunder covering either (i) the + * unmodified Software as contributed to or provided by such licensor, or (ii) + * the Larger Works (as defined below), to deal in both + * + * (a) the Software, and + * + * (b) any piece of software and/or hardware listed in the lrgrwrks.txt file if + * one is included with the Software each a "Larger Work" to which the Software + * is contributed by such licensors), + * + * without restriction, including without limitation the rights to copy, create + * derivative works of, display, perform, and distribute the Software and make, + * use, sell, offer for sale, import, export, have made, and have sold the + * Software and the Larger Work(s), and to sublicense the foregoing rights on + * either these or other terms. + * + * This license is subject to the following condition: + * + * The above copyright notice and either this complete permission notice or at a + * minimum a reference to the UPL must be included in all copies or substantial + * portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. */ package org.graalvm.nativebridge.processor.test.hstonative; diff --git a/sdk/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/hstonative/NativeInvalidEndPointHandleTest.java b/sdk/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/hstonative/NativeInvalidEndPointHandleTest.java index 03f809a55561..8cfb31b99326 100644 --- a/sdk/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/hstonative/NativeInvalidEndPointHandleTest.java +++ b/sdk/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/hstonative/NativeInvalidEndPointHandleTest.java @@ -1,26 +1,42 @@ /* - * Copyright (c) 2022, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2021, 2023, 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. Oracle designates this - * particular file as subject to the "Classpath" exception as provided - * by Oracle in the LICENSE file that accompanied this code. - * - * 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. + * The Universal Permissive License (UPL), Version 1.0 + * + * Subject to the condition set forth below, permission is hereby granted to any + * person obtaining a copy of this software, associated documentation and/or + * data (collectively the "Software"), free of charge and under any and all + * copyright rights in the Software, and any and all patent rights owned or + * freely licensable by each licensor hereunder covering either (i) the + * unmodified Software as contributed to or provided by such licensor, or (ii) + * the Larger Works (as defined below), to deal in both + * + * (a) the Software, and + * + * (b) any piece of software and/or hardware listed in the lrgrwrks.txt file if + * one is included with the Software each a "Larger Work" to which the Software + * is contributed by such licensors), + * + * without restriction, including without limitation the rights to copy, create + * derivative works of, display, perform, and distribute the Software and make, + * use, sell, offer for sale, import, export, have made, and have sold the + * Software and the Larger Work(s), and to sublicense the foregoing rights on + * either these or other terms. + * + * This license is subject to the following condition: + * + * The above copyright notice and either this complete permission notice or at a + * minimum a reference to the UPL must be included in all copies or substantial + * portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. */ package org.graalvm.nativebridge.processor.test.hstonative; diff --git a/sdk/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/hstonative/NativeOutParameterService.java b/sdk/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/hstonative/NativeOutParameterService.java index 211a496ebb47..0e726e1f6467 100644 --- a/sdk/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/hstonative/NativeOutParameterService.java +++ b/sdk/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/hstonative/NativeOutParameterService.java @@ -1,26 +1,42 @@ /* - * Copyright (c) 2023, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2021, 2023, 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. Oracle designates this - * particular file as subject to the "Classpath" exception as provided - * by Oracle in the LICENSE file that accompanied this code. + * The Universal Permissive License (UPL), Version 1.0 * - * 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). + * Subject to the condition set forth below, permission is hereby granted to any + * person obtaining a copy of this software, associated documentation and/or + * data (collectively the "Software"), free of charge and under any and all + * copyright rights in the Software, and any and all patent rights owned or + * freely licensable by each licensor hereunder covering either (i) the + * unmodified Software as contributed to or provided by such licensor, or (ii) + * the Larger Works (as defined below), to deal in both * - * 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. + * (a) the Software, and * - * 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. + * (b) any piece of software and/or hardware listed in the lrgrwrks.txt file if + * one is included with the Software each a "Larger Work" to which the Software + * is contributed by such licensors), + * + * without restriction, including without limitation the rights to copy, create + * derivative works of, display, perform, and distribute the Software and make, + * use, sell, offer for sale, import, export, have made, and have sold the + * Software and the Larger Work(s), and to sublicense the foregoing rights on + * either these or other terms. + * + * This license is subject to the following condition: + * + * The above copyright notice and either this complete permission notice or at a + * minimum a reference to the UPL must be included in all copies or substantial + * portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. */ package org.graalvm.nativebridge.processor.test.hstonative; diff --git a/sdk/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/nativetohs/HSClassImplTest.java b/sdk/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/nativetohs/HSClassImplTest.java index 39e8df9ab24c..05a4a59abc2a 100644 --- a/sdk/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/nativetohs/HSClassImplTest.java +++ b/sdk/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/nativetohs/HSClassImplTest.java @@ -1,26 +1,42 @@ /* - * Copyright (c) 2022, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2021, 2023, 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. Oracle designates this - * particular file as subject to the "Classpath" exception as provided - * by Oracle in the LICENSE file that accompanied this code. - * - * 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. + * The Universal Permissive License (UPL), Version 1.0 + * + * Subject to the condition set forth below, permission is hereby granted to any + * person obtaining a copy of this software, associated documentation and/or + * data (collectively the "Software"), free of charge and under any and all + * copyright rights in the Software, and any and all patent rights owned or + * freely licensable by each licensor hereunder covering either (i) the + * unmodified Software as contributed to or provided by such licensor, or (ii) + * the Larger Works (as defined below), to deal in both + * + * (a) the Software, and + * + * (b) any piece of software and/or hardware listed in the lrgrwrks.txt file if + * one is included with the Software each a "Larger Work" to which the Software + * is contributed by such licensors), + * + * without restriction, including without limitation the rights to copy, create + * derivative works of, display, perform, and distribute the Software and make, + * use, sell, offer for sale, import, export, have made, and have sold the + * Software and the Larger Work(s), and to sublicense the foregoing rights on + * either these or other terms. + * + * This license is subject to the following condition: + * + * The above copyright notice and either this complete permission notice or at a + * minimum a reference to the UPL must be included in all copies or substantial + * portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. */ package org.graalvm.nativebridge.processor.test.nativetohs; diff --git a/sdk/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/nativetohs/HSCustomMarshallerTest.java b/sdk/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/nativetohs/HSCustomMarshallerTest.java index 0d6b88c3a8e3..ffafe3c9cbd7 100644 --- a/sdk/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/nativetohs/HSCustomMarshallerTest.java +++ b/sdk/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/nativetohs/HSCustomMarshallerTest.java @@ -1,26 +1,42 @@ /* - * Copyright (c) 2022, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2021, 2023, 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. Oracle designates this - * particular file as subject to the "Classpath" exception as provided - * by Oracle in the LICENSE file that accompanied this code. - * - * 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. + * The Universal Permissive License (UPL), Version 1.0 + * + * Subject to the condition set forth below, permission is hereby granted to any + * person obtaining a copy of this software, associated documentation and/or + * data (collectively the "Software"), free of charge and under any and all + * copyright rights in the Software, and any and all patent rights owned or + * freely licensable by each licensor hereunder covering either (i) the + * unmodified Software as contributed to or provided by such licensor, or (ii) + * the Larger Works (as defined below), to deal in both + * + * (a) the Software, and + * + * (b) any piece of software and/or hardware listed in the lrgrwrks.txt file if + * one is included with the Software each a "Larger Work" to which the Software + * is contributed by such licensors), + * + * without restriction, including without limitation the rights to copy, create + * derivative works of, display, perform, and distribute the Software and make, + * use, sell, offer for sale, import, export, have made, and have sold the + * Software and the Larger Work(s), and to sublicense the foregoing rights on + * either these or other terms. + * + * This license is subject to the following condition: + * + * The above copyright notice and either this complete permission notice or at a + * minimum a reference to the UPL must be included in all copies or substantial + * portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. */ package org.graalvm.nativebridge.processor.test.nativetohs; diff --git a/sdk/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/nativetohs/HSCustomReceiverImplTest.java b/sdk/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/nativetohs/HSCustomReceiverImplTest.java index 9aed018013d6..794f3e02d412 100644 --- a/sdk/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/nativetohs/HSCustomReceiverImplTest.java +++ b/sdk/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/nativetohs/HSCustomReceiverImplTest.java @@ -1,26 +1,42 @@ /* - * Copyright (c) 2022, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2021, 2023, 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. Oracle designates this - * particular file as subject to the "Classpath" exception as provided - * by Oracle in the LICENSE file that accompanied this code. - * - * 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. + * The Universal Permissive License (UPL), Version 1.0 + * + * Subject to the condition set forth below, permission is hereby granted to any + * person obtaining a copy of this software, associated documentation and/or + * data (collectively the "Software"), free of charge and under any and all + * copyright rights in the Software, and any and all patent rights owned or + * freely licensable by each licensor hereunder covering either (i) the + * unmodified Software as contributed to or provided by such licensor, or (ii) + * the Larger Works (as defined below), to deal in both + * + * (a) the Software, and + * + * (b) any piece of software and/or hardware listed in the lrgrwrks.txt file if + * one is included with the Software each a "Larger Work" to which the Software + * is contributed by such licensors), + * + * without restriction, including without limitation the rights to copy, create + * derivative works of, display, perform, and distribute the Software and make, + * use, sell, offer for sale, import, export, have made, and have sold the + * Software and the Larger Work(s), and to sublicense the foregoing rights on + * either these or other terms. + * + * This license is subject to the following condition: + * + * The above copyright notice and either this complete permission notice or at a + * minimum a reference to the UPL must be included in all copies or substantial + * portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. */ package org.graalvm.nativebridge.processor.test.nativetohs; diff --git a/sdk/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/nativetohs/HSInterfaceImplTest.java b/sdk/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/nativetohs/HSInterfaceImplTest.java index 7239324d08f3..86e2f7c612b9 100644 --- a/sdk/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/nativetohs/HSInterfaceImplTest.java +++ b/sdk/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/nativetohs/HSInterfaceImplTest.java @@ -1,26 +1,42 @@ /* - * Copyright (c) 2022, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2021, 2023, 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. Oracle designates this - * particular file as subject to the "Classpath" exception as provided - * by Oracle in the LICENSE file that accompanied this code. - * - * 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. + * The Universal Permissive License (UPL), Version 1.0 + * + * Subject to the condition set forth below, permission is hereby granted to any + * person obtaining a copy of this software, associated documentation and/or + * data (collectively the "Software"), free of charge and under any and all + * copyright rights in the Software, and any and all patent rights owned or + * freely licensable by each licensor hereunder covering either (i) the + * unmodified Software as contributed to or provided by such licensor, or (ii) + * the Larger Works (as defined below), to deal in both + * + * (a) the Software, and + * + * (b) any piece of software and/or hardware listed in the lrgrwrks.txt file if + * one is included with the Software each a "Larger Work" to which the Software + * is contributed by such licensors), + * + * without restriction, including without limitation the rights to copy, create + * derivative works of, display, perform, and distribute the Software and make, + * use, sell, offer for sale, import, export, have made, and have sold the + * Software and the Larger Work(s), and to sublicense the foregoing rights on + * either these or other terms. + * + * This license is subject to the following condition: + * + * The above copyright notice and either this complete permission notice or at a + * minimum a reference to the UPL must be included in all copies or substantial + * portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. */ package org.graalvm.nativebridge.processor.test.nativetohs; diff --git a/sdk/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/nativetohs/HSInvalidBaseTypeTest.java b/sdk/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/nativetohs/HSInvalidBaseTypeTest.java index 648f9cd25782..12a22fbb3f5a 100644 --- a/sdk/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/nativetohs/HSInvalidBaseTypeTest.java +++ b/sdk/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/nativetohs/HSInvalidBaseTypeTest.java @@ -1,26 +1,42 @@ /* - * Copyright (c) 2022, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2021, 2023, 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. Oracle designates this - * particular file as subject to the "Classpath" exception as provided - * by Oracle in the LICENSE file that accompanied this code. - * - * 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. + * The Universal Permissive License (UPL), Version 1.0 + * + * Subject to the condition set forth below, permission is hereby granted to any + * person obtaining a copy of this software, associated documentation and/or + * data (collectively the "Software"), free of charge and under any and all + * copyright rights in the Software, and any and all patent rights owned or + * freely licensable by each licensor hereunder covering either (i) the + * unmodified Software as contributed to or provided by such licensor, or (ii) + * the Larger Works (as defined below), to deal in both + * + * (a) the Software, and + * + * (b) any piece of software and/or hardware listed in the lrgrwrks.txt file if + * one is included with the Software each a "Larger Work" to which the Software + * is contributed by such licensors), + * + * without restriction, including without limitation the rights to copy, create + * derivative works of, display, perform, and distribute the Software and make, + * use, sell, offer for sale, import, export, have made, and have sold the + * Software and the Larger Work(s), and to sublicense the foregoing rights on + * either these or other terms. + * + * This license is subject to the following condition: + * + * The above copyright notice and either this complete permission notice or at a + * minimum a reference to the UPL must be included in all copies or substantial + * portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. */ package org.graalvm.nativebridge.processor.test.nativetohs; diff --git a/sdk/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/nativetohs/HSInvalidConstructor1Test.java b/sdk/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/nativetohs/HSInvalidConstructor1Test.java index eab397fd9e2f..ecf47d8d8327 100644 --- a/sdk/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/nativetohs/HSInvalidConstructor1Test.java +++ b/sdk/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/nativetohs/HSInvalidConstructor1Test.java @@ -1,26 +1,42 @@ /* - * Copyright (c) 2022, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2021, 2023, 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. Oracle designates this - * particular file as subject to the "Classpath" exception as provided - * by Oracle in the LICENSE file that accompanied this code. - * - * 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. + * The Universal Permissive License (UPL), Version 1.0 + * + * Subject to the condition set forth below, permission is hereby granted to any + * person obtaining a copy of this software, associated documentation and/or + * data (collectively the "Software"), free of charge and under any and all + * copyright rights in the Software, and any and all patent rights owned or + * freely licensable by each licensor hereunder covering either (i) the + * unmodified Software as contributed to or provided by such licensor, or (ii) + * the Larger Works (as defined below), to deal in both + * + * (a) the Software, and + * + * (b) any piece of software and/or hardware listed in the lrgrwrks.txt file if + * one is included with the Software each a "Larger Work" to which the Software + * is contributed by such licensors), + * + * without restriction, including without limitation the rights to copy, create + * derivative works of, display, perform, and distribute the Software and make, + * use, sell, offer for sale, import, export, have made, and have sold the + * Software and the Larger Work(s), and to sublicense the foregoing rights on + * either these or other terms. + * + * This license is subject to the following condition: + * + * The above copyright notice and either this complete permission notice or at a + * minimum a reference to the UPL must be included in all copies or substantial + * portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. */ package org.graalvm.nativebridge.processor.test.nativetohs; diff --git a/sdk/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/nativetohs/HSInvalidConstructor2Test.java b/sdk/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/nativetohs/HSInvalidConstructor2Test.java index cd637715b689..f6d2c0328fe9 100644 --- a/sdk/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/nativetohs/HSInvalidConstructor2Test.java +++ b/sdk/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/nativetohs/HSInvalidConstructor2Test.java @@ -1,26 +1,42 @@ /* - * Copyright (c) 2022, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2021, 2023, 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. Oracle designates this - * particular file as subject to the "Classpath" exception as provided - * by Oracle in the LICENSE file that accompanied this code. - * - * 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. + * The Universal Permissive License (UPL), Version 1.0 + * + * Subject to the condition set forth below, permission is hereby granted to any + * person obtaining a copy of this software, associated documentation and/or + * data (collectively the "Software"), free of charge and under any and all + * copyright rights in the Software, and any and all patent rights owned or + * freely licensable by each licensor hereunder covering either (i) the + * unmodified Software as contributed to or provided by such licensor, or (ii) + * the Larger Works (as defined below), to deal in both + * + * (a) the Software, and + * + * (b) any piece of software and/or hardware listed in the lrgrwrks.txt file if + * one is included with the Software each a "Larger Work" to which the Software + * is contributed by such licensors), + * + * without restriction, including without limitation the rights to copy, create + * derivative works of, display, perform, and distribute the Software and make, + * use, sell, offer for sale, import, export, have made, and have sold the + * Software and the Larger Work(s), and to sublicense the foregoing rights on + * either these or other terms. + * + * This license is subject to the following condition: + * + * The above copyright notice and either this complete permission notice or at a + * minimum a reference to the UPL must be included in all copies or substantial + * portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. */ package org.graalvm.nativebridge.processor.test.nativetohs; diff --git a/sdk/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/nativetohs/HSInvalidEndPointHandleTest.java b/sdk/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/nativetohs/HSInvalidEndPointHandleTest.java index cb0706f43642..accc93291a02 100644 --- a/sdk/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/nativetohs/HSInvalidEndPointHandleTest.java +++ b/sdk/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/nativetohs/HSInvalidEndPointHandleTest.java @@ -1,26 +1,42 @@ /* - * Copyright (c) 2022, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2021, 2023, 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. Oracle designates this - * particular file as subject to the "Classpath" exception as provided - * by Oracle in the LICENSE file that accompanied this code. - * - * 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. + * The Universal Permissive License (UPL), Version 1.0 + * + * Subject to the condition set forth below, permission is hereby granted to any + * person obtaining a copy of this software, associated documentation and/or + * data (collectively the "Software"), free of charge and under any and all + * copyright rights in the Software, and any and all patent rights owned or + * freely licensable by each licensor hereunder covering either (i) the + * unmodified Software as contributed to or provided by such licensor, or (ii) + * the Larger Works (as defined below), to deal in both + * + * (a) the Software, and + * + * (b) any piece of software and/or hardware listed in the lrgrwrks.txt file if + * one is included with the Software each a "Larger Work" to which the Software + * is contributed by such licensors), + * + * without restriction, including without limitation the rights to copy, create + * derivative works of, display, perform, and distribute the Software and make, + * use, sell, offer for sale, import, export, have made, and have sold the + * Software and the Larger Work(s), and to sublicense the foregoing rights on + * either these or other terms. + * + * This license is subject to the following condition: + * + * The above copyright notice and either this complete permission notice or at a + * minimum a reference to the UPL must be included in all copies or substantial + * portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. */ package org.graalvm.nativebridge.processor.test.nativetohs; diff --git a/sdk/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/nativetohs/HSOutParameterService.java b/sdk/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/nativetohs/HSOutParameterService.java index dab37e46b801..e3be073a95b5 100644 --- a/sdk/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/nativetohs/HSOutParameterService.java +++ b/sdk/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/nativetohs/HSOutParameterService.java @@ -1,26 +1,42 @@ /* - * Copyright (c) 2022, 2023, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2021, 2023, 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. Oracle designates this - * particular file as subject to the "Classpath" exception as provided - * by Oracle in the LICENSE file that accompanied this code. + * The Universal Permissive License (UPL), Version 1.0 * - * 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). + * Subject to the condition set forth below, permission is hereby granted to any + * person obtaining a copy of this software, associated documentation and/or + * data (collectively the "Software"), free of charge and under any and all + * copyright rights in the Software, and any and all patent rights owned or + * freely licensable by each licensor hereunder covering either (i) the + * unmodified Software as contributed to or provided by such licensor, or (ii) + * the Larger Works (as defined below), to deal in both * - * 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. + * (a) the Software, and * - * 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. + * (b) any piece of software and/or hardware listed in the lrgrwrks.txt file if + * one is included with the Software each a "Larger Work" to which the Software + * is contributed by such licensors), + * + * without restriction, including without limitation the rights to copy, create + * derivative works of, display, perform, and distribute the Software and make, + * use, sell, offer for sale, import, export, have made, and have sold the + * Software and the Larger Work(s), and to sublicense the foregoing rights on + * either these or other terms. + * + * This license is subject to the following condition: + * + * The above copyright notice and either this complete permission notice or at a + * minimum a reference to the UPL must be included in all copies or substantial + * portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. */ package org.graalvm.nativebridge.processor.test.nativetohs; diff --git a/sdk/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/nativetonative/MixedNativeToNativeServiceDifferentConfigs.java b/sdk/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/nativetonative/MixedNativeToNativeServiceDifferentConfigs.java index 41efc8ecc393..ea20f3f688ff 100644 --- a/sdk/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/nativetonative/MixedNativeToNativeServiceDifferentConfigs.java +++ b/sdk/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/nativetonative/MixedNativeToNativeServiceDifferentConfigs.java @@ -1,26 +1,42 @@ /* - * Copyright (c) 2022, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2021, 2023, 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. Oracle designates this - * particular file as subject to the "Classpath" exception as provided - * by Oracle in the LICENSE file that accompanied this code. - * - * 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. + * The Universal Permissive License (UPL), Version 1.0 + * + * Subject to the condition set forth below, permission is hereby granted to any + * person obtaining a copy of this software, associated documentation and/or + * data (collectively the "Software"), free of charge and under any and all + * copyright rights in the Software, and any and all patent rights owned or + * freely licensable by each licensor hereunder covering either (i) the + * unmodified Software as contributed to or provided by such licensor, or (ii) + * the Larger Works (as defined below), to deal in both + * + * (a) the Software, and + * + * (b) any piece of software and/or hardware listed in the lrgrwrks.txt file if + * one is included with the Software each a "Larger Work" to which the Software + * is contributed by such licensors), + * + * without restriction, including without limitation the rights to copy, create + * derivative works of, display, perform, and distribute the Software and make, + * use, sell, offer for sale, import, export, have made, and have sold the + * Software and the Larger Work(s), and to sublicense the foregoing rights on + * either these or other terms. + * + * This license is subject to the following condition: + * + * The above copyright notice and either this complete permission notice or at a + * minimum a reference to the UPL must be included in all copies or substantial + * portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. */ package org.graalvm.nativebridge.processor.test.nativetonative; diff --git a/sdk/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/nativetonative/MixedNativeToNativeServiceSameConfig.java b/sdk/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/nativetonative/MixedNativeToNativeServiceSameConfig.java index 4df0a07e4000..f9934282d1ce 100644 --- a/sdk/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/nativetonative/MixedNativeToNativeServiceSameConfig.java +++ b/sdk/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/nativetonative/MixedNativeToNativeServiceSameConfig.java @@ -1,26 +1,42 @@ /* - * Copyright (c) 2022, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2021, 2023, 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. Oracle designates this - * particular file as subject to the "Classpath" exception as provided - * by Oracle in the LICENSE file that accompanied this code. - * - * 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. + * The Universal Permissive License (UPL), Version 1.0 + * + * Subject to the condition set forth below, permission is hereby granted to any + * person obtaining a copy of this software, associated documentation and/or + * data (collectively the "Software"), free of charge and under any and all + * copyright rights in the Software, and any and all patent rights owned or + * freely licensable by each licensor hereunder covering either (i) the + * unmodified Software as contributed to or provided by such licensor, or (ii) + * the Larger Works (as defined below), to deal in both + * + * (a) the Software, and + * + * (b) any piece of software and/or hardware listed in the lrgrwrks.txt file if + * one is included with the Software each a "Larger Work" to which the Software + * is contributed by such licensors), + * + * without restriction, including without limitation the rights to copy, create + * derivative works of, display, perform, and distribute the Software and make, + * use, sell, offer for sale, import, export, have made, and have sold the + * Software and the Larger Work(s), and to sublicense the foregoing rights on + * either these or other terms. + * + * This license is subject to the following condition: + * + * The above copyright notice and either this complete permission notice or at a + * minimum a reference to the UPL must be included in all copies or substantial + * portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. */ package org.graalvm.nativebridge.processor.test.nativetonative; diff --git a/sdk/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/nativetonative/PureNativeToNativeService.java b/sdk/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/nativetonative/PureNativeToNativeService.java index 8780d7b04899..21dcbed7d960 100644 --- a/sdk/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/nativetonative/PureNativeToNativeService.java +++ b/sdk/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/nativetonative/PureNativeToNativeService.java @@ -1,26 +1,42 @@ /* - * Copyright (c) 2022, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2021, 2023, 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. Oracle designates this - * particular file as subject to the "Classpath" exception as provided - * by Oracle in the LICENSE file that accompanied this code. - * - * 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. + * The Universal Permissive License (UPL), Version 1.0 + * + * Subject to the condition set forth below, permission is hereby granted to any + * person obtaining a copy of this software, associated documentation and/or + * data (collectively the "Software"), free of charge and under any and all + * copyright rights in the Software, and any and all patent rights owned or + * freely licensable by each licensor hereunder covering either (i) the + * unmodified Software as contributed to or provided by such licensor, or (ii) + * the Larger Works (as defined below), to deal in both + * + * (a) the Software, and + * + * (b) any piece of software and/or hardware listed in the lrgrwrks.txt file if + * one is included with the Software each a "Larger Work" to which the Software + * is contributed by such licensors), + * + * without restriction, including without limitation the rights to copy, create + * derivative works of, display, perform, and distribute the Software and make, + * use, sell, offer for sale, import, export, have made, and have sold the + * Software and the Larger Work(s), and to sublicense the foregoing rights on + * either these or other terms. + * + * This license is subject to the following condition: + * + * The above copyright notice and either this complete permission notice or at a + * minimum a reference to the UPL must be included in all copies or substantial + * portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. */ package org.graalvm.nativebridge.processor.test.nativetonative; diff --git a/sdk/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/references/Context.java b/sdk/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/references/Context.java index c05d5c331f97..981614b95405 100644 --- a/sdk/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/references/Context.java +++ b/sdk/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/references/Context.java @@ -1,26 +1,42 @@ /* - * Copyright (c) 2022, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2021, 2023, 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. Oracle designates this - * particular file as subject to the "Classpath" exception as provided - * by Oracle in the LICENSE file that accompanied this code. - * - * 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. + * The Universal Permissive License (UPL), Version 1.0 + * + * Subject to the condition set forth below, permission is hereby granted to any + * person obtaining a copy of this software, associated documentation and/or + * data (collectively the "Software"), free of charge and under any and all + * copyright rights in the Software, and any and all patent rights owned or + * freely licensable by each licensor hereunder covering either (i) the + * unmodified Software as contributed to or provided by such licensor, or (ii) + * the Larger Works (as defined below), to deal in both + * + * (a) the Software, and + * + * (b) any piece of software and/or hardware listed in the lrgrwrks.txt file if + * one is included with the Software each a "Larger Work" to which the Software + * is contributed by such licensors), + * + * without restriction, including without limitation the rights to copy, create + * derivative works of, display, perform, and distribute the Software and make, + * use, sell, offer for sale, import, export, have made, and have sold the + * Software and the Larger Work(s), and to sublicense the foregoing rights on + * either these or other terms. + * + * This license is subject to the following condition: + * + * The above copyright notice and either this complete permission notice or at a + * minimum a reference to the UPL must be included in all copies or substantial + * portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. */ package org.graalvm.nativebridge.processor.test.references; diff --git a/sdk/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/references/CustomLanguageDispatch.java b/sdk/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/references/CustomLanguageDispatch.java index 0f3d77aca45a..47e4e222fe9e 100644 --- a/sdk/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/references/CustomLanguageDispatch.java +++ b/sdk/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/references/CustomLanguageDispatch.java @@ -1,26 +1,42 @@ /* - * Copyright (c) 2022, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2021, 2023, 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. Oracle designates this - * particular file as subject to the "Classpath" exception as provided - * by Oracle in the LICENSE file that accompanied this code. - * - * 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. + * The Universal Permissive License (UPL), Version 1.0 + * + * Subject to the condition set forth below, permission is hereby granted to any + * person obtaining a copy of this software, associated documentation and/or + * data (collectively the "Software"), free of charge and under any and all + * copyright rights in the Software, and any and all patent rights owned or + * freely licensable by each licensor hereunder covering either (i) the + * unmodified Software as contributed to or provided by such licensor, or (ii) + * the Larger Works (as defined below), to deal in both + * + * (a) the Software, and + * + * (b) any piece of software and/or hardware listed in the lrgrwrks.txt file if + * one is included with the Software each a "Larger Work" to which the Software + * is contributed by such licensors), + * + * without restriction, including without limitation the rights to copy, create + * derivative works of, display, perform, and distribute the Software and make, + * use, sell, offer for sale, import, export, have made, and have sold the + * Software and the Larger Work(s), and to sublicense the foregoing rights on + * either these or other terms. + * + * This license is subject to the following condition: + * + * The above copyright notice and either this complete permission notice or at a + * minimum a reference to the UPL must be included in all copies or substantial + * portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. */ package org.graalvm.nativebridge.processor.test.references; diff --git a/sdk/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/references/HSAlwaysByReferenceHandler.java b/sdk/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/references/HSAlwaysByReferenceHandler.java index 435326428b26..f74653d9f9a1 100644 --- a/sdk/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/references/HSAlwaysByReferenceHandler.java +++ b/sdk/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/references/HSAlwaysByReferenceHandler.java @@ -1,26 +1,42 @@ /* - * Copyright (c) 2023, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2021, 2023, 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. Oracle designates this - * particular file as subject to the "Classpath" exception as provided - * by Oracle in the LICENSE file that accompanied this code. - * - * 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. + * The Universal Permissive License (UPL), Version 1.0 + * + * Subject to the condition set forth below, permission is hereby granted to any + * person obtaining a copy of this software, associated documentation and/or + * data (collectively the "Software"), free of charge and under any and all + * copyright rights in the Software, and any and all patent rights owned or + * freely licensable by each licensor hereunder covering either (i) the + * unmodified Software as contributed to or provided by such licensor, or (ii) + * the Larger Works (as defined below), to deal in both + * + * (a) the Software, and + * + * (b) any piece of software and/or hardware listed in the lrgrwrks.txt file if + * one is included with the Software each a "Larger Work" to which the Software + * is contributed by such licensors), + * + * without restriction, including without limitation the rights to copy, create + * derivative works of, display, perform, and distribute the Software and make, + * use, sell, offer for sale, import, export, have made, and have sold the + * Software and the Larger Work(s), and to sublicense the foregoing rights on + * either these or other terms. + * + * This license is subject to the following condition: + * + * The above copyright notice and either this complete permission notice or at a + * minimum a reference to the UPL must be included in all copies or substantial + * portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. */ package org.graalvm.nativebridge.processor.test.references; diff --git a/sdk/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/references/HSHandler.java b/sdk/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/references/HSHandler.java index 165a97f96919..e1cafbaa6b60 100644 --- a/sdk/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/references/HSHandler.java +++ b/sdk/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/references/HSHandler.java @@ -1,26 +1,42 @@ /* - * Copyright (c) 2022, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2021, 2023, 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. Oracle designates this - * particular file as subject to the "Classpath" exception as provided - * by Oracle in the LICENSE file that accompanied this code. - * - * 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. + * The Universal Permissive License (UPL), Version 1.0 + * + * Subject to the condition set forth below, permission is hereby granted to any + * person obtaining a copy of this software, associated documentation and/or + * data (collectively the "Software"), free of charge and under any and all + * copyright rights in the Software, and any and all patent rights owned or + * freely licensable by each licensor hereunder covering either (i) the + * unmodified Software as contributed to or provided by such licensor, or (ii) + * the Larger Works (as defined below), to deal in both + * + * (a) the Software, and + * + * (b) any piece of software and/or hardware listed in the lrgrwrks.txt file if + * one is included with the Software each a "Larger Work" to which the Software + * is contributed by such licensors), + * + * without restriction, including without limitation the rights to copy, create + * derivative works of, display, perform, and distribute the Software and make, + * use, sell, offer for sale, import, export, have made, and have sold the + * Software and the Larger Work(s), and to sublicense the foregoing rights on + * either these or other terms. + * + * This license is subject to the following condition: + * + * The above copyright notice and either this complete permission notice or at a + * minimum a reference to the UPL must be included in all copies or substantial + * portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. */ package org.graalvm.nativebridge.processor.test.references; diff --git a/sdk/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/references/HSReferenceArrayOperations.java b/sdk/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/references/HSReferenceArrayOperations.java index 29f13099f867..b1dee08c293b 100644 --- a/sdk/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/references/HSReferenceArrayOperations.java +++ b/sdk/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/references/HSReferenceArrayOperations.java @@ -1,26 +1,42 @@ /* - * Copyright (c) 2022, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2021, 2023, 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. Oracle designates this - * particular file as subject to the "Classpath" exception as provided - * by Oracle in the LICENSE file that accompanied this code. + * The Universal Permissive License (UPL), Version 1.0 * - * 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). + * Subject to the condition set forth below, permission is hereby granted to any + * person obtaining a copy of this software, associated documentation and/or + * data (collectively the "Software"), free of charge and under any and all + * copyright rights in the Software, and any and all patent rights owned or + * freely licensable by each licensor hereunder covering either (i) the + * unmodified Software as contributed to or provided by such licensor, or (ii) + * the Larger Works (as defined below), to deal in both * - * 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. + * (a) the Software, and * - * 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. + * (b) any piece of software and/or hardware listed in the lrgrwrks.txt file if + * one is included with the Software each a "Larger Work" to which the Software + * is contributed by such licensors), + * + * without restriction, including without limitation the rights to copy, create + * derivative works of, display, perform, and distribute the Software and make, + * use, sell, offer for sale, import, export, have made, and have sold the + * Software and the Larger Work(s), and to sublicense the foregoing rights on + * either these or other terms. + * + * This license is subject to the following condition: + * + * The above copyright notice and either this complete permission notice or at a + * minimum a reference to the UPL must be included in all copies or substantial + * portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. */ package org.graalvm.nativebridge.processor.test.references; diff --git a/sdk/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/references/Handler.java b/sdk/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/references/Handler.java index 75d46da708c9..86fe8a95de17 100644 --- a/sdk/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/references/Handler.java +++ b/sdk/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/references/Handler.java @@ -1,26 +1,42 @@ /* - * Copyright (c) 2022, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2021, 2023, 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. Oracle designates this - * particular file as subject to the "Classpath" exception as provided - * by Oracle in the LICENSE file that accompanied this code. - * - * 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. + * The Universal Permissive License (UPL), Version 1.0 + * + * Subject to the condition set forth below, permission is hereby granted to any + * person obtaining a copy of this software, associated documentation and/or + * data (collectively the "Software"), free of charge and under any and all + * copyright rights in the Software, and any and all patent rights owned or + * freely licensable by each licensor hereunder covering either (i) the + * unmodified Software as contributed to or provided by such licensor, or (ii) + * the Larger Works (as defined below), to deal in both + * + * (a) the Software, and + * + * (b) any piece of software and/or hardware listed in the lrgrwrks.txt file if + * one is included with the Software each a "Larger Work" to which the Software + * is contributed by such licensors), + * + * without restriction, including without limitation the rights to copy, create + * derivative works of, display, perform, and distribute the Software and make, + * use, sell, offer for sale, import, export, have made, and have sold the + * Software and the Larger Work(s), and to sublicense the foregoing rights on + * either these or other terms. + * + * This license is subject to the following condition: + * + * The above copyright notice and either this complete permission notice or at a + * minimum a reference to the UPL must be included in all copies or substantial + * portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. */ package org.graalvm.nativebridge.processor.test.references; diff --git a/sdk/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/references/LanguageAPI.java b/sdk/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/references/LanguageAPI.java index e82a25e2b4b2..f8dbfd501883 100644 --- a/sdk/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/references/LanguageAPI.java +++ b/sdk/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/references/LanguageAPI.java @@ -1,26 +1,42 @@ /* - * Copyright (c) 2022, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2021, 2023, 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. Oracle designates this - * particular file as subject to the "Classpath" exception as provided - * by Oracle in the LICENSE file that accompanied this code. - * - * 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. + * The Universal Permissive License (UPL), Version 1.0 + * + * Subject to the condition set forth below, permission is hereby granted to any + * person obtaining a copy of this software, associated documentation and/or + * data (collectively the "Software"), free of charge and under any and all + * copyright rights in the Software, and any and all patent rights owned or + * freely licensable by each licensor hereunder covering either (i) the + * unmodified Software as contributed to or provided by such licensor, or (ii) + * the Larger Works (as defined below), to deal in both + * + * (a) the Software, and + * + * (b) any piece of software and/or hardware listed in the lrgrwrks.txt file if + * one is included with the Software each a "Larger Work" to which the Software + * is contributed by such licensors), + * + * without restriction, including without limitation the rights to copy, create + * derivative works of, display, perform, and distribute the Software and make, + * use, sell, offer for sale, import, export, have made, and have sold the + * Software and the Larger Work(s), and to sublicense the foregoing rights on + * either these or other terms. + * + * This license is subject to the following condition: + * + * The above copyright notice and either this complete permission notice or at a + * minimum a reference to the UPL must be included in all copies or substantial + * portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. */ package org.graalvm.nativebridge.processor.test.references; diff --git a/sdk/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/references/NativeContext.java b/sdk/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/references/NativeContext.java index 8fd270c7e3a0..d98dcb55ff0c 100644 --- a/sdk/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/references/NativeContext.java +++ b/sdk/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/references/NativeContext.java @@ -1,26 +1,42 @@ /* - * Copyright (c) 2022, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2021, 2023, 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. Oracle designates this - * particular file as subject to the "Classpath" exception as provided - * by Oracle in the LICENSE file that accompanied this code. - * - * 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. + * The Universal Permissive License (UPL), Version 1.0 + * + * Subject to the condition set forth below, permission is hereby granted to any + * person obtaining a copy of this software, associated documentation and/or + * data (collectively the "Software"), free of charge and under any and all + * copyright rights in the Software, and any and all patent rights owned or + * freely licensable by each licensor hereunder covering either (i) the + * unmodified Software as contributed to or provided by such licensor, or (ii) + * the Larger Works (as defined below), to deal in both + * + * (a) the Software, and + * + * (b) any piece of software and/or hardware listed in the lrgrwrks.txt file if + * one is included with the Software each a "Larger Work" to which the Software + * is contributed by such licensors), + * + * without restriction, including without limitation the rights to copy, create + * derivative works of, display, perform, and distribute the Software and make, + * use, sell, offer for sale, import, export, have made, and have sold the + * Software and the Larger Work(s), and to sublicense the foregoing rights on + * either these or other terms. + * + * This license is subject to the following condition: + * + * The above copyright notice and either this complete permission notice or at a + * minimum a reference to the UPL must be included in all copies or substantial + * portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. */ package org.graalvm.nativebridge.processor.test.references; diff --git a/sdk/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/references/NativeCustomLanguageDispatch.java b/sdk/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/references/NativeCustomLanguageDispatch.java index 90a728fa555a..59dd558c4673 100644 --- a/sdk/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/references/NativeCustomLanguageDispatch.java +++ b/sdk/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/references/NativeCustomLanguageDispatch.java @@ -1,26 +1,42 @@ /* - * Copyright (c) 2022, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2021, 2023, 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. Oracle designates this - * particular file as subject to the "Classpath" exception as provided - * by Oracle in the LICENSE file that accompanied this code. - * - * 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. + * The Universal Permissive License (UPL), Version 1.0 + * + * Subject to the condition set forth below, permission is hereby granted to any + * person obtaining a copy of this software, associated documentation and/or + * data (collectively the "Software"), free of charge and under any and all + * copyright rights in the Software, and any and all patent rights owned or + * freely licensable by each licensor hereunder covering either (i) the + * unmodified Software as contributed to or provided by such licensor, or (ii) + * the Larger Works (as defined below), to deal in both + * + * (a) the Software, and + * + * (b) any piece of software and/or hardware listed in the lrgrwrks.txt file if + * one is included with the Software each a "Larger Work" to which the Software + * is contributed by such licensors), + * + * without restriction, including without limitation the rights to copy, create + * derivative works of, display, perform, and distribute the Software and make, + * use, sell, offer for sale, import, export, have made, and have sold the + * Software and the Larger Work(s), and to sublicense the foregoing rights on + * either these or other terms. + * + * This license is subject to the following condition: + * + * The above copyright notice and either this complete permission notice or at a + * minimum a reference to the UPL must be included in all copies or substantial + * portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. */ package org.graalvm.nativebridge.processor.test.references; diff --git a/sdk/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/references/NativeRecord.java b/sdk/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/references/NativeRecord.java index 88b9a4931faf..5dae4e63f7c5 100644 --- a/sdk/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/references/NativeRecord.java +++ b/sdk/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/references/NativeRecord.java @@ -1,26 +1,42 @@ /* - * Copyright (c) 2022, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2021, 2023, 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. Oracle designates this - * particular file as subject to the "Classpath" exception as provided - * by Oracle in the LICENSE file that accompanied this code. - * - * 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. + * The Universal Permissive License (UPL), Version 1.0 + * + * Subject to the condition set forth below, permission is hereby granted to any + * person obtaining a copy of this software, associated documentation and/or + * data (collectively the "Software"), free of charge and under any and all + * copyright rights in the Software, and any and all patent rights owned or + * freely licensable by each licensor hereunder covering either (i) the + * unmodified Software as contributed to or provided by such licensor, or (ii) + * the Larger Works (as defined below), to deal in both + * + * (a) the Software, and + * + * (b) any piece of software and/or hardware listed in the lrgrwrks.txt file if + * one is included with the Software each a "Larger Work" to which the Software + * is contributed by such licensors), + * + * without restriction, including without limitation the rights to copy, create + * derivative works of, display, perform, and distribute the Software and make, + * use, sell, offer for sale, import, export, have made, and have sold the + * Software and the Larger Work(s), and to sublicense the foregoing rights on + * either these or other terms. + * + * This license is subject to the following condition: + * + * The above copyright notice and either this complete permission notice or at a + * minimum a reference to the UPL must be included in all copies or substantial + * portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. */ package org.graalvm.nativebridge.processor.test.references; diff --git a/sdk/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/references/NativeReferenceArrayOperations.java b/sdk/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/references/NativeReferenceArrayOperations.java index fd99fbe7d291..4facd035e5eb 100644 --- a/sdk/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/references/NativeReferenceArrayOperations.java +++ b/sdk/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/references/NativeReferenceArrayOperations.java @@ -1,26 +1,42 @@ /* - * Copyright (c) 2022, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2021, 2023, 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. Oracle designates this - * particular file as subject to the "Classpath" exception as provided - * by Oracle in the LICENSE file that accompanied this code. + * The Universal Permissive License (UPL), Version 1.0 * - * 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). + * Subject to the condition set forth below, permission is hereby granted to any + * person obtaining a copy of this software, associated documentation and/or + * data (collectively the "Software"), free of charge and under any and all + * copyright rights in the Software, and any and all patent rights owned or + * freely licensable by each licensor hereunder covering either (i) the + * unmodified Software as contributed to or provided by such licensor, or (ii) + * the Larger Works (as defined below), to deal in both * - * 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. + * (a) the Software, and * - * 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. + * (b) any piece of software and/or hardware listed in the lrgrwrks.txt file if + * one is included with the Software each a "Larger Work" to which the Software + * is contributed by such licensors), + * + * without restriction, including without limitation the rights to copy, create + * derivative works of, display, perform, and distribute the Software and make, + * use, sell, offer for sale, import, export, have made, and have sold the + * Software and the Larger Work(s), and to sublicense the foregoing rights on + * either these or other terms. + * + * This license is subject to the following condition: + * + * The above copyright notice and either this complete permission notice or at a + * minimum a reference to the UPL must be included in all copies or substantial + * portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. */ package org.graalvm.nativebridge.processor.test.references; diff --git a/sdk/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/references/NativeService.java b/sdk/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/references/NativeService.java index be7a68065819..bf598928cb72 100644 --- a/sdk/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/references/NativeService.java +++ b/sdk/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/references/NativeService.java @@ -1,26 +1,42 @@ /* - * Copyright (c) 2022, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2021, 2023, 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. Oracle designates this - * particular file as subject to the "Classpath" exception as provided - * by Oracle in the LICENSE file that accompanied this code. - * - * 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. + * The Universal Permissive License (UPL), Version 1.0 + * + * Subject to the condition set forth below, permission is hereby granted to any + * person obtaining a copy of this software, associated documentation and/or + * data (collectively the "Software"), free of charge and under any and all + * copyright rights in the Software, and any and all patent rights owned or + * freely licensable by each licensor hereunder covering either (i) the + * unmodified Software as contributed to or provided by such licensor, or (ii) + * the Larger Works (as defined below), to deal in both + * + * (a) the Software, and + * + * (b) any piece of software and/or hardware listed in the lrgrwrks.txt file if + * one is included with the Software each a "Larger Work" to which the Software + * is contributed by such licensors), + * + * without restriction, including without limitation the rights to copy, create + * derivative works of, display, perform, and distribute the Software and make, + * use, sell, offer for sale, import, export, have made, and have sold the + * Software and the Larger Work(s), and to sublicense the foregoing rights on + * either these or other terms. + * + * This license is subject to the following condition: + * + * The above copyright notice and either this complete permission notice or at a + * minimum a reference to the UPL must be included in all copies or substantial + * portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. */ package org.graalvm.nativebridge.processor.test.references; diff --git a/sdk/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/references/Record.java b/sdk/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/references/Record.java index 738465ecf768..cf58076f0e32 100644 --- a/sdk/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/references/Record.java +++ b/sdk/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/references/Record.java @@ -1,26 +1,42 @@ /* - * Copyright (c) 2022, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2021, 2023, 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. Oracle designates this - * particular file as subject to the "Classpath" exception as provided - * by Oracle in the LICENSE file that accompanied this code. - * - * 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. + * The Universal Permissive License (UPL), Version 1.0 + * + * Subject to the condition set forth below, permission is hereby granted to any + * person obtaining a copy of this software, associated documentation and/or + * data (collectively the "Software"), free of charge and under any and all + * copyright rights in the Software, and any and all patent rights owned or + * freely licensable by each licensor hereunder covering either (i) the + * unmodified Software as contributed to or provided by such licensor, or (ii) + * the Larger Works (as defined below), to deal in both + * + * (a) the Software, and + * + * (b) any piece of software and/or hardware listed in the lrgrwrks.txt file if + * one is included with the Software each a "Larger Work" to which the Software + * is contributed by such licensors), + * + * without restriction, including without limitation the rights to copy, create + * derivative works of, display, perform, and distribute the Software and make, + * use, sell, offer for sale, import, export, have made, and have sold the + * Software and the Larger Work(s), and to sublicense the foregoing rights on + * either these or other terms. + * + * This license is subject to the following condition: + * + * The above copyright notice and either this complete permission notice or at a + * minimum a reference to the UPL must be included in all copies or substantial + * portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. */ package org.graalvm.nativebridge.processor.test.references; diff --git a/sdk/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/references/ReferenceArrayOperations.java b/sdk/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/references/ReferenceArrayOperations.java index b329723ce17f..c9504c071e66 100644 --- a/sdk/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/references/ReferenceArrayOperations.java +++ b/sdk/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/references/ReferenceArrayOperations.java @@ -1,26 +1,42 @@ /* - * Copyright (c) 2022, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2021, 2023, 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. Oracle designates this - * particular file as subject to the "Classpath" exception as provided - * by Oracle in the LICENSE file that accompanied this code. + * The Universal Permissive License (UPL), Version 1.0 * - * 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). + * Subject to the condition set forth below, permission is hereby granted to any + * person obtaining a copy of this software, associated documentation and/or + * data (collectively the "Software"), free of charge and under any and all + * copyright rights in the Software, and any and all patent rights owned or + * freely licensable by each licensor hereunder covering either (i) the + * unmodified Software as contributed to or provided by such licensor, or (ii) + * the Larger Works (as defined below), to deal in both * - * 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. + * (a) the Software, and * - * 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. + * (b) any piece of software and/or hardware listed in the lrgrwrks.txt file if + * one is included with the Software each a "Larger Work" to which the Software + * is contributed by such licensors), + * + * without restriction, including without limitation the rights to copy, create + * derivative works of, display, perform, and distribute the Software and make, + * use, sell, offer for sale, import, export, have made, and have sold the + * Software and the Larger Work(s), and to sublicense the foregoing rights on + * either these or other terms. + * + * This license is subject to the following condition: + * + * The above copyright notice and either this complete permission notice or at a + * minimum a reference to the UPL must be included in all copies or substantial + * portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. */ package org.graalvm.nativebridge.processor.test.references; diff --git a/sdk/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/references/Service.java b/sdk/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/references/Service.java index f6510447e95e..66626f597bda 100644 --- a/sdk/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/references/Service.java +++ b/sdk/src/org.graalvm.nativebridge.processor.test/src/org/graalvm/nativebridge/processor/test/references/Service.java @@ -1,26 +1,42 @@ /* - * Copyright (c) 2022, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2021, 2023, 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. Oracle designates this - * particular file as subject to the "Classpath" exception as provided - * by Oracle in the LICENSE file that accompanied this code. - * - * 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. + * The Universal Permissive License (UPL), Version 1.0 + * + * Subject to the condition set forth below, permission is hereby granted to any + * person obtaining a copy of this software, associated documentation and/or + * data (collectively the "Software"), free of charge and under any and all + * copyright rights in the Software, and any and all patent rights owned or + * freely licensable by each licensor hereunder covering either (i) the + * unmodified Software as contributed to or provided by such licensor, or (ii) + * the Larger Works (as defined below), to deal in both + * + * (a) the Software, and + * + * (b) any piece of software and/or hardware listed in the lrgrwrks.txt file if + * one is included with the Software each a "Larger Work" to which the Software + * is contributed by such licensors), + * + * without restriction, including without limitation the rights to copy, create + * derivative works of, display, perform, and distribute the Software and make, + * use, sell, offer for sale, import, export, have made, and have sold the + * Software and the Larger Work(s), and to sublicense the foregoing rights on + * either these or other terms. + * + * This license is subject to the following condition: + * + * The above copyright notice and either this complete permission notice or at a + * minimum a reference to the UPL must be included in all copies or substantial + * portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. */ package org.graalvm.nativebridge.processor.test.references; diff --git a/sdk/src/org.graalvm.nativebridge.processor/src/org/graalvm/nativebridge/processor/AbstractBridgeGenerator.java b/sdk/src/org.graalvm.nativebridge.processor/src/org/graalvm/nativebridge/processor/AbstractBridgeGenerator.java index 034ef789dd31..74ba6dab9dc4 100644 --- a/sdk/src/org.graalvm.nativebridge.processor/src/org/graalvm/nativebridge/processor/AbstractBridgeGenerator.java +++ b/sdk/src/org.graalvm.nativebridge.processor/src/org/graalvm/nativebridge/processor/AbstractBridgeGenerator.java @@ -1,26 +1,42 @@ /* - * Copyright (c) 2021, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2021, 2023, 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. Oracle designates this - * particular file as subject to the "Classpath" exception as provided - * by Oracle in the LICENSE file that accompanied this code. + * The Universal Permissive License (UPL), Version 1.0 * - * 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). + * Subject to the condition set forth below, permission is hereby granted to any + * person obtaining a copy of this software, associated documentation and/or + * data (collectively the "Software"), free of charge and under any and all + * copyright rights in the Software, and any and all patent rights owned or + * freely licensable by each licensor hereunder covering either (i) the + * unmodified Software as contributed to or provided by such licensor, or (ii) + * the Larger Works (as defined below), to deal in both * - * 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. + * (a) the Software, and * - * 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. + * (b) any piece of software and/or hardware listed in the lrgrwrks.txt file if + * one is included with the Software each a "Larger Work" to which the Software + * is contributed by such licensors), + * + * without restriction, including without limitation the rights to copy, create + * derivative works of, display, perform, and distribute the Software and make, + * use, sell, offer for sale, import, export, have made, and have sold the + * Software and the Larger Work(s), and to sublicense the foregoing rights on + * either these or other terms. + * + * This license is subject to the following condition: + * + * The above copyright notice and either this complete permission notice or at a + * minimum a reference to the UPL must be included in all copies or substantial + * portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. */ package org.graalvm.nativebridge.processor; diff --git a/sdk/src/org.graalvm.nativebridge.processor/src/org/graalvm/nativebridge/processor/AbstractBridgeParser.java b/sdk/src/org.graalvm.nativebridge.processor/src/org/graalvm/nativebridge/processor/AbstractBridgeParser.java index 668c9f85c5c6..7a9027adf90e 100644 --- a/sdk/src/org.graalvm.nativebridge.processor/src/org/graalvm/nativebridge/processor/AbstractBridgeParser.java +++ b/sdk/src/org.graalvm.nativebridge.processor/src/org/graalvm/nativebridge/processor/AbstractBridgeParser.java @@ -1,26 +1,42 @@ /* - * Copyright (c) 2021, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2021, 2023, 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. Oracle designates this - * particular file as subject to the "Classpath" exception as provided - * by Oracle in the LICENSE file that accompanied this code. + * The Universal Permissive License (UPL), Version 1.0 * - * 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). + * Subject to the condition set forth below, permission is hereby granted to any + * person obtaining a copy of this software, associated documentation and/or + * data (collectively the "Software"), free of charge and under any and all + * copyright rights in the Software, and any and all patent rights owned or + * freely licensable by each licensor hereunder covering either (i) the + * unmodified Software as contributed to or provided by such licensor, or (ii) + * the Larger Works (as defined below), to deal in both * - * 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. + * (a) the Software, and * - * 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. + * (b) any piece of software and/or hardware listed in the lrgrwrks.txt file if + * one is included with the Software each a "Larger Work" to which the Software + * is contributed by such licensors), + * + * without restriction, including without limitation the rights to copy, create + * derivative works of, display, perform, and distribute the Software and make, + * use, sell, offer for sale, import, export, have made, and have sold the + * Software and the Larger Work(s), and to sublicense the foregoing rights on + * either these or other terms. + * + * This license is subject to the following condition: + * + * The above copyright notice and either this complete permission notice or at a + * minimum a reference to the UPL must be included in all copies or substantial + * portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. */ package org.graalvm.nativebridge.processor; diff --git a/sdk/src/org.graalvm.nativebridge.processor/src/org/graalvm/nativebridge/processor/AbstractProcessor.java b/sdk/src/org.graalvm.nativebridge.processor/src/org/graalvm/nativebridge/processor/AbstractProcessor.java index 59ece11696d4..6234a079df1d 100644 --- a/sdk/src/org.graalvm.nativebridge.processor/src/org/graalvm/nativebridge/processor/AbstractProcessor.java +++ b/sdk/src/org.graalvm.nativebridge.processor/src/org/graalvm/nativebridge/processor/AbstractProcessor.java @@ -1,26 +1,42 @@ /* - * Copyright (c) 2018, 2022, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2021, 2023, 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. Oracle designates this - * particular file as subject to the "Classpath" exception as provided - * by Oracle in the LICENSE file that accompanied this code. + * The Universal Permissive License (UPL), Version 1.0 * - * 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). + * Subject to the condition set forth below, permission is hereby granted to any + * person obtaining a copy of this software, associated documentation and/or + * data (collectively the "Software"), free of charge and under any and all + * copyright rights in the Software, and any and all patent rights owned or + * freely licensable by each licensor hereunder covering either (i) the + * unmodified Software as contributed to or provided by such licensor, or (ii) + * the Larger Works (as defined below), to deal in both * - * 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. + * (a) the Software, and * - * 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. + * (b) any piece of software and/or hardware listed in the lrgrwrks.txt file if + * one is included with the Software each a "Larger Work" to which the Software + * is contributed by such licensors), + * + * without restriction, including without limitation the rights to copy, create + * derivative works of, display, perform, and distribute the Software and make, + * use, sell, offer for sale, import, export, have made, and have sold the + * Software and the Larger Work(s), and to sublicense the foregoing rights on + * either these or other terms. + * + * This license is subject to the following condition: + * + * The above copyright notice and either this complete permission notice or at a + * minimum a reference to the UPL must be included in all copies or substantial + * portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. */ package org.graalvm.nativebridge.processor; diff --git a/sdk/src/org.graalvm.nativebridge.processor/src/org/graalvm/nativebridge/processor/CodeBuilder.java b/sdk/src/org.graalvm.nativebridge.processor/src/org/graalvm/nativebridge/processor/CodeBuilder.java index 04a2283e8af4..527d46b9abd5 100644 --- a/sdk/src/org.graalvm.nativebridge.processor/src/org/graalvm/nativebridge/processor/CodeBuilder.java +++ b/sdk/src/org.graalvm.nativebridge.processor/src/org/graalvm/nativebridge/processor/CodeBuilder.java @@ -1,26 +1,42 @@ /* - * Copyright (c) 2022, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2021, 2023, 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. Oracle designates this - * particular file as subject to the "Classpath" exception as provided - * by Oracle in the LICENSE file that accompanied this code. + * The Universal Permissive License (UPL), Version 1.0 * - * 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). + * Subject to the condition set forth below, permission is hereby granted to any + * person obtaining a copy of this software, associated documentation and/or + * data (collectively the "Software"), free of charge and under any and all + * copyright rights in the Software, and any and all patent rights owned or + * freely licensable by each licensor hereunder covering either (i) the + * unmodified Software as contributed to or provided by such licensor, or (ii) + * the Larger Works (as defined below), to deal in both * - * 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. + * (a) the Software, and * - * 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. + * (b) any piece of software and/or hardware listed in the lrgrwrks.txt file if + * one is included with the Software each a "Larger Work" to which the Software + * is contributed by such licensors), + * + * without restriction, including without limitation the rights to copy, create + * derivative works of, display, perform, and distribute the Software and make, + * use, sell, offer for sale, import, export, have made, and have sold the + * Software and the Larger Work(s), and to sublicense the foregoing rights on + * either these or other terms. + * + * This license is subject to the following condition: + * + * The above copyright notice and either this complete permission notice or at a + * minimum a reference to the UPL must be included in all copies or substantial + * portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. */ package org.graalvm.nativebridge.processor; diff --git a/sdk/src/org.graalvm.nativebridge.processor/src/org/graalvm/nativebridge/processor/ExpectError.java b/sdk/src/org.graalvm.nativebridge.processor/src/org/graalvm/nativebridge/processor/ExpectError.java index 87e782bffc9c..72611089ee3f 100644 --- a/sdk/src/org.graalvm.nativebridge.processor/src/org/graalvm/nativebridge/processor/ExpectError.java +++ b/sdk/src/org.graalvm.nativebridge.processor/src/org/graalvm/nativebridge/processor/ExpectError.java @@ -1,26 +1,42 @@ /* - * Copyright (c) 2022, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2021, 2023, 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. Oracle designates this - * particular file as subject to the "Classpath" exception as provided - * by Oracle in the LICENSE file that accompanied this code. + * The Universal Permissive License (UPL), Version 1.0 * - * 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). + * Subject to the condition set forth below, permission is hereby granted to any + * person obtaining a copy of this software, associated documentation and/or + * data (collectively the "Software"), free of charge and under any and all + * copyright rights in the Software, and any and all patent rights owned or + * freely licensable by each licensor hereunder covering either (i) the + * unmodified Software as contributed to or provided by such licensor, or (ii) + * the Larger Works (as defined below), to deal in both * - * 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. + * (a) the Software, and * - * 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. + * (b) any piece of software and/or hardware listed in the lrgrwrks.txt file if + * one is included with the Software each a "Larger Work" to which the Software + * is contributed by such licensors), + * + * without restriction, including without limitation the rights to copy, create + * derivative works of, display, perform, and distribute the Software and make, + * use, sell, offer for sale, import, export, have made, and have sold the + * Software and the Larger Work(s), and to sublicense the foregoing rights on + * either these or other terms. + * + * This license is subject to the following condition: + * + * The above copyright notice and either this complete permission notice or at a + * minimum a reference to the UPL must be included in all copies or substantial + * portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. */ package org.graalvm.nativebridge.processor; diff --git a/sdk/src/org.graalvm.nativebridge.processor/src/org/graalvm/nativebridge/processor/HotSpotToNativeBridgeGenerator.java b/sdk/src/org.graalvm.nativebridge.processor/src/org/graalvm/nativebridge/processor/HotSpotToNativeBridgeGenerator.java index edecffd5b5ee..e041ca4e62ae 100644 --- a/sdk/src/org.graalvm.nativebridge.processor/src/org/graalvm/nativebridge/processor/HotSpotToNativeBridgeGenerator.java +++ b/sdk/src/org.graalvm.nativebridge.processor/src/org/graalvm/nativebridge/processor/HotSpotToNativeBridgeGenerator.java @@ -1,26 +1,42 @@ /* - * Copyright (c) 2021, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2021, 2023, 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. Oracle designates this - * particular file as subject to the "Classpath" exception as provided - * by Oracle in the LICENSE file that accompanied this code. + * The Universal Permissive License (UPL), Version 1.0 * - * 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). + * Subject to the condition set forth below, permission is hereby granted to any + * person obtaining a copy of this software, associated documentation and/or + * data (collectively the "Software"), free of charge and under any and all + * copyright rights in the Software, and any and all patent rights owned or + * freely licensable by each licensor hereunder covering either (i) the + * unmodified Software as contributed to or provided by such licensor, or (ii) + * the Larger Works (as defined below), to deal in both * - * 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. + * (a) the Software, and * - * 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. + * (b) any piece of software and/or hardware listed in the lrgrwrks.txt file if + * one is included with the Software each a "Larger Work" to which the Software + * is contributed by such licensors), + * + * without restriction, including without limitation the rights to copy, create + * derivative works of, display, perform, and distribute the Software and make, + * use, sell, offer for sale, import, export, have made, and have sold the + * Software and the Larger Work(s), and to sublicense the foregoing rights on + * either these or other terms. + * + * This license is subject to the following condition: + * + * The above copyright notice and either this complete permission notice or at a + * minimum a reference to the UPL must be included in all copies or substantial + * portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. */ package org.graalvm.nativebridge.processor; diff --git a/sdk/src/org.graalvm.nativebridge.processor/src/org/graalvm/nativebridge/processor/HotSpotToNativeBridgeParser.java b/sdk/src/org.graalvm.nativebridge.processor/src/org/graalvm/nativebridge/processor/HotSpotToNativeBridgeParser.java index 855d9eeb88ac..26e3cc8c91c5 100644 --- a/sdk/src/org.graalvm.nativebridge.processor/src/org/graalvm/nativebridge/processor/HotSpotToNativeBridgeParser.java +++ b/sdk/src/org.graalvm.nativebridge.processor/src/org/graalvm/nativebridge/processor/HotSpotToNativeBridgeParser.java @@ -1,26 +1,42 @@ /* - * Copyright (c) 2021, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2021, 2023, 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. Oracle designates this - * particular file as subject to the "Classpath" exception as provided - * by Oracle in the LICENSE file that accompanied this code. + * The Universal Permissive License (UPL), Version 1.0 * - * 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). + * Subject to the condition set forth below, permission is hereby granted to any + * person obtaining a copy of this software, associated documentation and/or + * data (collectively the "Software"), free of charge and under any and all + * copyright rights in the Software, and any and all patent rights owned or + * freely licensable by each licensor hereunder covering either (i) the + * unmodified Software as contributed to or provided by such licensor, or (ii) + * the Larger Works (as defined below), to deal in both * - * 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. + * (a) the Software, and * - * 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. + * (b) any piece of software and/or hardware listed in the lrgrwrks.txt file if + * one is included with the Software each a "Larger Work" to which the Software + * is contributed by such licensors), + * + * without restriction, including without limitation the rights to copy, create + * derivative works of, display, perform, and distribute the Software and make, + * use, sell, offer for sale, import, export, have made, and have sold the + * Software and the Larger Work(s), and to sublicense the foregoing rights on + * either these or other terms. + * + * This license is subject to the following condition: + * + * The above copyright notice and either this complete permission notice or at a + * minimum a reference to the UPL must be included in all copies or substantial + * portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. */ package org.graalvm.nativebridge.processor; diff --git a/sdk/src/org.graalvm.nativebridge.processor/src/org/graalvm/nativebridge/processor/NativeBridgeProcessor.java b/sdk/src/org.graalvm.nativebridge.processor/src/org/graalvm/nativebridge/processor/NativeBridgeProcessor.java index 710d9b1b062c..5fe71befd53b 100644 --- a/sdk/src/org.graalvm.nativebridge.processor/src/org/graalvm/nativebridge/processor/NativeBridgeProcessor.java +++ b/sdk/src/org.graalvm.nativebridge.processor/src/org/graalvm/nativebridge/processor/NativeBridgeProcessor.java @@ -1,26 +1,42 @@ /* - * Copyright (c) 2021, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2021, 2023, 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. Oracle designates this - * particular file as subject to the "Classpath" exception as provided - * by Oracle in the LICENSE file that accompanied this code. + * The Universal Permissive License (UPL), Version 1.0 * - * 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). + * Subject to the condition set forth below, permission is hereby granted to any + * person obtaining a copy of this software, associated documentation and/or + * data (collectively the "Software"), free of charge and under any and all + * copyright rights in the Software, and any and all patent rights owned or + * freely licensable by each licensor hereunder covering either (i) the + * unmodified Software as contributed to or provided by such licensor, or (ii) + * the Larger Works (as defined below), to deal in both * - * 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. + * (a) the Software, and * - * 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. + * (b) any piece of software and/or hardware listed in the lrgrwrks.txt file if + * one is included with the Software each a "Larger Work" to which the Software + * is contributed by such licensors), + * + * without restriction, including without limitation the rights to copy, create + * derivative works of, display, perform, and distribute the Software and make, + * use, sell, offer for sale, import, export, have made, and have sold the + * Software and the Larger Work(s), and to sublicense the foregoing rights on + * either these or other terms. + * + * This license is subject to the following condition: + * + * The above copyright notice and either this complete permission notice or at a + * minimum a reference to the UPL must be included in all copies or substantial + * portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. */ package org.graalvm.nativebridge.processor; diff --git a/sdk/src/org.graalvm.nativebridge.processor/src/org/graalvm/nativebridge/processor/NativeToHotSpotBridgeGenerator.java b/sdk/src/org.graalvm.nativebridge.processor/src/org/graalvm/nativebridge/processor/NativeToHotSpotBridgeGenerator.java index c1c1e80241e3..886b17b763c2 100644 --- a/sdk/src/org.graalvm.nativebridge.processor/src/org/graalvm/nativebridge/processor/NativeToHotSpotBridgeGenerator.java +++ b/sdk/src/org.graalvm.nativebridge.processor/src/org/graalvm/nativebridge/processor/NativeToHotSpotBridgeGenerator.java @@ -1,26 +1,42 @@ /* - * Copyright (c) 2021, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2021, 2023, 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. Oracle designates this - * particular file as subject to the "Classpath" exception as provided - * by Oracle in the LICENSE file that accompanied this code. + * The Universal Permissive License (UPL), Version 1.0 * - * 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). + * Subject to the condition set forth below, permission is hereby granted to any + * person obtaining a copy of this software, associated documentation and/or + * data (collectively the "Software"), free of charge and under any and all + * copyright rights in the Software, and any and all patent rights owned or + * freely licensable by each licensor hereunder covering either (i) the + * unmodified Software as contributed to or provided by such licensor, or (ii) + * the Larger Works (as defined below), to deal in both * - * 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. + * (a) the Software, and * - * 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. + * (b) any piece of software and/or hardware listed in the lrgrwrks.txt file if + * one is included with the Software each a "Larger Work" to which the Software + * is contributed by such licensors), + * + * without restriction, including without limitation the rights to copy, create + * derivative works of, display, perform, and distribute the Software and make, + * use, sell, offer for sale, import, export, have made, and have sold the + * Software and the Larger Work(s), and to sublicense the foregoing rights on + * either these or other terms. + * + * This license is subject to the following condition: + * + * The above copyright notice and either this complete permission notice or at a + * minimum a reference to the UPL must be included in all copies or substantial + * portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. */ package org.graalvm.nativebridge.processor; diff --git a/sdk/src/org.graalvm.nativebridge.processor/src/org/graalvm/nativebridge/processor/NativeToHotSpotBridgeParser.java b/sdk/src/org.graalvm.nativebridge.processor/src/org/graalvm/nativebridge/processor/NativeToHotSpotBridgeParser.java index 31994f6d1de9..35283d8880c5 100644 --- a/sdk/src/org.graalvm.nativebridge.processor/src/org/graalvm/nativebridge/processor/NativeToHotSpotBridgeParser.java +++ b/sdk/src/org.graalvm.nativebridge.processor/src/org/graalvm/nativebridge/processor/NativeToHotSpotBridgeParser.java @@ -1,26 +1,42 @@ /* - * Copyright (c) 2021, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2021, 2023, 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. Oracle designates this - * particular file as subject to the "Classpath" exception as provided - * by Oracle in the LICENSE file that accompanied this code. + * The Universal Permissive License (UPL), Version 1.0 * - * 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). + * Subject to the condition set forth below, permission is hereby granted to any + * person obtaining a copy of this software, associated documentation and/or + * data (collectively the "Software"), free of charge and under any and all + * copyright rights in the Software, and any and all patent rights owned or + * freely licensable by each licensor hereunder covering either (i) the + * unmodified Software as contributed to or provided by such licensor, or (ii) + * the Larger Works (as defined below), to deal in both * - * 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. + * (a) the Software, and * - * 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. + * (b) any piece of software and/or hardware listed in the lrgrwrks.txt file if + * one is included with the Software each a "Larger Work" to which the Software + * is contributed by such licensors), + * + * without restriction, including without limitation the rights to copy, create + * derivative works of, display, perform, and distribute the Software and make, + * use, sell, offer for sale, import, export, have made, and have sold the + * Software and the Larger Work(s), and to sublicense the foregoing rights on + * either these or other terms. + * + * This license is subject to the following condition: + * + * The above copyright notice and either this complete permission notice or at a + * minimum a reference to the UPL must be included in all copies or substantial + * portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. */ package org.graalvm.nativebridge.processor; diff --git a/sdk/src/org.graalvm.nativebridge.processor/src/org/graalvm/nativebridge/processor/NativeToNativeBridgeGenerator.java b/sdk/src/org.graalvm.nativebridge.processor/src/org/graalvm/nativebridge/processor/NativeToNativeBridgeGenerator.java index e290b6f86c9c..ce43a078cd3b 100644 --- a/sdk/src/org.graalvm.nativebridge.processor/src/org/graalvm/nativebridge/processor/NativeToNativeBridgeGenerator.java +++ b/sdk/src/org.graalvm.nativebridge.processor/src/org/graalvm/nativebridge/processor/NativeToNativeBridgeGenerator.java @@ -1,26 +1,42 @@ /* - * Copyright (c) 2022, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2021, 2023, 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. Oracle designates this - * particular file as subject to the "Classpath" exception as provided - * by Oracle in the LICENSE file that accompanied this code. + * The Universal Permissive License (UPL), Version 1.0 * - * 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). + * Subject to the condition set forth below, permission is hereby granted to any + * person obtaining a copy of this software, associated documentation and/or + * data (collectively the "Software"), free of charge and under any and all + * copyright rights in the Software, and any and all patent rights owned or + * freely licensable by each licensor hereunder covering either (i) the + * unmodified Software as contributed to or provided by such licensor, or (ii) + * the Larger Works (as defined below), to deal in both * - * 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. + * (a) the Software, and * - * 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. + * (b) any piece of software and/or hardware listed in the lrgrwrks.txt file if + * one is included with the Software each a "Larger Work" to which the Software + * is contributed by such licensors), + * + * without restriction, including without limitation the rights to copy, create + * derivative works of, display, perform, and distribute the Software and make, + * use, sell, offer for sale, import, export, have made, and have sold the + * Software and the Larger Work(s), and to sublicense the foregoing rights on + * either these or other terms. + * + * This license is subject to the following condition: + * + * The above copyright notice and either this complete permission notice or at a + * minimum a reference to the UPL must be included in all copies or substantial + * portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. */ package org.graalvm.nativebridge.processor; diff --git a/sdk/src/org.graalvm.nativebridge.processor/src/org/graalvm/nativebridge/processor/NativeToNativeBridgeParser.java b/sdk/src/org.graalvm.nativebridge.processor/src/org/graalvm/nativebridge/processor/NativeToNativeBridgeParser.java index 7c2104e29bff..07f6f089a7cb 100644 --- a/sdk/src/org.graalvm.nativebridge.processor/src/org/graalvm/nativebridge/processor/NativeToNativeBridgeParser.java +++ b/sdk/src/org.graalvm.nativebridge.processor/src/org/graalvm/nativebridge/processor/NativeToNativeBridgeParser.java @@ -1,26 +1,42 @@ /* - * Copyright (c) 2022, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2021, 2023, 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. Oracle designates this - * particular file as subject to the "Classpath" exception as provided - * by Oracle in the LICENSE file that accompanied this code. + * The Universal Permissive License (UPL), Version 1.0 * - * 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). + * Subject to the condition set forth below, permission is hereby granted to any + * person obtaining a copy of this software, associated documentation and/or + * data (collectively the "Software"), free of charge and under any and all + * copyright rights in the Software, and any and all patent rights owned or + * freely licensable by each licensor hereunder covering either (i) the + * unmodified Software as contributed to or provided by such licensor, or (ii) + * the Larger Works (as defined below), to deal in both * - * 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. + * (a) the Software, and * - * 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. + * (b) any piece of software and/or hardware listed in the lrgrwrks.txt file if + * one is included with the Software each a "Larger Work" to which the Software + * is contributed by such licensors), + * + * without restriction, including without limitation the rights to copy, create + * derivative works of, display, perform, and distribute the Software and make, + * use, sell, offer for sale, import, export, have made, and have sold the + * Software and the Larger Work(s), and to sublicense the foregoing rights on + * either these or other terms. + * + * This license is subject to the following condition: + * + * The above copyright notice and either this complete permission notice or at a + * minimum a reference to the UPL must be included in all copies or substantial + * portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. */ package org.graalvm.nativebridge.processor; diff --git a/sdk/src/org.graalvm.nativebridge.processor/src/org/graalvm/nativebridge/processor/SuppressFBWarnings.java b/sdk/src/org.graalvm.nativebridge.processor/src/org/graalvm/nativebridge/processor/SuppressFBWarnings.java index 255559f4e804..3692068fa02e 100644 --- a/sdk/src/org.graalvm.nativebridge.processor/src/org/graalvm/nativebridge/processor/SuppressFBWarnings.java +++ b/sdk/src/org.graalvm.nativebridge.processor/src/org/graalvm/nativebridge/processor/SuppressFBWarnings.java @@ -1,26 +1,42 @@ /* - * Copyright (c) 2021, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2021, 2023, 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. Oracle designates this - * particular file as subject to the "Classpath" exception as provided - * by Oracle in the LICENSE file that accompanied this code. - * - * 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. + * The Universal Permissive License (UPL), Version 1.0 + * + * Subject to the condition set forth below, permission is hereby granted to any + * person obtaining a copy of this software, associated documentation and/or + * data (collectively the "Software"), free of charge and under any and all + * copyright rights in the Software, and any and all patent rights owned or + * freely licensable by each licensor hereunder covering either (i) the + * unmodified Software as contributed to or provided by such licensor, or (ii) + * the Larger Works (as defined below), to deal in both + * + * (a) the Software, and + * + * (b) any piece of software and/or hardware listed in the lrgrwrks.txt file if + * one is included with the Software each a "Larger Work" to which the Software + * is contributed by such licensors), + * + * without restriction, including without limitation the rights to copy, create + * derivative works of, display, perform, and distribute the Software and make, + * use, sell, offer for sale, import, export, have made, and have sold the + * Software and the Larger Work(s), and to sublicense the foregoing rights on + * either these or other terms. + * + * This license is subject to the following condition: + * + * The above copyright notice and either this complete permission notice or at a + * minimum a reference to the UPL must be included in all copies or substantial + * portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. */ package org.graalvm.nativebridge.processor; diff --git a/sdk/src/org.graalvm.nativebridge.processor/src/org/graalvm/nativebridge/processor/Utilities.java b/sdk/src/org.graalvm.nativebridge.processor/src/org/graalvm/nativebridge/processor/Utilities.java index 1f9cf5b60c51..ac11962bca6f 100644 --- a/sdk/src/org.graalvm.nativebridge.processor/src/org/graalvm/nativebridge/processor/Utilities.java +++ b/sdk/src/org.graalvm.nativebridge.processor/src/org/graalvm/nativebridge/processor/Utilities.java @@ -1,26 +1,42 @@ /* - * Copyright (c) 2021, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2021, 2023, 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. Oracle designates this - * particular file as subject to the "Classpath" exception as provided - * by Oracle in the LICENSE file that accompanied this code. + * The Universal Permissive License (UPL), Version 1.0 * - * 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). + * Subject to the condition set forth below, permission is hereby granted to any + * person obtaining a copy of this software, associated documentation and/or + * data (collectively the "Software"), free of charge and under any and all + * copyright rights in the Software, and any and all patent rights owned or + * freely licensable by each licensor hereunder covering either (i) the + * unmodified Software as contributed to or provided by such licensor, or (ii) + * the Larger Works (as defined below), to deal in both * - * 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. + * (a) the Software, and * - * 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. + * (b) any piece of software and/or hardware listed in the lrgrwrks.txt file if + * one is included with the Software each a "Larger Work" to which the Software + * is contributed by such licensors), + * + * without restriction, including without limitation the rights to copy, create + * derivative works of, display, perform, and distribute the Software and make, + * use, sell, offer for sale, import, export, have made, and have sold the + * Software and the Larger Work(s), and to sublicense the foregoing rights on + * either these or other terms. + * + * This license is subject to the following condition: + * + * The above copyright notice and either this complete permission notice or at a + * minimum a reference to the UPL must be included in all copies or substantial + * portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. */ package org.graalvm.nativebridge.processor; diff --git a/sdk/src/org.graalvm.nativebridge/src/org/graalvm/nativebridge/AlwaysByReference.java b/sdk/src/org.graalvm.nativebridge/src/org/graalvm/nativebridge/AlwaysByReference.java index c6e208d45264..3fcde4ac8854 100644 --- a/sdk/src/org.graalvm.nativebridge/src/org/graalvm/nativebridge/AlwaysByReference.java +++ b/sdk/src/org.graalvm.nativebridge/src/org/graalvm/nativebridge/AlwaysByReference.java @@ -1,26 +1,42 @@ /* - * Copyright (c) 2023, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2022, 2023, 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. Oracle designates this - * particular file as subject to the "Classpath" exception as provided - * by Oracle in the LICENSE file that accompanied this code. - * - * 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. + * The Universal Permissive License (UPL), Version 1.0 + * + * Subject to the condition set forth below, permission is hereby granted to any + * person obtaining a copy of this software, associated documentation and/or + * data (collectively the "Software"), free of charge and under any and all + * copyright rights in the Software, and any and all patent rights owned or + * freely licensable by each licensor hereunder covering either (i) the + * unmodified Software as contributed to or provided by such licensor, or (ii) + * the Larger Works (as defined below), to deal in both + * + * (a) the Software, and + * + * (b) any piece of software and/or hardware listed in the lrgrwrks.txt file if + * one is included with the Software each a "Larger Work" to which the Software + * is contributed by such licensors), + * + * without restriction, including without limitation the rights to copy, create + * derivative works of, display, perform, and distribute the Software and make, + * use, sell, offer for sale, import, export, have made, and have sold the + * Software and the Larger Work(s), and to sublicense the foregoing rights on + * either these or other terms. + * + * This license is subject to the following condition: + * + * The above copyright notice and either this complete permission notice or at a + * minimum a reference to the UPL must be included in all copies or substantial + * portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. */ package org.graalvm.nativebridge; diff --git a/sdk/src/org.graalvm.nativebridge/src/org/graalvm/nativebridge/AlwaysByReferenceRepeated.java b/sdk/src/org.graalvm.nativebridge/src/org/graalvm/nativebridge/AlwaysByReferenceRepeated.java index 541dae806891..ec7b26092f19 100644 --- a/sdk/src/org.graalvm.nativebridge/src/org/graalvm/nativebridge/AlwaysByReferenceRepeated.java +++ b/sdk/src/org.graalvm.nativebridge/src/org/graalvm/nativebridge/AlwaysByReferenceRepeated.java @@ -1,26 +1,42 @@ /* - * Copyright (c) 2023, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2022, 2023, 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. Oracle designates this - * particular file as subject to the "Classpath" exception as provided - * by Oracle in the LICENSE file that accompanied this code. - * - * 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. + * The Universal Permissive License (UPL), Version 1.0 + * + * Subject to the condition set forth below, permission is hereby granted to any + * person obtaining a copy of this software, associated documentation and/or + * data (collectively the "Software"), free of charge and under any and all + * copyright rights in the Software, and any and all patent rights owned or + * freely licensable by each licensor hereunder covering either (i) the + * unmodified Software as contributed to or provided by such licensor, or (ii) + * the Larger Works (as defined below), to deal in both + * + * (a) the Software, and + * + * (b) any piece of software and/or hardware listed in the lrgrwrks.txt file if + * one is included with the Software each a "Larger Work" to which the Software + * is contributed by such licensors), + * + * without restriction, including without limitation the rights to copy, create + * derivative works of, display, perform, and distribute the Software and make, + * use, sell, offer for sale, import, export, have made, and have sold the + * Software and the Larger Work(s), and to sublicense the foregoing rights on + * either these or other terms. + * + * This license is subject to the following condition: + * + * The above copyright notice and either this complete permission notice or at a + * minimum a reference to the UPL must be included in all copies or substantial + * portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. */ package org.graalvm.nativebridge; diff --git a/sdk/src/org.graalvm.nativebridge/src/org/graalvm/nativebridge/BinaryInput.java b/sdk/src/org.graalvm.nativebridge/src/org/graalvm/nativebridge/BinaryInput.java index 57fff7551577..59bdb922be98 100644 --- a/sdk/src/org.graalvm.nativebridge/src/org/graalvm/nativebridge/BinaryInput.java +++ b/sdk/src/org.graalvm.nativebridge/src/org/graalvm/nativebridge/BinaryInput.java @@ -1,26 +1,42 @@ /* - * Copyright (c) 2021, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2022, 2023, 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. Oracle designates this - * particular file as subject to the "Classpath" exception as provided - * by Oracle in the LICENSE file that accompanied this code. + * The Universal Permissive License (UPL), Version 1.0 * - * 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). + * Subject to the condition set forth below, permission is hereby granted to any + * person obtaining a copy of this software, associated documentation and/or + * data (collectively the "Software"), free of charge and under any and all + * copyright rights in the Software, and any and all patent rights owned or + * freely licensable by each licensor hereunder covering either (i) the + * unmodified Software as contributed to or provided by such licensor, or (ii) + * the Larger Works (as defined below), to deal in both * - * 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. + * (a) the Software, and * - * 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. + * (b) any piece of software and/or hardware listed in the lrgrwrks.txt file if + * one is included with the Software each a "Larger Work" to which the Software + * is contributed by such licensors), + * + * without restriction, including without limitation the rights to copy, create + * derivative works of, display, perform, and distribute the Software and make, + * use, sell, offer for sale, import, export, have made, and have sold the + * Software and the Larger Work(s), and to sublicense the foregoing rights on + * either these or other terms. + * + * This license is subject to the following condition: + * + * The above copyright notice and either this complete permission notice or at a + * minimum a reference to the UPL must be included in all copies or substantial + * portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. */ package org.graalvm.nativebridge; diff --git a/sdk/src/org.graalvm.nativebridge/src/org/graalvm/nativebridge/BinaryMarshaller.java b/sdk/src/org.graalvm.nativebridge/src/org/graalvm/nativebridge/BinaryMarshaller.java index 75cb8115635d..f90dbd576db1 100644 --- a/sdk/src/org.graalvm.nativebridge/src/org/graalvm/nativebridge/BinaryMarshaller.java +++ b/sdk/src/org.graalvm.nativebridge/src/org/graalvm/nativebridge/BinaryMarshaller.java @@ -1,26 +1,42 @@ /* - * Copyright (c) 2022, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2022, 2023, 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. Oracle designates this - * particular file as subject to the "Classpath" exception as provided - * by Oracle in the LICENSE file that accompanied this code. + * The Universal Permissive License (UPL), Version 1.0 * - * 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). + * Subject to the condition set forth below, permission is hereby granted to any + * person obtaining a copy of this software, associated documentation and/or + * data (collectively the "Software"), free of charge and under any and all + * copyright rights in the Software, and any and all patent rights owned or + * freely licensable by each licensor hereunder covering either (i) the + * unmodified Software as contributed to or provided by such licensor, or (ii) + * the Larger Works (as defined below), to deal in both * - * 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. + * (a) the Software, and * - * 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. + * (b) any piece of software and/or hardware listed in the lrgrwrks.txt file if + * one is included with the Software each a "Larger Work" to which the Software + * is contributed by such licensors), + * + * without restriction, including without limitation the rights to copy, create + * derivative works of, display, perform, and distribute the Software and make, + * use, sell, offer for sale, import, export, have made, and have sold the + * Software and the Larger Work(s), and to sublicense the foregoing rights on + * either these or other terms. + * + * This license is subject to the following condition: + * + * The above copyright notice and either this complete permission notice or at a + * minimum a reference to the UPL must be included in all copies or substantial + * portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. */ package org.graalvm.nativebridge; diff --git a/sdk/src/org.graalvm.nativebridge/src/org/graalvm/nativebridge/BinaryOutput.java b/sdk/src/org.graalvm.nativebridge/src/org/graalvm/nativebridge/BinaryOutput.java index 898224bdfc2f..24ce6a9e9b59 100644 --- a/sdk/src/org.graalvm.nativebridge/src/org/graalvm/nativebridge/BinaryOutput.java +++ b/sdk/src/org.graalvm.nativebridge/src/org/graalvm/nativebridge/BinaryOutput.java @@ -1,26 +1,42 @@ /* - * Copyright (c) 2021, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2022, 2023, 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. Oracle designates this - * particular file as subject to the "Classpath" exception as provided - * by Oracle in the LICENSE file that accompanied this code. + * The Universal Permissive License (UPL), Version 1.0 * - * 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). + * Subject to the condition set forth below, permission is hereby granted to any + * person obtaining a copy of this software, associated documentation and/or + * data (collectively the "Software"), free of charge and under any and all + * copyright rights in the Software, and any and all patent rights owned or + * freely licensable by each licensor hereunder covering either (i) the + * unmodified Software as contributed to or provided by such licensor, or (ii) + * the Larger Works (as defined below), to deal in both * - * 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. + * (a) the Software, and * - * 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. + * (b) any piece of software and/or hardware listed in the lrgrwrks.txt file if + * one is included with the Software each a "Larger Work" to which the Software + * is contributed by such licensors), + * + * without restriction, including without limitation the rights to copy, create + * derivative works of, display, perform, and distribute the Software and make, + * use, sell, offer for sale, import, export, have made, and have sold the + * Software and the Larger Work(s), and to sublicense the foregoing rights on + * either these or other terms. + * + * This license is subject to the following condition: + * + * The above copyright notice and either this complete permission notice or at a + * minimum a reference to the UPL must be included in all copies or substantial + * portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. */ package org.graalvm.nativebridge; diff --git a/sdk/src/org.graalvm.nativebridge/src/org/graalvm/nativebridge/ByReference.java b/sdk/src/org.graalvm.nativebridge/src/org/graalvm/nativebridge/ByReference.java index 95344252e0b0..5a5c1b5fa249 100644 --- a/sdk/src/org.graalvm.nativebridge/src/org/graalvm/nativebridge/ByReference.java +++ b/sdk/src/org.graalvm.nativebridge/src/org/graalvm/nativebridge/ByReference.java @@ -1,26 +1,42 @@ /* - * Copyright (c) 2021, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2022, 2023, 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. Oracle designates this - * particular file as subject to the "Classpath" exception as provided - * by Oracle in the LICENSE file that accompanied this code. + * The Universal Permissive License (UPL), Version 1.0 * - * 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). + * Subject to the condition set forth below, permission is hereby granted to any + * person obtaining a copy of this software, associated documentation and/or + * data (collectively the "Software"), free of charge and under any and all + * copyright rights in the Software, and any and all patent rights owned or + * freely licensable by each licensor hereunder covering either (i) the + * unmodified Software as contributed to or provided by such licensor, or (ii) + * the Larger Works (as defined below), to deal in both * - * 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. + * (a) the Software, and * - * 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. + * (b) any piece of software and/or hardware listed in the lrgrwrks.txt file if + * one is included with the Software each a "Larger Work" to which the Software + * is contributed by such licensors), + * + * without restriction, including without limitation the rights to copy, create + * derivative works of, display, perform, and distribute the Software and make, + * use, sell, offer for sale, import, export, have made, and have sold the + * Software and the Larger Work(s), and to sublicense the foregoing rights on + * either these or other terms. + * + * This license is subject to the following condition: + * + * The above copyright notice and either this complete permission notice or at a + * minimum a reference to the UPL must be included in all copies or substantial + * portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. */ package org.graalvm.nativebridge; diff --git a/sdk/src/org.graalvm.nativebridge/src/org/graalvm/nativebridge/CustomDispatchAccessor.java b/sdk/src/org.graalvm.nativebridge/src/org/graalvm/nativebridge/CustomDispatchAccessor.java index 824d2be664a9..fc90b041010b 100644 --- a/sdk/src/org.graalvm.nativebridge/src/org/graalvm/nativebridge/CustomDispatchAccessor.java +++ b/sdk/src/org.graalvm.nativebridge/src/org/graalvm/nativebridge/CustomDispatchAccessor.java @@ -1,26 +1,42 @@ /* - * Copyright (c) 2021, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2021, 2023, 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. Oracle designates this - * particular file as subject to the "Classpath" exception as provided - * by Oracle in the LICENSE file that accompanied this code. - * - * 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. + * The Universal Permissive License (UPL), Version 1.0 + * + * Subject to the condition set forth below, permission is hereby granted to any + * person obtaining a copy of this software, associated documentation and/or + * data (collectively the "Software"), free of charge and under any and all + * copyright rights in the Software, and any and all patent rights owned or + * freely licensable by each licensor hereunder covering either (i) the + * unmodified Software as contributed to or provided by such licensor, or (ii) + * the Larger Works (as defined below), to deal in both + * + * (a) the Software, and + * + * (b) any piece of software and/or hardware listed in the lrgrwrks.txt file if + * one is included with the Software each a "Larger Work" to which the Software + * is contributed by such licensors), + * + * without restriction, including without limitation the rights to copy, create + * derivative works of, display, perform, and distribute the Software and make, + * use, sell, offer for sale, import, export, have made, and have sold the + * Software and the Larger Work(s), and to sublicense the foregoing rights on + * either these or other terms. + * + * This license is subject to the following condition: + * + * The above copyright notice and either this complete permission notice or at a + * minimum a reference to the UPL must be included in all copies or substantial + * portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. */ package org.graalvm.nativebridge; diff --git a/sdk/src/org.graalvm.nativebridge/src/org/graalvm/nativebridge/CustomDispatchFactory.java b/sdk/src/org.graalvm.nativebridge/src/org/graalvm/nativebridge/CustomDispatchFactory.java index 2cdfd453bfcb..4089d5befb3e 100644 --- a/sdk/src/org.graalvm.nativebridge/src/org/graalvm/nativebridge/CustomDispatchFactory.java +++ b/sdk/src/org.graalvm.nativebridge/src/org/graalvm/nativebridge/CustomDispatchFactory.java @@ -1,26 +1,42 @@ /* - * Copyright (c) 2022, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2022, 2023, 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. Oracle designates this - * particular file as subject to the "Classpath" exception as provided - * by Oracle in the LICENSE file that accompanied this code. - * - * 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. + * The Universal Permissive License (UPL), Version 1.0 + * + * Subject to the condition set forth below, permission is hereby granted to any + * person obtaining a copy of this software, associated documentation and/or + * data (collectively the "Software"), free of charge and under any and all + * copyright rights in the Software, and any and all patent rights owned or + * freely licensable by each licensor hereunder covering either (i) the + * unmodified Software as contributed to or provided by such licensor, or (ii) + * the Larger Works (as defined below), to deal in both + * + * (a) the Software, and + * + * (b) any piece of software and/or hardware listed in the lrgrwrks.txt file if + * one is included with the Software each a "Larger Work" to which the Software + * is contributed by such licensors), + * + * without restriction, including without limitation the rights to copy, create + * derivative works of, display, perform, and distribute the Software and make, + * use, sell, offer for sale, import, export, have made, and have sold the + * Software and the Larger Work(s), and to sublicense the foregoing rights on + * either these or other terms. + * + * This license is subject to the following condition: + * + * The above copyright notice and either this complete permission notice or at a + * minimum a reference to the UPL must be included in all copies or substantial + * portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. */ package org.graalvm.nativebridge; diff --git a/sdk/src/org.graalvm.nativebridge/src/org/graalvm/nativebridge/CustomReceiverAccessor.java b/sdk/src/org.graalvm.nativebridge/src/org/graalvm/nativebridge/CustomReceiverAccessor.java index 000bcb790c94..8f1a1722627d 100644 --- a/sdk/src/org.graalvm.nativebridge/src/org/graalvm/nativebridge/CustomReceiverAccessor.java +++ b/sdk/src/org.graalvm.nativebridge/src/org/graalvm/nativebridge/CustomReceiverAccessor.java @@ -1,26 +1,42 @@ /* - * Copyright (c) 2021, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2021, 2023, 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. Oracle designates this - * particular file as subject to the "Classpath" exception as provided - * by Oracle in the LICENSE file that accompanied this code. - * - * 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. + * The Universal Permissive License (UPL), Version 1.0 + * + * Subject to the condition set forth below, permission is hereby granted to any + * person obtaining a copy of this software, associated documentation and/or + * data (collectively the "Software"), free of charge and under any and all + * copyright rights in the Software, and any and all patent rights owned or + * freely licensable by each licensor hereunder covering either (i) the + * unmodified Software as contributed to or provided by such licensor, or (ii) + * the Larger Works (as defined below), to deal in both + * + * (a) the Software, and + * + * (b) any piece of software and/or hardware listed in the lrgrwrks.txt file if + * one is included with the Software each a "Larger Work" to which the Software + * is contributed by such licensors), + * + * without restriction, including without limitation the rights to copy, create + * derivative works of, display, perform, and distribute the Software and make, + * use, sell, offer for sale, import, export, have made, and have sold the + * Software and the Larger Work(s), and to sublicense the foregoing rights on + * either these or other terms. + * + * This license is subject to the following condition: + * + * The above copyright notice and either this complete permission notice or at a + * minimum a reference to the UPL must be included in all copies or substantial + * portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. */ package org.graalvm.nativebridge; diff --git a/sdk/src/org.graalvm.nativebridge/src/org/graalvm/nativebridge/DefaultStackTraceMarshaller.java b/sdk/src/org.graalvm.nativebridge/src/org/graalvm/nativebridge/DefaultStackTraceMarshaller.java index d0a2855ba1be..58b773d0784c 100644 --- a/sdk/src/org.graalvm.nativebridge/src/org/graalvm/nativebridge/DefaultStackTraceMarshaller.java +++ b/sdk/src/org.graalvm.nativebridge/src/org/graalvm/nativebridge/DefaultStackTraceMarshaller.java @@ -1,26 +1,42 @@ /* - * Copyright (c) 2022, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2021, 2023, 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. Oracle designates this - * particular file as subject to the "Classpath" exception as provided - * by Oracle in the LICENSE file that accompanied this code. - * - * 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. + * The Universal Permissive License (UPL), Version 1.0 + * + * Subject to the condition set forth below, permission is hereby granted to any + * person obtaining a copy of this software, associated documentation and/or + * data (collectively the "Software"), free of charge and under any and all + * copyright rights in the Software, and any and all patent rights owned or + * freely licensable by each licensor hereunder covering either (i) the + * unmodified Software as contributed to or provided by such licensor, or (ii) + * the Larger Works (as defined below), to deal in both + * + * (a) the Software, and + * + * (b) any piece of software and/or hardware listed in the lrgrwrks.txt file if + * one is included with the Software each a "Larger Work" to which the Software + * is contributed by such licensors), + * + * without restriction, including without limitation the rights to copy, create + * derivative works of, display, perform, and distribute the Software and make, + * use, sell, offer for sale, import, export, have made, and have sold the + * Software and the Larger Work(s), and to sublicense the foregoing rights on + * either these or other terms. + * + * This license is subject to the following condition: + * + * The above copyright notice and either this complete permission notice or at a + * minimum a reference to the UPL must be included in all copies or substantial + * portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. */ package org.graalvm.nativebridge; diff --git a/sdk/src/org.graalvm.nativebridge/src/org/graalvm/nativebridge/DefaultThrowableMarshaller.java b/sdk/src/org.graalvm.nativebridge/src/org/graalvm/nativebridge/DefaultThrowableMarshaller.java index 85ec099b0ad2..640186f76f3d 100644 --- a/sdk/src/org.graalvm.nativebridge/src/org/graalvm/nativebridge/DefaultThrowableMarshaller.java +++ b/sdk/src/org.graalvm.nativebridge/src/org/graalvm/nativebridge/DefaultThrowableMarshaller.java @@ -1,26 +1,42 @@ /* - * Copyright (c) 2022, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2021, 2023, 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. Oracle designates this - * particular file as subject to the "Classpath" exception as provided - * by Oracle in the LICENSE file that accompanied this code. - * - * 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. + * The Universal Permissive License (UPL), Version 1.0 + * + * Subject to the condition set forth below, permission is hereby granted to any + * person obtaining a copy of this software, associated documentation and/or + * data (collectively the "Software"), free of charge and under any and all + * copyright rights in the Software, and any and all patent rights owned or + * freely licensable by each licensor hereunder covering either (i) the + * unmodified Software as contributed to or provided by such licensor, or (ii) + * the Larger Works (as defined below), to deal in both + * + * (a) the Software, and + * + * (b) any piece of software and/or hardware listed in the lrgrwrks.txt file if + * one is included with the Software each a "Larger Work" to which the Software + * is contributed by such licensors), + * + * without restriction, including without limitation the rights to copy, create + * derivative works of, display, perform, and distribute the Software and make, + * use, sell, offer for sale, import, export, have made, and have sold the + * Software and the Larger Work(s), and to sublicense the foregoing rights on + * either these or other terms. + * + * This license is subject to the following condition: + * + * The above copyright notice and either this complete permission notice or at a + * minimum a reference to the UPL must be included in all copies or substantial + * portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. */ package org.graalvm.nativebridge; diff --git a/sdk/src/org.graalvm.nativebridge/src/org/graalvm/nativebridge/EndPointHandle.java b/sdk/src/org.graalvm.nativebridge/src/org/graalvm/nativebridge/EndPointHandle.java index 7c3dcaecab5a..424c680c8237 100644 --- a/sdk/src/org.graalvm.nativebridge/src/org/graalvm/nativebridge/EndPointHandle.java +++ b/sdk/src/org.graalvm.nativebridge/src/org/graalvm/nativebridge/EndPointHandle.java @@ -1,26 +1,42 @@ /* - * Copyright (c) 2021, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2021, 2023, 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. Oracle designates this - * particular file as subject to the "Classpath" exception as provided - * by Oracle in the LICENSE file that accompanied this code. - * - * 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. + * The Universal Permissive License (UPL), Version 1.0 + * + * Subject to the condition set forth below, permission is hereby granted to any + * person obtaining a copy of this software, associated documentation and/or + * data (collectively the "Software"), free of charge and under any and all + * copyright rights in the Software, and any and all patent rights owned or + * freely licensable by each licensor hereunder covering either (i) the + * unmodified Software as contributed to or provided by such licensor, or (ii) + * the Larger Works (as defined below), to deal in both + * + * (a) the Software, and + * + * (b) any piece of software and/or hardware listed in the lrgrwrks.txt file if + * one is included with the Software each a "Larger Work" to which the Software + * is contributed by such licensors), + * + * without restriction, including without limitation the rights to copy, create + * derivative works of, display, perform, and distribute the Software and make, + * use, sell, offer for sale, import, export, have made, and have sold the + * Software and the Larger Work(s), and to sublicense the foregoing rights on + * either these or other terms. + * + * This license is subject to the following condition: + * + * The above copyright notice and either this complete permission notice or at a + * minimum a reference to the UPL must be included in all copies or substantial + * portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. */ package org.graalvm.nativebridge; diff --git a/sdk/src/org.graalvm.nativebridge/src/org/graalvm/nativebridge/ForeignException.java b/sdk/src/org.graalvm.nativebridge/src/org/graalvm/nativebridge/ForeignException.java index 82f811456e94..f0095819ac00 100644 --- a/sdk/src/org.graalvm.nativebridge/src/org/graalvm/nativebridge/ForeignException.java +++ b/sdk/src/org.graalvm.nativebridge/src/org/graalvm/nativebridge/ForeignException.java @@ -1,26 +1,42 @@ /* - * Copyright (c) 2022, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2021, 2023, 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. Oracle designates this - * particular file as subject to the "Classpath" exception as provided - * by Oracle in the LICENSE file that accompanied this code. + * The Universal Permissive License (UPL), Version 1.0 * - * 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). + * Subject to the condition set forth below, permission is hereby granted to any + * person obtaining a copy of this software, associated documentation and/or + * data (collectively the "Software"), free of charge and under any and all + * copyright rights in the Software, and any and all patent rights owned or + * freely licensable by each licensor hereunder covering either (i) the + * unmodified Software as contributed to or provided by such licensor, or (ii) + * the Larger Works (as defined below), to deal in both * - * 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. + * (a) the Software, and * - * 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. + * (b) any piece of software and/or hardware listed in the lrgrwrks.txt file if + * one is included with the Software each a "Larger Work" to which the Software + * is contributed by such licensors), + * + * without restriction, including without limitation the rights to copy, create + * derivative works of, display, perform, and distribute the Software and make, + * use, sell, offer for sale, import, export, have made, and have sold the + * Software and the Larger Work(s), and to sublicense the foregoing rights on + * either these or other terms. + * + * This license is subject to the following condition: + * + * The above copyright notice and either this complete permission notice or at a + * minimum a reference to the UPL must be included in all copies or substantial + * portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. */ package org.graalvm.nativebridge; diff --git a/sdk/src/org.graalvm.nativebridge/src/org/graalvm/nativebridge/ForeignExceptionEndPoints.java b/sdk/src/org.graalvm.nativebridge/src/org/graalvm/nativebridge/ForeignExceptionEndPoints.java index a464cdb0eaaf..d78fc3ebaee7 100644 --- a/sdk/src/org.graalvm.nativebridge/src/org/graalvm/nativebridge/ForeignExceptionEndPoints.java +++ b/sdk/src/org.graalvm.nativebridge/src/org/graalvm/nativebridge/ForeignExceptionEndPoints.java @@ -1,26 +1,42 @@ /* - * Copyright (c) 2022, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2021, 2023, 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. Oracle designates this - * particular file as subject to the "Classpath" exception as provided - * by Oracle in the LICENSE file that accompanied this code. - * - * 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. + * The Universal Permissive License (UPL), Version 1.0 + * + * Subject to the condition set forth below, permission is hereby granted to any + * person obtaining a copy of this software, associated documentation and/or + * data (collectively the "Software"), free of charge and under any and all + * copyright rights in the Software, and any and all patent rights owned or + * freely licensable by each licensor hereunder covering either (i) the + * unmodified Software as contributed to or provided by such licensor, or (ii) + * the Larger Works (as defined below), to deal in both + * + * (a) the Software, and + * + * (b) any piece of software and/or hardware listed in the lrgrwrks.txt file if + * one is included with the Software each a "Larger Work" to which the Software + * is contributed by such licensors), + * + * without restriction, including without limitation the rights to copy, create + * derivative works of, display, perform, and distribute the Software and make, + * use, sell, offer for sale, import, export, have made, and have sold the + * Software and the Larger Work(s), and to sublicense the foregoing rights on + * either these or other terms. + * + * This license is subject to the following condition: + * + * The above copyright notice and either this complete permission notice or at a + * minimum a reference to the UPL must be included in all copies or substantial + * portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. */ package org.graalvm.nativebridge; diff --git a/sdk/src/org.graalvm.nativebridge/src/org/graalvm/nativebridge/GenerateHotSpotToNativeBridge.java b/sdk/src/org.graalvm.nativebridge/src/org/graalvm/nativebridge/GenerateHotSpotToNativeBridge.java index c173e7deba3b..10b50f1cd359 100644 --- a/sdk/src/org.graalvm.nativebridge/src/org/graalvm/nativebridge/GenerateHotSpotToNativeBridge.java +++ b/sdk/src/org.graalvm.nativebridge/src/org/graalvm/nativebridge/GenerateHotSpotToNativeBridge.java @@ -1,26 +1,42 @@ /* - * Copyright (c) 2021, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2021, 2023, 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. Oracle designates this - * particular file as subject to the "Classpath" exception as provided - * by Oracle in the LICENSE file that accompanied this code. - * - * 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. + * The Universal Permissive License (UPL), Version 1.0 + * + * Subject to the condition set forth below, permission is hereby granted to any + * person obtaining a copy of this software, associated documentation and/or + * data (collectively the "Software"), free of charge and under any and all + * copyright rights in the Software, and any and all patent rights owned or + * freely licensable by each licensor hereunder covering either (i) the + * unmodified Software as contributed to or provided by such licensor, or (ii) + * the Larger Works (as defined below), to deal in both + * + * (a) the Software, and + * + * (b) any piece of software and/or hardware listed in the lrgrwrks.txt file if + * one is included with the Software each a "Larger Work" to which the Software + * is contributed by such licensors), + * + * without restriction, including without limitation the rights to copy, create + * derivative works of, display, perform, and distribute the Software and make, + * use, sell, offer for sale, import, export, have made, and have sold the + * Software and the Larger Work(s), and to sublicense the foregoing rights on + * either these or other terms. + * + * This license is subject to the following condition: + * + * The above copyright notice and either this complete permission notice or at a + * minimum a reference to the UPL must be included in all copies or substantial + * portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. */ package org.graalvm.nativebridge; diff --git a/sdk/src/org.graalvm.nativebridge/src/org/graalvm/nativebridge/GenerateNativeToHotSpotBridge.java b/sdk/src/org.graalvm.nativebridge/src/org/graalvm/nativebridge/GenerateNativeToHotSpotBridge.java index be865151c6cf..b60c00424216 100644 --- a/sdk/src/org.graalvm.nativebridge/src/org/graalvm/nativebridge/GenerateNativeToHotSpotBridge.java +++ b/sdk/src/org.graalvm.nativebridge/src/org/graalvm/nativebridge/GenerateNativeToHotSpotBridge.java @@ -1,26 +1,42 @@ /* - * Copyright (c) 2021, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2021, 2023, 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. Oracle designates this - * particular file as subject to the "Classpath" exception as provided - * by Oracle in the LICENSE file that accompanied this code. - * - * 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. + * The Universal Permissive License (UPL), Version 1.0 + * + * Subject to the condition set forth below, permission is hereby granted to any + * person obtaining a copy of this software, associated documentation and/or + * data (collectively the "Software"), free of charge and under any and all + * copyright rights in the Software, and any and all patent rights owned or + * freely licensable by each licensor hereunder covering either (i) the + * unmodified Software as contributed to or provided by such licensor, or (ii) + * the Larger Works (as defined below), to deal in both + * + * (a) the Software, and + * + * (b) any piece of software and/or hardware listed in the lrgrwrks.txt file if + * one is included with the Software each a "Larger Work" to which the Software + * is contributed by such licensors), + * + * without restriction, including without limitation the rights to copy, create + * derivative works of, display, perform, and distribute the Software and make, + * use, sell, offer for sale, import, export, have made, and have sold the + * Software and the Larger Work(s), and to sublicense the foregoing rights on + * either these or other terms. + * + * This license is subject to the following condition: + * + * The above copyright notice and either this complete permission notice or at a + * minimum a reference to the UPL must be included in all copies or substantial + * portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. */ package org.graalvm.nativebridge; diff --git a/sdk/src/org.graalvm.nativebridge/src/org/graalvm/nativebridge/GenerateNativeToNativeBridge.java b/sdk/src/org.graalvm.nativebridge/src/org/graalvm/nativebridge/GenerateNativeToNativeBridge.java index fbcd41a9cac6..e257dcddcf63 100644 --- a/sdk/src/org.graalvm.nativebridge/src/org/graalvm/nativebridge/GenerateNativeToNativeBridge.java +++ b/sdk/src/org.graalvm.nativebridge/src/org/graalvm/nativebridge/GenerateNativeToNativeBridge.java @@ -1,26 +1,42 @@ /* - * Copyright (c) 2022, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2021, 2023, 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. Oracle designates this - * particular file as subject to the "Classpath" exception as provided - * by Oracle in the LICENSE file that accompanied this code. - * - * 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. + * The Universal Permissive License (UPL), Version 1.0 + * + * Subject to the condition set forth below, permission is hereby granted to any + * person obtaining a copy of this software, associated documentation and/or + * data (collectively the "Software"), free of charge and under any and all + * copyright rights in the Software, and any and all patent rights owned or + * freely licensable by each licensor hereunder covering either (i) the + * unmodified Software as contributed to or provided by such licensor, or (ii) + * the Larger Works (as defined below), to deal in both + * + * (a) the Software, and + * + * (b) any piece of software and/or hardware listed in the lrgrwrks.txt file if + * one is included with the Software each a "Larger Work" to which the Software + * is contributed by such licensors), + * + * without restriction, including without limitation the rights to copy, create + * derivative works of, display, perform, and distribute the Software and make, + * use, sell, offer for sale, import, export, have made, and have sold the + * Software and the Larger Work(s), and to sublicense the foregoing rights on + * either these or other terms. + * + * This license is subject to the following condition: + * + * The above copyright notice and either this complete permission notice or at a + * minimum a reference to the UPL must be included in all copies or substantial + * portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. */ package org.graalvm.nativebridge; diff --git a/sdk/src/org.graalvm.nativebridge/src/org/graalvm/nativebridge/Idempotent.java b/sdk/src/org.graalvm.nativebridge/src/org/graalvm/nativebridge/Idempotent.java index 5ad8eb9ba2c2..05d73607cbbf 100644 --- a/sdk/src/org.graalvm.nativebridge/src/org/graalvm/nativebridge/Idempotent.java +++ b/sdk/src/org.graalvm.nativebridge/src/org/graalvm/nativebridge/Idempotent.java @@ -1,26 +1,42 @@ /* - * Copyright (c) 2021, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2021, 2023, 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. Oracle designates this - * particular file as subject to the "Classpath" exception as provided - * by Oracle in the LICENSE file that accompanied this code. - * - * 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. + * The Universal Permissive License (UPL), Version 1.0 + * + * Subject to the condition set forth below, permission is hereby granted to any + * person obtaining a copy of this software, associated documentation and/or + * data (collectively the "Software"), free of charge and under any and all + * copyright rights in the Software, and any and all patent rights owned or + * freely licensable by each licensor hereunder covering either (i) the + * unmodified Software as contributed to or provided by such licensor, or (ii) + * the Larger Works (as defined below), to deal in both + * + * (a) the Software, and + * + * (b) any piece of software and/or hardware listed in the lrgrwrks.txt file if + * one is included with the Software each a "Larger Work" to which the Software + * is contributed by such licensors), + * + * without restriction, including without limitation the rights to copy, create + * derivative works of, display, perform, and distribute the Software and make, + * use, sell, offer for sale, import, export, have made, and have sold the + * Software and the Larger Work(s), and to sublicense the foregoing rights on + * either these or other terms. + * + * This license is subject to the following condition: + * + * The above copyright notice and either this complete permission notice or at a + * minimum a reference to the UPL must be included in all copies or substantial + * portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. */ package org.graalvm.nativebridge; diff --git a/sdk/src/org.graalvm.nativebridge/src/org/graalvm/nativebridge/In.java b/sdk/src/org.graalvm.nativebridge/src/org/graalvm/nativebridge/In.java index 3d9acf75a76b..e99e4e6359c5 100644 --- a/sdk/src/org.graalvm.nativebridge/src/org/graalvm/nativebridge/In.java +++ b/sdk/src/org.graalvm.nativebridge/src/org/graalvm/nativebridge/In.java @@ -1,26 +1,42 @@ /* - * Copyright (c) 2021, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2021, 2023, 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. Oracle designates this - * particular file as subject to the "Classpath" exception as provided - * by Oracle in the LICENSE file that accompanied this code. - * - * 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. + * The Universal Permissive License (UPL), Version 1.0 + * + * Subject to the condition set forth below, permission is hereby granted to any + * person obtaining a copy of this software, associated documentation and/or + * data (collectively the "Software"), free of charge and under any and all + * copyright rights in the Software, and any and all patent rights owned or + * freely licensable by each licensor hereunder covering either (i) the + * unmodified Software as contributed to or provided by such licensor, or (ii) + * the Larger Works (as defined below), to deal in both + * + * (a) the Software, and + * + * (b) any piece of software and/or hardware listed in the lrgrwrks.txt file if + * one is included with the Software each a "Larger Work" to which the Software + * is contributed by such licensors), + * + * without restriction, including without limitation the rights to copy, create + * derivative works of, display, perform, and distribute the Software and make, + * use, sell, offer for sale, import, export, have made, and have sold the + * Software and the Larger Work(s), and to sublicense the foregoing rights on + * either these or other terms. + * + * This license is subject to the following condition: + * + * The above copyright notice and either this complete permission notice or at a + * minimum a reference to the UPL must be included in all copies or substantial + * portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. */ package org.graalvm.nativebridge; diff --git a/sdk/src/org.graalvm.nativebridge/src/org/graalvm/nativebridge/JNIClassCache.java b/sdk/src/org.graalvm.nativebridge/src/org/graalvm/nativebridge/JNIClassCache.java index 36f1ac494be8..ce87ee5426b7 100644 --- a/sdk/src/org.graalvm.nativebridge/src/org/graalvm/nativebridge/JNIClassCache.java +++ b/sdk/src/org.graalvm.nativebridge/src/org/graalvm/nativebridge/JNIClassCache.java @@ -1,26 +1,42 @@ /* - * Copyright (c) 2023, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2021, 2023, 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. Oracle designates this - * particular file as subject to the "Classpath" exception as provided - * by Oracle in the LICENSE file that accompanied this code. + * The Universal Permissive License (UPL), Version 1.0 * - * 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). + * Subject to the condition set forth below, permission is hereby granted to any + * person obtaining a copy of this software, associated documentation and/or + * data (collectively the "Software"), free of charge and under any and all + * copyright rights in the Software, and any and all patent rights owned or + * freely licensable by each licensor hereunder covering either (i) the + * unmodified Software as contributed to or provided by such licensor, or (ii) + * the Larger Works (as defined below), to deal in both * - * 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. + * (a) the Software, and * - * 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. + * (b) any piece of software and/or hardware listed in the lrgrwrks.txt file if + * one is included with the Software each a "Larger Work" to which the Software + * is contributed by such licensors), + * + * without restriction, including without limitation the rights to copy, create + * derivative works of, display, perform, and distribute the Software and make, + * use, sell, offer for sale, import, export, have made, and have sold the + * Software and the Larger Work(s), and to sublicense the foregoing rights on + * either these or other terms. + * + * This license is subject to the following condition: + * + * The above copyright notice and either this complete permission notice or at a + * minimum a reference to the UPL must be included in all copies or substantial + * portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. */ package org.graalvm.nativebridge; diff --git a/sdk/src/org.graalvm.nativebridge/src/org/graalvm/nativebridge/JNIConfig.java b/sdk/src/org.graalvm.nativebridge/src/org/graalvm/nativebridge/JNIConfig.java index 7da2cf18ae50..b9a73989839d 100644 --- a/sdk/src/org.graalvm.nativebridge/src/org/graalvm/nativebridge/JNIConfig.java +++ b/sdk/src/org.graalvm.nativebridge/src/org/graalvm/nativebridge/JNIConfig.java @@ -1,26 +1,42 @@ /* - * Copyright (c) 2021, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2021, 2023, 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. Oracle designates this - * particular file as subject to the "Classpath" exception as provided - * by Oracle in the LICENSE file that accompanied this code. + * The Universal Permissive License (UPL), Version 1.0 * - * 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). + * Subject to the condition set forth below, permission is hereby granted to any + * person obtaining a copy of this software, associated documentation and/or + * data (collectively the "Software"), free of charge and under any and all + * copyright rights in the Software, and any and all patent rights owned or + * freely licensable by each licensor hereunder covering either (i) the + * unmodified Software as contributed to or provided by such licensor, or (ii) + * the Larger Works (as defined below), to deal in both * - * 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. + * (a) the Software, and * - * 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. + * (b) any piece of software and/or hardware listed in the lrgrwrks.txt file if + * one is included with the Software each a "Larger Work" to which the Software + * is contributed by such licensors), + * + * without restriction, including without limitation the rights to copy, create + * derivative works of, display, perform, and distribute the Software and make, + * use, sell, offer for sale, import, export, have made, and have sold the + * Software and the Larger Work(s), and to sublicense the foregoing rights on + * either these or other terms. + * + * This license is subject to the following condition: + * + * The above copyright notice and either this complete permission notice or at a + * minimum a reference to the UPL must be included in all copies or substantial + * portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. */ package org.graalvm.nativebridge; diff --git a/sdk/src/org.graalvm.nativebridge/src/org/graalvm/nativebridge/MarshalledException.java b/sdk/src/org.graalvm.nativebridge/src/org/graalvm/nativebridge/MarshalledException.java index 57676688e18b..79775d57fd64 100644 --- a/sdk/src/org.graalvm.nativebridge/src/org/graalvm/nativebridge/MarshalledException.java +++ b/sdk/src/org.graalvm.nativebridge/src/org/graalvm/nativebridge/MarshalledException.java @@ -1,26 +1,42 @@ /* - * Copyright (c) 2022, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2021, 2023, 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. Oracle designates this - * particular file as subject to the "Classpath" exception as provided - * by Oracle in the LICENSE file that accompanied this code. + * The Universal Permissive License (UPL), Version 1.0 * - * 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). + * Subject to the condition set forth below, permission is hereby granted to any + * person obtaining a copy of this software, associated documentation and/or + * data (collectively the "Software"), free of charge and under any and all + * copyright rights in the Software, and any and all patent rights owned or + * freely licensable by each licensor hereunder covering either (i) the + * unmodified Software as contributed to or provided by such licensor, or (ii) + * the Larger Works (as defined below), to deal in both * - * 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. + * (a) the Software, and * - * 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. + * (b) any piece of software and/or hardware listed in the lrgrwrks.txt file if + * one is included with the Software each a "Larger Work" to which the Software + * is contributed by such licensors), + * + * without restriction, including without limitation the rights to copy, create + * derivative works of, display, perform, and distribute the Software and make, + * use, sell, offer for sale, import, export, have made, and have sold the + * Software and the Larger Work(s), and to sublicense the foregoing rights on + * either these or other terms. + * + * This license is subject to the following condition: + * + * The above copyright notice and either this complete permission notice or at a + * minimum a reference to the UPL must be included in all copies or substantial + * portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. */ package org.graalvm.nativebridge; diff --git a/sdk/src/org.graalvm.nativebridge/src/org/graalvm/nativebridge/MarshallerAnnotation.java b/sdk/src/org.graalvm.nativebridge/src/org/graalvm/nativebridge/MarshallerAnnotation.java index 19389c4a97de..a85515b8071e 100644 --- a/sdk/src/org.graalvm.nativebridge/src/org/graalvm/nativebridge/MarshallerAnnotation.java +++ b/sdk/src/org.graalvm.nativebridge/src/org/graalvm/nativebridge/MarshallerAnnotation.java @@ -1,26 +1,42 @@ /* - * Copyright (c) 2022, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2021, 2023, 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. Oracle designates this - * particular file as subject to the "Classpath" exception as provided - * by Oracle in the LICENSE file that accompanied this code. - * - * 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. + * The Universal Permissive License (UPL), Version 1.0 + * + * Subject to the condition set forth below, permission is hereby granted to any + * person obtaining a copy of this software, associated documentation and/or + * data (collectively the "Software"), free of charge and under any and all + * copyright rights in the Software, and any and all patent rights owned or + * freely licensable by each licensor hereunder covering either (i) the + * unmodified Software as contributed to or provided by such licensor, or (ii) + * the Larger Works (as defined below), to deal in both + * + * (a) the Software, and + * + * (b) any piece of software and/or hardware listed in the lrgrwrks.txt file if + * one is included with the Software each a "Larger Work" to which the Software + * is contributed by such licensors), + * + * without restriction, including without limitation the rights to copy, create + * derivative works of, display, perform, and distribute the Software and make, + * use, sell, offer for sale, import, export, have made, and have sold the + * Software and the Larger Work(s), and to sublicense the foregoing rights on + * either these or other terms. + * + * This license is subject to the following condition: + * + * The above copyright notice and either this complete permission notice or at a + * minimum a reference to the UPL must be included in all copies or substantial + * portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. */ package org.graalvm.nativebridge; diff --git a/sdk/src/org.graalvm.nativebridge/src/org/graalvm/nativebridge/NativeIsolate.java b/sdk/src/org.graalvm.nativebridge/src/org/graalvm/nativebridge/NativeIsolate.java index 5ada2c8208ce..75838347ced7 100644 --- a/sdk/src/org.graalvm.nativebridge/src/org/graalvm/nativebridge/NativeIsolate.java +++ b/sdk/src/org.graalvm.nativebridge/src/org/graalvm/nativebridge/NativeIsolate.java @@ -1,26 +1,42 @@ /* - * Copyright (c) 2021, 2022, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2021, 2023, 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. Oracle designates this - * particular file as subject to the "Classpath" exception as provided - * by Oracle in the LICENSE file that accompanied this code. + * The Universal Permissive License (UPL), Version 1.0 * - * 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). + * Subject to the condition set forth below, permission is hereby granted to any + * person obtaining a copy of this software, associated documentation and/or + * data (collectively the "Software"), free of charge and under any and all + * copyright rights in the Software, and any and all patent rights owned or + * freely licensable by each licensor hereunder covering either (i) the + * unmodified Software as contributed to or provided by such licensor, or (ii) + * the Larger Works (as defined below), to deal in both * - * 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. + * (a) the Software, and * - * 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. + * (b) any piece of software and/or hardware listed in the lrgrwrks.txt file if + * one is included with the Software each a "Larger Work" to which the Software + * is contributed by such licensors), + * + * without restriction, including without limitation the rights to copy, create + * derivative works of, display, perform, and distribute the Software and make, + * use, sell, offer for sale, import, export, have made, and have sold the + * Software and the Larger Work(s), and to sublicense the foregoing rights on + * either these or other terms. + * + * This license is subject to the following condition: + * + * The above copyright notice and either this complete permission notice or at a + * minimum a reference to the UPL must be included in all copies or substantial + * portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. */ package org.graalvm.nativebridge; diff --git a/sdk/src/org.graalvm.nativebridge/src/org/graalvm/nativebridge/NativeIsolateThread.java b/sdk/src/org.graalvm.nativebridge/src/org/graalvm/nativebridge/NativeIsolateThread.java index b2dd4301c7fa..9bbb816f6326 100644 --- a/sdk/src/org.graalvm.nativebridge/src/org/graalvm/nativebridge/NativeIsolateThread.java +++ b/sdk/src/org.graalvm.nativebridge/src/org/graalvm/nativebridge/NativeIsolateThread.java @@ -1,26 +1,42 @@ /* - * Copyright (c) 2021, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2021, 2023, 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. Oracle designates this - * particular file as subject to the "Classpath" exception as provided - * by Oracle in the LICENSE file that accompanied this code. + * The Universal Permissive License (UPL), Version 1.0 * - * 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). + * Subject to the condition set forth below, permission is hereby granted to any + * person obtaining a copy of this software, associated documentation and/or + * data (collectively the "Software"), free of charge and under any and all + * copyright rights in the Software, and any and all patent rights owned or + * freely licensable by each licensor hereunder covering either (i) the + * unmodified Software as contributed to or provided by such licensor, or (ii) + * the Larger Works (as defined below), to deal in both * - * 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. + * (a) the Software, and * - * 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. + * (b) any piece of software and/or hardware listed in the lrgrwrks.txt file if + * one is included with the Software each a "Larger Work" to which the Software + * is contributed by such licensors), + * + * without restriction, including without limitation the rights to copy, create + * derivative works of, display, perform, and distribute the Software and make, + * use, sell, offer for sale, import, export, have made, and have sold the + * Software and the Larger Work(s), and to sublicense the foregoing rights on + * either these or other terms. + * + * This license is subject to the following condition: + * + * The above copyright notice and either this complete permission notice or at a + * minimum a reference to the UPL must be included in all copies or substantial + * portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. */ package org.graalvm.nativebridge; diff --git a/sdk/src/org.graalvm.nativebridge/src/org/graalvm/nativebridge/NativeObject.java b/sdk/src/org.graalvm.nativebridge/src/org/graalvm/nativebridge/NativeObject.java index 7ba9a5a616ae..5db42950cac3 100644 --- a/sdk/src/org.graalvm.nativebridge/src/org/graalvm/nativebridge/NativeObject.java +++ b/sdk/src/org.graalvm.nativebridge/src/org/graalvm/nativebridge/NativeObject.java @@ -1,26 +1,42 @@ /* - * Copyright (c) 2021, 2022, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2021, 2023, 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. Oracle designates this - * particular file as subject to the "Classpath" exception as provided - * by Oracle in the LICENSE file that accompanied this code. + * The Universal Permissive License (UPL), Version 1.0 * - * 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). + * Subject to the condition set forth below, permission is hereby granted to any + * person obtaining a copy of this software, associated documentation and/or + * data (collectively the "Software"), free of charge and under any and all + * copyright rights in the Software, and any and all patent rights owned or + * freely licensable by each licensor hereunder covering either (i) the + * unmodified Software as contributed to or provided by such licensor, or (ii) + * the Larger Works (as defined below), to deal in both * - * 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. + * (a) the Software, and * - * 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. + * (b) any piece of software and/or hardware listed in the lrgrwrks.txt file if + * one is included with the Software each a "Larger Work" to which the Software + * is contributed by such licensors), + * + * without restriction, including without limitation the rights to copy, create + * derivative works of, display, perform, and distribute the Software and make, + * use, sell, offer for sale, import, export, have made, and have sold the + * Software and the Larger Work(s), and to sublicense the foregoing rights on + * either these or other terms. + * + * This license is subject to the following condition: + * + * The above copyright notice and either this complete permission notice or at a + * minimum a reference to the UPL must be included in all copies or substantial + * portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. */ package org.graalvm.nativebridge; diff --git a/sdk/src/org.graalvm.nativebridge/src/org/graalvm/nativebridge/NativeObjectCleaner.java b/sdk/src/org.graalvm.nativebridge/src/org/graalvm/nativebridge/NativeObjectCleaner.java index 61e188bba34a..f7c03a36accf 100644 --- a/sdk/src/org.graalvm.nativebridge/src/org/graalvm/nativebridge/NativeObjectCleaner.java +++ b/sdk/src/org.graalvm.nativebridge/src/org/graalvm/nativebridge/NativeObjectCleaner.java @@ -1,26 +1,42 @@ /* - * Copyright (c) 2022, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2021, 2023, 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. Oracle designates this - * particular file as subject to the "Classpath" exception as provided - * by Oracle in the LICENSE file that accompanied this code. + * The Universal Permissive License (UPL), Version 1.0 * - * 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). + * Subject to the condition set forth below, permission is hereby granted to any + * person obtaining a copy of this software, associated documentation and/or + * data (collectively the "Software"), free of charge and under any and all + * copyright rights in the Software, and any and all patent rights owned or + * freely licensable by each licensor hereunder covering either (i) the + * unmodified Software as contributed to or provided by such licensor, or (ii) + * the Larger Works (as defined below), to deal in both * - * 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. + * (a) the Software, and * - * 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. + * (b) any piece of software and/or hardware listed in the lrgrwrks.txt file if + * one is included with the Software each a "Larger Work" to which the Software + * is contributed by such licensors), + * + * without restriction, including without limitation the rights to copy, create + * derivative works of, display, perform, and distribute the Software and make, + * use, sell, offer for sale, import, export, have made, and have sold the + * Software and the Larger Work(s), and to sublicense the foregoing rights on + * either these or other terms. + * + * This license is subject to the following condition: + * + * The above copyright notice and either this complete permission notice or at a + * minimum a reference to the UPL must be included in all copies or substantial + * portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. */ package org.graalvm.nativebridge; diff --git a/sdk/src/org.graalvm.nativebridge/src/org/graalvm/nativebridge/NativeObjectHandles.java b/sdk/src/org.graalvm.nativebridge/src/org/graalvm/nativebridge/NativeObjectHandles.java index f2893ae3e843..cf80228d494f 100644 --- a/sdk/src/org.graalvm.nativebridge/src/org/graalvm/nativebridge/NativeObjectHandles.java +++ b/sdk/src/org.graalvm.nativebridge/src/org/graalvm/nativebridge/NativeObjectHandles.java @@ -1,26 +1,42 @@ /* - * Copyright (c) 2021, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2021, 2023, 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. Oracle designates this - * particular file as subject to the "Classpath" exception as provided - * by Oracle in the LICENSE file that accompanied this code. + * The Universal Permissive License (UPL), Version 1.0 * - * 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). + * Subject to the condition set forth below, permission is hereby granted to any + * person obtaining a copy of this software, associated documentation and/or + * data (collectively the "Software"), free of charge and under any and all + * copyright rights in the Software, and any and all patent rights owned or + * freely licensable by each licensor hereunder covering either (i) the + * unmodified Software as contributed to or provided by such licensor, or (ii) + * the Larger Works (as defined below), to deal in both * - * 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. + * (a) the Software, and * - * 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. + * (b) any piece of software and/or hardware listed in the lrgrwrks.txt file if + * one is included with the Software each a "Larger Work" to which the Software + * is contributed by such licensors), + * + * without restriction, including without limitation the rights to copy, create + * derivative works of, display, perform, and distribute the Software and make, + * use, sell, offer for sale, import, export, have made, and have sold the + * Software and the Larger Work(s), and to sublicense the foregoing rights on + * either these or other terms. + * + * This license is subject to the following condition: + * + * The above copyright notice and either this complete permission notice or at a + * minimum a reference to the UPL must be included in all copies or substantial + * portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. */ package org.graalvm.nativebridge; diff --git a/sdk/src/org.graalvm.nativebridge/src/org/graalvm/nativebridge/NullableBinaryMarshaller.java b/sdk/src/org.graalvm.nativebridge/src/org/graalvm/nativebridge/NullableBinaryMarshaller.java index 87cf9a0f5b0b..237511907299 100644 --- a/sdk/src/org.graalvm.nativebridge/src/org/graalvm/nativebridge/NullableBinaryMarshaller.java +++ b/sdk/src/org.graalvm.nativebridge/src/org/graalvm/nativebridge/NullableBinaryMarshaller.java @@ -1,26 +1,42 @@ /* - * Copyright (c) 2022, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2021, 2023, 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. Oracle designates this - * particular file as subject to the "Classpath" exception as provided - * by Oracle in the LICENSE file that accompanied this code. + * The Universal Permissive License (UPL), Version 1.0 * - * 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). + * Subject to the condition set forth below, permission is hereby granted to any + * person obtaining a copy of this software, associated documentation and/or + * data (collectively the "Software"), free of charge and under any and all + * copyright rights in the Software, and any and all patent rights owned or + * freely licensable by each licensor hereunder covering either (i) the + * unmodified Software as contributed to or provided by such licensor, or (ii) + * the Larger Works (as defined below), to deal in both * - * 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. + * (a) the Software, and * - * 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. + * (b) any piece of software and/or hardware listed in the lrgrwrks.txt file if + * one is included with the Software each a "Larger Work" to which the Software + * is contributed by such licensors), + * + * without restriction, including without limitation the rights to copy, create + * derivative works of, display, perform, and distribute the Software and make, + * use, sell, offer for sale, import, export, have made, and have sold the + * Software and the Larger Work(s), and to sublicense the foregoing rights on + * either these or other terms. + * + * This license is subject to the following condition: + * + * The above copyright notice and either this complete permission notice or at a + * minimum a reference to the UPL must be included in all copies or substantial + * portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. */ package org.graalvm.nativebridge; diff --git a/sdk/src/org.graalvm.nativebridge/src/org/graalvm/nativebridge/Out.java b/sdk/src/org.graalvm.nativebridge/src/org/graalvm/nativebridge/Out.java index fa2dc1c84e91..b337a0a0b2ab 100644 --- a/sdk/src/org.graalvm.nativebridge/src/org/graalvm/nativebridge/Out.java +++ b/sdk/src/org.graalvm.nativebridge/src/org/graalvm/nativebridge/Out.java @@ -1,26 +1,42 @@ /* - * Copyright (c) 2021, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2021, 2023, 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. Oracle designates this - * particular file as subject to the "Classpath" exception as provided - * by Oracle in the LICENSE file that accompanied this code. + * The Universal Permissive License (UPL), Version 1.0 * - * 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). + * Subject to the condition set forth below, permission is hereby granted to any + * person obtaining a copy of this software, associated documentation and/or + * data (collectively the "Software"), free of charge and under any and all + * copyright rights in the Software, and any and all patent rights owned or + * freely licensable by each licensor hereunder covering either (i) the + * unmodified Software as contributed to or provided by such licensor, or (ii) + * the Larger Works (as defined below), to deal in both * - * 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. + * (a) the Software, and * - * 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. + * (b) any piece of software and/or hardware listed in the lrgrwrks.txt file if + * one is included with the Software each a "Larger Work" to which the Software + * is contributed by such licensors), + * + * without restriction, including without limitation the rights to copy, create + * derivative works of, display, perform, and distribute the Software and make, + * use, sell, offer for sale, import, export, have made, and have sold the + * Software and the Larger Work(s), and to sublicense the foregoing rights on + * either these or other terms. + * + * This license is subject to the following condition: + * + * The above copyright notice and either this complete permission notice or at a + * minimum a reference to the UPL must be included in all copies or substantial + * portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. */ package org.graalvm.nativebridge; diff --git a/sdk/src/org.graalvm.nativebridge/src/org/graalvm/nativebridge/RawReference.java b/sdk/src/org.graalvm.nativebridge/src/org/graalvm/nativebridge/RawReference.java index cb66d8077726..055b78d6f7e9 100644 --- a/sdk/src/org.graalvm.nativebridge/src/org/graalvm/nativebridge/RawReference.java +++ b/sdk/src/org.graalvm.nativebridge/src/org/graalvm/nativebridge/RawReference.java @@ -1,26 +1,42 @@ /* - * Copyright (c) 2022, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2021, 2023, 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. Oracle designates this - * particular file as subject to the "Classpath" exception as provided - * by Oracle in the LICENSE file that accompanied this code. - * - * 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. + * The Universal Permissive License (UPL), Version 1.0 + * + * Subject to the condition set forth below, permission is hereby granted to any + * person obtaining a copy of this software, associated documentation and/or + * data (collectively the "Software"), free of charge and under any and all + * copyright rights in the Software, and any and all patent rights owned or + * freely licensable by each licensor hereunder covering either (i) the + * unmodified Software as contributed to or provided by such licensor, or (ii) + * the Larger Works (as defined below), to deal in both + * + * (a) the Software, and + * + * (b) any piece of software and/or hardware listed in the lrgrwrks.txt file if + * one is included with the Software each a "Larger Work" to which the Software + * is contributed by such licensors), + * + * without restriction, including without limitation the rights to copy, create + * derivative works of, display, perform, and distribute the Software and make, + * use, sell, offer for sale, import, export, have made, and have sold the + * Software and the Larger Work(s), and to sublicense the foregoing rights on + * either these or other terms. + * + * This license is subject to the following condition: + * + * The above copyright notice and either this complete permission notice or at a + * minimum a reference to the UPL must be included in all copies or substantial + * portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. */ package org.graalvm.nativebridge; diff --git a/sdk/src/org.graalvm.nativebridge/src/org/graalvm/nativebridge/ReceiverMethod.java b/sdk/src/org.graalvm.nativebridge/src/org/graalvm/nativebridge/ReceiverMethod.java index b1f21a3e05ad..815d047839f3 100644 --- a/sdk/src/org.graalvm.nativebridge/src/org/graalvm/nativebridge/ReceiverMethod.java +++ b/sdk/src/org.graalvm.nativebridge/src/org/graalvm/nativebridge/ReceiverMethod.java @@ -1,26 +1,42 @@ /* - * Copyright (c) 2021, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2021, 2023, 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. Oracle designates this - * particular file as subject to the "Classpath" exception as provided - * by Oracle in the LICENSE file that accompanied this code. - * - * 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. + * The Universal Permissive License (UPL), Version 1.0 + * + * Subject to the condition set forth below, permission is hereby granted to any + * person obtaining a copy of this software, associated documentation and/or + * data (collectively the "Software"), free of charge and under any and all + * copyright rights in the Software, and any and all patent rights owned or + * freely licensable by each licensor hereunder covering either (i) the + * unmodified Software as contributed to or provided by such licensor, or (ii) + * the Larger Works (as defined below), to deal in both + * + * (a) the Software, and + * + * (b) any piece of software and/or hardware listed in the lrgrwrks.txt file if + * one is included with the Software each a "Larger Work" to which the Software + * is contributed by such licensors), + * + * without restriction, including without limitation the rights to copy, create + * derivative works of, display, perform, and distribute the Software and make, + * use, sell, offer for sale, import, export, have made, and have sold the + * Software and the Larger Work(s), and to sublicense the foregoing rights on + * either these or other terms. + * + * This license is subject to the following condition: + * + * The above copyright notice and either this complete permission notice or at a + * minimum a reference to the UPL must be included in all copies or substantial + * portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. */ package org.graalvm.nativebridge; diff --git a/sdk/src/org.graalvm.nativebridge/src/org/graalvm/nativebridge/StackTraceElementMarshaller.java b/sdk/src/org.graalvm.nativebridge/src/org/graalvm/nativebridge/StackTraceElementMarshaller.java index 143087950aba..40585dc0cebc 100644 --- a/sdk/src/org.graalvm.nativebridge/src/org/graalvm/nativebridge/StackTraceElementMarshaller.java +++ b/sdk/src/org.graalvm.nativebridge/src/org/graalvm/nativebridge/StackTraceElementMarshaller.java @@ -1,26 +1,42 @@ /* - * Copyright (c) 2023, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2021, 2023, 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. Oracle designates this - * particular file as subject to the "Classpath" exception as provided - * by Oracle in the LICENSE file that accompanied this code. - * - * 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. + * The Universal Permissive License (UPL), Version 1.0 + * + * Subject to the condition set forth below, permission is hereby granted to any + * person obtaining a copy of this software, associated documentation and/or + * data (collectively the "Software"), free of charge and under any and all + * copyright rights in the Software, and any and all patent rights owned or + * freely licensable by each licensor hereunder covering either (i) the + * unmodified Software as contributed to or provided by such licensor, or (ii) + * the Larger Works (as defined below), to deal in both + * + * (a) the Software, and + * + * (b) any piece of software and/or hardware listed in the lrgrwrks.txt file if + * one is included with the Software each a "Larger Work" to which the Software + * is contributed by such licensors), + * + * without restriction, including without limitation the rights to copy, create + * derivative works of, display, perform, and distribute the Software and make, + * use, sell, offer for sale, import, export, have made, and have sold the + * Software and the Larger Work(s), and to sublicense the foregoing rights on + * either these or other terms. + * + * This license is subject to the following condition: + * + * The above copyright notice and either this complete permission notice or at a + * minimum a reference to the UPL must be included in all copies or substantial + * portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. */ package org.graalvm.nativebridge; diff --git a/sdk/src/org.graalvm.nativebridge/src/org/graalvm/nativebridge/StringMarshaller.java b/sdk/src/org.graalvm.nativebridge/src/org/graalvm/nativebridge/StringMarshaller.java index 41f721b837cb..5aa4c6de30ab 100644 --- a/sdk/src/org.graalvm.nativebridge/src/org/graalvm/nativebridge/StringMarshaller.java +++ b/sdk/src/org.graalvm.nativebridge/src/org/graalvm/nativebridge/StringMarshaller.java @@ -1,26 +1,42 @@ /* - * Copyright (c) 2023, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2021, 2023, 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. Oracle designates this - * particular file as subject to the "Classpath" exception as provided - * by Oracle in the LICENSE file that accompanied this code. - * - * 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. + * The Universal Permissive License (UPL), Version 1.0 + * + * Subject to the condition set forth below, permission is hereby granted to any + * person obtaining a copy of this software, associated documentation and/or + * data (collectively the "Software"), free of charge and under any and all + * copyright rights in the Software, and any and all patent rights owned or + * freely licensable by each licensor hereunder covering either (i) the + * unmodified Software as contributed to or provided by such licensor, or (ii) + * the Larger Works (as defined below), to deal in both + * + * (a) the Software, and + * + * (b) any piece of software and/or hardware listed in the lrgrwrks.txt file if + * one is included with the Software each a "Larger Work" to which the Software + * is contributed by such licensors), + * + * without restriction, including without limitation the rights to copy, create + * derivative works of, display, perform, and distribute the Software and make, + * use, sell, offer for sale, import, export, have made, and have sold the + * Software and the Larger Work(s), and to sublicense the foregoing rights on + * either these or other terms. + * + * This license is subject to the following condition: + * + * The above copyright notice and either this complete permission notice or at a + * minimum a reference to the UPL must be included in all copies or substantial + * portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. */ package org.graalvm.nativebridge; diff --git a/substratevm/src/com.oracle.svm.graal.hotspot.libgraal/src/org/graalvm/libgraal/jni/LibGraalJNIMethodScope.java b/substratevm/src/com.oracle.svm.graal.hotspot.libgraal/src/org/graalvm/libgraal/jni/LibGraalJNIMethodScope.java index 9eed10cd53bb..a4c0c73c4eb2 100644 --- a/substratevm/src/com.oracle.svm.graal.hotspot.libgraal/src/org/graalvm/libgraal/jni/LibGraalJNIMethodScope.java +++ b/substratevm/src/com.oracle.svm.graal.hotspot.libgraal/src/org/graalvm/libgraal/jni/LibGraalJNIMethodScope.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2021, 2023, 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 diff --git a/substratevm/src/com.oracle.svm.graal.hotspot.libgraal/src/org/graalvm/libgraal/jni/LibGraalUtil.java b/substratevm/src/com.oracle.svm.graal.hotspot.libgraal/src/org/graalvm/libgraal/jni/LibGraalUtil.java index 7dff332376bb..76c03101cd2d 100644 --- a/substratevm/src/com.oracle.svm.graal.hotspot.libgraal/src/org/graalvm/libgraal/jni/LibGraalUtil.java +++ b/substratevm/src/com.oracle.svm.graal.hotspot.libgraal/src/org/graalvm/libgraal/jni/LibGraalUtil.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2021, 2023, 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 @@ -36,7 +36,7 @@ private LibGraalUtil() { public static JNIMethodScope openScope(Class entryPointClass, Enum id, JNIEnv env) { Objects.requireNonNull(id, "Id must be non null."); - return LibGraalJNIMethodScope.open(entryPointClass.getSimpleName() + "::" + id, env); + return LibGraalJNIMethodScope.open(com.oracle.svm.util.ClassUtil.getUnqualifiedName(entryPointClass) + "::" + id, env); } public static JNIMethodScope openScope(String scopeName, JNIEnv env) { From 7565cc8ace010ff76856095c17ee33854385d939 Mon Sep 17 00:00:00 2001 From: Christian Humer Date: Fri, 23 Jun 2023 14:25:02 +0200 Subject: [PATCH 15/43] Cleanup code after native bridge move to SDK. --- sdk/mx.sdk/suite.py | 14 ----- .../src/org/graalvm/jniutils/JNI.java | 6 +- .../org/graalvm/jniutils/JNIMethodScope.java | 6 +- .../src/org/graalvm/jniutils/JNIUtil.java | 9 +-- .../graalvm/jniutils/NativeBridgeSupport.java | 5 ++ .../processor/AbstractBridgeGenerator.java | 28 ++++----- .../HotSpotToNativeBridgeGenerator.java | 60 +++++++++---------- .../NativeToHotSpotBridgeGenerator.java | 54 ++++++++--------- .../NativeToNativeBridgeGenerator.java | 2 +- .../graalvm/nativebridge/NativeIsolate.java | 27 ++------- substratevm/mx.substratevm/mx_substratevm.py | 1 + .../truffle/LibGraalNativeBridgeSupport.java | 23 ++++++- 12 files changed, 108 insertions(+), 127 deletions(-) diff --git a/sdk/mx.sdk/suite.py b/sdk/mx.sdk/suite.py index a40b74c4e84a..6f0ed3366ab0 100644 --- a/sdk/mx.sdk/suite.py +++ b/sdk/mx.sdk/suite.py @@ -529,13 +529,6 @@ "exports" : [ "org.graalvm.jniutils", ], - "requiresConcealed" : { - "jdk.internal.vm.ci" : [ - "jdk.vm.ci.meta", - "jdk.vm.ci.code", - "jdk.vm.ci.services", - ], - }, }, "subDir" : "src", "dependencies" : ["org.graalvm.jniutils"], @@ -549,13 +542,6 @@ "exports" : [ "org.graalvm.nativebridge", ], - "requiresConcealed" : { - "jdk.internal.vm.ci" : [ - "jdk.vm.ci.meta", - "jdk.vm.ci.code", - "jdk.vm.ci.services", - ], - }, }, "subDir" : "src", "dependencies" : ["org.graalvm.nativebridge"], diff --git a/sdk/src/org.graalvm.jniutils/src/org/graalvm/jniutils/JNI.java b/sdk/src/org.graalvm.jniutils/src/org/graalvm/jniutils/JNI.java index 9155c7df2d13..8bd81b37cf75 100644 --- a/sdk/src/org.graalvm.jniutils/src/org/graalvm/jniutils/JNI.java +++ b/sdk/src/org.graalvm.jniutils/src/org/graalvm/jniutils/JNI.java @@ -51,9 +51,9 @@ import org.graalvm.nativeimage.ImageSingletons; import org.graalvm.nativeimage.c.CContext; +import org.graalvm.nativeimage.c.function.CFunction.Transition; import org.graalvm.nativeimage.c.function.CFunctionPointer; import org.graalvm.nativeimage.c.function.InvokeCFunctionPointer; -import org.graalvm.nativeimage.c.function.CFunction.Transition; import org.graalvm.nativeimage.c.struct.CField; import org.graalvm.nativeimage.c.struct.CPointerTo; import org.graalvm.nativeimage.c.struct.CStruct; @@ -66,8 +66,6 @@ import org.graalvm.nativeimage.c.type.VoidPointer; import org.graalvm.word.PointerBase; -import jdk.vm.ci.services.Services; - public final class JNI { public static final int JNI_OK = 0; @@ -1098,7 +1096,7 @@ public List getHeaderFiles() { } private static Path[] findJNIHeaders() { - Path javaHome = Paths.get(Services.getSavedProperties().get("java.home")); + Path javaHome = Paths.get(System.getProperty("java.home")); Path includeFolder = javaHome.resolve("include"); if (!Files.exists(includeFolder)) { Path parent = javaHome.getParent(); diff --git a/sdk/src/org.graalvm.jniutils/src/org/graalvm/jniutils/JNIMethodScope.java b/sdk/src/org.graalvm.jniutils/src/org/graalvm/jniutils/JNIMethodScope.java index b3122d3c6065..ad3e157debca 100644 --- a/sdk/src/org.graalvm.jniutils/src/org/graalvm/jniutils/JNIMethodScope.java +++ b/sdk/src/org.graalvm.jniutils/src/org/graalvm/jniutils/JNIMethodScope.java @@ -42,11 +42,11 @@ import static org.graalvm.jniutils.JNIUtil.getFeatureName; +import java.util.Objects; + import org.graalvm.jniutils.JNI.JNIEnv; import org.graalvm.jniutils.JNI.JObject; -import java.util.Objects; - /** * Scope of a call from HotSpot to native method. This also provides access to the {@link JNIEnv} * value for the current thread within the native method call. @@ -163,7 +163,7 @@ public void close() { } } - int depth() { + public final int depth() { int depth = 0; JNIMethodScope ancestor = parent; while (ancestor != null) { diff --git a/sdk/src/org.graalvm.jniutils/src/org/graalvm/jniutils/JNIUtil.java b/sdk/src/org.graalvm.jniutils/src/org/graalvm/jniutils/JNIUtil.java index a786df09d3ce..bc09cf84c21e 100644 --- a/sdk/src/org.graalvm.jniutils/src/org/graalvm/jniutils/JNIUtil.java +++ b/sdk/src/org.graalvm.jniutils/src/org/graalvm/jniutils/JNIUtil.java @@ -48,7 +48,6 @@ import java.io.PrintWriter; import java.io.StringWriter; -import org.graalvm.compiler.serviceprovider.IsolateUtil; import org.graalvm.jniutils.JNI.JArray; import org.graalvm.jniutils.JNI.JBooleanArray; import org.graalvm.jniutils.JNI.JByteArray; @@ -1191,13 +1190,7 @@ public static boolean tracingAt(int level) { */ public static void trace(int level, String format, Object... args) { if (tracingAt(level)) { - StringBuilder sb = new StringBuilder(); - sb.append('[').append(IsolateUtil.getIsolateID()).append(':').append(Thread.currentThread().getName()).append(']'); - JNIMethodScope scope = JNIMethodScope.scopeOrNull(); - if (scope != null) { - sb.append(new String(new char[2 + (scope.depth() * 2)]).replace('\0', ' ')); - } - NativeBridgeSupport.getInstance().trace(sb.append(String.format(format, args)).toString()); + NativeBridgeSupport.getInstance().trace(String.format(format, args)); } } diff --git a/sdk/src/org.graalvm.jniutils/src/org/graalvm/jniutils/NativeBridgeSupport.java b/sdk/src/org.graalvm.jniutils/src/org/graalvm/jniutils/NativeBridgeSupport.java index 5e8424e92754..bdbf6e185bf7 100644 --- a/sdk/src/org.graalvm.jniutils/src/org/graalvm/jniutils/NativeBridgeSupport.java +++ b/sdk/src/org.graalvm.jniutils/src/org/graalvm/jniutils/NativeBridgeSupport.java @@ -40,6 +40,9 @@ */ package org.graalvm.jniutils; +import java.util.function.Consumer; +import java.util.function.Supplier; + import org.graalvm.nativeimage.ImageSingletons; /** @@ -65,6 +68,8 @@ public interface NativeBridgeSupport { */ void trace(String message); + ThreadLocal createTerminatingThreadLocal(Supplier onCreate, Consumer onTerminate); + /** * Returns a {@code NativeBridgeSupport} instance registered in the {@link ImageSingletons}. */ diff --git a/sdk/src/org.graalvm.nativebridge.processor/src/org/graalvm/nativebridge/processor/AbstractBridgeGenerator.java b/sdk/src/org.graalvm.nativebridge.processor/src/org/graalvm/nativebridge/processor/AbstractBridgeGenerator.java index 74ba6dab9dc4..1afa15b7f24b 100644 --- a/sdk/src/org.graalvm.nativebridge.processor/src/org/graalvm/nativebridge/processor/AbstractBridgeGenerator.java +++ b/sdk/src/org.graalvm.nativebridge.processor/src/org/graalvm/nativebridge/processor/AbstractBridgeGenerator.java @@ -114,7 +114,7 @@ final FactoryMethodInfo resolveFactoryMethod(CharSequence factoryMethodName, Cha abstract void generateImpl(CodeBuilder builder, CharSequence targetClassSimpleName); - abstract MarshallerSnippets marshallerSnippets(MarshallerData marshallerData); + abstract MarshallerSnippet marshallerSnippets(MarshallerData marshallerData); void configureMultipleDefinitions(@SuppressWarnings("unused") List otherDefinitions) { } @@ -152,11 +152,11 @@ final void generateMarshallerLookups(CodeBuilder builder) { } } - final CacheSnippets cacheSnippets() { + final CacheSnippet cacheSnippets() { if (definitionData.hasCustomDispatch()) { - return CacheSnippets.customDispatch(types, parser.typeCache); + return CacheSnippet.customDispatch(types, parser.typeCache); } else { - return CacheSnippets.standardDispatch(types, parser.typeCache); + return CacheSnippet.standardDispatch(types, parser.typeCache); } } @@ -262,7 +262,7 @@ void generateMarshallerFields(CodeBuilder builder, Modifier... modifiers) { } } - void generateCacheFields(CodeBuilder builder, HotSpotToNativeBridgeGenerator.CacheSnippets cacheSnippets) { + void generateCacheFields(CodeBuilder builder, HotSpotToNativeBridgeGenerator.CacheSnippet cacheSnippets) { for (AbstractBridgeParser.MethodData methodData : definitionData.toGenerate) { AbstractBridgeParser.CacheData cacheData = methodData.cachedData; if (cacheData != null) { @@ -273,7 +273,7 @@ void generateCacheFields(CodeBuilder builder, HotSpotToNativeBridgeGenerator.Cac } } - void generateCacheFieldsInit(CodeBuilder builder, CacheSnippets cacheSnippets) { + void generateCacheFieldsInit(CodeBuilder builder, CacheSnippet cacheSnippets) { for (AbstractBridgeParser.MethodData methodData : definitionData.toGenerate) { AbstractBridgeParser.CacheData cacheData = methodData.cachedData; if (cacheData != null) { @@ -437,7 +437,7 @@ boolean isOutParameter(MarshallerData marshaller, TypeMirror type, boolean hostT return isBinaryMarshallable(marshaller, type, hostToIsolate) && marshaller.out != null; } - abstract static class MarshallerSnippets { + abstract static class MarshallerSnippet { private final NativeBridgeProcessor processor; private final AbstractTypeCache cache; @@ -445,7 +445,7 @@ abstract static class MarshallerSnippets { final MarshallerData marshallerData; final Types types; - MarshallerSnippets(NativeBridgeProcessor processor, MarshallerData marshallerData, Types types, AbstractTypeCache cache, BinaryNameCache binaryNameCache) { + MarshallerSnippet(NativeBridgeProcessor processor, MarshallerData marshallerData, Types types, AbstractTypeCache cache, BinaryNameCache binaryNameCache) { this.processor = processor; this.marshallerData = marshallerData; this.types = types; @@ -905,12 +905,12 @@ final void generateReadNativeObjectArray(CodeBuilder currentBuilder, CharSequenc } } - abstract static class CacheSnippets { + abstract static class CacheSnippet { final Types types; final AbstractTypeCache cache; - CacheSnippets(Types type, AbstractTypeCache cache) { + CacheSnippet(Types type, AbstractTypeCache cache) { this.types = type; this.cache = cache; } @@ -925,15 +925,15 @@ abstract static class CacheSnippets { abstract CharSequence writeCache(CodeBuilder currentBuilder, CharSequence cacheField, CharSequence receiver, CharSequence value); - static CacheSnippets standardDispatch(Types types, AbstractTypeCache cache) { + static CacheSnippet standardDispatch(Types types, AbstractTypeCache cache) { return new StandardDispatch(types, cache); } - static CacheSnippets customDispatch(Types types, AbstractTypeCache cache) { + static CacheSnippet customDispatch(Types types, AbstractTypeCache cache) { return new CustomDispatch(types, cache); } - private static final class StandardDispatch extends CacheSnippets { + private static final class StandardDispatch extends CacheSnippet { StandardDispatch(Types types, AbstractTypeCache cache) { super(types, cache); @@ -965,7 +965,7 @@ CharSequence writeCache(CodeBuilder currentBuilder, CharSequence cacheField, Cha } } - private static final class CustomDispatch extends CacheSnippets { + private static final class CustomDispatch extends CacheSnippet { CustomDispatch(Types type, AbstractTypeCache cache) { super(type, cache); diff --git a/sdk/src/org.graalvm.nativebridge.processor/src/org/graalvm/nativebridge/processor/HotSpotToNativeBridgeGenerator.java b/sdk/src/org.graalvm.nativebridge.processor/src/org/graalvm/nativebridge/processor/HotSpotToNativeBridgeGenerator.java index e041ca4e62ae..962d91a5c43d 100644 --- a/sdk/src/org.graalvm.nativebridge.processor/src/org/graalvm/nativebridge/processor/HotSpotToNativeBridgeGenerator.java +++ b/sdk/src/org.graalvm.nativebridge.processor/src/org/graalvm/nativebridge/processor/HotSpotToNativeBridgeGenerator.java @@ -131,14 +131,14 @@ void generateImpl(CodeBuilder builder, CharSequence targetClassSimpleName) { } @Override - HotSpotToNativeMarshallerSnippets marshallerSnippets(MarshallerData marshallerData) { - return HotSpotToNativeMarshallerSnippets.forData(parser.processor, definitionData, marshallerData, types, typeCache, binaryNameCache); + HotSpotToNativeMarshallerSnippet marshallerSnippets(MarshallerData marshallerData) { + return HotSpotToNativeMarshallerSnippet.forData(parser.processor, definitionData, marshallerData, types, typeCache, binaryNameCache); } private void generateHSToNativeStartPoint(CodeBuilder builder, FactoryMethodInfo factoryMethodInfo) { HotSpotToNativeDefinitionData hsData = ((HotSpotToNativeDefinitionData) definitionData); - CacheSnippets cacheSnippets = cacheSnippets(); + CacheSnippet cacheSnippets = cacheSnippets(); builder.classStart(EnumSet.of(Modifier.PRIVATE, Modifier.STATIC, Modifier.FINAL), factoryMethod.startPointSimpleName, definitionData.annotatedType, Collections.emptyList()); builder.indent(); @@ -178,7 +178,7 @@ private void generateHSToNativeStartPoint(CodeBuilder builder, FactoryMethodInfo builder.classEnd(); } - private void generateHSToNativeStartMethod(CodeBuilder builder, CacheSnippets cacheSnippets, MethodData methodData) { + private void generateHSToNativeStartMethod(CodeBuilder builder, CacheSnippet cacheSnippets, MethodData methodData) { builder.line(""); overrideMethod(builder, methodData); builder.indent(); @@ -255,7 +255,7 @@ private void generateHSToNativeStartMethod(CodeBuilder builder, CacheSnippets ca boolean needsPostMarshallParameters = generatePreMarshallParameters(builder, allParameters, marshalledParametersOutput, overrides); CharSequence nativeCall = generateMarshallParameters(builder, nativeMethodName, allParameters, marshalledParametersOutput, syntheticPrependParameters, syntheticAppendParameters, overrides); - MarshallerSnippets marshallerSnippets = marshallerSnippets(methodData.getReturnTypeMarshaller()); + MarshallerSnippet marshallerSnippets = marshallerSnippets(methodData.getReturnTypeMarshaller()); PreUnmarshallResult preUnmarshallResult = generatePreUnmarshallResult(builder, marshallerSnippets, returnType, nativeCall, receiverNativeObject, hasBinaryMarshalledResult); CharSequence value = marshallerSnippets.unmarshallResult(builder, returnType, preUnmarshallResult.result, receiverNativeObject, preUnmarshallResult.binaryInput, null); builder.lineStart().write(resFieldName).write(" = ").write(value).lineEnd(";"); @@ -279,12 +279,12 @@ private void generateHSToNativeStartMethod(CodeBuilder builder, CacheSnippets ca boolean needsPostMarshallParameters = generatePreMarshallParameters(builder, allParameters, marshalledParametersOutput, overrides); CharSequence nativeCall = generateMarshallParameters(builder, nativeMethodName, allParameters, marshalledParametersOutput, syntheticPrependParameters, syntheticAppendParameters, overrides); - MarshallerSnippets resultMarshallerSnippets = marshallerSnippets(methodData.getReturnTypeMarshaller()); + MarshallerSnippet resultMarshallerSnippets = marshallerSnippets(methodData.getReturnTypeMarshaller()); boolean voidReturnType = returnType.getKind() == TypeKind.VOID; CharSequence resultVariable = null; PreUnmarshallResult preUnmarshallResult; if (firstOutMarshalledParameter != null) { - MarshallerSnippets customMarshalledSnippets = marshallerSnippets(firstOutMarshalledParameter); + MarshallerSnippet customMarshalledSnippets = marshallerSnippets(firstOutMarshalledParameter); CharSequence resultInput = generateBinaryInputForResult(builder, customMarshalledSnippets, returnType, nativeCall); preUnmarshallResult = new PreUnmarshallResult(HOTSPOT_RESULT_VARIABLE, null, resultInput, false); if (!voidReturnType) { @@ -344,7 +344,7 @@ private boolean generatePreMarshallParameters(CodeBuilder builder, List parameterValueOverrides) { boolean needsPostMarshall = false; for (MarshalledParameter marshalledParameter : marshalledParameters) { - MarshallerSnippets snippets = marshallerSnippets(marshalledParameter.marshallerData); + MarshallerSnippet snippets = marshallerSnippets(marshalledParameter.marshallerData); needsPostMarshall |= snippets.preMarshallParameter(builder, marshalledParameter.parameterType, marshalledParameter.parameterName, marshalledParametersOutput, null, parameterValueOverrides); } @@ -357,7 +357,7 @@ private CharSequence generateMarshallParameters(CodeBuilder builder, CharSequenc for (MarshalledParameter marshalledParameter : marshalledParameters) { CharSequence override = parameterValueOverrides.get(marshalledParameter.parameterName.toString()); CharSequence useValue = override != null ? override : marshalledParameter.parameterName; - MarshallerSnippets snippets = marshallerSnippets(marshalledParameter.marshallerData); + MarshallerSnippet snippets = marshallerSnippets(marshalledParameter.marshallerData); CharSequence expr = snippets.marshallParameter(builder, marshalledParameter.parameterType, useValue, marshalledParametersOutput, null); if (expr != null) { actualParameters.add(expr); @@ -376,12 +376,12 @@ private void generatePostMarshallParameters(CodeBuilder builder, List "L" + Utilities.cSymbol(te.getQualifiedName().toString()) + "_2"); } - private abstract static class HotSpotToNativeMarshallerSnippets extends MarshallerSnippets { + private abstract static class HotSpotToNativeMarshallerSnippet extends MarshallerSnippet { final TypeCache cache; - HotSpotToNativeMarshallerSnippets(NativeBridgeProcessor processor, MarshallerData marshallerData, Types types, TypeCache typeCache, BinaryNameCache binaryNameCache) { + HotSpotToNativeMarshallerSnippet(NativeBridgeProcessor processor, MarshallerData marshallerData, Types types, TypeCache typeCache, BinaryNameCache binaryNameCache) { super(processor, marshallerData, types, typeCache, binaryNameCache); this.cache = typeCache; } - static HotSpotToNativeMarshallerSnippets forData(NativeBridgeProcessor processor, DefinitionData data, MarshallerData marshallerData, + static HotSpotToNativeMarshallerSnippet forData(NativeBridgeProcessor processor, DefinitionData data, MarshallerData marshallerData, Types types, TypeCache typeCache, BinaryNameCache binaryNameCache) { switch (marshallerData.kind) { case VALUE: - return new DirectSnippets(processor, marshallerData, types, typeCache, binaryNameCache); + return new DirectSnippet(processor, marshallerData, types, typeCache, binaryNameCache); case REFERENCE: - return new ReferenceSnippets(processor, data, marshallerData, types, typeCache, binaryNameCache); + return new ReferenceSnippet(processor, data, marshallerData, types, typeCache, binaryNameCache); case RAW_REFERENCE: - return new RawReferenceSnippets(processor, marshallerData, types, typeCache, binaryNameCache); + return new RawReferenceSnippet(processor, marshallerData, types, typeCache, binaryNameCache); case CUSTOM: - return new CustomSnippets(processor, marshallerData, types, typeCache, binaryNameCache); + return new CustomSnippet(processor, marshallerData, types, typeCache, binaryNameCache); default: throw new IllegalArgumentException(String.valueOf(marshallerData.kind)); } } - private static final class DirectSnippets extends HotSpotToNativeMarshallerSnippets { + private static final class DirectSnippet extends HotSpotToNativeMarshallerSnippet { - DirectSnippets(NativeBridgeProcessor processor, MarshallerData marshallerData, Types types, TypeCache cache, BinaryNameCache binaryNameCache) { + DirectSnippet(NativeBridgeProcessor processor, MarshallerData marshallerData, Types types, TypeCache cache, BinaryNameCache binaryNameCache) { super(processor, marshallerData, types, cache, binaryNameCache); } @@ -1006,11 +1006,11 @@ void read(CodeBuilder currentBuilder, TypeMirror resultType, CharSequence result } } - private static final class ReferenceSnippets extends HotSpotToNativeMarshallerSnippets { + private static final class ReferenceSnippet extends HotSpotToNativeMarshallerSnippet { private final DefinitionData data; - ReferenceSnippets(NativeBridgeProcessor processor, DefinitionData data, MarshallerData marshallerData, Types types, TypeCache cache, BinaryNameCache binaryNameCache) { + ReferenceSnippet(NativeBridgeProcessor processor, DefinitionData data, MarshallerData marshallerData, Types types, TypeCache cache, BinaryNameCache binaryNameCache) { super(processor, marshallerData, types, cache, binaryNameCache); this.data = data; } @@ -1386,9 +1386,9 @@ void read(CodeBuilder currentBuilder, TypeMirror resultType, CharSequence result } } - private static final class RawReferenceSnippets extends HotSpotToNativeMarshallerSnippets { + private static final class RawReferenceSnippet extends HotSpotToNativeMarshallerSnippet { - RawReferenceSnippets(NativeBridgeProcessor processor, MarshallerData marshallerData, Types types, TypeCache cache, BinaryNameCache binaryNameCache) { + RawReferenceSnippet(NativeBridgeProcessor processor, MarshallerData marshallerData, Types types, TypeCache cache, BinaryNameCache binaryNameCache) { super(processor, marshallerData, types, cache, binaryNameCache); } @@ -1430,9 +1430,9 @@ void read(CodeBuilder currentBuilder, TypeMirror resultType, CharSequence result } } - private static final class CustomSnippets extends HotSpotToNativeMarshallerSnippets { + private static final class CustomSnippet extends HotSpotToNativeMarshallerSnippet { - CustomSnippets(NativeBridgeProcessor processor, MarshallerData marshallerData, Types types, TypeCache cache, BinaryNameCache binaryNameCache) { + CustomSnippet(NativeBridgeProcessor processor, MarshallerData marshallerData, Types types, TypeCache cache, BinaryNameCache binaryNameCache) { super(processor, marshallerData, types, cache, binaryNameCache); } diff --git a/sdk/src/org.graalvm.nativebridge.processor/src/org/graalvm/nativebridge/processor/NativeToHotSpotBridgeGenerator.java b/sdk/src/org.graalvm.nativebridge.processor/src/org/graalvm/nativebridge/processor/NativeToHotSpotBridgeGenerator.java index 886b17b763c2..7c643c752094 100644 --- a/sdk/src/org.graalvm.nativebridge.processor/src/org/graalvm/nativebridge/processor/NativeToHotSpotBridgeGenerator.java +++ b/sdk/src/org.graalvm.nativebridge.processor/src/org/graalvm/nativebridge/processor/NativeToHotSpotBridgeGenerator.java @@ -98,12 +98,12 @@ void generateImpl(CodeBuilder builder, CharSequence targetClassSimpleName) { } @Override - MarshallerSnippets marshallerSnippets(MarshallerData marshallerData) { - return NativeToHotSpotMarshallerSnippets.forData(parser.processor, definitionData, marshallerData, types, typeCache, binaryNameCache); + MarshallerSnippet marshallerSnippets(MarshallerData marshallerData) { + return NativeToHotSpotMarshallerSnippet.forData(parser.processor, definitionData, marshallerData, types, typeCache, binaryNameCache); } private void generateNativeToHSStartPoint(CodeBuilder builder, FactoryMethodInfo factoryMethodInfo) { - CacheSnippets cacheSnippets = cacheSnippets(); + CacheSnippet cacheSnippets = cacheSnippets(); builder.classStart(EnumSet.of(Modifier.PRIVATE, Modifier.STATIC, Modifier.FINAL), START_POINT_SIMPLE_NAME, definitionData.annotatedType, Collections.emptyList()); builder.indent(); @@ -236,7 +236,7 @@ private void generateJNIFieldsInit(CodeBuilder builder, CodeBuilder.Parameter jn } } - private void generateNativeToHSStartMethod(CodeBuilder builder, CacheSnippets cacheSnippets, MethodData methodData) { + private void generateNativeToHSStartMethod(CodeBuilder builder, CacheSnippet cacheSnippets, MethodData methodData) { builder.line(""); overrideMethod(builder, methodData); builder.indent(); @@ -271,7 +271,7 @@ private void generateNativeToHSStartMethod(CodeBuilder builder, CacheSnippets ca CharSequence env; TypeMirror returnType = methodData.type.getReturnType(); boolean voidMethod = returnType.getKind() == TypeKind.VOID; - MarshallerSnippets resultMarshallerSnippets = marshallerSnippets(methodData.getReturnTypeMarshaller()); + MarshallerSnippet resultMarshallerSnippets = marshallerSnippets(methodData.getReturnTypeMarshaller()); if (cacheData != null) { if (hasOutParameters) { throw new IllegalStateException("Idempotent cannot be used with Out parameters."); @@ -347,7 +347,7 @@ private void generateNativeToHSStartMethod(CodeBuilder builder, CacheSnippets ca Map.Entry binaryUnmarshallVars = null; if (firstOutMarshalledParameter != null) { hasPostMarshall = true; - MarshallerSnippets customMarshalledSnippets = marshallerSnippets(firstOutMarshalledParameter); + MarshallerSnippet customMarshalledSnippets = marshallerSnippets(firstOutMarshalledParameter); CharSequence jniCall = callHotSpot(builder, methodData, env, args, customMarshalledSnippets); CharSequence endPointResult = generateStoreEndPointResult(builder, customMarshalledSnippets, returnType, jniCall, env); binaryUnmarshallVars = generateCreateBinaryInputForJByteArray(builder, binaryMarshallVars, endPointResult, "marshalledResultInput", env, staticMarshallBufferVar, staticBufferSize); @@ -403,11 +403,11 @@ private void generateNativeToHSStartMethod(CodeBuilder builder, CacheSnippets ca builder.line("}"); } - private static CharSequence generateStoreEndPointResult(CodeBuilder builder, MarshallerSnippets snippets, TypeMirror returnType, CharSequence nativeCall, CharSequence jniEnvFieldName) { + private static CharSequence generateStoreEndPointResult(CodeBuilder builder, MarshallerSnippet snippets, TypeMirror returnType, CharSequence nativeCall, CharSequence jniEnvFieldName) { return snippets.storeRawResult(builder, returnType, nativeCall, jniEnvFieldName); } - private PreUnmarshallResult generatePreUnmarshallResult(CodeBuilder builder, MarshallerSnippets snippets, BinaryMarshallVariables binaryMarshallVars, TypeMirror returnType, + private PreUnmarshallResult generatePreUnmarshallResult(CodeBuilder builder, MarshallerSnippet snippets, BinaryMarshallVariables binaryMarshallVars, TypeMirror returnType, CharSequence nativeCall, CharSequence receiver, CharSequence jniEnvFieldName, boolean hasBinaryMarshalledResult, CharSequence staticMarshallBufferVar, int staticBufferSize) { CharSequence result = nativeCall; @@ -604,7 +604,7 @@ private CharSequence generatePushArgs(CodeBuilder builder, MethodData methodData CharSequence parameterName = formalParameters.get(i).getSimpleName(); CharSequence parameterValueOverride = parameterValueOverrides.get(parameterName.toString()); MarshallerData marshaller = methodData.getParameterMarshaller(i); - MarshallerSnippets marshallerSnippets = marshallerSnippets(marshaller); + MarshallerSnippet marshallerSnippets = marshallerSnippets(marshaller); if (parameterValueOverride != null) { value = parameterValueOverride; } else { @@ -674,7 +674,7 @@ private CharSequence jValueSetterName(TypeMirror type) { } } - private CharSequence callHotSpot(CodeBuilder builder, MethodData methodData, CharSequence jniEnv, CharSequence args, MarshallerSnippets marshallerSnippets) { + private CharSequence callHotSpot(CodeBuilder builder, MethodData methodData, CharSequence jniEnv, CharSequence args, MarshallerSnippet marshallerSnippets) { CharSequence hsCallsInstance = new CodeBuilder(builder).invokeStatic(typeCache.foreignException, "getJNICalls").build(); TypeMirror retType = methodData.type.getReturnType(); return new CodeBuilder(builder).invoke(hsCallsInstance, callHotSpotName(marshallerSnippets.getEndPointMethodParameterType(retType)), @@ -877,7 +877,7 @@ private void generateNativeToHSEndMethod(CodeBuilder builder, MethodData methodD marshallerSnippets(methodData.getReturnTypeMarshaller()).write(builder, receiverMethodReturnType, resultVariable, marshalledOutputVar, null); } } else if (resultVariable != null) { - MarshallerSnippets returnTypeSnippets = marshallerSnippets(methodData.getReturnTypeMarshaller()); + MarshallerSnippet returnTypeSnippets = marshallerSnippets(methodData.getReturnTypeMarshaller()); CharSequence resultOverride = returnTypeSnippets.preMarshallResult(builder, receiverMethodReturnType, resultVariable, marshalledOutputVar, null); if (resultOverride != null) { resultVariable = resultOverride; @@ -893,7 +893,7 @@ private void generateNativeToHSEndMethod(CodeBuilder builder, MethodData methodD // Generate post unmarshall statements. for (int i = nonReceiverParameterStart; i < methodParameters.size(); i++) { - MarshallerSnippets marshallerSnippets = marshallerSnippets(methodData.getParameterMarshaller(i)); + MarshallerSnippet marshallerSnippets = marshallerSnippets(methodData.getParameterMarshaller(i)); marshallerSnippets.postUnmarshallParameter(builder, methodParameterTypes.get(i), methodParameters.get(i).getSimpleName(), marshalledOutputVar, null, resultVariable); } @@ -937,34 +937,34 @@ private static final class BinaryMarshallVariables { } } - private abstract static class NativeToHotSpotMarshallerSnippets extends MarshallerSnippets { + private abstract static class NativeToHotSpotMarshallerSnippet extends MarshallerSnippet { final TypeCache cache; - NativeToHotSpotMarshallerSnippets(NativeBridgeProcessor processor, MarshallerData marshallerData, Types types, TypeCache typeCache, BinaryNameCache binaryNameCache) { + NativeToHotSpotMarshallerSnippet(NativeBridgeProcessor processor, MarshallerData marshallerData, Types types, TypeCache typeCache, BinaryNameCache binaryNameCache) { super(processor, marshallerData, types, typeCache, binaryNameCache); this.cache = typeCache; } - static NativeToHotSpotMarshallerSnippets forData(NativeBridgeProcessor processor, DefinitionData data, MarshallerData marshallerData, + static NativeToHotSpotMarshallerSnippet forData(NativeBridgeProcessor processor, DefinitionData data, MarshallerData marshallerData, Types types, TypeCache typeCache, BinaryNameCache binaryNameCache) { switch (marshallerData.kind) { case VALUE: - return new DirectSnippets(processor, marshallerData, types, typeCache, binaryNameCache); + return new DirectSnippet(processor, marshallerData, types, typeCache, binaryNameCache); case REFERENCE: - return new ReferenceSnippets(processor, data, marshallerData, types, typeCache, binaryNameCache); + return new ReferenceSnippet(processor, data, marshallerData, types, typeCache, binaryNameCache); case RAW_REFERENCE: - return new RawReferenceSnippets(processor, marshallerData, types, typeCache, binaryNameCache); + return new RawReferenceSnippet(processor, marshallerData, types, typeCache, binaryNameCache); case CUSTOM: - return new CustomSnippets(processor, marshallerData, types, typeCache, binaryNameCache); + return new CustomSnippet(processor, marshallerData, types, typeCache, binaryNameCache); default: throw new IllegalArgumentException(String.valueOf(marshallerData.kind)); } } - private static final class DirectSnippets extends NativeToHotSpotMarshallerSnippets { + private static final class DirectSnippet extends NativeToHotSpotMarshallerSnippet { - DirectSnippets(NativeBridgeProcessor processor, MarshallerData marshallerData, Types types, TypeCache cache, BinaryNameCache binaryNameCache) { + DirectSnippet(NativeBridgeProcessor processor, MarshallerData marshallerData, Types types, TypeCache cache, BinaryNameCache binaryNameCache) { super(processor, marshallerData, types, cache, binaryNameCache); } @@ -1128,11 +1128,11 @@ private static CharSequence arrayFactoryMethodName(TypeMirror jniArrayType) { } } - private static final class ReferenceSnippets extends NativeToHotSpotMarshallerSnippets { + private static final class ReferenceSnippet extends NativeToHotSpotMarshallerSnippet { private final DefinitionData data; - ReferenceSnippets(NativeBridgeProcessor processor, DefinitionData data, MarshallerData marshallerData, Types types, TypeCache cache, BinaryNameCache binaryNameCache) { + ReferenceSnippet(NativeBridgeProcessor processor, DefinitionData data, MarshallerData marshallerData, Types types, TypeCache cache, BinaryNameCache binaryNameCache) { super(processor, marshallerData, types, cache, binaryNameCache); this.data = data; } @@ -1445,9 +1445,9 @@ void read(CodeBuilder currentBuilder, TypeMirror resultType, CharSequence result } } - private static final class RawReferenceSnippets extends NativeToHotSpotMarshallerSnippets { + private static final class RawReferenceSnippet extends NativeToHotSpotMarshallerSnippet { - RawReferenceSnippets(NativeBridgeProcessor processor, MarshallerData marshallerData, Types types, TypeCache cache, BinaryNameCache binaryNameCache) { + RawReferenceSnippet(NativeBridgeProcessor processor, MarshallerData marshallerData, Types types, TypeCache cache, BinaryNameCache binaryNameCache) { super(processor, marshallerData, types, cache, binaryNameCache); } @@ -1489,9 +1489,9 @@ void read(CodeBuilder currentBuilder, TypeMirror resultType, CharSequence result } } - private static final class CustomSnippets extends NativeToHotSpotMarshallerSnippets { + private static final class CustomSnippet extends NativeToHotSpotMarshallerSnippet { - CustomSnippets(NativeBridgeProcessor processor, MarshallerData marshallerData, Types types, TypeCache cache, BinaryNameCache binaryNameCache) { + CustomSnippet(NativeBridgeProcessor processor, MarshallerData marshallerData, Types types, TypeCache cache, BinaryNameCache binaryNameCache) { super(processor, marshallerData, types, cache, binaryNameCache); } diff --git a/sdk/src/org.graalvm.nativebridge.processor/src/org/graalvm/nativebridge/processor/NativeToNativeBridgeGenerator.java b/sdk/src/org.graalvm.nativebridge.processor/src/org/graalvm/nativebridge/processor/NativeToNativeBridgeGenerator.java index ce43a078cd3b..355b1ffaa02c 100644 --- a/sdk/src/org.graalvm.nativebridge.processor/src/org/graalvm/nativebridge/processor/NativeToNativeBridgeGenerator.java +++ b/sdk/src/org.graalvm.nativebridge.processor/src/org/graalvm/nativebridge/processor/NativeToNativeBridgeGenerator.java @@ -105,7 +105,7 @@ void generateImpl(CodeBuilder builder, CharSequence targetClassSimpleName) { } @Override - MarshallerSnippets marshallerSnippets(AbstractBridgeParser.MarshallerData marshallerData) { + MarshallerSnippet marshallerSnippets(AbstractBridgeParser.MarshallerData marshallerData) { throw new UnsupportedOperationException("Should not reach here"); } diff --git a/sdk/src/org.graalvm.nativebridge/src/org/graalvm/nativebridge/NativeIsolate.java b/sdk/src/org.graalvm.nativebridge/src/org/graalvm/nativebridge/NativeIsolate.java index 75838347ced7..4dc2a1142b30 100644 --- a/sdk/src/org.graalvm.nativebridge/src/org/graalvm/nativebridge/NativeIsolate.java +++ b/sdk/src/org.graalvm.nativebridge/src/org/graalvm/nativebridge/NativeIsolate.java @@ -40,8 +40,6 @@ */ package org.graalvm.nativebridge; -import java.lang.reflect.InvocationTargetException; -import java.lang.reflect.Method; import java.util.ArrayList; import java.util.Collection; import java.util.Collections; @@ -52,7 +50,8 @@ import java.util.function.Consumer; import java.util.function.Supplier; -import jdk.vm.ci.services.Services; +import org.graalvm.jniutils.NativeBridgeSupport; +import org.graalvm.nativeimage.ImageSingletons; /** * Represents a single native image isolate. All {@link NativeObject}s have a {@link NativeIsolate} @@ -64,7 +63,6 @@ public final class NativeIsolate { private static final long NULL = 0L; private static final Map isolates = new ConcurrentHashMap<>(); private static final AtomicInteger UUIDS = new AtomicInteger(0); - private static final Method createTerminatingThreadLocal = methodOrNull(Services.class, "createTerminatingThreadLocal", Supplier.class, Consumer.class); private final long uuid; private final long isolateId; @@ -83,8 +81,8 @@ private NativeIsolate(long isolateId, JNIConfig config) { this.config = config; this.cleaners = Collections.newSetFromMap(new ConcurrentHashMap<>()); this.threads = new ArrayList<>(); - this.attachedIsolateThread = createTerminatingThreadLocal != null ? NativeIsolate.invoke(createTerminatingThreadLocal, null, - (Supplier) () -> null, (Consumer) this::detachThread) : new ThreadLocal<>(); + this.attachedIsolateThread = ImageSingletons.lookup(NativeBridgeSupport.class).createTerminatingThreadLocal((Supplier) () -> null, + (Consumer) this::detachThread); this.state = State.ACTIVE; } @@ -305,23 +303,6 @@ private synchronized void detachThread(NativeIsolateThread nativeIsolateThread) } } - private static Method methodOrNull(Class enclosingClass, String methodName, Class... parameterTypes) { - try { - return enclosingClass.getDeclaredMethod(methodName, parameterTypes); - } catch (NoSuchMethodException e) { - return null; - } - } - - @SuppressWarnings("unchecked") - private static T invoke(Method method, Object receiver, Object... args) { - try { - return (T) method.invoke(receiver, args); - } catch (IllegalAccessException | InvocationTargetException e) { - throw new InternalError(e); - } - } - private enum State { ACTIVE, diff --git a/substratevm/mx.substratevm/mx_substratevm.py b/substratevm/mx.substratevm/mx_substratevm.py index 4cab248b0ca4..5b1ca7e49d99 100644 --- a/substratevm/mx.substratevm/mx_substratevm.py +++ b/substratevm/mx.substratevm/mx_substratevm.py @@ -1172,6 +1172,7 @@ def _native_image_launcher_extra_jvm_args(): )) libgraal_jar_distributions = [ + 'sdk:JNIUTILS', 'sdk:NATIVEBRIDGE', 'substratevm:GRAAL_HOTSPOT_LIBRARY'] libgraal_build_args = [ diff --git a/substratevm/src/com.oracle.svm.graal.hotspot.libgraal/src/com/oracle/svm/graal/hotspot/libgraal/truffle/LibGraalNativeBridgeSupport.java b/substratevm/src/com.oracle.svm.graal.hotspot.libgraal/src/com/oracle/svm/graal/hotspot/libgraal/truffle/LibGraalNativeBridgeSupport.java index 07def2600708..18e0a123c13d 100644 --- a/substratevm/src/com.oracle.svm.graal.hotspot.libgraal/src/com/oracle/svm/graal/hotspot/libgraal/truffle/LibGraalNativeBridgeSupport.java +++ b/substratevm/src/com.oracle.svm.graal.hotspot.libgraal/src/com/oracle/svm/graal/hotspot/libgraal/truffle/LibGraalNativeBridgeSupport.java @@ -24,11 +24,16 @@ */ package com.oracle.svm.graal.hotspot.libgraal.truffle; -import jdk.vm.ci.services.Services; +import java.util.concurrent.atomic.AtomicInteger; +import java.util.function.Consumer; +import java.util.function.Supplier; + import org.graalvm.compiler.debug.TTY; +import org.graalvm.compiler.serviceprovider.IsolateUtil; +import org.graalvm.jniutils.JNIMethodScope; import org.graalvm.jniutils.NativeBridgeSupport; -import java.util.concurrent.atomic.AtomicInteger; +import jdk.vm.ci.services.Services; public final class LibGraalNativeBridgeSupport implements NativeBridgeSupport { @@ -60,7 +65,14 @@ public void trace(String message) { if (!inTrace.get()) { inTrace.set(true); try { - TTY.println(message); + StringBuilder sb = new StringBuilder(); + sb.append('[').append(IsolateUtil.getIsolateID()).append(':').append(Thread.currentThread().getName()).append(']'); + JNIMethodScope scope = JNIMethodScope.scopeOrNull(); + if (scope != null) { + sb.append(new String(new char[2 + (scope.depth() * 2)]).replace('\0', ' ')); + } + sb.append(message); + TTY.println(sb.toString()); } finally { inTrace.remove(); } @@ -85,4 +97,9 @@ private int traceLevel() { } return res; } + + @Override + public ThreadLocal createTerminatingThreadLocal(Supplier initialValue, Consumer onTerminate) { + return Services.createTerminatingThreadLocal(initialValue, onTerminate); + } } From 857483a5d13a974dd38dc9f6663e8e3ffa012fbd Mon Sep 17 00:00:00 2001 From: Christian Humer Date: Wed, 28 Jun 2023 23:31:29 +0200 Subject: [PATCH 16/43] Cleanup and fix runtime and project configuration after move. --- sdk/mx.sdk/mx_sdk_vm.py | 14 +- sdk/mx.sdk/suite.py | 7 +- .../graalvm/jniutils/NativeBridgeSupport.java | 5 - .../org/graalvm/nativebridge/JNIConfig.java | 33 +- .../graalvm/nativebridge/NativeIsolate.java | 18 +- .../nativebridge/NativeIsolateThread.java | 7 + substratevm/mx.substratevm/mx_substratevm.py | 4 +- substratevm/mx.substratevm/suite.py | 5 +- .../com/oracle/svm/driver/NativeImage.java | 2 +- .../hotspot/libgraal/LibGraalFeature.java | 1 - .../libgraal}/LibGraalJNIMethodScope.java | 2 +- .../graal/hotspot/libgraal}/LibGraalUtil.java | 2 +- .../truffle/LibGraalNativeBridgeSupport.java | 6 - .../truffle/TruffleToLibGraalEntryPoints.java | 2 +- .../hosted/NativeImageClassLoaderSupport.java | 4 +- .../svm/truffle/isolated/BinaryInput.java | 635 +++++++++++++++++ .../svm/truffle/isolated/BinaryOutput.java | 667 ++++++++++++++++++ .../IsolatedCompilableTruffleAST.java | 4 +- .../IsolatedTruffleCompilationTask.java | 4 +- truffle/mx.truffle/macro-truffle.properties | 6 +- truffle/mx.truffle/suite.py | 34 +- .../src/com/oracle/truffle/api/Truffle.java | 6 + .../com/oracle/truffle/api/impl/Accessor.java | 3 + .../api/impl/DefaultRuntimeAccessor.java | 7 + ...compiler.truffle.jfr.EventFactory$Provider | 0 .../truffle/runtime/GraalRuntimeSupport.java | 9 + .../runtime/{hotspot => }/ModulesSupport.java | 55 +- .../hotspot/HotSpotTruffleRuntime.java | 7 + .../hotspot/HotSpotTruffleRuntimeAccess.java | 19 +- .../HotSpotTruffleRuntimeServices.java | 1 + .../src/truffle_attach.cc | 2 +- 31 files changed, 1488 insertions(+), 83 deletions(-) rename substratevm/src/com.oracle.svm.graal.hotspot.libgraal/src/{org/graalvm/libgraal/jni => com/oracle/svm/graal/hotspot/libgraal}/LibGraalJNIMethodScope.java (98%) rename substratevm/src/com.oracle.svm.graal.hotspot.libgraal/src/{org/graalvm/libgraal/jni => com/oracle/svm/graal/hotspot/libgraal}/LibGraalUtil.java (97%) create mode 100644 substratevm/src/com.oracle.svm.truffle/src/com/oracle/svm/truffle/isolated/BinaryInput.java create mode 100644 substratevm/src/com.oracle.svm.truffle/src/com/oracle/svm/truffle/isolated/BinaryOutput.java rename truffle/src/com.oracle.truffle.runtime/{ => src}/META-INF/services/org.graalvm.compiler.truffle.jfr.EventFactory$Provider (100%) rename truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/{hotspot => }/ModulesSupport.java (55%) diff --git a/sdk/mx.sdk/mx_sdk_vm.py b/sdk/mx.sdk/mx_sdk_vm.py index 39806c0dd9fb..a08aa3a4dfa2 100644 --- a/sdk/mx.sdk/mx_sdk_vm.py +++ b/sdk/mx.sdk/mx_sdk_vm.py @@ -668,11 +668,21 @@ def _patch_default_security_policy(build_dir, jmods_dir, dst_jdk_dir): grant codeBase "jrt:/org.graalvm.truffle" { permission java.security.AllPermission; }; - grant codeBase "jrt:/org.graalvm.sdk" { permission java.security.AllPermission; }; - + grant codeBase "jrt:/org.graalvm.truffle.runtime" { + permission java.security.AllPermission; + }; + grant codeBase "jrt:/org.graalvm.truffle.compiler" { + permission java.security.AllPermission; + }; + grant codeBase "jrt:/org.graalvm.nativebridge" { + permission java.security.AllPermission; + }; + grant codeBase "jrt:/org.graalvm.jniutils" { + permission java.security.AllPermission; + }; grant codeBase "jrt:/org.graalvm.locator" { permission java.io.FilePermission "<>", "read"; permission java.util.PropertyPermission "*", "read,write"; diff --git a/sdk/mx.sdk/suite.py b/sdk/mx.sdk/suite.py index 6f0ed3366ab0..f22c2949af3c 100644 --- a/sdk/mx.sdk/suite.py +++ b/sdk/mx.sdk/suite.py @@ -461,7 +461,7 @@ "org.graalvm.polyglot", "org.graalvm.options", "org.graalvm.word", - "org.graalvm.polyglot.impl to org.graalvm.truffle, com.oracle.graal.graal_enterprise", + "org.graalvm.polyglot.impl to org.graalvm.truffle, com.oracle.truffle.enterprise", "org.graalvm.word.impl to jdk.internal.vm.compiler", "org.graalvm.nativeimage.impl to org.graalvm.nativeimage.pointsto,org.graalvm.nativeimage.base,org.graalvm.nativeimage.builder,org.graalvm.nativeimage.configure,com.oracle.svm.svm_enterprise,org.graalvm.extraimage.builder", "org.graalvm.nativeimage.impl.clinit to org.graalvm.nativeimage.builder", @@ -562,6 +562,11 @@ "dependencies" : [ "org.graalvm.nativebridge.processor.test" ], + "requiresConcealed": { + "jdk.internal.vm.ci": [ + "jdk.vm.ci.services", + ], + }, "distDependencies" : ["NATIVEBRIDGE"], "maven": False, "testDistribution" : True, diff --git a/sdk/src/org.graalvm.jniutils/src/org/graalvm/jniutils/NativeBridgeSupport.java b/sdk/src/org.graalvm.jniutils/src/org/graalvm/jniutils/NativeBridgeSupport.java index bdbf6e185bf7..5e8424e92754 100644 --- a/sdk/src/org.graalvm.jniutils/src/org/graalvm/jniutils/NativeBridgeSupport.java +++ b/sdk/src/org.graalvm.jniutils/src/org/graalvm/jniutils/NativeBridgeSupport.java @@ -40,9 +40,6 @@ */ package org.graalvm.jniutils; -import java.util.function.Consumer; -import java.util.function.Supplier; - import org.graalvm.nativeimage.ImageSingletons; /** @@ -68,8 +65,6 @@ public interface NativeBridgeSupport { */ void trace(String message); - ThreadLocal createTerminatingThreadLocal(Supplier onCreate, Consumer onTerminate); - /** * Returns a {@code NativeBridgeSupport} instance registered in the {@link ImageSingletons}. */ diff --git a/sdk/src/org.graalvm.nativebridge/src/org/graalvm/nativebridge/JNIConfig.java b/sdk/src/org.graalvm.nativebridge/src/org/graalvm/nativebridge/JNIConfig.java index b9a73989839d..60bd1a31e359 100644 --- a/sdk/src/org.graalvm.nativebridge/src/org/graalvm/nativebridge/JNIConfig.java +++ b/sdk/src/org.graalvm.nativebridge/src/org/graalvm/nativebridge/JNIConfig.java @@ -40,8 +40,6 @@ */ package org.graalvm.nativebridge; -import org.graalvm.collections.Pair; -import org.graalvm.polyglot.TypeLiteral; import java.lang.annotation.Annotation; import java.lang.reflect.Array; import java.lang.reflect.GenericArrayType; @@ -53,8 +51,13 @@ import java.util.ListIterator; import java.util.Map; import java.util.Objects; +import java.util.function.Function; import java.util.function.LongBinaryOperator; import java.util.function.LongUnaryOperator; +import java.util.function.Supplier; + +import org.graalvm.collections.Pair; +import org.graalvm.polyglot.TypeLiteral; /** * A configuration used by the {@link NativeIsolate} and classes generated by the native bridge @@ -71,17 +74,20 @@ public final class JNIConfig { private final LongUnaryOperator detachThreadAction; private final LongBinaryOperator shutDownIsolateAction; private final LongBinaryOperator releaseNativeObjectAction; + private final Function, ThreadLocal> threadLocalFactory; JNIConfig(Map> binaryMarshallers, Map, List, BinaryMarshaller>>> annotationBinaryMarshallers, LongUnaryOperator attachThreadAction, LongUnaryOperator detachThreadAction, - LongBinaryOperator shutDownIsolateAction, LongBinaryOperator releaseNativeObjectAction) { + LongBinaryOperator shutDownIsolateAction, LongBinaryOperator releaseNativeObjectAction, + Function, ThreadLocal> threadLocalFactory) { this.binaryMarshallers = binaryMarshallers; this.annotationBinaryMarshallers = annotationBinaryMarshallers; this.attachThreadAction = attachThreadAction; this.detachThreadAction = detachThreadAction; this.shutDownIsolateAction = shutDownIsolateAction; this.releaseNativeObjectAction = releaseNativeObjectAction; + this.threadLocalFactory = threadLocalFactory; } /** @@ -131,6 +137,10 @@ public final BinaryMarshaller lookupMarshaller(TypeLiteral parameteriz } } + Function, ThreadLocal> getThreadLocalFactory() { + return threadLocalFactory; + } + long attachThread(long isolate) { return attachThreadAction.applyAsLong(isolate); } @@ -227,6 +237,7 @@ public static final class Builder { private LongUnaryOperator detachThreadAction = DETACH_UNSUPPORTED; private LongBinaryOperator shutDownIsolateAction = SHUTDOWN_UNSUPPORTED; private LongBinaryOperator releaseNativeObjectAction = RELEASE_UNSUPPORTED; + private Function, ThreadLocal> threadLocalFactory = ThreadLocal::withInitial; Builder() { this.binaryMarshallers = new HashMap<>(); @@ -372,13 +383,26 @@ public Builder setReleaseNativeObjectAction(LongBinaryOperator action) { return this; } + /** + * Registers a thread local factory whenever the default thread local handling should be + * overriden. This can be useful to install a terminating thread local using JVMCI services + * when needed. + * + * @see NativeObject + */ + public Builder setNativeThreadLocalFactory(Function, ThreadLocal> factory) { + Objects.requireNonNull(factory, "Action must be non null."); + this.threadLocalFactory = factory; + return this; + } + /** * Builds the {@link JNIConfig}. */ public JNIConfig build() { return new JNIConfig(binaryMarshallers, annotationBinaryMarshallers, attachThreadAction, detachThreadAction, shutDownIsolateAction, - releaseNativeObjectAction); + releaseNativeObjectAction, threadLocalFactory); } /** @@ -388,4 +412,5 @@ public static BinaryMarshaller defaultStackTraceMarshaller( return DefaultStackTraceMarshaller.INSTANCE; } } + } diff --git a/sdk/src/org.graalvm.nativebridge/src/org/graalvm/nativebridge/NativeIsolate.java b/sdk/src/org.graalvm.nativebridge/src/org/graalvm/nativebridge/NativeIsolate.java index 4dc2a1142b30..f978a6c4ef18 100644 --- a/sdk/src/org.graalvm.nativebridge/src/org/graalvm/nativebridge/NativeIsolate.java +++ b/sdk/src/org.graalvm.nativebridge/src/org/graalvm/nativebridge/NativeIsolate.java @@ -47,11 +47,6 @@ import java.util.Set; import java.util.concurrent.ConcurrentHashMap; import java.util.concurrent.atomic.AtomicInteger; -import java.util.function.Consumer; -import java.util.function.Supplier; - -import org.graalvm.jniutils.NativeBridgeSupport; -import org.graalvm.nativeimage.ImageSingletons; /** * Represents a single native image isolate. All {@link NativeObject}s have a {@link NativeIsolate} @@ -81,8 +76,7 @@ private NativeIsolate(long isolateId, JNIConfig config) { this.config = config; this.cleaners = Collections.newSetFromMap(new ConcurrentHashMap<>()); this.threads = new ArrayList<>(); - this.attachedIsolateThread = ImageSingletons.lookup(NativeBridgeSupport.class).createTerminatingThreadLocal((Supplier) () -> null, - (Consumer) this::detachThread); + this.attachedIsolateThread = config.getThreadLocalFactory().apply(() -> null); this.state = State.ACTIVE; } @@ -297,6 +291,16 @@ private NativeIsolateThread getOrCreateNativeIsolateThread() { return nativeIsolateThread; } + public void detachCurrentThread() { + synchronized (this) { + NativeIsolateThread isolateThread = attachedIsolateThread.get(); + if (isolateThread != null) { + detachThread(isolateThread); + attachedIsolateThread.set(null); + } + } + } + private synchronized void detachThread(NativeIsolateThread nativeIsolateThread) { if (state.isValid() && nativeIsolateThread != null && !nativeIsolateThread.isNativeThread()) { config.detachThread(nativeIsolateThread.isolateThread); diff --git a/sdk/src/org.graalvm.nativebridge/src/org/graalvm/nativebridge/NativeIsolateThread.java b/sdk/src/org.graalvm.nativebridge/src/org/graalvm/nativebridge/NativeIsolateThread.java index 9bbb816f6326..c7ccbe69b951 100644 --- a/sdk/src/org.graalvm.nativebridge/src/org/graalvm/nativebridge/NativeIsolateThread.java +++ b/sdk/src/org.graalvm.nativebridge/src/org/graalvm/nativebridge/NativeIsolateThread.java @@ -82,6 +82,13 @@ public long getIsolateThreadId() { return isolateThread; } + /** + * Returns the isolate for this thread. + */ + public NativeIsolate getIsolate() { + return isolate; + } + /** * Leaves the {@link NativeIsolate} on the current thread. */ diff --git a/substratevm/mx.substratevm/mx_substratevm.py b/substratevm/mx.substratevm/mx_substratevm.py index 5b1ca7e49d99..c084706c85aa 100644 --- a/substratevm/mx.substratevm/mx_substratevm.py +++ b/substratevm/mx.substratevm/mx_substratevm.py @@ -1181,9 +1181,7 @@ def _native_image_launcher_extra_jvm_args(): '-J--add-exports=jdk.internal.vm.compiler/org.graalvm.compiler.options=ALL-UNNAMED', '-J--add-exports=jdk.internal.vm.compiler/org.graalvm.compiler.truffle.compiler=ALL-UNNAMED', '-J--add-exports=jdk.internal.vm.compiler/org.graalvm.compiler.truffle.compiler.hotspot=ALL-UNNAMED', - '-J--add-exports=jdk.internal.vm.compiler/org.graalvm.jniutils=ALL-UNNAMED', - '-J--add-exports=jdk.internal.vm.compiler/org.graalvm.libgraal.jni.annotation=ALL-UNNAMED', - '-J--add-exports=jdk.internal.vm.compiler/org.graalvm.libgraal.jni=ALL-UNNAMED', + '-J--add-exports=org.graalvm.jniutils/org.graalvm.jniutils=ALL-UNNAMED', '-J--add-exports=org.graalvm.truffle.compiler/com.oracle.truffle.compiler.hotspot.libgraal=ALL-UNNAMED', '-J--add-exports=org.graalvm.truffle.compiler/com.oracle.truffle.compiler.hotspot=ALL-UNNAMED', '-J--add-exports=org.graalvm.truffle.compiler/com.oracle.truffle.compiler=ALL-UNNAMED', diff --git a/substratevm/mx.substratevm/suite.py b/substratevm/mx.substratevm/suite.py index e50d9208857a..29699aff5422 100644 --- a/substratevm/mx.substratevm/suite.py +++ b/substratevm/mx.substratevm/suite.py @@ -1003,7 +1003,6 @@ "com.oracle.svm.graal", "truffle:TRUFFLE_API", "truffle:TRUFFLE_RUNTIME", - "sdk:NATIVEBRIDGE", ], "requiresConcealed" : { "java.base" : [ @@ -1311,7 +1310,6 @@ "NATIVE_IMAGE_BASE", "truffle:TRUFFLE_API", "truffle:TRUFFLE_RUNTIME", - "sdk:NATIVEBRIDGE", ], "moduleInfo" : { "name" : "org.graalvm.nativeimage.builder", @@ -1495,8 +1493,6 @@ "description" : "SubstrateVM HotSpot Graal library support", "javaCompliance" : "17+", "dependencies": [ - "sdk:JNIUTILS", - "sdk:NATIVEBRIDGE", "com.oracle.svm.graal.hotspot.libgraal", ], "overlaps" : [ @@ -1504,6 +1500,7 @@ ], "distDependencies": [ "SVM", + "sdk:NATIVEBRIDGE", ], "defaultBuild": False, "maven": False, diff --git a/substratevm/src/com.oracle.svm.driver/src/com/oracle/svm/driver/NativeImage.java b/substratevm/src/com.oracle.svm.driver/src/com/oracle/svm/driver/NativeImage.java index b4909c3fd0c4..fa4209c7fb86 100644 --- a/substratevm/src/com.oracle.svm.driver/src/com/oracle/svm/driver/NativeImage.java +++ b/substratevm/src/com.oracle.svm.driver/src/com/oracle/svm/driver/NativeImage.java @@ -544,7 +544,7 @@ public List getBuilderModulePath() { if (libJvmciDir != null) { result.addAll(getJars(libJvmciDir, "graal-sdk", "enterprise-graal")); } - result.addAll(getJars(rootDir.resolve(Paths.get("lib", "truffle")), "truffle-api")); + result.addAll(getJars(rootDir.resolve(Paths.get("lib", "truffle")), "truffle-api", "truffle-compiler", "truffle-runtime", "truffle-enterprise")); if (modulePathBuild) { result.addAll(getJars(rootDir.resolve(Paths.get("lib", "svm", "builder")))); } diff --git a/substratevm/src/com.oracle.svm.graal.hotspot.libgraal/src/com/oracle/svm/graal/hotspot/libgraal/LibGraalFeature.java b/substratevm/src/com.oracle.svm.graal.hotspot.libgraal/src/com/oracle/svm/graal/hotspot/libgraal/LibGraalFeature.java index c9cddfde6f55..d7ab360bcee2 100644 --- a/substratevm/src/com.oracle.svm.graal.hotspot.libgraal/src/com/oracle/svm/graal/hotspot/libgraal/LibGraalFeature.java +++ b/substratevm/src/com.oracle.svm.graal.hotspot.libgraal/src/com/oracle/svm/graal/hotspot/libgraal/LibGraalFeature.java @@ -95,7 +95,6 @@ import org.graalvm.compiler.truffle.compiler.substitutions.GraphDecoderInvocationPluginProvider; import org.graalvm.jniutils.JNI; import org.graalvm.jniutils.JNIMethodScope; -import org.graalvm.libgraal.jni.LibGraalUtil; import org.graalvm.nativeimage.ImageSingletons; import org.graalvm.nativeimage.LogHandler; import org.graalvm.nativeimage.VMRuntime; diff --git a/substratevm/src/com.oracle.svm.graal.hotspot.libgraal/src/org/graalvm/libgraal/jni/LibGraalJNIMethodScope.java b/substratevm/src/com.oracle.svm.graal.hotspot.libgraal/src/com/oracle/svm/graal/hotspot/libgraal/LibGraalJNIMethodScope.java similarity index 98% rename from substratevm/src/com.oracle.svm.graal.hotspot.libgraal/src/org/graalvm/libgraal/jni/LibGraalJNIMethodScope.java rename to substratevm/src/com.oracle.svm.graal.hotspot.libgraal/src/com/oracle/svm/graal/hotspot/libgraal/LibGraalJNIMethodScope.java index a4c0c73c4eb2..8c58d658af68 100644 --- a/substratevm/src/com.oracle.svm.graal.hotspot.libgraal/src/org/graalvm/libgraal/jni/LibGraalJNIMethodScope.java +++ b/substratevm/src/com.oracle.svm.graal.hotspot.libgraal/src/com/oracle/svm/graal/hotspot/libgraal/LibGraalJNIMethodScope.java @@ -22,7 +22,7 @@ * or visit www.oracle.com if you need additional information or have any * questions. */ -package org.graalvm.libgraal.jni; +package com.oracle.svm.graal.hotspot.libgraal; import jdk.vm.ci.hotspot.HotSpotJVMCIRuntime; import jdk.vm.ci.hotspot.HotSpotVMConfigAccess; diff --git a/substratevm/src/com.oracle.svm.graal.hotspot.libgraal/src/org/graalvm/libgraal/jni/LibGraalUtil.java b/substratevm/src/com.oracle.svm.graal.hotspot.libgraal/src/com/oracle/svm/graal/hotspot/libgraal/LibGraalUtil.java similarity index 97% rename from substratevm/src/com.oracle.svm.graal.hotspot.libgraal/src/org/graalvm/libgraal/jni/LibGraalUtil.java rename to substratevm/src/com.oracle.svm.graal.hotspot.libgraal/src/com/oracle/svm/graal/hotspot/libgraal/LibGraalUtil.java index 76c03101cd2d..56e6ef03a0b5 100644 --- a/substratevm/src/com.oracle.svm.graal.hotspot.libgraal/src/org/graalvm/libgraal/jni/LibGraalUtil.java +++ b/substratevm/src/com.oracle.svm.graal.hotspot.libgraal/src/com/oracle/svm/graal/hotspot/libgraal/LibGraalUtil.java @@ -22,7 +22,7 @@ * or visit www.oracle.com if you need additional information or have any * questions. */ -package org.graalvm.libgraal.jni; +package com.oracle.svm.graal.hotspot.libgraal; import java.util.Objects; diff --git a/substratevm/src/com.oracle.svm.graal.hotspot.libgraal/src/com/oracle/svm/graal/hotspot/libgraal/truffle/LibGraalNativeBridgeSupport.java b/substratevm/src/com.oracle.svm.graal.hotspot.libgraal/src/com/oracle/svm/graal/hotspot/libgraal/truffle/LibGraalNativeBridgeSupport.java index 18e0a123c13d..1cf88e8146b0 100644 --- a/substratevm/src/com.oracle.svm.graal.hotspot.libgraal/src/com/oracle/svm/graal/hotspot/libgraal/truffle/LibGraalNativeBridgeSupport.java +++ b/substratevm/src/com.oracle.svm.graal.hotspot.libgraal/src/com/oracle/svm/graal/hotspot/libgraal/truffle/LibGraalNativeBridgeSupport.java @@ -25,8 +25,6 @@ package com.oracle.svm.graal.hotspot.libgraal.truffle; import java.util.concurrent.atomic.AtomicInteger; -import java.util.function.Consumer; -import java.util.function.Supplier; import org.graalvm.compiler.debug.TTY; import org.graalvm.compiler.serviceprovider.IsolateUtil; @@ -98,8 +96,4 @@ private int traceLevel() { return res; } - @Override - public ThreadLocal createTerminatingThreadLocal(Supplier initialValue, Consumer onTerminate) { - return Services.createTerminatingThreadLocal(initialValue, onTerminate); - } } diff --git a/substratevm/src/com.oracle.svm.graal.hotspot.libgraal/src/com/oracle/svm/graal/hotspot/libgraal/truffle/TruffleToLibGraalEntryPoints.java b/substratevm/src/com.oracle.svm.graal.hotspot.libgraal/src/com/oracle/svm/graal/hotspot/libgraal/truffle/TruffleToLibGraalEntryPoints.java index 99ffca179737..488e217ab245 100644 --- a/substratevm/src/com.oracle.svm.graal.hotspot.libgraal/src/com/oracle/svm/graal/hotspot/libgraal/truffle/TruffleToLibGraalEntryPoints.java +++ b/substratevm/src/com.oracle.svm.graal.hotspot.libgraal/src/com/oracle/svm/graal/hotspot/libgraal/truffle/TruffleToLibGraalEntryPoints.java @@ -65,7 +65,6 @@ import org.graalvm.jniutils.JNIExceptionWrapper; import org.graalvm.jniutils.JNIMethodScope; import org.graalvm.jniutils.JNIUtil; -import org.graalvm.libgraal.jni.LibGraalUtil; import org.graalvm.nativebridge.BinaryOutput; import org.graalvm.nativebridge.BinaryOutput.ByteArrayBinaryOutput; import org.graalvm.nativeimage.Isolate; @@ -79,6 +78,7 @@ import com.oracle.svm.core.heap.Heap; import com.oracle.svm.graal.hotspot.libgraal.LibGraal; +import com.oracle.svm.graal.hotspot.libgraal.LibGraalUtil; import com.oracle.truffle.compiler.TruffleCompilable; import com.oracle.truffle.compiler.TruffleCompilationTask; import com.oracle.truffle.compiler.TruffleCompilerListener; diff --git a/substratevm/src/com.oracle.svm.hosted/src/com/oracle/svm/hosted/NativeImageClassLoaderSupport.java b/substratevm/src/com.oracle.svm.hosted/src/com/oracle/svm/hosted/NativeImageClassLoaderSupport.java index ebbd649fd5fa..375eb9f5d58d 100644 --- a/substratevm/src/com.oracle.svm.hosted/src/com/oracle/svm/hosted/NativeImageClassLoaderSupport.java +++ b/substratevm/src/com.oracle.svm.hosted/src/com/oracle/svm/hosted/NativeImageClassLoaderSupport.java @@ -636,7 +636,9 @@ private void run() { List requiresInit = Arrays.asList( "jdk.internal.vm.ci", "jdk.internal.vm.compiler", "com.oracle.graal.graal_enterprise", - "org.graalvm.sdk", "org.graalvm.truffle"); + "org.graalvm.sdk", "org.graalvm.truffle", "org.graalvm.truffle.runtime", + "org.graalvm.truffle.compiler", "com.oracle.truffle.enterprise", "org.graalvm.jniutils", + "org.graalvm.nativebridge"); for (ModuleReference moduleReference : upgradeAndSystemModuleFinder.findAll()) { if (requiresInit.contains(moduleReference.descriptor().name())) { diff --git a/substratevm/src/com.oracle.svm.truffle/src/com/oracle/svm/truffle/isolated/BinaryInput.java b/substratevm/src/com.oracle.svm.truffle/src/com/oracle/svm/truffle/isolated/BinaryInput.java new file mode 100644 index 000000000000..f5ca95856086 --- /dev/null +++ b/substratevm/src/com.oracle.svm.truffle/src/com/oracle/svm/truffle/isolated/BinaryInput.java @@ -0,0 +1,635 @@ +/* + * Copyright (c) 2022, 2023, 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. Oracle designates this + * particular file as subject to the "Classpath" exception as provided + * by Oracle in the LICENSE file that accompanied this code. + * + * 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.svm.truffle.isolated; + +import static com.oracle.svm.truffle.isolated.BinaryOutput.ARRAY; +import static com.oracle.svm.truffle.isolated.BinaryOutput.BOOLEAN; +import static com.oracle.svm.truffle.isolated.BinaryOutput.BYTE; +import static com.oracle.svm.truffle.isolated.BinaryOutput.CHAR; +import static com.oracle.svm.truffle.isolated.BinaryOutput.DOUBLE; +import static com.oracle.svm.truffle.isolated.BinaryOutput.FLOAT; +import static com.oracle.svm.truffle.isolated.BinaryOutput.INT; +import static com.oracle.svm.truffle.isolated.BinaryOutput.LARGE_STRING_TAG; +import static com.oracle.svm.truffle.isolated.BinaryOutput.LONG; +import static com.oracle.svm.truffle.isolated.BinaryOutput.NULL; +import static com.oracle.svm.truffle.isolated.BinaryOutput.SHORT; +import static com.oracle.svm.truffle.isolated.BinaryOutput.STRING; +import static com.oracle.svm.truffle.isolated.BinaryOutput.bufferSize; + +import java.nio.ByteBuffer; +import java.nio.ByteOrder; + +import org.graalvm.nativeimage.c.type.CCharPointer; +import org.graalvm.nativeimage.c.type.CTypeConversion; + +/** + * Copy from native-bridge to avoid depenency from now. Keep in sync with native-bridge. + */ +abstract class BinaryInput { + + private static final int EOF = -1; + + private byte[] tempEncodingByteBuffer; + private char[] tempEncodingCharBuffer; + protected final int length; + protected int pos; + + private BinaryInput(int length) { + this.length = length; + } + + /** + * Reads a single byte and returns {@code true} if that byte is non-zero, {@code false} if that + * byte is zero. + * + * @throws IndexOutOfBoundsException if there are not enough bytes to read. + */ + public final boolean readBoolean() throws IndexOutOfBoundsException { + int b = read(); + if (b < 0) { + throw new IndexOutOfBoundsException(); + } + return b != 0; + } + + /** + * Reads and returns a single byte. + * + * @throws IndexOutOfBoundsException if there are not enough bytes to read. + */ + public final byte readByte() throws IndexOutOfBoundsException { + int b = read(); + if (b < 0) { + throw new IndexOutOfBoundsException(); + } + return (byte) b; + } + + /** + * Reads two bytes and returns a {@code short} value. + * + * @throws IndexOutOfBoundsException if there are not enough bytes to read. + */ + public final short readShort() throws IndexOutOfBoundsException { + int b1 = read(); + int b2 = read(); + if ((b1 | b2) < 0) { + throw new IndexOutOfBoundsException(); + } + return packShort(b1, b2); + } + + /** + * Creates a Java {@code short} from given unsigned bytes, where {@code b1} is the most + * significant byte {@code byte} and {@code b2} is the least significant {@code byte}. + */ + private static short packShort(int b1, int b2) { + return (short) ((b1 << 8) + b2); + } + + /** + * Reads two bytes and returns a {@code char} value. + * + * @throws IndexOutOfBoundsException if there are not enough bytes to read. + */ + public final char readChar() throws IndexOutOfBoundsException { + int b1 = read(); + int b2 = read(); + if ((b1 | b2) < 0) { + throw new IndexOutOfBoundsException(); + } + return packChar(b1, b2); + } + + /** + * Creates a Java {@code char} from given unsigned bytes, where {@code b1} is the most + * significant byte {@code byte} and {@code b2} is the least significant {@code byte}. + */ + private static char packChar(int b1, int b2) { + return (char) ((b1 << 8) + b2); + } + + /** + * Reads four bytes and returns an {@code int} value. + * + * @throws IndexOutOfBoundsException if there are not enough bytes to read. + */ + public final int readInt() throws IndexOutOfBoundsException { + int b1 = read(); + int b2 = read(); + int b3 = read(); + int b4 = read(); + if ((b1 | b2 | b3 | b4) < 0) { + throw new IndexOutOfBoundsException(); + } + return packInt(b1, b2, b3, b4); + } + + /** + * Creates a Java {@code int} from given unsigned bytes, where {@code b1} is the most + * significant byte {@code byte} and {@code b4} is the least significant {@code byte}. + */ + private static int packInt(int b1, int b2, int b3, int b4) { + return (b1 << 24) + (b2 << 16) + (b3 << 8) + b4; + } + + /** + * Reads eight bytes and returns a {@code long} value. + * + * @throws IndexOutOfBoundsException if there are not enough bytes to read. + */ + public final long readLong() throws IndexOutOfBoundsException { + int b1 = read(); + int b2 = read(); + int b3 = read(); + int b4 = read(); + int b5 = read(); + int b6 = read(); + int b7 = read(); + int b8 = read(); + if ((b1 | b2 | b3 | b4 | b5 | b6 | b7 | b8) < 0) { + throw new IndexOutOfBoundsException(); + } + return packLong(b1, b2, b3, b4, b5, b6, b7, b8); + } + + /** + * Creates a Java {@code long} from given unsigned bytes, where {@code b1} is the most + * significant byte {@code byte} and {@code b8} is the least significant {@code byte}. + */ + private static long packLong(int b1, int b2, int b3, int b4, int b5, int b6, int b7, int b8) { + return ((long) b1 << 56) + ((long) b2 << 48) + ((long) b3 << 40) + ((long) b4 << 32) + + ((long) b5 << 24) + ((long) b6 << 16) + ((long) b7 << 8) + b8; + } + + /** + * Reads four bytes and returns a {@code float} value. It does this by reading an {@code int} + * value and converting the {@code int} value to a {@code float} using + * {@link Float#intBitsToFloat(int)}. + * + * @throws IndexOutOfBoundsException if there are not enough bytes to read. + */ + public final float readFloat() throws IndexOutOfBoundsException { + return Float.intBitsToFloat(readInt()); + } + + /** + * Reads eight bytes and returns a {@code double} value. It does this by reading a {@code long} + * value and converting the {@code long} value to a {@code double} using + * {@link Double#longBitsToDouble(long)}. + * + * @throws IndexOutOfBoundsException if there are not enough bytes to read. + */ + public final double readDouble() throws IndexOutOfBoundsException { + return Double.longBitsToDouble(readLong()); + } + + /** + * Reads a single byte. The byte value is returned as an {@code int} in the range {@code 0} to + * {@code 255}. If no byte is available because the end of the stream has been reached, the + * value {@code -1} is returned. + */ + public abstract int read(); + + /** + * Reads {@code len} bytes into a byte array starting at offset {@code off}. + * + * @throws IndexOutOfBoundsException if there are not enough bytes to read + */ + public abstract void read(byte[] b, int off, int len) throws IndexOutOfBoundsException; + + /** + * Reads a string using a modified UTF-8 encoding in a machine-independent manner. + * + * @throws IndexOutOfBoundsException if there are not enough bytes to read. + * @throws IllegalArgumentException if the bytes do not represent a valid modified UTF-8 + * encoding of a string. + */ + public final String readUTF() throws IndexOutOfBoundsException, IllegalArgumentException { + int len; + int b1 = read(); + int b2 = read(); + if ((b1 | b2) < 0) { + throw new IndexOutOfBoundsException(); + } + if ((b1 & LARGE_STRING_TAG) == LARGE_STRING_TAG) { + int b3 = read(); + int b4 = read(); + if ((b3 | b4) < 0) { + throw new IndexOutOfBoundsException(); + } + len = ((b1 & ~LARGE_STRING_TAG) << 24) + (b2 << 16) + (b3 << 8) + b4; + } else { + len = (b1 << 8) + b2; + } + ensureBufferSize(len); + if (tempEncodingCharBuffer == null || tempEncodingCharBuffer.length < len) { + tempEncodingCharBuffer = new char[Math.max(bufferSize(0, len), 80)]; + } + + int c1; + int c2; + int c3; + int byteCount = 0; + int charCount = 0; + + read(tempEncodingByteBuffer, 0, len); + + while (byteCount < len) { + c1 = tempEncodingByteBuffer[byteCount] & 0xff; + if (c1 > 127) { + break; + } + byteCount++; + tempEncodingCharBuffer[charCount++] = (char) c1; + } + + while (byteCount < len) { + c1 = tempEncodingByteBuffer[byteCount] & 0xff; + switch (c1 >> 4) { + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + case 7: + /* 0xxxxxxx */ + byteCount++; + tempEncodingCharBuffer[charCount++] = (char) c1; + break; + case 12: + case 13: + /* 110x xxxx 10xx xxxx */ + byteCount += 2; + if (byteCount > len) { + throw new IllegalArgumentException("Partial character at end"); + } + c2 = tempEncodingByteBuffer[byteCount - 1]; + if ((c2 & 0xC0) != 0x80) { + throw new IllegalArgumentException("Malformed input around byte " + byteCount); + } + tempEncodingCharBuffer[charCount++] = (char) (((c1 & 0x1F) << 6) | (c2 & 0x3F)); + break; + case 14: + /* 1110 xxxx 10xx xxxx 10xx xxxx */ + byteCount += 3; + if (byteCount > len) { + throw new IllegalArgumentException("Malformed input: partial character at end"); + } + c2 = tempEncodingByteBuffer[byteCount - 2]; + c3 = tempEncodingByteBuffer[byteCount - 1]; + if (((c2 & 0xC0) != 0x80) || ((c3 & 0xC0) != 0x80)) { + throw new IllegalArgumentException("Malformed input around byte " + (byteCount - 1)); + } + tempEncodingCharBuffer[charCount++] = (char) (((c1 & 0x0F) << 12) | ((c2 & 0x3F) << 6) | (c3 & 0x3F)); + break; + default: + /* 10xx xxxx, 1111 xxxx */ + throw new IllegalArgumentException("Malformed input around byte " + byteCount); + } + } + // The number of chars produced may be less than len + return new String(tempEncodingCharBuffer, 0, charCount); + } + + /** + * Reads a single value, using the data type encoded in the marshalled data. + * + * @return The read value, such as a boxed Java primitive, a {@link String}, a {@code null}, or + * an array of these types. + * @throws IndexOutOfBoundsException if there are not enough bytes to read. + * @throws IllegalArgumentException when the marshaled type is not supported or if the bytes do + * not represent a valid modified UTF-8 encoding of a string. + */ + public final Object readTypedValue() throws IndexOutOfBoundsException, IllegalArgumentException { + byte tag = readByte(); + switch (tag) { + case ARRAY: + int len = readInt(); + Object[] arr = new Object[len]; + for (int i = 0; i < len; i++) { + arr[i] = readTypedValue(); + } + return arr; + case NULL: + return null; + case BOOLEAN: + return readBoolean(); + case BYTE: + return readByte(); + case SHORT: + return readShort(); + case CHAR: + return readChar(); + case INT: + return readInt(); + case LONG: + return readLong(); + case FLOAT: + return readFloat(); + case DOUBLE: + return readDouble(); + case STRING: + return readUTF(); + default: + throw new IllegalArgumentException(String.format("Unknown tag %d", tag)); + } + } + + /** + * Reads {@code len} bytes into a boolean array starting at offset {@code off}. + * + * @throws IndexOutOfBoundsException if there are not enough bytes to read + */ + public final void read(boolean[] b, int off, int len) { + ensureBufferSize(len); + read(tempEncodingByteBuffer, 0, len); + int limit = off + len; + for (int i = off, j = 0; i < limit; i++) { + b[i] = tempEncodingByteBuffer[j++] != 0; + } + } + + /** + * Reads {@code len} shorts into a short array starting at offset {@code off}. + * + * @throws IndexOutOfBoundsException if there are not enough bytes to read + */ + public final void read(short[] b, int off, int len) { + int size = len * Short.BYTES; + ensureBufferSize(size); + read(tempEncodingByteBuffer, 0, size); + int limit = off + len; + for (int i = off, j = 0; i < limit; i++) { + int b1 = (tempEncodingByteBuffer[j++] & 0xff); + int b2 = (tempEncodingByteBuffer[j++] & 0xff); + b[i] = packShort(b1, b2); + } + } + + /** + * Reads {@code len} chars into a char array starting at offset {@code off}. + * + * @throws IndexOutOfBoundsException if there are not enough bytes to read + */ + public final void read(char[] b, int off, int len) { + int size = len * Character.BYTES; + ensureBufferSize(size); + read(tempEncodingByteBuffer, 0, size); + int limit = off + len; + for (int i = off, j = 0; i < limit; i++) { + int b1 = (tempEncodingByteBuffer[j++] & 0xff); + int b2 = (tempEncodingByteBuffer[j++] & 0xff); + b[i] = packChar(b1, b2); + } + } + + /** + * Reads {@code len} ints into an int array starting at offset {@code off}. + * + * @throws IndexOutOfBoundsException if there are not enough bytes to read + */ + public final void read(int[] b, int off, int len) { + int size = len * Integer.BYTES; + ensureBufferSize(size); + read(tempEncodingByteBuffer, 0, size); + int limit = off + len; + for (int i = off, j = 0; i < limit; i++) { + int b1 = (tempEncodingByteBuffer[j++] & 0xff); + int b2 = (tempEncodingByteBuffer[j++] & 0xff); + int b3 = (tempEncodingByteBuffer[j++] & 0xff); + int b4 = (tempEncodingByteBuffer[j++] & 0xff); + b[i] = packInt(b1, b2, b3, b4); + } + } + + /** + * Reads {@code len} longs into a long array starting at offset {@code off}. + * + * @throws IndexOutOfBoundsException if there are not enough bytes to read + */ + public final void read(long[] b, int off, int len) { + int size = len * Long.BYTES; + ensureBufferSize(size); + read(tempEncodingByteBuffer, 0, size); + int limit = off + len; + for (int i = off, j = 0; i < limit; i++) { + int b1 = (tempEncodingByteBuffer[j++] & 0xff); + int b2 = (tempEncodingByteBuffer[j++] & 0xff); + int b3 = (tempEncodingByteBuffer[j++] & 0xff); + int b4 = (tempEncodingByteBuffer[j++] & 0xff); + int b5 = (tempEncodingByteBuffer[j++] & 0xff); + int b6 = (tempEncodingByteBuffer[j++] & 0xff); + int b7 = (tempEncodingByteBuffer[j++] & 0xff); + int b8 = (tempEncodingByteBuffer[j++] & 0xff); + b[i] = packLong(b1, b2, b3, b4, b5, b6, b7, b8); + } + } + + /** + * Reads {@code len} floats into a float array starting at offset {@code off}. + * + * @throws IndexOutOfBoundsException if there are not enough bytes to read + */ + public final void read(float[] b, int off, int len) { + int size = len * Float.BYTES; + ensureBufferSize(size); + read(tempEncodingByteBuffer, 0, size); + int limit = off + len; + for (int i = off, j = 0; i < limit; i++) { + int b1 = (tempEncodingByteBuffer[j++] & 0xff); + int b2 = (tempEncodingByteBuffer[j++] & 0xff); + int b3 = (tempEncodingByteBuffer[j++] & 0xff); + int b4 = (tempEncodingByteBuffer[j++] & 0xff); + b[i] = Float.intBitsToFloat(packInt(b1, b2, b3, b4)); + } + } + + /** + * Reads {@code len} doubles into a double array starting at offset {@code off}. + * + * @throws IndexOutOfBoundsException if there are not enough bytes to read + */ + public final void read(double[] b, int off, int len) { + int size = len * Double.BYTES; + ensureBufferSize(size); + read(tempEncodingByteBuffer, 0, size); + int limit = off + len; + for (int i = off, j = 0; i < limit; i++) { + int b1 = (tempEncodingByteBuffer[j++] & 0xff); + int b2 = (tempEncodingByteBuffer[j++] & 0xff); + int b3 = (tempEncodingByteBuffer[j++] & 0xff); + int b4 = (tempEncodingByteBuffer[j++] & 0xff); + int b5 = (tempEncodingByteBuffer[j++] & 0xff); + int b6 = (tempEncodingByteBuffer[j++] & 0xff); + int b7 = (tempEncodingByteBuffer[j++] & 0xff); + int b8 = (tempEncodingByteBuffer[j++] & 0xff); + b[i] = Double.longBitsToDouble(packLong(b1, b2, b3, b4, b5, b6, b7, b8)); + } + } + + /** + * Returns a read only {@link ByteBuffer} backed by the {@link BinaryInput} internal buffer. The + * content of the buffer will start at the {@link BinaryInput}'s current position. The buffer's + * capacity and limit will be {@code len}, its position will be zero, its mark will be + * undefined, and its byte order will be {@link ByteOrder#BIG_ENDIAN BIG_ENDIAN}. After a + * successful call, the {@link BinaryInput}'s current position is incremented by the + * {@code len}. + * + * @throws IndexOutOfBoundsException if the BinaryInput has not enough remaining bytes. + */ + public abstract ByteBuffer asByteBuffer(int len); + + /** + * Creates a new buffer backed by a byte array. + */ + public static BinaryInput create(byte[] buffer) { + return new ByteArrayBinaryInput(buffer); + } + + /** + * Creates a new buffer backed by a byte array only up to a given length. + */ + public static BinaryInput create(byte[] buffer, int length) { + return new ByteArrayBinaryInput(buffer, length); + } + + /** + * Creates a new buffer wrapping an off-heap memory segment starting at an {@code address} + * having {@code length} bytes. + */ + public static BinaryInput create(CCharPointer address, int length) { + return new CCharPointerInput(address, length); + } + + private void ensureBufferSize(int len) { + if (tempEncodingByteBuffer == null || tempEncodingByteBuffer.length < len) { + tempEncodingByteBuffer = new byte[Math.max(bufferSize(0, len), 80)]; + } + } + + private static final class ByteArrayBinaryInput extends BinaryInput { + + private final byte[] buffer; + + ByteArrayBinaryInput(byte[] buffer) { + super(buffer.length); + this.buffer = buffer; + } + + ByteArrayBinaryInput(byte[] buffer, int length) { + super(length); + this.buffer = buffer; + } + + @Override + public int read() { + if (pos >= length) { + return EOF; + } + return (buffer[pos++] & 0xff); + } + + @Override + public void read(byte[] b, int off, int len) { + if (len < 0) { + throw new IllegalArgumentException(String.format("Len must be non negative but was %d", len)); + } + if (pos + len > length) { + throw new IndexOutOfBoundsException(); + } + System.arraycopy(buffer, pos, b, off, len); + pos += len; + } + + @Override + public ByteBuffer asByteBuffer(int len) { + ByteBuffer result = ByteBuffer.wrap(buffer, pos, len).slice().asReadOnlyBuffer(); + pos += len; + return result; + } + } + + private static final class CCharPointerInput extends BinaryInput { + + /** + * Represents the point at which the average cost of a JNI call exceeds the expense of an + * element by element copy. See {@code java.nio.Bits#JNI_COPY_TO_ARRAY_THRESHOLD}. + */ + private static final int BYTEBUFFER_COPY_TO_ARRAY_THRESHOLD = 6; + + private final CCharPointer address; + /** + * ByteBuffer view of this {@link CCharPointerInput} direct memory. The ByteBuffer is used + * for bulk data transfers, where the bulk ByteBuffer operations outperform element by + * element copying by an order of magnitude. + */ + private ByteBuffer byteBufferView; + + CCharPointerInput(CCharPointer address, int length) { + super(length); + this.address = address; + } + + @Override + public int read() { + if (pos >= length) { + return EOF; + } + return (address.read(pos++) & 0xff); + } + + @Override + public void read(byte[] b, int off, int len) { + if (len < 0) { + throw new IllegalArgumentException(String.format("Len must be non negative but was %d", len)); + } + if (pos + len > length) { + throw new IndexOutOfBoundsException(); + } + if (len > BYTEBUFFER_COPY_TO_ARRAY_THRESHOLD) { + if (byteBufferView == null) { + byteBufferView = CTypeConversion.asByteBuffer(address, length); + } + byteBufferView.position(pos); + byteBufferView.get(b, off, len); + } else { + for (int i = 0, j = pos; i < len; i++, j++) { + b[off + i] = address.read(j); + } + } + pos += len; + } + + @Override + public ByteBuffer asByteBuffer(int len) { + ByteBuffer result = CTypeConversion.asByteBuffer(address.addressOf(pos), len).order(ByteOrder.BIG_ENDIAN).asReadOnlyBuffer(); + pos += len; + return result; + } + } +} diff --git a/substratevm/src/com.oracle.svm.truffle/src/com/oracle/svm/truffle/isolated/BinaryOutput.java b/substratevm/src/com.oracle.svm.truffle/src/com/oracle/svm/truffle/isolated/BinaryOutput.java new file mode 100644 index 000000000000..8c251b193196 --- /dev/null +++ b/substratevm/src/com.oracle.svm.truffle/src/com/oracle/svm/truffle/isolated/BinaryOutput.java @@ -0,0 +1,667 @@ +/* + * Copyright (c) 2022, 2023, 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. Oracle designates this + * particular file as subject to the "Classpath" exception as provided + * by Oracle in the LICENSE file that accompanied this code. + * + * 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.svm.truffle.isolated; + +import java.io.Closeable; +import java.nio.ByteBuffer; +import java.util.Arrays; +import java.util.Objects; + +import org.graalvm.nativeimage.UnmanagedMemory; +import org.graalvm.nativeimage.c.type.CCharPointer; +import org.graalvm.nativeimage.c.type.CTypeConversion; +import org.graalvm.word.WordFactory; + +/** + * Copy from native-bridge to avoid depenency from now. Keep in sync with native-bridge. + */ +abstract class BinaryOutput { + + /** + * Maximum string length for string encoded by 4 bytes length followed be content. + */ + private static final int MAX_LENGTH = Integer.MAX_VALUE - Integer.BYTES; + /** + * Maximum string length for string encoded by 2 bytes length followed be content. + */ + private static final int MAX_SHORT_LENGTH = Short.MAX_VALUE; + /** + * byte. + */ + static final int LARGE_STRING_TAG = 1 << 7; + + // Type tags used by writeTypedValue + static final byte NULL = 0; + static final byte BOOLEAN = NULL + 1; + static final byte BYTE = BOOLEAN + 1; + static final byte SHORT = BYTE + 1; + static final byte CHAR = SHORT + 1; + static final byte INT = CHAR + 1; + static final byte LONG = INT + 1; + static final byte FLOAT = LONG + 1; + static final byte DOUBLE = FLOAT + 1; + static final byte STRING = DOUBLE + 1; + static final byte ARRAY = STRING + 1; + + private byte[] tempDecodingBuffer; + protected int pos; + + private BinaryOutput() { + } + + /** + * Writes a {@code boolean} as a single byte value. The value {@code true} is written as the + * value {@code (byte)1}, the value {@code false} is written as the value {@code (byte)0}. The + * buffer position is incremented by {@code 1}. + */ + public final void writeBoolean(boolean value) { + write(value ? 1 : 0); + } + + /** + * Writes a {@code byte} as a single byte value. The buffer position is incremented by + * {@code 1}. + */ + public final void writeByte(int value) { + write(value); + } + + /** + * Writes a {@code short} as two bytes, high byte first. The buffer position is incremented by + * {@code 2}. + */ + public final void writeShort(int value) { + write((value >>> 8) & 0xff); + write(value & 0xff); + } + + /** + * Writes a {@code char} as two bytes, high byte first. The buffer position is incremented by + * {@code 2}. + */ + public final void writeChar(int value) { + write((value >>> 8) & 0xff); + write(value & 0xff); + } + + /** + * Writes an {@code int} as four bytes, high byte first. The buffer position is incremented by + * {@code 4}. + */ + public final void writeInt(int value) { + write((value >>> 24) & 0xff); + write((value >>> 16) & 0xff); + write((value >>> 8) & 0xff); + write(value & 0xff); + } + + /** + * Writes a {@code long} as eight bytes, high byte first. The buffer position is incremented by + * {@code 8}. + */ + public final void writeLong(long value) { + write((int) ((value >>> 56) & 0xff)); + write((int) ((value >>> 48) & 0xff)); + write((int) ((value >>> 40) & 0xff)); + write((int) ((value >>> 32) & 0xff)); + write((int) ((value >>> 24) & 0xff)); + write((int) ((value >>> 16) & 0xff)); + write((int) ((value >>> 8) & 0xff)); + write((int) (value & 0xff)); + } + + /** + * Converts a {@code float} value to an {@code int} using the + * {@link Float#floatToIntBits(float)}, and then writes that {@code int} as four bytes, high + * byte first. The buffer position is incremented by {@code 4}. + */ + public final void writeFloat(float value) { + writeInt(Float.floatToIntBits(value)); + } + + /** + * Converts a {@code double} value to a {@code long} using the + * {@link Double#doubleToLongBits(double)}, and then writes that {@code long} as eight bytes, + * high byte first. The buffer position is incremented by {@code 8}. + */ + public final void writeDouble(double value) { + writeLong(Double.doubleToLongBits(value)); + } + + /** + * Writes the lowest byte of the argument as a single byte value. The buffer position is + * incremented by {@code 1}. + */ + public abstract void write(int b); + + /** + * Writes {@code len} bytes from the byte {@code array} starting at offset {@code off}. The + * buffer position is incremented by {@code len}. + */ + public abstract void write(byte[] array, int off, int len); + + /** + * Reserves a buffer space. The reserved space can be used for out parameters. + * + * @param numberOfBytes number of bytes to reserve. + */ + public abstract void skip(int numberOfBytes); + + /** + * Writes a string using a modified UTF-8 encoding in a machine-independent manner. + * + * @throws IllegalArgumentException if the {@code string} cannot be encoded using modified UTF-8 + * encoding. + */ + public final void writeUTF(String string) throws IllegalArgumentException { + int len = string.length(); + int utfLen = 0; + int c; + int count = 0; + + for (int i = 0; i < len; i++) { + c = string.charAt(i); + if ((c >= 0x0001) && (c <= 0x007F)) { + utfLen++; + } else if (c > 0x07FF) { + utfLen += 3; + } else { + utfLen += 2; + } + } + + if (utfLen > MAX_LENGTH) { + throw new IllegalArgumentException("String too long to encode, " + utfLen + " bytes"); + } + int headerSize; + if (utfLen > MAX_SHORT_LENGTH) { + headerSize = Integer.BYTES; + ensureBufferSize(headerSize, utfLen); + tempDecodingBuffer[count++] = (byte) ((LARGE_STRING_TAG | (utfLen >>> 24)) & 0xff); + tempDecodingBuffer[count++] = (byte) ((utfLen >>> 16) & 0xFF); + } else { + headerSize = Short.BYTES; + ensureBufferSize(headerSize, utfLen); + } + tempDecodingBuffer[count++] = (byte) ((utfLen >>> 8) & 0xFF); + tempDecodingBuffer[count++] = (byte) (utfLen & 0xFF); + + int i = 0; + for (; i < len; i++) { + c = string.charAt(i); + if (!((c >= 0x0001) && (c <= 0x007F))) { + break; + } + tempDecodingBuffer[count++] = (byte) c; + } + + for (; i < len; i++) { + c = string.charAt(i); + if ((c >= 0x0001) && (c <= 0x007F)) { + tempDecodingBuffer[count++] = (byte) c; + } else if (c > 0x07FF) { + tempDecodingBuffer[count++] = (byte) (0xE0 | ((c >> 12) & 0x0F)); + tempDecodingBuffer[count++] = (byte) (0x80 | ((c >> 6) & 0x3F)); + tempDecodingBuffer[count++] = (byte) (0x80 | (c & 0x3F)); + } else { + tempDecodingBuffer[count++] = (byte) (0xC0 | ((c >> 6) & 0x1F)); + tempDecodingBuffer[count++] = (byte) (0x80 | (c & 0x3F)); + } + } + write(tempDecodingBuffer, 0, headerSize + utfLen); + } + + /** + * Returns this buffer's position. + */ + public int getPosition() { + return pos; + } + + /** + * Returns true if a value is a typed value writable using + * {@link #writeTypedValue(Object)}, else false. + */ + public static boolean isTypedValue(Object value) { + if (value == null) { + return true; + } + return value instanceof Object[] || value == null || value instanceof Boolean || value instanceof Byte || + value instanceof Short || value instanceof Character || value instanceof Integer || + value instanceof Long || value instanceof Float || value instanceof Double || value instanceof String; + } + + /** + * Writes the value that is represented by the given object, together with information on the + * value's data type. Supported types are boxed Java primitive types, {@link String}, + * {@code null}, and arrays of these types. + * + * @throws IllegalArgumentException when the {@code value} type is not supported or the + * {@code value} is a string which cannot be encoded using modified UTF-8 encoding. + * @see #isTypedValue(Object) to find out whether a value can be serialized. + */ + public final void writeTypedValue(Object value) throws IllegalArgumentException { + if (value instanceof Object[]) { + Object[] arr = (Object[]) value; + writeByte(ARRAY); + writeInt(arr.length); + for (Object arrElement : arr) { + writeTypedValue(arrElement); + } + } else if (value == null) { + writeByte(NULL); + } else if (value instanceof Boolean) { + writeByte(BOOLEAN); + writeBoolean((boolean) value); + } else if (value instanceof Byte) { + writeByte(BYTE); + writeByte((byte) value); + } else if (value instanceof Short) { + writeByte(SHORT); + writeShort((short) value); + } else if (value instanceof Character) { + writeByte(CHAR); + writeChar((char) value); + } else if (value instanceof Integer) { + writeByte(INT); + writeInt((int) value); + } else if (value instanceof Long) { + writeByte(LONG); + writeLong((long) value); + } else if (value instanceof Float) { + writeByte(FLOAT); + writeFloat((float) value); + } else if (value instanceof Double) { + writeByte(DOUBLE); + writeDouble((double) value); + } else if (value instanceof String) { + writeByte(STRING); + writeUTF((String) value); + } else { + throw new IllegalArgumentException(String.format("Unsupported type %s", value.getClass())); + } + } + + /** + * Writes {@code len} bytes from the boolean {@code array} starting at offset {@code off}. The + * value {@code true} is written as the value {@code (byte)1}, the value {@code false} is + * written as the value {@code (byte)0}. The buffer position is incremented by {@code len}. + */ + public final void write(boolean[] array, int off, int len) { + ensureBufferSize(0, len); + for (int i = 0, j = 0; i < len; i++, j++) { + tempDecodingBuffer[j] = (byte) (array[off + i] ? 1 : 0); + } + write(tempDecodingBuffer, 0, len); + } + + /** + * Writes {@code len} shorts from the {@code array} starting at offset {@code off}. The buffer + * position is incremented by {@code 2 * len}. + */ + public final void write(short[] array, int off, int len) { + int size = len * Short.BYTES; + ensureBufferSize(0, size); + for (int i = 0, j = 0; i < len; i++) { + tempDecodingBuffer[j++] = (byte) ((array[off + i] >>> 8) & 0xff); + tempDecodingBuffer[j++] = (byte) (array[off + i] & 0xff); + } + write(tempDecodingBuffer, 0, size); + } + + /** + * Writes {@code len} chars from the {@code array} starting at offset {@code off}. The buffer + * position is incremented by {@code 2 * len}. + */ + public final void write(char[] array, int off, int len) { + int size = len * Character.BYTES; + ensureBufferSize(0, size); + for (int i = 0, j = 0; i < len; i++) { + tempDecodingBuffer[j++] = (byte) ((array[off + i] >>> 8) & 0xff); + tempDecodingBuffer[j++] = (byte) (array[off + i] & 0xff); + } + write(tempDecodingBuffer, 0, size); + } + + /** + * Writes {@code len} ints from the {@code array} starting at offset {@code off}. The buffer + * position is incremented by {@code 4 * len}. + */ + public final void write(int[] array, int off, int len) { + int size = len * Integer.BYTES; + ensureBufferSize(0, size); + for (int i = 0, j = 0; i < len; i++) { + tempDecodingBuffer[j++] = (byte) ((array[off + i] >>> 24) & 0xff); + tempDecodingBuffer[j++] = (byte) ((array[off + i] >>> 16) & 0xff); + tempDecodingBuffer[j++] = (byte) ((array[off + i] >>> 8) & 0xff); + tempDecodingBuffer[j++] = (byte) (array[off + i] & 0xff); + } + write(tempDecodingBuffer, 0, size); + } + + /** + * Writes {@code len} longs from the {@code array} starting at offset {@code off}. The buffer + * position is incremented by {@code 8 * len}. + */ + public final void write(long[] array, int off, int len) { + int size = len * Long.BYTES; + ensureBufferSize(0, size); + for (int i = 0, j = 0; i < len; i++) { + tempDecodingBuffer[j++] = (byte) ((array[off + i] >>> 56) & 0xff); + tempDecodingBuffer[j++] = (byte) ((array[off + i] >>> 48) & 0xff); + tempDecodingBuffer[j++] = (byte) ((array[off + i] >>> 40) & 0xff); + tempDecodingBuffer[j++] = (byte) ((array[off + i] >>> 32) & 0xff); + tempDecodingBuffer[j++] = (byte) ((array[off + i] >>> 24) & 0xff); + tempDecodingBuffer[j++] = (byte) ((array[off + i] >>> 16) & 0xff); + tempDecodingBuffer[j++] = (byte) ((array[off + i] >>> 8) & 0xff); + tempDecodingBuffer[j++] = (byte) (array[off + i] & 0xff); + } + write(tempDecodingBuffer, 0, size); + } + + /** + * Writes {@code len} floats from the {@code array} starting at offset {@code off}. Each + * {@code float} value is converted to an {@code int} using the + * {@link Float#floatToIntBits(float)} and written as an int. The buffer position is incremented + * by {@code 4 * len}. + */ + public final void write(float[] array, int off, int len) { + int size = len * Float.BYTES; + ensureBufferSize(0, size); + for (int i = 0, j = 0; i < len; i++) { + int bits = Float.floatToIntBits(array[off + i]); + tempDecodingBuffer[j++] = (byte) ((bits >>> 24) & 0xff); + tempDecodingBuffer[j++] = (byte) ((bits >>> 16) & 0xff); + tempDecodingBuffer[j++] = (byte) ((bits >>> 8) & 0xff); + tempDecodingBuffer[j++] = (byte) (bits & 0xff); + } + write(tempDecodingBuffer, 0, size); + } + + /** + * Writes {@code len} doubles from the {@code array} starting at offset {@code off}. Each + * {@code double} value is converted to an {@code lang} using the + * {@link Double#doubleToLongBits(double)} and written as a long. The buffer position is + * incremented by {@code 8 * len}. + */ + public final void write(double[] array, int off, int len) { + int size = len * Double.BYTES; + ensureBufferSize(Integer.BYTES, size); + for (int i = 0, j = 0; i < len; i++) { + long bits = Double.doubleToLongBits(array[off + i]); + tempDecodingBuffer[j++] = (byte) ((bits >>> 56) & 0xff); + tempDecodingBuffer[j++] = (byte) ((bits >>> 48) & 0xff); + tempDecodingBuffer[j++] = (byte) ((bits >>> 40) & 0xff); + tempDecodingBuffer[j++] = (byte) ((bits >>> 32) & 0xff); + tempDecodingBuffer[j++] = (byte) ((bits >>> 24) & 0xff); + tempDecodingBuffer[j++] = (byte) ((bits >>> 16) & 0xff); + tempDecodingBuffer[j++] = (byte) ((bits >>> 8) & 0xff); + tempDecodingBuffer[j++] = (byte) (bits & 0xff); + } + write(tempDecodingBuffer, 0, size); + } + + private void ensureBufferSize(int headerSize, int dataSize) { + if (tempDecodingBuffer == null || tempDecodingBuffer.length < (headerSize + dataSize)) { + tempDecodingBuffer = new byte[bufferSize(headerSize, dataSize)]; + } + } + + /** + * Creates a new buffer backed by a byte array. + */ + public static ByteArrayBinaryOutput create() { + return new ByteArrayBinaryOutput(ByteArrayBinaryOutput.INITIAL_SIZE); + } + + /** + * Creates a new buffer wrapping the {@code initialBuffer}. If the {@code initialBuffer} + * capacity is not sufficient for writing the data, a new array is allocated. Always use + * {@link ByteArrayBinaryOutput#getArray()} to obtain the marshaled data. + */ + public static ByteArrayBinaryOutput create(byte[] initialBuffer) { + Objects.requireNonNull(initialBuffer, "InitialBuffer must be non null."); + return new ByteArrayBinaryOutput(initialBuffer); + } + + /** + * Creates a new buffer wrapping an off-heap memory segment starting at {@code address} having + * {@code length} bytes. If the capacity of an off-heap memory segment is not sufficient for + * writing the data, a new off-heap memory is allocated. Always use + * {@link CCharPointerBinaryOutput#getAddress()} to obtain the marshaled data. + * + * @param address the off-heap memory address + * @param length the off-heap memory size + * @param dynamicallyAllocated {@code true} if the memory was dynamically allocated and should + * be freed when the buffer is closed; {@code false} for the stack allocated memory. + */ + public static CCharPointerBinaryOutput create(CCharPointer address, int length, boolean dynamicallyAllocated) { + return new CCharPointerBinaryOutput(address, length, dynamicallyAllocated); + } + + static int bufferSize(int headerSize, int dataSize) { + return headerSize + (dataSize <= MAX_SHORT_LENGTH ? dataSize << 1 : dataSize); + } + + /** + * A {@link BinaryOutput} backed by a byte array. + */ + public static final class ByteArrayBinaryOutput extends BinaryOutput { + + private static final int MAX_ARRAY_SIZE = Integer.MAX_VALUE - 8; + static final int INITIAL_SIZE = 32; + + private byte[] buffer; + + private ByteArrayBinaryOutput(int size) { + buffer = new byte[size]; + } + + private ByteArrayBinaryOutput(byte[] initialBuffer) { + buffer = initialBuffer; + } + + @Override + public void write(int b) { + ensureCapacity(pos + 1); + buffer[pos] = (byte) b; + pos += 1; + } + + @Override + public void write(byte[] b, int off, int len) { + ensureCapacity(pos + len); + System.arraycopy(b, off, buffer, pos, len); + pos += len; + } + + @Override + public void skip(int numberOfBytes) { + ensureCapacity(pos + numberOfBytes); + pos += numberOfBytes; + } + + /** + * Returns the byte array containing the marshalled data. + */ + public byte[] getArray() { + return buffer; + } + + private void ensureCapacity(int neededCapacity) { + if (neededCapacity - buffer.length > 0) { + int newCapacity = buffer.length << 1; + if (newCapacity - neededCapacity < 0) { + newCapacity = neededCapacity; + } + if (newCapacity - MAX_ARRAY_SIZE > 0) { + throw new OutOfMemoryError(); + } + buffer = Arrays.copyOf(buffer, newCapacity); + } + } + + /** + * Creates a new buffer backed by a byte array. The buffer initial size is + * {@code initialSize}. + */ + public static ByteArrayBinaryOutput create(int initialSize) { + return new ByteArrayBinaryOutput(initialSize); + } + } + + /** + * A {@link BinaryOutput} backed by an off-heap memory. + */ + public static final class CCharPointerBinaryOutput extends BinaryOutput implements Closeable { + + /** + * Represents the point at which the average cost of a JNI call exceeds the expense of an + * element by element copy. See {@code java.nio.Bits#JNI_COPY_FROM_ARRAY_THRESHOLD}. + */ + private static final int BYTEBUFFER_COPY_FROM_ARRAY_THRESHOLD = 6; + + private CCharPointer address; + private int length; + private boolean unmanaged; + /** + * ByteBuffer view of this {@link CCharPointerBinaryOutput} direct memory. The ByteBuffer is + * used for bulk data transfers, where the bulk ByteBuffer operations outperform element by + * element copying by an order of magnitude. + */ + private ByteBuffer byteBufferView; + + private CCharPointerBinaryOutput(CCharPointer address, int length, boolean unmanaged) { + this.address = address; + this.length = length; + this.unmanaged = unmanaged; + } + + @Override + public int getPosition() { + checkClosed(); + return super.getPosition(); + } + + /** + * Returns an address of an off-heap memory segment containing the marshalled data. + */ + public CCharPointer getAddress() { + checkClosed(); + return address; + } + + @Override + public void write(int b) { + checkClosed(); + ensureCapacity(pos + 1); + address.write(pos++, (byte) b); + } + + @Override + public void write(byte[] b, int off, int len) { + checkClosed(); + if ((off | len | b.length) < 0 || b.length - off < len) { + throw new IndexOutOfBoundsException("Offset: " + off + ", length: " + len + ", array length: " + b.length); + } + ensureCapacity(pos + len); + if (len > BYTEBUFFER_COPY_FROM_ARRAY_THRESHOLD) { + if (byteBufferView == null) { + byteBufferView = CTypeConversion.asByteBuffer(address, length); + } + byteBufferView.position(pos); + byteBufferView.put(b, off, len); + } else { + for (int i = 0; i < len; i++) { + address.write(pos + i, b[off + i]); + } + } + pos += len; + } + + @Override + public void skip(int numberOfBytes) { + ensureCapacity(pos + numberOfBytes); + pos += numberOfBytes; + } + + /** + * Closes the buffer and frees off-heap allocated resources. + */ + @Override + public void close() { + if (unmanaged) { + UnmanagedMemory.free(address); + byteBufferView = null; + address = WordFactory.nullPointer(); + length = 0; + unmanaged = false; + pos = Integer.MIN_VALUE; + } + } + + private void checkClosed() { + if (pos == Integer.MIN_VALUE) { + throw new IllegalStateException("Already closed"); + } + } + + private void ensureCapacity(int neededCapacity) { + if (neededCapacity - length > 0) { + byteBufferView = null; + int newCapacity = length << 1; + if (newCapacity - neededCapacity < 0) { + newCapacity = neededCapacity; + } + if (newCapacity - Integer.MAX_VALUE > 0) { + throw new OutOfMemoryError(); + } + if (unmanaged) { + address = UnmanagedMemory.realloc(address, WordFactory.unsigned(newCapacity)); + } else { + CCharPointer newAddress = UnmanagedMemory.malloc(newCapacity); + memcpy(newAddress, address, pos); + address = newAddress; + } + length = newCapacity; + unmanaged = true; + } + } + + private static void memcpy(CCharPointer dst, CCharPointer src, int len) { + for (int i = 0; i < len; i++) { + dst.write(i, src.read(i)); + } + } + + /** + * Creates a new buffer backed by an off-heap memory segment. The buffer initial size is + * {@code initialSize}. + */ + public static CCharPointerBinaryOutput create(int initialSize) { + return new CCharPointerBinaryOutput(UnmanagedMemory.malloc(initialSize), initialSize, true); + } + } +} diff --git a/substratevm/src/com.oracle.svm.truffle/src/com/oracle/svm/truffle/isolated/IsolatedCompilableTruffleAST.java b/substratevm/src/com.oracle.svm.truffle/src/com/oracle/svm/truffle/isolated/IsolatedCompilableTruffleAST.java index e3262e183ddf..91bece15a676 100644 --- a/substratevm/src/com.oracle.svm.truffle/src/com/oracle/svm/truffle/isolated/IsolatedCompilableTruffleAST.java +++ b/substratevm/src/com.oracle.svm.truffle/src/com/oracle/svm/truffle/isolated/IsolatedCompilableTruffleAST.java @@ -29,9 +29,6 @@ import java.util.function.Supplier; import org.graalvm.compiler.debug.GraalError; -import org.graalvm.nativebridge.BinaryInput; -import org.graalvm.nativebridge.BinaryOutput; -import org.graalvm.nativebridge.BinaryOutput.ByteArrayBinaryOutput; import org.graalvm.nativeimage.c.function.CEntryPoint; import org.graalvm.nativeimage.c.type.CCharPointer; import org.graalvm.nativeimage.c.type.CTypeConversion; @@ -49,6 +46,7 @@ import com.oracle.svm.graal.isolated.IsolatedObjectProxy; import com.oracle.svm.graal.isolated.IsolatedSpeculationLog; import com.oracle.svm.truffle.api.SubstrateCompilableTruffleAST; +import com.oracle.svm.truffle.isolated.BinaryOutput.ByteArrayBinaryOutput; import com.oracle.truffle.compiler.TruffleCompilable; import jdk.vm.ci.code.InstalledCode; diff --git a/substratevm/src/com.oracle.svm.truffle/src/com/oracle/svm/truffle/isolated/IsolatedTruffleCompilationTask.java b/substratevm/src/com.oracle.svm.truffle/src/com/oracle/svm/truffle/isolated/IsolatedTruffleCompilationTask.java index 9a6a9bdb519b..bedccd6bdd4b 100644 --- a/substratevm/src/com.oracle.svm.truffle/src/com/oracle/svm/truffle/isolated/IsolatedTruffleCompilationTask.java +++ b/substratevm/src/com.oracle.svm.truffle/src/com/oracle/svm/truffle/isolated/IsolatedTruffleCompilationTask.java @@ -28,9 +28,6 @@ import java.util.LinkedHashMap; import java.util.Map; -import org.graalvm.nativebridge.BinaryInput; -import org.graalvm.nativebridge.BinaryOutput; -import org.graalvm.nativebridge.BinaryOutput.ByteArrayBinaryOutput; import org.graalvm.nativeimage.c.function.CEntryPoint; import org.graalvm.nativeimage.c.type.CCharPointer; import org.graalvm.nativeimage.c.type.CTypeConversion; @@ -46,6 +43,7 @@ import com.oracle.svm.graal.isolated.IsolatedObjectConstant; import com.oracle.svm.graal.isolated.IsolatedObjectProxy; import com.oracle.svm.truffle.api.SubstrateCompilableTruffleAST; +import com.oracle.svm.truffle.isolated.BinaryOutput.ByteArrayBinaryOutput; import com.oracle.truffle.compiler.TruffleCompilable; import com.oracle.truffle.compiler.TruffleCompilationTask; import com.oracle.truffle.compiler.TruffleSourceLanguagePosition; diff --git a/truffle/mx.truffle/macro-truffle.properties b/truffle/mx.truffle/macro-truffle.properties index e078b60beeca..3c9001f0a496 100644 --- a/truffle/mx.truffle/macro-truffle.properties +++ b/truffle/mx.truffle/macro-truffle.properties @@ -3,6 +3,8 @@ Args = -H:Features=com.oracle.svm.truffle.TruffleFeature,com.oracle.svm.truffle. -H:MaxRuntimeCompileMethods=2500 \ --initialize-at-build-time=com.oracle.truffle \ --initialize-at-build-time=org.graalvm.shadowed.org.jcodings \ + --initialize-at-build-time=org.graalvm.jniutils \ + --initialize-at-build-time=org.graalvm.nativebridge \ --initialize-at-build-time=com.oracle.truffle.tools.utils.json \ --initialize-at-build-time=org.graalvm.shadowed.org.jline,org.graalvm.shadowed.org.fusesource.jansi \ --initialize-at-run-time=sun.rmi \ @@ -11,6 +13,8 @@ Args = -H:Features=com.oracle.svm.truffle.TruffleFeature,com.oracle.svm.truffle. # The `--add-exports` are a temporary solution for languages on classpath, will be fixed by languages modularization, GR-44217. JavaArgs = -Dtruffle.TruffleRuntime=com.oracle.svm.truffle.api.SubstrateTruffleRuntime \ -Dgraalvm.ForcePolyglotInvalid=false \ + --add-exports com.oracle.truffle.enterprise/com.oracle.truffle.polyglot.enterprise=ALL-UNNAMED \ + --add-exports com.oracle.truffle.enterprise/com.oracle.truffle.runtime.enterprise=ALL-UNNAMED \ --add-exports org.graalvm.truffle.runtime/org.graalvm.compiler.truffle.runtime=ALL-UNNAMED \ --add-exports org.graalvm.truffle.compiler/com.oracle.truffle.compiler=ALL-UNNAMED \ --add-exports org.graalvm.truffle/com.oracle.truffle.api=ALL-UNNAMED \ @@ -48,4 +52,4 @@ JavaArgs = -Dtruffle.TruffleRuntime=com.oracle.svm.truffle.api.SubstrateTruffleR --add-exports org.graalvm.truffle/org.graalvm.shadowed.org.jcodings.transcode=ALL-UNNAMED \ --add-exports org.graalvm.truffle/org.graalvm.shadowed.org.jcodings.transcode.specific=ALL-UNNAMED \ --add-exports org.graalvm.truffle/org.graalvm.shadowed.org.jcodings.unicode=ALL-UNNAMED \ - --add-exports org.graalvm.truffle/org.graalvm.shadowed.org.jcodings.util=ALL-UNNAMED + --add-exports org.graalvm.truffle/org.graalvm.shadowed.org.jcodings.util=ALL-UNNAMED diff --git a/truffle/mx.truffle/suite.py b/truffle/mx.truffle/suite.py index 9b2e7b0d68d9..7fc1065de59c 100644 --- a/truffle/mx.truffle/suite.py +++ b/truffle/mx.truffle/suite.py @@ -244,7 +244,7 @@ "javaCompliance" : "17+", "workingSets" : "API,Truffle", }, - + "com.oracle.truffle.runtime" : { "subDir" : "src", "sourceDirs" : ["src"], @@ -265,13 +265,16 @@ "jdk.vm.ci.code", "jdk.vm.ci.code.stack", ], + "java.base" : [ + "jdk.internal.module", + ], }, "annotationProcessors" : ["TRUFFLE_DSL_PROCESSOR", "TRUFFLE_LIBGRAAL_PROCESSOR"], "checkstyle" : "com.oracle.truffle.api", "javaCompliance" : "17+", "workingSets" : "API,Truffle", }, - + "com.oracle.truffle.compiler" : { "subDir" : "src", "sourceDirs" : ["src"], @@ -1160,7 +1163,7 @@ ], "exports" : [ # Qualified exports - "com.oracle.truffle.compiler to org.graalvm.truffle.runtime, jdk.internal.vm.compiler, com.oracle.graal.graal_enterprise, org.graalvm.nativeimage.builder", + "com.oracle.truffle.compiler to org.graalvm.truffle.runtime, jdk.internal.vm.compiler, com.oracle.truffle.enterprise, com.oracle.graal.graal_enterprise, org.graalvm.nativeimage.builder", "com.oracle.truffle.compiler.hotspot to org.graalvm.truffle.runtime, jdk.internal.vm.compiler", "com.oracle.truffle.compiler.hotspot.libgraal to org.graalvm.truffle.runtime, jdk.internal.vm.compiler" ], @@ -1184,7 +1187,7 @@ "description" : "Truffle compiler API.", "maven": True, }, - + "TRUFFLE_RUNTIME" : { # This distribution defines a module. "moduleInfo" : { @@ -1196,8 +1199,8 @@ ], "exports" : [ # Qualified exports - "org.graalvm.compiler.truffle.runtime to jdk.internal.vm.compiler, com.oracle.graal.graal_enterprise, com.oracle.svm.svm_enterprise, org.graalvm.nativeimage.builder", - "org.graalvm.compiler.truffle.runtime.hotspot to jdk.internal.vm.compiler" + "org.graalvm.compiler.truffle.runtime to org.graalvm.truffle, jdk.internal.vm.compiler, com.oracle.truffle.enterprise, com.oracle.svm.svm_enterprise, org.graalvm.nativeimage.builder", + "org.graalvm.compiler.truffle.runtime.hotspot to org.graalvm.truffle, jdk.internal.vm.compiler", ], "uses" : [ "com.oracle.truffle.api.impl.TruffleLocator", @@ -1231,7 +1234,6 @@ "description" : "Truffle runtime distribution.", "maven": True, }, - "TRUFFLE_API" : { # This distribution defines a module. @@ -1268,8 +1270,8 @@ "com.oracle.truffle.api.library.provider", # Qualified exports - "com.oracle.truffle.api.impl to jdk.internal.vm.compiler, org.graalvm.locator, org.graalvm.truffle.runtime", - "com.oracle.truffle.object to jdk.internal.vm.compiler, com.oracle.graal.graal_enterprise, org.graalvm.truffle.runtime", + "com.oracle.truffle.api.impl to jdk.internal.vm.compiler, org.graalvm.locator, org.graalvm.truffle.runtime, org.graalvm.nativeimage.builder", + "com.oracle.truffle.object to jdk.internal.vm.compiler, com.oracle.truffle.enterprise, org.graalvm.truffle.runtime, org.graalvm.nativeimage.builder", ], "uses" : [ "com.oracle.truffle.api.TruffleRuntimeAccess", @@ -1294,10 +1296,10 @@ "com.oracle.truffle.api.instrumentation.provider", "com.oracle.truffle.api.library.provider", # Qualified exports - "com.oracle.truffle.api* to jdk.internal.vm.compiler, jdk.internal.vm.compiler.truffle.jfr, com.oracle.graal.graal_enterprise, com.oracle.svm.svm_enterprise, org.graalvm.nativeimage.builder, org.graalvm.truffle.runtime", - "com.oracle.truffle.api.impl to jdk.internal.vm.compiler,org.graalvm.locator, org.graalvm.truffle.runtime", - "com.oracle.truffle.api to org.graalvm.locator, org.graalvm.nativeimage.builder, org.graalvm.truffle.runtime", - "com.oracle.truffle.object to jdk.internal.vm.compiler, com.oracle.graal.graal_enterprise, org.graalvm.truffle.runtime", + "com.oracle.truffle.api* to jdk.internal.vm.compiler, jdk.internal.vm.compiler.truffle.jfr, com.oracle.truffle.enterprise, com.oracle.svm.svm_enterprise, org.graalvm.nativeimage.builder, org.graalvm.truffle.runtime", + "com.oracle.truffle.api.impl to jdk.internal.vm.compiler,org.graalvm.locator, org.graalvm.truffle.runtime, org.graalvm.nativeimage.builder", + "com.oracle.truffle.api to org.graalvm.locator, org.graalvm.nativeimage.builder, org.graalvm.truffle.runtime, org.graalvm.nativeimage.builder", + "com.oracle.truffle.object to jdk.internal.vm.compiler, com.oracle.truffle.enterprise, org.graalvm.truffle.runtime, org.graalvm.nativeimage.builder", ], }, "subDir" : "src", @@ -1326,7 +1328,7 @@ "moduleInfo" : "closed", } }, - + "TRUFFLE_LIBGRAAL_TRUFFLEATTACH" : { "native" : True, "platformDependent" : True, @@ -1500,7 +1502,7 @@ "description" : "The Truffle DSL Processor generates source code for nodes that are declared using the DSL.", "allowsJavadocWarnings": True, }, - + "TRUFFLE_LIBGRAAL_PROCESSOR" : { "subDir" : "src", "dependencies" : ["com.oracle.truffle.libgraal.processor"], @@ -1508,7 +1510,7 @@ "description" : "The Truffle libgraal processor is shared across Truffle and the compiler to generate code for the compiler bridge.", "allowsJavadocWarnings": True, }, - + "TRUFFLE_SL" : { "subDir" : "src", "moduleInfo" : { diff --git a/truffle/src/com.oracle.truffle.api/src/com/oracle/truffle/api/Truffle.java b/truffle/src/com.oracle.truffle.api/src/com/oracle/truffle/api/Truffle.java index 2e1ba4d7fff4..cc49bc580ae4 100644 --- a/truffle/src/com.oracle.truffle.api/src/com/oracle/truffle/api/Truffle.java +++ b/truffle/src/com.oracle.truffle.api/src/com/oracle/truffle/api/Truffle.java @@ -115,6 +115,12 @@ public TruffleRuntime run() { try { ClassLoader cl = Thread.currentThread().getContextClassLoader(); Class runtimeClass = Class.forName(runtimeClassName, false, cl); + try { + Class modulesSupport = Class.forName("org.graalvm.compiler.truffle.runtime.ModulesSupport"); + modulesSupport.getMethod("exportJVMCI", Class.class).invoke(null, runtimeClass); + } catch (ClassNotFoundException e) { + // we ignore if modules support is not available. + } return (TruffleRuntime) runtimeClass.getDeclaredConstructor().newInstance(); } catch (Throwable e) { // Fail fast for other errors diff --git a/truffle/src/com.oracle.truffle.api/src/com/oracle/truffle/api/impl/Accessor.java b/truffle/src/com.oracle.truffle.api/src/com/oracle/truffle/api/impl/Accessor.java index 0b60ff96ddb9..984538ca17c4 100644 --- a/truffle/src/com.oracle.truffle.api/src/com/oracle/truffle/api/impl/Accessor.java +++ b/truffle/src/com.oracle.truffle.api/src/com/oracle/truffle/api/impl/Accessor.java @@ -1224,6 +1224,9 @@ public AbstractFastThreadLocal getContextThreadLocal() { } public abstract boolean isLegacyCompilerOption(String key); + + public abstract ThreadLocal createTerminatingThreadLocal(Supplier initialValue, Consumer onThreadTermination); + } public abstract static class LanguageProviderSupport extends Support { diff --git a/truffle/src/com.oracle.truffle.api/src/com/oracle/truffle/api/impl/DefaultRuntimeAccessor.java b/truffle/src/com.oracle.truffle.api/src/com/oracle/truffle/api/impl/DefaultRuntimeAccessor.java index 816953de8940..af29c1b73105 100644 --- a/truffle/src/com.oracle.truffle.api/src/com/oracle/truffle/api/impl/DefaultRuntimeAccessor.java +++ b/truffle/src/com.oracle.truffle.api/src/com/oracle/truffle/api/impl/DefaultRuntimeAccessor.java @@ -40,7 +40,9 @@ */ package com.oracle.truffle.api.impl; +import java.util.function.Consumer; import java.util.function.Function; +import java.util.function.Supplier; import org.graalvm.options.OptionDescriptors; import org.graalvm.options.OptionValues; @@ -271,6 +273,11 @@ public AbstractFastThreadLocal getContextThreadLocal() { return DefaultContextThreadLocal.SINGLETON; } + @Override + public ThreadLocal createTerminatingThreadLocal(Supplier initialValue, Consumer onThreadTermination) { + return ThreadLocal.withInitial(initialValue); + } + } } diff --git a/truffle/src/com.oracle.truffle.runtime/META-INF/services/org.graalvm.compiler.truffle.jfr.EventFactory$Provider b/truffle/src/com.oracle.truffle.runtime/src/META-INF/services/org.graalvm.compiler.truffle.jfr.EventFactory$Provider similarity index 100% rename from truffle/src/com.oracle.truffle.runtime/META-INF/services/org.graalvm.compiler.truffle.jfr.EventFactory$Provider rename to truffle/src/com.oracle.truffle.runtime/src/META-INF/services/org.graalvm.compiler.truffle.jfr.EventFactory$Provider diff --git a/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/GraalRuntimeSupport.java b/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/GraalRuntimeSupport.java index e09e1f20d041..549b582dbb7e 100644 --- a/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/GraalRuntimeSupport.java +++ b/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/GraalRuntimeSupport.java @@ -40,7 +40,9 @@ */ package org.graalvm.compiler.truffle.runtime; +import java.util.function.Consumer; import java.util.function.Function; +import java.util.function.Supplier; import org.graalvm.compiler.truffle.runtime.GraalTruffleRuntime.CompilerOptionsDescriptors; import org.graalvm.options.OptionDescriptors; @@ -65,6 +67,8 @@ import com.oracle.truffle.api.nodes.Node; import com.oracle.truffle.api.nodes.RootNode; +import jdk.vm.ci.services.Services; + final class GraalRuntimeSupport extends RuntimeSupport { GraalRuntimeSupport(Object permission) { @@ -366,4 +370,9 @@ public AbstractFastThreadLocal getContextThreadLocal() { return local; } + @Override + public ThreadLocal createTerminatingThreadLocal(Supplier initialValue, Consumer onThreadTermination) { + return Services.createTerminatingThreadLocal(initialValue, onThreadTermination); + } + } diff --git a/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/hotspot/ModulesSupport.java b/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/ModulesSupport.java similarity index 55% rename from truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/hotspot/ModulesSupport.java rename to truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/ModulesSupport.java index 1fc2ce8f61f5..6383c0c89c61 100644 --- a/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/hotspot/ModulesSupport.java +++ b/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/ModulesSupport.java @@ -38,20 +38,63 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ -package org.graalvm.compiler.truffle.runtime.hotspot; +package org.graalvm.compiler.truffle.runtime; -final class ModulesSupport { +import java.lang.module.ModuleDescriptor.Requires; + +import org.graalvm.compiler.truffle.runtime.hotspot.HotSpotTruffleRuntimeAccess; + +import jdk.internal.module.Modules; + +public final class ModulesSupport { + + private static final boolean AVAILABLE; static { - loadModulesSupportLibrary(); + AVAILABLE = loadModulesSupportLibrary(); + + if (AVAILABLE) { + // this is the only access we really need to request natively using JNI. + // after that we can access through the Modules class + addExports0(ModulesSupport.class.getModule().getLayer().findModule("java.base").orElseThrow(), "jdk.internal.module", ModulesSupport.class.getModule()); + } } private ModulesSupport() { } - static void addExports(Module m1, String pn, Module m2) { + public static boolean exportJVMCI(Class toClass) { + Module jvmciModule = HotSpotTruffleRuntimeAccess.class.getModule().getLayer().findModule("jdk.internal.vm.ci").orElse(null); + if (jvmciModule == null) { + // jvmci not found -> fallback to default runtime + return false; + } + addExportsRecursive(jvmciModule, toClass.getModule()); + return true; + } - addExports0(m1, pn, m2); + private static void addExportsRecursive(Module jvmciModule, Module runtimeModule) { + for (String pn : jvmciModule.getPackages()) { + ModulesSupport.addExports(jvmciModule, pn, runtimeModule); + } + for (Requires requires : runtimeModule.getDescriptor().requires()) { + Module requiredModule = ModulesSupport.class.getModule().getLayer().findModule(requires.name()).orElse(null); + if (requiredModule != null) { + if (requiredModule.getName().equals("java.base")) { + continue; + } + addExportsRecursive(jvmciModule, requiredModule); + } + } + } + + public static void addExports(Module m1, String pn, Module m2) { + // we check available to avoid illegal access errors for the Modules class + if (AVAILABLE) { + Modules.addExports(m1, pn, m2); + } else { + throw new UnsupportedOperationException(); + } } private static boolean loadModulesSupportLibrary() { @@ -72,6 +115,6 @@ private static boolean loadModulesSupportLibrary() { } } - private static native void addExports0(Module runtimeModule, String packageName, Module compilerModule); + private static native void addExports0(Module m1, String pn, Module m2); } diff --git a/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/hotspot/HotSpotTruffleRuntime.java b/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/hotspot/HotSpotTruffleRuntime.java index bf3111559199..d2505eec6c6e 100644 --- a/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/hotspot/HotSpotTruffleRuntime.java +++ b/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/hotspot/HotSpotTruffleRuntime.java @@ -52,6 +52,7 @@ import java.util.Objects; import java.util.concurrent.ExecutionException; import java.util.function.Consumer; +import java.util.function.Supplier; import org.graalvm.compiler.truffle.runtime.BackgroundCompileQueue; import org.graalvm.compiler.truffle.runtime.CompilationTask; @@ -90,6 +91,7 @@ import jdk.vm.ci.meta.ResolvedJavaType; import jdk.vm.ci.meta.SpeculationLog; import jdk.vm.ci.runtime.JVMCI; +import jdk.vm.ci.services.Services; import sun.misc.Unsafe; /** @@ -729,4 +731,9 @@ public boolean isLibGraalCompilationEnabled() { return compilationSupport instanceof LibGraalTruffleCompilationSupport; } + @SuppressWarnings("static-method") + public ThreadLocal createTerminatingThreadLocal(Supplier initialValue, Consumer onThreadTermination) { + return Services.createTerminatingThreadLocal(initialValue, onThreadTermination); + } + } diff --git a/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/hotspot/HotSpotTruffleRuntimeAccess.java b/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/hotspot/HotSpotTruffleRuntimeAccess.java index 2cffb2c382c7..052df247267e 100644 --- a/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/hotspot/HotSpotTruffleRuntimeAccess.java +++ b/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/hotspot/HotSpotTruffleRuntimeAccess.java @@ -40,15 +40,16 @@ */ package org.graalvm.compiler.truffle.runtime.hotspot; +import org.graalvm.compiler.truffle.runtime.ModulesSupport; import org.graalvm.compiler.truffle.runtime.hotspot.libgraal.LibGraalTruffleCompilationSupport; import org.graalvm.libgraal.LibGraal; import com.oracle.truffle.api.TruffleRuntime; import com.oracle.truffle.api.TruffleRuntimeAccess; import com.oracle.truffle.api.impl.DefaultTruffleRuntime; -import com.oracle.truffle.compiler.TruffleCompilable; import com.oracle.truffle.compiler.TruffleCompilationSupport; +import jdk.internal.module.Modules; import jdk.vm.ci.hotspot.HotSpotJVMCIRuntime; import jdk.vm.ci.hotspot.HotSpotVMConfigAccess; import jdk.vm.ci.runtime.JVMCI; @@ -74,20 +75,9 @@ public int getPriority() { } protected static TruffleRuntime createRuntime() { - Module runtimeModule = HotSpotTruffleRuntimeAccess.class.getModule(); - Module compilerAPIModule = TruffleCompilable.class.getModule(); - Module jvmciModule = HotSpotTruffleRuntimeAccess.class.getModule().getLayer().findModule("jdk.internal.vm.ci").orElse(null); - - if (jvmciModule == null) { - // jvmci not found -> fallback to default runtime + if (!ModulesSupport.exportJVMCI(HotSpotTruffleRuntimeAccess.class)) { return null; } - - for (String pn : jvmciModule.getPackages()) { - ModulesSupport.addExports(jvmciModule, pn, runtimeModule); - ModulesSupport.addExports(jvmciModule, pn, compilerAPIModule); - } - Services.initializeJVMCI(); HotSpotJVMCIRuntime hsRuntime = (HotSpotJVMCIRuntime) JVMCI.getRuntime(); HotSpotVMConfigAccess config = new HotSpotVMConfigAccess(hsRuntime.getConfigStore()); @@ -96,7 +86,6 @@ protected static TruffleRuntime createRuntime() { // compilation disabled in host VM -> fallback to default runtime return null; } - TruffleCompilationSupport compilationSupport; if (LibGraal.isAvailable()) { compilationSupport = new LibGraalTruffleCompilationSupport(); @@ -108,7 +97,7 @@ protected static TruffleRuntime createRuntime() { // jargraal compiler module not found -> fallback to default runtime return null; } - ModulesSupport.addExports(compilerModule, "org.graalvm.compiler.truffle.compiler.hotspot", runtimeModule); + Modules.addExports(compilerModule, "org.graalvm.compiler.truffle.compiler.hotspot", HotSpotTruffleRuntimeAccess.class.getModule()); Class hotspotCompilationSupport = Class.forName("org.graalvm.compiler.truffle.compiler.hotspot.HotSpotTruffleCompilationSupport"); compilationSupport = (TruffleCompilationSupport) hotspotCompilationSupport.getConstructor().newInstance(); } catch (ReflectiveOperationException e) { diff --git a/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/hotspot/HotSpotTruffleRuntimeServices.java b/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/hotspot/HotSpotTruffleRuntimeServices.java index 31945aec9765..4625e19d2ba3 100644 --- a/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/hotspot/HotSpotTruffleRuntimeServices.java +++ b/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/hotspot/HotSpotTruffleRuntimeServices.java @@ -80,4 +80,5 @@ public static SpeculationLog getCompilationSpeculationLog(OptimizedCallTarget ca compilationSpeculationLog.collectFailedSpeculations(); return compilationSpeculationLog; } + } diff --git a/truffle/src/org.graalvm.compiler.truffle.libgraal.truffleattach/src/truffle_attach.cc b/truffle/src/org.graalvm.compiler.truffle.libgraal.truffleattach/src/truffle_attach.cc index 069dbf1f008a..0b1a480bb8e6 100644 --- a/truffle/src/org.graalvm.compiler.truffle.libgraal.truffleattach/src/truffle_attach.cc +++ b/truffle/src/org.graalvm.compiler.truffle.libgraal.truffleattach/src/truffle_attach.cc @@ -47,7 +47,7 @@ static void addExports(JNIEnv* jniEnv, jobject m1, jobject pn, jobject m2) { extern "C" { #endif -JNIEXPORT void JNICALL Java_org_graalvm_compiler_truffle_runtime_hotspot_ModulesSupport_addExports0(JNIEnv *env, jclass clz, jobject m1, jobject pn, jobject m2) { +JNIEXPORT void JNICALL Java_org_graalvm_compiler_truffle_runtime_ModulesSupport_addExports0(JNIEnv *env, jclass clz, jobject m1, jobject pn, jobject m2) { addExports(env, m1, pn, m2); } From e4e08be38e1d1314b3f92657f231e640a57c8b14 Mon Sep 17 00:00:00 2001 From: Christian Humer Date: Thu, 29 Jun 2023 18:50:15 +0200 Subject: [PATCH 17/43] Refactor Truffle optimizing runtime package. Note this is an incompatible change if you were depending on the optimizing runtime classes. --- compiler/mx.compiler/suite.py | 4 - .../core/test/VerifyBailoutUsage.java | 4 +- .../core/test/VerifySystemPropertyUsage.java | 2 +- .../core/test/VerifyUnsafeAccess.java | 2 +- .../hotspot/test/CompileTheWorld.java | 7 +- .../hotspot/test/LibGraalCompilerTest.java | 5 +- .../test/AOTSupportCompilationTest.java | 2 +- .../test/AbstractSplittingStrategyTest.java | 8 +- .../test/AgnosticInliningPhaseTest.java | 4 +- ...locationReporterPartialEvaluationTest.java | 2 +- .../AssumedValuePartialEvaluationTest.java | 2 +- .../test/AssumptionPartialEvaluationTest.java | 4 +- .../test/BeginNodeOptimizationTest.java | 2 +- .../truffle/test/BytecodeOSRNodeTest.java | 7 +- .../test/CastExactPartialEvaluationTest.java | 2 +- .../truffle/test/CodeInvalidationTest.java | 4 +- ...nalWeakReferencePartialEvaluationTest.java | 2 +- .../truffle/test/CompilationMemoryTest.java | 8 +- .../test/CompilerInitializationTest.java | 2 +- .../truffle/test/CompilerLoggingTest.java | 8 +- .../test/ContextLookupCompilationTest.java | 4 +- .../test/DFAPartialEvaluationTest.java | 2 +- .../truffle/test/DeoptInvalidateListener.java | 7 +- .../DynamicObjectPartialEvaluationTest.java | 2 +- .../truffle/test/EncodedGraphCacheTest.java | 6 +- .../compiler/truffle/test/EngineModeTest.java | 6 +- .../truffle/test/ExceptionActionTest.java | 9 +- .../test/ExitDuringCompilationTest.java | 8 +- .../test/ExplodeLoopBlockDuplicationTest.java | 2 +- .../truffle/test/FlushEngineQueueTest.java | 2 +- .../test/FrameAccessVerificationTest.java | 2 +- .../truffle/test/FrameDescriptorTest.java | 2 +- .../test/GenerateInlineCompilationTest.java | 2 +- .../test/GetRootNodeCompilationTest.java | 2 +- .../test/GraalTruffleRuntimeListenerTest.java | 8 +- .../truffle/test/HashCodeIntrinsicTest.java | 2 +- .../truffle/test/HostInliningTest.java | 4 +- .../truffle/test/IndirectCallSiteTest.java | 10 +-- .../test/InstrumentBranchesPhaseTest.java | 2 +- .../test/LanguageContextFreedTest.java | 5 +- .../truffle/test/LazyClassLoadingTest.java | 4 +- .../truffle/test/LibraryCompilationTest.java | 2 +- .../test/LibrarySplittingStrategyTest.java | 2 +- .../truffle/test/LoopNodeOSRTest.java | 4 +- .../test/LoopNodePartialEvaluationTest.java | 2 +- .../truffle/test/MaterializedFrameTest.java | 2 +- .../truffle/test/MergeExplodeProxyTest.java | 2 +- .../MultiTierAssumptionInvalidationTest.java | 2 +- .../test/MultiTierCompilationTest.java | 6 +- .../compiler/truffle/test/NodeLimitTest.java | 4 +- .../test/NodeSplittingStrategyTest.java | 6 +- .../truffle/test/OptimizedBlockNodeTest.java | 6 +- .../truffle/test/OptimizedCallTargetTest.java | 8 +- .../test/OptimizedOSRLoopNodeTest.java | 14 +-- .../truffle/test/OverrideOptionsTest.java | 4 +- .../truffle/test/PartialEvaluationTest.java | 4 +- .../truffle/test/PerformanceWarningTest.java | 6 +- .../test/PolyglotEngineOptionsTest.java | 5 +- ...agateHotnessToLexicalSingleCallerTest.java | 4 +- .../test/ResourceLimitsCompilationTest.java | 2 +- .../test/RewriteDuringCompilationTest.java | 4 +- .../test/SafepointRethrowDeoptPETest.java | 2 +- .../test/SimplePartialEvaluationTest.java | 2 +- .../StringNodeInliningCompilationTest.java | 2 +- .../test/TestWithSynchronousCompiling.java | 3 +- .../ThreadsActivationCompilationTest.java | 2 +- .../truffle/test/TraceCompilationTest.java | 3 +- .../test/TransferToInterpreterTest.java | 4 +- .../test/TruffleBoundaryExceptionsTest.java | 12 +-- .../test/TruffleBoundaryInliningTest.java | 2 +- .../truffle/test/TruffleCompilerImplTest.java | 4 +- .../test/TruffleContextCompilationTest.java | 2 +- .../test/TruffleReturnBoxedParameterTest.java | 2 +- ...ffleToTruffleCallExceptionHandlerTest.java | 4 +- .../test/UnrollLoopBlockDuplicationTest.java | 2 +- .../builtins/SLCallUntilOptimizedBuiltin.java | 3 +- .../builtins/SLDisableSplittingBuiltin.java | 4 +- .../test/builtins/SLGetOptionBuiltin.java | 4 +- .../test/builtins/SLGraalRuntimeBuiltin.java | 5 +- .../test/builtins/SLIsOptimizedBuiltin.java | 3 +- .../SLWaitForOptimizationBuiltin.java | 5 +- .../test/collection/BTreeQueueTest.java | 3 +- .../DelegatingBlockingQueueTest.java | 5 +- .../libgraal/JNIExceptionWrapperTest.java | 4 +- .../strings/TStringConstantFoldingTest.java | 2 +- .../meta/HotSpotGraphBuilderPlugins.java | 2 +- .../truffle/compiler/KnownTruffleTypes.java | 10 +-- .../compiler/host/TruffleKnownHostTypes.java | 2 +- .../hotspot/HotSpotKnownTruffleTypes.java | 4 +- .../HotSpotTruffleGraphBuilderPlugins.java | 2 +- ...otSpotTruffleSafepointLoweringSnippet.java | 4 +- .../compiler/phases/InstrumentPhase.java | 8 +- .../truffle/HSTruffleCompilerRuntime.java | 2 +- .../truffle/TruffleFromLibGraalCalls.java | 2 +- .../truffle/TruffleToLibGraalEntryPoints.java | 62 ++++++------- .../native-image/native-image.properties | 2 +- .../svm/truffle/tck/PermissionsFeature.java | 2 +- .../oracle/svm/truffle/TruffleFeature.java | 8 +- .../oracle/svm/truffle/TruffleJFRFeature.java | 6 +- .../oracle/svm/truffle/TruffleSupport.java | 10 +-- .../truffle/api/SubstrateFastThreadLocal.java | 2 +- .../api/SubstrateOptimizedCallTarget.java | 4 +- .../truffle/api/SubstrateTruffleRuntime.java | 14 +-- .../IsolatedTruffleRuntimeSupport.java | 6 +- truffle/docs/HostCompilation.md | 2 +- truffle/docs/Optimizing.md | 18 ++-- truffle/docs/TraversingCompilationQueue.md | 8 +- truffle/docs/splitting/Splitting.md | 2 +- truffle/mx.truffle/macro-truffle.properties | 2 +- truffle/mx.truffle/suite.py | 14 +-- .../src/com/oracle/truffle/api/Truffle.java | 2 +- .../com/oracle/truffle/api/impl/Accessor.java | 2 +- .../com/oracle/truffle/api/impl/TVMCI.java | 2 +- .../oracle/truffle/api/nodes/BlockNode.java | 2 +- ...om.oracle.truffle.api.TruffleRuntimeAccess | 2 +- ...com.oracle.truffle.runtime.LoopNodeFactory | 1 + ....truffle.runtime.jfr.EventFactory$Provider | 1 + ...compiler.truffle.jfr.EventFactory$Provider | 1 - ...m.compiler.truffle.runtime.LoopNodeFactory | 1 - .../runtime/AbstractCompilationTask.java | 4 +- .../AbstractGraalTruffleRuntimeListener.java | 2 +- .../runtime/AbstractOptimizedLoopNode.java | 2 +- .../runtime/BackgroundCompileQueue.java | 2 +- .../truffle/runtime/BaseOSRRootNode.java | 2 +- .../truffle/runtime/BytecodeOSRMetadata.java | 2 +- .../truffle/runtime/BytecodeOSRRootNode.java | 2 +- .../truffle/runtime/CompilationState.java | 2 +- .../truffle/runtime/CompilationTask.java | 2 +- .../runtime/DefaultLoopNodeFactory.java | 2 +- .../runtime/DynamicThresholdsQueue.java | 2 +- .../truffle/runtime/EngineCacheSupport.java | 2 +- .../oracle}/truffle/runtime/EngineData.java | 86 +++++++++---------- .../truffle/runtime/FixedPointMath.java | 2 +- .../truffle/runtime/FloodControlHandler.java | 2 +- .../truffle/runtime/GraalFastThreadLocal.java | 6 +- .../truffle/runtime/GraalFrameInstance.java | 2 +- .../runtime/GraalOSRFrameInstance.java | 2 +- .../truffle/runtime/GraalRuntimeAccessor.java | 2 +- .../runtime/GraalRuntimeServiceProvider.java | 2 +- .../truffle/runtime/GraalRuntimeSupport.java | 4 +- .../oracle}/truffle/runtime/GraalTVMCI.java | 2 +- .../truffle/runtime/GraalTestTVMCI.java | 5 +- .../truffle/runtime/GraalTruffleRuntime.java | 22 ++--- .../runtime/GraalTruffleRuntimeListener.java | 2 +- ...GraalTruffleRuntimeListenerDispatcher.java | 2 +- .../truffle/runtime/InlineDecision.java | 2 +- .../truffle/runtime/LoopNodeFactory.java | 2 +- .../oracle}/truffle/runtime/ModuleUtil.java | 2 +- .../truffle/runtime/ModulesSupport.java | 4 +- .../truffle/runtime/OptimizedAssumption.java | 2 +- .../truffle/runtime/OptimizedBlockNode.java | 2 +- .../truffle/runtime/OptimizedCallTarget.java | 4 +- .../runtime/OptimizedDirectCallNode.java | 2 +- .../runtime/OptimizedIndirectCallNode.java | 2 +- .../truffle/runtime/OptimizedLoopNode.java | 2 +- .../truffle/runtime/OptimizedOSRLoopNode.java | 2 +- .../runtime/OptimizedRuntimeOptions.java | 2 +- .../truffle/runtime/SuppressFBWarnings.java | 2 +- .../runtime/TraversingBlockingQueue.java | 2 +- .../truffle/runtime/TruffleCallBoundary.java | 2 +- .../truffle/runtime/TruffleInlining.java | 2 +- .../runtime/TruffleSplittingStrategy.java | 2 +- .../oracle}/truffle/runtime/TruffleTypes.java | 2 +- .../runtime/collection/ArrayQueue.java | 2 +- .../runtime/collection/BTreeQueue.java | 2 +- .../collection/DelegatingBlockingQueue.java | 2 +- .../runtime/collection/SerialQueue.java | 2 +- .../truffle/runtime/debug/JFRListener.java | 24 +++--- .../runtime/debug/StatisticsListener.java | 15 ++-- .../debug/TraceASTCompilationListener.java | 13 ++- .../debug/TraceCompilationListener.java | 19 ++-- .../TraceCompilationPolymorphismListener.java | 13 ++- .../runtime/debug/TraceSplittingListener.java | 13 ++- .../hotspot/HotSpotFastThreadLocal.java | 5 +- .../hotspot/HotSpotOptimizedCallTarget.java | 11 ++- .../hotspot/HotSpotThreadLocalHandshake.java | 2 +- .../hotspot/HotSpotTruffleRuntime.java | 19 ++-- .../hotspot/HotSpotTruffleRuntimeAccess.java | 9 +- .../HotSpotTruffleRuntimeServices.java | 4 +- .../runtime/hotspot/libgraal/BinaryInput.java | 30 +++---- .../hotspot/libgraal/BinaryOutput.java | 2 +- .../libgraal/DestroyedIsolateException.java | 2 +- .../runtime/hotspot}/libgraal/LibGraal.java | 2 +- .../LibGraalCompilationResultInfo.java | 4 +- .../hotspot/libgraal/LibGraalGraphInfo.java | 4 +- .../LibGraalHotSpotTruffleCompiler.java | 11 +-- .../hotspot}/libgraal/LibGraalIsolate.java | 2 +- .../hotspot}/libgraal/LibGraalObject.java | 2 +- .../hotspot}/libgraal/LibGraalScope.java | 4 +- .../libgraal/LibGraalScopedHandle.java | 2 +- .../libgraal/LibGraalStringSupplier.java | 6 +- .../LibGraalTruffleCompilationSupport.java | 12 +-- .../TruffleFromLibGraalEntryPoints.java | 9 +- .../libgraal/TruffleToLibGraalCalls.java | 2 +- .../runtime}/jfr/CompilationEvent.java | 2 +- .../jfr/CompilationStatisticsEvent.java | 2 +- .../runtime}/jfr/DeoptimizationEvent.java | 2 +- .../oracle/truffle/runtime}/jfr/Event.java | 2 +- .../truffle/runtime}/jfr/EventFactory.java | 2 +- .../runtime}/jfr/InvalidationEvent.java | 2 +- .../runtime}/jfr/RootFunctionEvent.java | 2 +- .../jfr/impl/CompilationEventImpl.java | 5 +- .../jfr/impl/CompilationFailureEventImpl.java | 2 +- .../impl/CompilationStatisticsEventImpl.java | 5 +- .../jfr/impl/DeoptimizationEventImpl.java | 5 +- .../runtime}/jfr/impl/EventFactoryImpl.java | 16 ++-- .../jfr/impl/InvalidationEventImpl.java | 5 +- .../runtime}/jfr/impl/ProviderImpl.java | 5 +- .../jfr/impl/RootFunctionEventImpl.java | 4 +- .../TruffleRuntimeServices.java | 2 +- .../src/truffle_attach.cc | 2 +- wasm/README.md | 6 +- 212 files changed, 534 insertions(+), 550 deletions(-) create mode 100644 truffle/src/com.oracle.truffle.runtime/src/META-INF/services/com.oracle.truffle.runtime.LoopNodeFactory create mode 100644 truffle/src/com.oracle.truffle.runtime/src/META-INF/services/com.oracle.truffle.runtime.jfr.EventFactory$Provider delete mode 100644 truffle/src/com.oracle.truffle.runtime/src/META-INF/services/org.graalvm.compiler.truffle.jfr.EventFactory$Provider delete mode 100644 truffle/src/com.oracle.truffle.runtime/src/META-INF/services/org.graalvm.compiler.truffle.runtime.LoopNodeFactory rename truffle/src/com.oracle.truffle.runtime/src/{org/graalvm/compiler => com/oracle}/truffle/runtime/AbstractCompilationTask.java (98%) rename truffle/src/com.oracle.truffle.runtime/src/{org/graalvm/compiler => com/oracle}/truffle/runtime/AbstractGraalTruffleRuntimeListener.java (98%) rename truffle/src/com.oracle.truffle.runtime/src/{org/graalvm/compiler => com/oracle}/truffle/runtime/AbstractOptimizedLoopNode.java (98%) rename truffle/src/com.oracle.truffle.runtime/src/{org/graalvm/compiler => com/oracle}/truffle/runtime/BackgroundCompileQueue.java (99%) rename truffle/src/com.oracle.truffle.runtime/src/{org/graalvm/compiler => com/oracle}/truffle/runtime/BaseOSRRootNode.java (98%) rename truffle/src/com.oracle.truffle.runtime/src/{org/graalvm/compiler => com/oracle}/truffle/runtime/BytecodeOSRMetadata.java (99%) rename truffle/src/com.oracle.truffle.runtime/src/{org/graalvm/compiler => com/oracle}/truffle/runtime/BytecodeOSRRootNode.java (99%) rename truffle/src/com.oracle.truffle.runtime/src/{org/graalvm/compiler => com/oracle}/truffle/runtime/CompilationState.java (98%) rename truffle/src/com.oracle.truffle.runtime/src/{org/graalvm/compiler => com/oracle}/truffle/runtime/CompilationTask.java (99%) rename truffle/src/com.oracle.truffle.runtime/src/{org/graalvm/compiler => com/oracle}/truffle/runtime/DefaultLoopNodeFactory.java (98%) rename truffle/src/com.oracle.truffle.runtime/src/{org/graalvm/compiler => com/oracle}/truffle/runtime/DynamicThresholdsQueue.java (98%) rename truffle/src/com.oracle.truffle.runtime/src/{org/graalvm/compiler => com/oracle}/truffle/runtime/EngineCacheSupport.java (98%) rename truffle/src/com.oracle.truffle.runtime/src/{org/graalvm/compiler => com/oracle}/truffle/runtime/EngineData.java (82%) rename truffle/src/com.oracle.truffle.runtime/src/{org/graalvm/compiler => com/oracle}/truffle/runtime/FixedPointMath.java (98%) rename truffle/src/com.oracle.truffle.runtime/src/{org/graalvm/compiler => com/oracle}/truffle/runtime/FloodControlHandler.java (98%) rename truffle/src/com.oracle.truffle.runtime/src/{org/graalvm/compiler => com/oracle}/truffle/runtime/GraalFastThreadLocal.java (94%) rename truffle/src/com.oracle.truffle.runtime/src/{org/graalvm/compiler => com/oracle}/truffle/runtime/GraalFrameInstance.java (99%) rename truffle/src/com.oracle.truffle.runtime/src/{org/graalvm/compiler => com/oracle}/truffle/runtime/GraalOSRFrameInstance.java (98%) rename truffle/src/com.oracle.truffle.runtime/src/{org/graalvm/compiler => com/oracle}/truffle/runtime/GraalRuntimeAccessor.java (98%) rename truffle/src/com.oracle.truffle.runtime/src/{org/graalvm/compiler => com/oracle}/truffle/runtime/GraalRuntimeServiceProvider.java (98%) rename truffle/src/com.oracle.truffle.runtime/src/{org/graalvm/compiler => com/oracle}/truffle/runtime/GraalRuntimeSupport.java (99%) rename truffle/src/com.oracle.truffle.runtime/src/{org/graalvm/compiler => com/oracle}/truffle/runtime/GraalTVMCI.java (98%) rename truffle/src/com.oracle.truffle.runtime/src/{org/graalvm/compiler => com/oracle}/truffle/runtime/GraalTestTVMCI.java (95%) rename truffle/src/com.oracle.truffle.runtime/src/{org/graalvm/compiler => com/oracle}/truffle/runtime/GraalTruffleRuntime.java (98%) rename truffle/src/com.oracle.truffle.runtime/src/{org/graalvm/compiler => com/oracle}/truffle/runtime/GraalTruffleRuntimeListener.java (99%) rename truffle/src/com.oracle.truffle.runtime/src/{org/graalvm/compiler => com/oracle}/truffle/runtime/GraalTruffleRuntimeListenerDispatcher.java (99%) rename truffle/src/com.oracle.truffle.runtime/src/{org/graalvm/compiler => com/oracle}/truffle/runtime/InlineDecision.java (98%) rename truffle/src/com.oracle.truffle.runtime/src/{org/graalvm/compiler => com/oracle}/truffle/runtime/LoopNodeFactory.java (98%) rename truffle/src/com.oracle.truffle.runtime/src/{org/graalvm/compiler => com/oracle}/truffle/runtime/ModuleUtil.java (98%) rename truffle/src/com.oracle.truffle.runtime/src/{org/graalvm/compiler => com/oracle}/truffle/runtime/ModulesSupport.java (97%) rename truffle/src/com.oracle.truffle.runtime/src/{org/graalvm/compiler => com/oracle}/truffle/runtime/OptimizedAssumption.java (99%) rename truffle/src/com.oracle.truffle.runtime/src/{org/graalvm/compiler => com/oracle}/truffle/runtime/OptimizedBlockNode.java (99%) rename truffle/src/com.oracle.truffle.runtime/src/{org/graalvm/compiler => com/oracle}/truffle/runtime/OptimizedCallTarget.java (99%) rename truffle/src/com.oracle.truffle.runtime/src/{org/graalvm/compiler => com/oracle}/truffle/runtime/OptimizedDirectCallNode.java (99%) rename truffle/src/com.oracle.truffle.runtime/src/{org/graalvm/compiler => com/oracle}/truffle/runtime/OptimizedIndirectCallNode.java (98%) rename truffle/src/com.oracle.truffle.runtime/src/{org/graalvm/compiler => com/oracle}/truffle/runtime/OptimizedLoopNode.java (98%) rename truffle/src/com.oracle.truffle.runtime/src/{org/graalvm/compiler => com/oracle}/truffle/runtime/OptimizedOSRLoopNode.java (99%) rename truffle/src/com.oracle.truffle.runtime/src/{org/graalvm/compiler => com/oracle}/truffle/runtime/OptimizedRuntimeOptions.java (99%) rename truffle/src/com.oracle.truffle.runtime/src/{org/graalvm/compiler => com/oracle}/truffle/runtime/SuppressFBWarnings.java (98%) rename truffle/src/com.oracle.truffle.runtime/src/{org/graalvm/compiler => com/oracle}/truffle/runtime/TraversingBlockingQueue.java (99%) rename truffle/src/com.oracle.truffle.runtime/src/{org/graalvm/compiler => com/oracle}/truffle/runtime/TruffleCallBoundary.java (98%) rename truffle/src/com.oracle.truffle.runtime/src/{org/graalvm/compiler => com/oracle}/truffle/runtime/TruffleInlining.java (98%) rename truffle/src/com.oracle.truffle.runtime/src/{org/graalvm/compiler => com/oracle}/truffle/runtime/TruffleSplittingStrategy.java (99%) rename truffle/src/com.oracle.truffle.runtime/src/{org/graalvm/compiler => com/oracle}/truffle/runtime/TruffleTypes.java (98%) rename truffle/src/com.oracle.truffle.runtime/src/{org/graalvm/compiler => com/oracle}/truffle/runtime/collection/ArrayQueue.java (98%) rename truffle/src/com.oracle.truffle.runtime/src/{org/graalvm/compiler => com/oracle}/truffle/runtime/collection/BTreeQueue.java (99%) rename truffle/src/com.oracle.truffle.runtime/src/{org/graalvm/compiler => com/oracle}/truffle/runtime/collection/DelegatingBlockingQueue.java (99%) rename truffle/src/com.oracle.truffle.runtime/src/{org/graalvm/compiler => com/oracle}/truffle/runtime/collection/SerialQueue.java (97%) rename truffle/src/com.oracle.truffle.runtime/src/{org/graalvm/compiler => com/oracle}/truffle/runtime/debug/JFRListener.java (95%) rename truffle/src/com.oracle.truffle.runtime/src/{org/graalvm/compiler => com/oracle}/truffle/runtime/debug/StatisticsListener.java (98%) rename truffle/src/com.oracle.truffle.runtime/src/{org/graalvm/compiler => com/oracle}/truffle/runtime/debug/TraceASTCompilationListener.java (91%) rename truffle/src/com.oracle.truffle.runtime/src/{org/graalvm/compiler => com/oracle}/truffle/runtime/debug/TraceCompilationListener.java (96%) rename truffle/src/com.oracle.truffle.runtime/src/{org/graalvm/compiler => com/oracle}/truffle/runtime/debug/TraceCompilationPolymorphismListener.java (90%) rename truffle/src/com.oracle.truffle.runtime/src/{org/graalvm/compiler => com/oracle}/truffle/runtime/debug/TraceSplittingListener.java (93%) rename truffle/src/com.oracle.truffle.runtime/src/{org/graalvm/compiler => com/oracle}/truffle/runtime/hotspot/HotSpotFastThreadLocal.java (98%) rename truffle/src/com.oracle.truffle.runtime/src/{org/graalvm/compiler => com/oracle}/truffle/runtime/hotspot/HotSpotOptimizedCallTarget.java (95%) rename truffle/src/com.oracle.truffle.runtime/src/{org/graalvm/compiler => com/oracle}/truffle/runtime/hotspot/HotSpotThreadLocalHandshake.java (98%) rename truffle/src/com.oracle.truffle.runtime/src/{org/graalvm/compiler => com/oracle}/truffle/runtime/hotspot/HotSpotTruffleRuntime.java (98%) rename truffle/src/com.oracle.truffle.runtime/src/{org/graalvm/compiler => com/oracle}/truffle/runtime/hotspot/HotSpotTruffleRuntimeAccess.java (95%) rename truffle/src/com.oracle.truffle.runtime/src/{org/graalvm/compiler => com/oracle}/truffle/runtime/hotspot/HotSpotTruffleRuntimeServices.java (96%) rename truffle/src/com.oracle.truffle.runtime/src/{org/graalvm/compiler => com/oracle}/truffle/runtime/hotspot/libgraal/BinaryInput.java (95%) rename truffle/src/com.oracle.truffle.runtime/src/{org/graalvm/compiler => com/oracle}/truffle/runtime/hotspot/libgraal/BinaryOutput.java (99%) rename truffle/src/com.oracle.truffle.runtime/src/{org/graalvm => com/oracle/truffle/runtime/hotspot}/libgraal/DestroyedIsolateException.java (98%) rename truffle/src/com.oracle.truffle.runtime/src/{org/graalvm => com/oracle/truffle/runtime/hotspot}/libgraal/LibGraal.java (99%) rename truffle/src/com.oracle.truffle.runtime/src/{org/graalvm/compiler => com/oracle}/truffle/runtime/hotspot/libgraal/LibGraalCompilationResultInfo.java (96%) rename truffle/src/com.oracle.truffle.runtime/src/{org/graalvm/compiler => com/oracle}/truffle/runtime/hotspot/libgraal/LibGraalGraphInfo.java (95%) rename truffle/src/com.oracle.truffle.runtime/src/{org/graalvm/compiler => com/oracle}/truffle/runtime/hotspot/libgraal/LibGraalHotSpotTruffleCompiler.java (95%) rename truffle/src/com.oracle.truffle.runtime/src/{org/graalvm => com/oracle/truffle/runtime/hotspot}/libgraal/LibGraalIsolate.java (99%) rename truffle/src/com.oracle.truffle.runtime/src/{org/graalvm => com/oracle/truffle/runtime/hotspot}/libgraal/LibGraalObject.java (98%) rename truffle/src/com.oracle.truffle.runtime/src/{org/graalvm => com/oracle/truffle/runtime/hotspot}/libgraal/LibGraalScope.java (98%) rename truffle/src/com.oracle.truffle.runtime/src/{org/graalvm/compiler => com/oracle}/truffle/runtime/hotspot/libgraal/LibGraalScopedHandle.java (97%) rename truffle/src/com.oracle.truffle.runtime/src/{org/graalvm/compiler => com/oracle}/truffle/runtime/hotspot/libgraal/LibGraalStringSupplier.java (93%) rename truffle/src/com.oracle.truffle.runtime/src/{org/graalvm/compiler => com/oracle}/truffle/runtime/hotspot/libgraal/LibGraalTruffleCompilationSupport.java (94%) rename truffle/src/com.oracle.truffle.runtime/src/{org/graalvm/compiler => com/oracle}/truffle/runtime/hotspot/libgraal/TruffleFromLibGraalEntryPoints.java (98%) rename truffle/src/com.oracle.truffle.runtime/src/{org/graalvm/compiler => com/oracle}/truffle/runtime/hotspot/libgraal/TruffleToLibGraalCalls.java (99%) rename truffle/src/com.oracle.truffle.runtime/src/{org/graalvm/compiler/truffle => com/oracle/truffle/runtime}/jfr/CompilationEvent.java (98%) rename truffle/src/com.oracle.truffle.runtime/src/{org/graalvm/compiler/truffle => com/oracle/truffle/runtime}/jfr/CompilationStatisticsEvent.java (98%) rename truffle/src/com.oracle.truffle.runtime/src/{org/graalvm/compiler/truffle => com/oracle/truffle/runtime}/jfr/DeoptimizationEvent.java (98%) rename truffle/src/com.oracle.truffle.runtime/src/{org/graalvm/compiler/truffle => com/oracle/truffle/runtime}/jfr/Event.java (98%) rename truffle/src/com.oracle.truffle.runtime/src/{org/graalvm/compiler/truffle => com/oracle/truffle/runtime}/jfr/EventFactory.java (98%) rename truffle/src/com.oracle.truffle.runtime/src/{org/graalvm/compiler/truffle => com/oracle/truffle/runtime}/jfr/InvalidationEvent.java (98%) rename truffle/src/com.oracle.truffle.runtime/src/{org/graalvm/compiler/truffle => com/oracle/truffle/runtime}/jfr/RootFunctionEvent.java (98%) rename truffle/src/com.oracle.truffle.runtime/src/{org/graalvm/compiler/truffle => com/oracle/truffle/runtime}/jfr/impl/CompilationEventImpl.java (97%) rename truffle/src/com.oracle.truffle.runtime/src/{org/graalvm/compiler/truffle => com/oracle/truffle/runtime}/jfr/impl/CompilationFailureEventImpl.java (98%) rename truffle/src/com.oracle.truffle.runtime/src/{org/graalvm/compiler/truffle => com/oracle/truffle/runtime}/jfr/impl/CompilationStatisticsEventImpl.java (97%) rename truffle/src/com.oracle.truffle.runtime/src/{org/graalvm/compiler/truffle => com/oracle/truffle/runtime}/jfr/impl/DeoptimizationEventImpl.java (95%) rename truffle/src/com.oracle.truffle.runtime/src/{org/graalvm/compiler/truffle => com/oracle/truffle/runtime}/jfr/impl/EventFactoryImpl.java (92%) rename truffle/src/com.oracle.truffle.runtime/src/{org/graalvm/compiler/truffle => com/oracle/truffle/runtime}/jfr/impl/InvalidationEventImpl.java (96%) rename truffle/src/com.oracle.truffle.runtime/src/{org/graalvm/compiler/truffle => com/oracle/truffle/runtime}/jfr/impl/ProviderImpl.java (95%) rename truffle/src/com.oracle.truffle.runtime/src/{org/graalvm/compiler/truffle => com/oracle/truffle/runtime}/jfr/impl/RootFunctionEventImpl.java (97%) rename truffle/src/com.oracle.truffle.runtime/src/{org/graalvm/compiler => com/oracle}/truffle/runtime/serviceprovider/TruffleRuntimeServices.java (97%) diff --git a/compiler/mx.compiler/suite.py b/compiler/mx.compiler/suite.py index a17faf7f13b6..8fdd27012b18 100644 --- a/compiler/mx.compiler/suite.py +++ b/compiler/mx.compiler/suite.py @@ -214,10 +214,6 @@ "org.graalvm.compiler.loop.test", "org.graalvm.compiler.core.aarch64.test", "org.graalvm.compiler.jtt", - "org.graalvm.compiler.truffle.options", - "org.graalvm.compiler.truffle.jfr", - "org.graalvm.compiler.truffle.jfr.impl", - "org.graalvm.compiler.truffle.runtime", "org.graalvm.compiler.truffle.test", ], }, diff --git a/compiler/src/jdk.internal.vm.compiler.test/src/org/graalvm/compiler/core/test/VerifyBailoutUsage.java b/compiler/src/jdk.internal.vm.compiler.test/src/org/graalvm/compiler/core/test/VerifyBailoutUsage.java index 87a931dcaa9c..acc91efe54b5 100644 --- a/compiler/src/jdk.internal.vm.compiler.test/src/org/graalvm/compiler/core/test/VerifyBailoutUsage.java +++ b/compiler/src/jdk.internal.vm.compiler.test/src/org/graalvm/compiler/core/test/VerifyBailoutUsage.java @@ -53,10 +53,10 @@ private static String getPackageName(Class c) { "jdk.vm.ci", // Allows GraalTruffleRuntime.handleAnnotationFailure to throw - // a BailoutException since the org.graalvm.compiler.truffle.runtime + // a BailoutException since the com.oracle.truffle.runtime // project can not see the PermanentBailoutException or // RetryableBailoutException types. - "org.graalvm.compiler.truffle.runtime" + "com.oracle.truffle.runtime" }; } catch (Throwable t) { throw new GraalError(t); diff --git a/compiler/src/jdk.internal.vm.compiler.test/src/org/graalvm/compiler/core/test/VerifySystemPropertyUsage.java b/compiler/src/jdk.internal.vm.compiler.test/src/org/graalvm/compiler/core/test/VerifySystemPropertyUsage.java index 1563511ef72a..854976b2df4a 100644 --- a/compiler/src/jdk.internal.vm.compiler.test/src/org/graalvm/compiler/core/test/VerifySystemPropertyUsage.java +++ b/compiler/src/jdk.internal.vm.compiler.test/src/org/graalvm/compiler/core/test/VerifySystemPropertyUsage.java @@ -88,7 +88,7 @@ protected void verify(StructuredGraph graph, CoreProviders context) { // The main method in JVMCIVersionCheck is only called from the shell return; } else if (packageName.startsWith("com.oracle.truffle") || packageName.startsWith("org.graalvm.polyglot") || - packageName.startsWith("org.graalvm.home") || packageName.equals("org.graalvm.compiler.truffle.runtime.hotspot")) { + packageName.startsWith("org.graalvm.home") || packageName.equals("com.oracle.truffle.runtime.hotspot")) { // Truffle, SDK and Truffle runtime do not depend on JVMCI so they cannot use // Services.getSavedProperties() return; diff --git a/compiler/src/jdk.internal.vm.compiler.test/src/org/graalvm/compiler/core/test/VerifyUnsafeAccess.java b/compiler/src/jdk.internal.vm.compiler.test/src/org/graalvm/compiler/core/test/VerifyUnsafeAccess.java index 11009e0bb763..1c753f2f0724 100644 --- a/compiler/src/jdk.internal.vm.compiler.test/src/org/graalvm/compiler/core/test/VerifyUnsafeAccess.java +++ b/compiler/src/jdk.internal.vm.compiler.test/src/org/graalvm/compiler/core/test/VerifyUnsafeAccess.java @@ -62,7 +62,7 @@ protected void verify(StructuredGraph graph, CoreProviders context) { caller.getName().equals("initUnsafe")) { // This is the blessed way access Unsafe in Graal and JVMCI return; - } else if (packageName.startsWith("com.oracle.truffle") || packageName.startsWith("org.graalvm.compiler.truffle.runtime")) { + } else if (packageName.startsWith("com.oracle.truffle") || packageName.startsWith("com.oracle.truffle.runtime")) { // Truffle and GraalTruffleRuntime do not depend on Graal and so cannot use // GraalUnsafeAccess return; diff --git a/compiler/src/jdk.internal.vm.compiler.test/src/org/graalvm/compiler/hotspot/test/CompileTheWorld.java b/compiler/src/jdk.internal.vm.compiler.test/src/org/graalvm/compiler/hotspot/test/CompileTheWorld.java index 8bbfe78573b4..dda68a7970d5 100644 --- a/compiler/src/jdk.internal.vm.compiler.test/src/org/graalvm/compiler/hotspot/test/CompileTheWorld.java +++ b/compiler/src/jdk.internal.vm.compiler.test/src/org/graalvm/compiler/hotspot/test/CompileTheWorld.java @@ -113,11 +113,12 @@ import org.graalvm.compiler.options.OptionsParser; import org.graalvm.compiler.serviceprovider.GraalServices; import org.graalvm.compiler.serviceprovider.GraalUnsafeAccess; -import org.graalvm.libgraal.LibGraal; -import org.graalvm.libgraal.LibGraalIsolate; -import org.graalvm.libgraal.LibGraalScope; import org.graalvm.util.OptionsEncoder; +import com.oracle.truffle.runtime.hotspot.libgraal.LibGraal; +import com.oracle.truffle.runtime.hotspot.libgraal.LibGraalIsolate; +import com.oracle.truffle.runtime.hotspot.libgraal.LibGraalScope; + import jdk.vm.ci.hotspot.HotSpotCodeCacheProvider; import jdk.vm.ci.hotspot.HotSpotCompilationRequest; import jdk.vm.ci.hotspot.HotSpotInstalledCode; diff --git a/compiler/src/jdk.internal.vm.compiler.test/src/org/graalvm/compiler/hotspot/test/LibGraalCompilerTest.java b/compiler/src/jdk.internal.vm.compiler.test/src/org/graalvm/compiler/hotspot/test/LibGraalCompilerTest.java index 042f3d38dca2..1cbf88e21789 100644 --- a/compiler/src/jdk.internal.vm.compiler.test/src/org/graalvm/compiler/hotspot/test/LibGraalCompilerTest.java +++ b/compiler/src/jdk.internal.vm.compiler.test/src/org/graalvm/compiler/hotspot/test/LibGraalCompilerTest.java @@ -25,11 +25,12 @@ package org.graalvm.compiler.hotspot.test; import org.graalvm.compiler.hotspot.HotSpotGraalServices; -import org.graalvm.libgraal.LibGraal; -import org.graalvm.libgraal.LibGraalScope; import org.junit.Assume; import org.junit.Test; +import com.oracle.truffle.runtime.hotspot.libgraal.LibGraal; +import com.oracle.truffle.runtime.hotspot.libgraal.LibGraalScope; + import jdk.vm.ci.meta.ResolvedJavaType; /** diff --git a/compiler/src/jdk.internal.vm.compiler.test/src/org/graalvm/compiler/truffle/test/AOTSupportCompilationTest.java b/compiler/src/jdk.internal.vm.compiler.test/src/org/graalvm/compiler/truffle/test/AOTSupportCompilationTest.java index 79dae2f2db64..526898b28951 100644 --- a/compiler/src/jdk.internal.vm.compiler.test/src/org/graalvm/compiler/truffle/test/AOTSupportCompilationTest.java +++ b/compiler/src/jdk.internal.vm.compiler.test/src/org/graalvm/compiler/truffle/test/AOTSupportCompilationTest.java @@ -26,7 +26,6 @@ import org.graalvm.compiler.nodes.StructuredGraph; import org.graalvm.compiler.nodes.java.MethodCallTargetNode; -import org.graalvm.compiler.truffle.runtime.OptimizedCallTarget; import org.graalvm.polyglot.Context; import org.junit.Test; import org.openjdk.jmh.annotations.TearDown; @@ -43,6 +42,7 @@ import com.oracle.truffle.api.dsl.test.AOTSupportTestFactory.AOTManualLibrarySingleLimitNodeGen; import com.oracle.truffle.api.dsl.test.AOTSupportTestFactory.TestNodeGen; import com.oracle.truffle.api.test.polyglot.ProxyLanguage; +import com.oracle.truffle.runtime.OptimizedCallTarget; public class AOTSupportCompilationTest extends PartialEvaluationTest { diff --git a/compiler/src/jdk.internal.vm.compiler.test/src/org/graalvm/compiler/truffle/test/AbstractSplittingStrategyTest.java b/compiler/src/jdk.internal.vm.compiler.test/src/org/graalvm/compiler/truffle/test/AbstractSplittingStrategyTest.java index c17f6cf54a55..c6d7fcd7daf7 100644 --- a/compiler/src/jdk.internal.vm.compiler.test/src/org/graalvm/compiler/truffle/test/AbstractSplittingStrategyTest.java +++ b/compiler/src/jdk.internal.vm.compiler.test/src/org/graalvm/compiler/truffle/test/AbstractSplittingStrategyTest.java @@ -26,10 +26,6 @@ import java.lang.reflect.Field; -import org.graalvm.compiler.truffle.runtime.GraalTruffleRuntime; -import org.graalvm.compiler.truffle.runtime.GraalTruffleRuntimeListener; -import org.graalvm.compiler.truffle.runtime.OptimizedCallTarget; -import org.graalvm.compiler.truffle.runtime.OptimizedDirectCallNode; import org.junit.After; import org.junit.Assert; import org.junit.Before; @@ -42,6 +38,10 @@ import com.oracle.truffle.api.nodes.NodeCost; import com.oracle.truffle.api.nodes.RootNode; import com.oracle.truffle.api.test.ReflectionUtils; +import com.oracle.truffle.runtime.GraalTruffleRuntime; +import com.oracle.truffle.runtime.GraalTruffleRuntimeListener; +import com.oracle.truffle.runtime.OptimizedCallTarget; +import com.oracle.truffle.runtime.OptimizedDirectCallNode; public class AbstractSplittingStrategyTest extends TestWithPolyglotOptions { diff --git a/compiler/src/jdk.internal.vm.compiler.test/src/org/graalvm/compiler/truffle/test/AgnosticInliningPhaseTest.java b/compiler/src/jdk.internal.vm.compiler.test/src/org/graalvm/compiler/truffle/test/AgnosticInliningPhaseTest.java index 1011f93c69e6..bef852090be0 100644 --- a/compiler/src/jdk.internal.vm.compiler.test/src/org/graalvm/compiler/truffle/test/AgnosticInliningPhaseTest.java +++ b/compiler/src/jdk.internal.vm.compiler.test/src/org/graalvm/compiler/truffle/test/AgnosticInliningPhaseTest.java @@ -31,8 +31,6 @@ import org.graalvm.compiler.truffle.compiler.TruffleCompilerImpl; import org.graalvm.compiler.truffle.compiler.TruffleTierContext; import org.graalvm.compiler.truffle.compiler.phases.inlining.AgnosticInliningPhase; -import org.graalvm.compiler.truffle.runtime.OptimizedCallTarget; -import org.graalvm.compiler.truffle.runtime.OptimizedDirectCallNode; import org.graalvm.polyglot.Context; import org.junit.Before; @@ -42,6 +40,8 @@ import com.oracle.truffle.api.frame.VirtualFrame; import com.oracle.truffle.api.nodes.RootNode; import com.oracle.truffle.compiler.TruffleCompilationTask; +import com.oracle.truffle.runtime.OptimizedCallTarget; +import com.oracle.truffle.runtime.OptimizedDirectCallNode; public class AgnosticInliningPhaseTest extends PartialEvaluationTest { diff --git a/compiler/src/jdk.internal.vm.compiler.test/src/org/graalvm/compiler/truffle/test/AllocationReporterPartialEvaluationTest.java b/compiler/src/jdk.internal.vm.compiler.test/src/org/graalvm/compiler/truffle/test/AllocationReporterPartialEvaluationTest.java index 4900670233d9..45f7669ff2f0 100644 --- a/compiler/src/jdk.internal.vm.compiler.test/src/org/graalvm/compiler/truffle/test/AllocationReporterPartialEvaluationTest.java +++ b/compiler/src/jdk.internal.vm.compiler.test/src/org/graalvm/compiler/truffle/test/AllocationReporterPartialEvaluationTest.java @@ -28,7 +28,6 @@ import static org.junit.Assert.assertNotNull; import static org.junit.Assert.assertTrue; -import org.graalvm.compiler.truffle.runtime.OptimizedCallTarget; import org.graalvm.polyglot.Context; import org.graalvm.polyglot.PolyglotAccess; import org.junit.Test; @@ -43,6 +42,7 @@ import com.oracle.truffle.api.instrumentation.TruffleInstrument; import com.oracle.truffle.api.nodes.LanguageInfo; import com.oracle.truffle.api.nodes.RootNode; +import com.oracle.truffle.runtime.OptimizedCallTarget; /** * Test of consistent behavior of AllocationReporter when individual calls are optimized or diff --git a/compiler/src/jdk.internal.vm.compiler.test/src/org/graalvm/compiler/truffle/test/AssumedValuePartialEvaluationTest.java b/compiler/src/jdk.internal.vm.compiler.test/src/org/graalvm/compiler/truffle/test/AssumedValuePartialEvaluationTest.java index 46ce97d04eff..24764dde6da0 100644 --- a/compiler/src/jdk.internal.vm.compiler.test/src/org/graalvm/compiler/truffle/test/AssumedValuePartialEvaluationTest.java +++ b/compiler/src/jdk.internal.vm.compiler.test/src/org/graalvm/compiler/truffle/test/AssumedValuePartialEvaluationTest.java @@ -25,7 +25,6 @@ package org.graalvm.compiler.truffle.test; import org.graalvm.compiler.nodes.StructuredGraph; -import org.graalvm.compiler.truffle.runtime.OptimizedCallTarget; import org.graalvm.compiler.truffle.test.nodes.AbstractTestNode; import org.graalvm.compiler.truffle.test.nodes.RootTestNode; import org.junit.Assert; @@ -34,6 +33,7 @@ import com.oracle.truffle.api.frame.FrameDescriptor; import com.oracle.truffle.api.frame.VirtualFrame; import com.oracle.truffle.api.utilities.AssumedValue; +import com.oracle.truffle.runtime.OptimizedCallTarget; public class AssumedValuePartialEvaluationTest extends PartialEvaluationTest { diff --git a/compiler/src/jdk.internal.vm.compiler.test/src/org/graalvm/compiler/truffle/test/AssumptionPartialEvaluationTest.java b/compiler/src/jdk.internal.vm.compiler.test/src/org/graalvm/compiler/truffle/test/AssumptionPartialEvaluationTest.java index 754ca2eed8d7..c82983f659f4 100644 --- a/compiler/src/jdk.internal.vm.compiler.test/src/org/graalvm/compiler/truffle/test/AssumptionPartialEvaluationTest.java +++ b/compiler/src/jdk.internal.vm.compiler.test/src/org/graalvm/compiler/truffle/test/AssumptionPartialEvaluationTest.java @@ -26,8 +26,6 @@ import java.lang.ref.WeakReference; -import org.graalvm.compiler.truffle.runtime.OptimizedAssumption; -import org.graalvm.compiler.truffle.runtime.OptimizedCallTarget; import org.graalvm.compiler.truffle.test.nodes.AbstractTestNode; import org.graalvm.compiler.truffle.test.nodes.AssumptionCutsBranchTestNode; import org.graalvm.compiler.truffle.test.nodes.ConstantWithAssumptionTestNode; @@ -46,6 +44,8 @@ import com.oracle.truffle.api.nodes.NodeInfo; import com.oracle.truffle.api.nodes.RootNode; import com.oracle.truffle.compiler.OptimizedAssumptionDependency; +import com.oracle.truffle.runtime.OptimizedAssumption; +import com.oracle.truffle.runtime.OptimizedCallTarget; public class AssumptionPartialEvaluationTest extends PartialEvaluationTest { public static Object constant42() { diff --git a/compiler/src/jdk.internal.vm.compiler.test/src/org/graalvm/compiler/truffle/test/BeginNodeOptimizationTest.java b/compiler/src/jdk.internal.vm.compiler.test/src/org/graalvm/compiler/truffle/test/BeginNodeOptimizationTest.java index 5ad002f9b789..b770c0460d46 100644 --- a/compiler/src/jdk.internal.vm.compiler.test/src/org/graalvm/compiler/truffle/test/BeginNodeOptimizationTest.java +++ b/compiler/src/jdk.internal.vm.compiler.test/src/org/graalvm/compiler/truffle/test/BeginNodeOptimizationTest.java @@ -29,7 +29,6 @@ import org.graalvm.compiler.graph.Graph; import org.graalvm.compiler.nodes.BeginNode; -import org.graalvm.compiler.truffle.runtime.OptimizedCallTarget; import org.graalvm.polyglot.Context; import org.junit.Assert; import org.junit.Test; @@ -39,6 +38,7 @@ import com.oracle.truffle.api.nodes.ExplodeLoop; import com.oracle.truffle.api.nodes.Node; import com.oracle.truffle.api.nodes.RootNode; +import com.oracle.truffle.runtime.OptimizedCallTarget; public class BeginNodeOptimizationTest extends PartialEvaluationTest { diff --git a/compiler/src/jdk.internal.vm.compiler.test/src/org/graalvm/compiler/truffle/test/BytecodeOSRNodeTest.java b/compiler/src/jdk.internal.vm.compiler.test/src/org/graalvm/compiler/truffle/test/BytecodeOSRNodeTest.java index 045050942869..8c6665a33cdf 100644 --- a/compiler/src/jdk.internal.vm.compiler.test/src/org/graalvm/compiler/truffle/test/BytecodeOSRNodeTest.java +++ b/compiler/src/jdk.internal.vm.compiler.test/src/org/graalvm/compiler/truffle/test/BytecodeOSRNodeTest.java @@ -29,10 +29,11 @@ import java.util.concurrent.TimeUnit; import com.oracle.truffle.api.test.SubprocessTestUtils; +import com.oracle.truffle.runtime.BytecodeOSRMetadata; +import com.oracle.truffle.runtime.GraalTruffleRuntime; +import com.oracle.truffle.runtime.OptimizedCallTarget; + import org.graalvm.compiler.test.GraalTest; -import org.graalvm.compiler.truffle.runtime.BytecodeOSRMetadata; -import org.graalvm.compiler.truffle.runtime.GraalTruffleRuntime; -import org.graalvm.compiler.truffle.runtime.OptimizedCallTarget; import org.graalvm.polyglot.Context; import org.junit.Assert; import org.junit.Before; diff --git a/compiler/src/jdk.internal.vm.compiler.test/src/org/graalvm/compiler/truffle/test/CastExactPartialEvaluationTest.java b/compiler/src/jdk.internal.vm.compiler.test/src/org/graalvm/compiler/truffle/test/CastExactPartialEvaluationTest.java index 1b02ee9ec5cb..ab22fbba6362 100644 --- a/compiler/src/jdk.internal.vm.compiler.test/src/org/graalvm/compiler/truffle/test/CastExactPartialEvaluationTest.java +++ b/compiler/src/jdk.internal.vm.compiler.test/src/org/graalvm/compiler/truffle/test/CastExactPartialEvaluationTest.java @@ -30,7 +30,6 @@ import org.graalvm.compiler.nodes.StructuredGraph; import org.graalvm.compiler.nodes.java.MethodCallTargetNode; -import org.graalvm.compiler.truffle.runtime.OptimizedCallTarget; import org.graalvm.compiler.truffle.test.nodes.AbstractTestNode; import org.graalvm.compiler.truffle.test.nodes.RootTestNode; import org.junit.Assert; @@ -44,6 +43,7 @@ import com.oracle.truffle.api.frame.VirtualFrame; import com.oracle.truffle.api.nodes.RootNode; import com.oracle.truffle.api.profiles.ValueProfile; +import com.oracle.truffle.runtime.OptimizedCallTarget; public class CastExactPartialEvaluationTest extends PartialEvaluationTest { diff --git a/compiler/src/jdk.internal.vm.compiler.test/src/org/graalvm/compiler/truffle/test/CodeInvalidationTest.java b/compiler/src/jdk.internal.vm.compiler.test/src/org/graalvm/compiler/truffle/test/CodeInvalidationTest.java index 3423f7bbd649..42b51267d7cc 100644 --- a/compiler/src/jdk.internal.vm.compiler.test/src/org/graalvm/compiler/truffle/test/CodeInvalidationTest.java +++ b/compiler/src/jdk.internal.vm.compiler.test/src/org/graalvm/compiler/truffle/test/CodeInvalidationTest.java @@ -32,8 +32,6 @@ import java.util.concurrent.Future; import java.util.concurrent.TimeUnit; -import org.graalvm.compiler.truffle.runtime.OptimizedCallTarget; -import org.graalvm.compiler.truffle.runtime.OptimizedOSRLoopNode; import org.graalvm.polyglot.Context; import org.graalvm.polyglot.PolyglotException; import org.graalvm.polyglot.Source; @@ -56,6 +54,8 @@ import com.oracle.truffle.api.test.CompileImmediatelyCheck; import com.oracle.truffle.api.test.polyglot.AbstractPolyglotTest; import com.oracle.truffle.api.test.polyglot.ProxyLanguage; +import com.oracle.truffle.runtime.OptimizedCallTarget; +import com.oracle.truffle.runtime.OptimizedOSRLoopNode; public class CodeInvalidationTest extends AbstractPolyglotTest { diff --git a/compiler/src/jdk.internal.vm.compiler.test/src/org/graalvm/compiler/truffle/test/CompilationFinalWeakReferencePartialEvaluationTest.java b/compiler/src/jdk.internal.vm.compiler.test/src/org/graalvm/compiler/truffle/test/CompilationFinalWeakReferencePartialEvaluationTest.java index 5e609aee305e..e197be134770 100644 --- a/compiler/src/jdk.internal.vm.compiler.test/src/org/graalvm/compiler/truffle/test/CompilationFinalWeakReferencePartialEvaluationTest.java +++ b/compiler/src/jdk.internal.vm.compiler.test/src/org/graalvm/compiler/truffle/test/CompilationFinalWeakReferencePartialEvaluationTest.java @@ -28,7 +28,6 @@ import java.util.function.IntSupplier; import java.util.stream.IntStream; -import org.graalvm.compiler.truffle.runtime.OptimizedCallTarget; import org.graalvm.compiler.truffle.test.nodes.AbstractTestNode; import org.graalvm.compiler.truffle.test.nodes.RootTestNode; import org.junit.Assert; @@ -39,6 +38,7 @@ import com.oracle.truffle.api.frame.FrameDescriptor; import com.oracle.truffle.api.frame.VirtualFrame; import com.oracle.truffle.api.nodes.RootNode; +import com.oracle.truffle.runtime.OptimizedCallTarget; public class CompilationFinalWeakReferencePartialEvaluationTest extends PartialEvaluationTest { public static Object constant42() { diff --git a/compiler/src/jdk.internal.vm.compiler.test/src/org/graalvm/compiler/truffle/test/CompilationMemoryTest.java b/compiler/src/jdk.internal.vm.compiler.test/src/org/graalvm/compiler/truffle/test/CompilationMemoryTest.java index 696bcf9a1beb..f8f05911655f 100644 --- a/compiler/src/jdk.internal.vm.compiler.test/src/org/graalvm/compiler/truffle/test/CompilationMemoryTest.java +++ b/compiler/src/jdk.internal.vm.compiler.test/src/org/graalvm/compiler/truffle/test/CompilationMemoryTest.java @@ -29,10 +29,6 @@ import java.util.Arrays; import java.util.concurrent.FutureTask; -import org.graalvm.compiler.truffle.runtime.AbstractCompilationTask; -import org.graalvm.compiler.truffle.runtime.GraalTruffleRuntime; -import org.graalvm.compiler.truffle.runtime.GraalTruffleRuntimeListener; -import org.graalvm.compiler.truffle.runtime.OptimizedCallTarget; import org.junit.Assert; import org.junit.Before; import org.junit.Test; @@ -41,6 +37,10 @@ import com.oracle.truffle.api.nodes.RootNode; import com.oracle.truffle.api.test.GCUtils; import com.oracle.truffle.compiler.TruffleCompilerListener; +import com.oracle.truffle.runtime.AbstractCompilationTask; +import com.oracle.truffle.runtime.GraalTruffleRuntime; +import com.oracle.truffle.runtime.GraalTruffleRuntimeListener; +import com.oracle.truffle.runtime.OptimizedCallTarget; public class CompilationMemoryTest extends TestWithPolyglotOptions { diff --git a/compiler/src/jdk.internal.vm.compiler.test/src/org/graalvm/compiler/truffle/test/CompilerInitializationTest.java b/compiler/src/jdk.internal.vm.compiler.test/src/org/graalvm/compiler/truffle/test/CompilerInitializationTest.java index fbc0fc7e4717..e2523c4f6f45 100644 --- a/compiler/src/jdk.internal.vm.compiler.test/src/org/graalvm/compiler/truffle/test/CompilerInitializationTest.java +++ b/compiler/src/jdk.internal.vm.compiler.test/src/org/graalvm/compiler/truffle/test/CompilerInitializationTest.java @@ -30,7 +30,6 @@ import java.lang.reflect.Field; import java.lang.reflect.Method; -import org.graalvm.compiler.truffle.runtime.GraalTruffleRuntime; import org.graalvm.polyglot.Context; import org.junit.Assume; import org.junit.Before; @@ -40,6 +39,7 @@ import com.oracle.truffle.api.TruffleOptions; import com.oracle.truffle.api.instrumentation.test.InstrumentationTestLanguage; import com.oracle.truffle.api.test.ReflectionUtils; +import com.oracle.truffle.runtime.GraalTruffleRuntime; public class CompilerInitializationTest { diff --git a/compiler/src/jdk.internal.vm.compiler.test/src/org/graalvm/compiler/truffle/test/CompilerLoggingTest.java b/compiler/src/jdk.internal.vm.compiler.test/src/org/graalvm/compiler/truffle/test/CompilerLoggingTest.java index 4f156ae96640..52736c3a0b85 100644 --- a/compiler/src/jdk.internal.vm.compiler.test/src/org/graalvm/compiler/truffle/test/CompilerLoggingTest.java +++ b/compiler/src/jdk.internal.vm.compiler.test/src/org/graalvm/compiler/truffle/test/CompilerLoggingTest.java @@ -37,10 +37,6 @@ import com.oracle.truffle.api.frame.VirtualFrame; import org.graalvm.compiler.debug.TTY; import org.graalvm.compiler.truffle.compiler.TruffleCompilerImpl; -import org.graalvm.compiler.truffle.runtime.AbstractCompilationTask; -import org.graalvm.compiler.truffle.runtime.GraalTruffleRuntime; -import org.graalvm.compiler.truffle.runtime.GraalTruffleRuntimeListener; -import org.graalvm.compiler.truffle.runtime.OptimizedCallTarget; import org.graalvm.polyglot.Context; import org.junit.Assert; import org.junit.Assume; @@ -49,6 +45,10 @@ import com.oracle.truffle.api.nodes.RootNode; import com.oracle.truffle.compiler.TruffleCompiler; import com.oracle.truffle.compiler.TruffleCompilerListener; +import com.oracle.truffle.runtime.AbstractCompilationTask; +import com.oracle.truffle.runtime.GraalTruffleRuntime; +import com.oracle.truffle.runtime.GraalTruffleRuntimeListener; +import com.oracle.truffle.runtime.OptimizedCallTarget; import static org.junit.Assert.assertFalse; import static org.junit.Assert.assertTrue; diff --git a/compiler/src/jdk.internal.vm.compiler.test/src/org/graalvm/compiler/truffle/test/ContextLookupCompilationTest.java b/compiler/src/jdk.internal.vm.compiler.test/src/org/graalvm/compiler/truffle/test/ContextLookupCompilationTest.java index b7ea5aeb9c7f..5bcb87aba4fa 100644 --- a/compiler/src/jdk.internal.vm.compiler.test/src/org/graalvm/compiler/truffle/test/ContextLookupCompilationTest.java +++ b/compiler/src/jdk.internal.vm.compiler.test/src/org/graalvm/compiler/truffle/test/ContextLookupCompilationTest.java @@ -38,8 +38,6 @@ import org.graalvm.compiler.nodes.FieldLocationIdentity; import org.graalvm.compiler.nodes.StructuredGraph; import org.graalvm.compiler.nodes.memory.ReadNode; -import org.graalvm.compiler.truffle.runtime.GraalTruffleRuntime; -import org.graalvm.compiler.truffle.runtime.OptimizedCallTarget; import org.graalvm.polyglot.Context; import org.graalvm.polyglot.Engine; import org.graalvm.word.LocationIdentity; @@ -62,6 +60,8 @@ import com.oracle.truffle.api.frame.VirtualFrame; import com.oracle.truffle.api.nodes.ExplodeLoop; import com.oracle.truffle.api.nodes.RootNode; +import com.oracle.truffle.runtime.GraalTruffleRuntime; +import com.oracle.truffle.runtime.OptimizedCallTarget; import jdk.vm.ci.code.BailoutException; import jdk.vm.ci.meta.ResolvedJavaField; diff --git a/compiler/src/jdk.internal.vm.compiler.test/src/org/graalvm/compiler/truffle/test/DFAPartialEvaluationTest.java b/compiler/src/jdk.internal.vm.compiler.test/src/org/graalvm/compiler/truffle/test/DFAPartialEvaluationTest.java index 064a409cc661..52fd5af2b280 100644 --- a/compiler/src/jdk.internal.vm.compiler.test/src/org/graalvm/compiler/truffle/test/DFAPartialEvaluationTest.java +++ b/compiler/src/jdk.internal.vm.compiler.test/src/org/graalvm/compiler/truffle/test/DFAPartialEvaluationTest.java @@ -24,7 +24,6 @@ */ package org.graalvm.compiler.truffle.test; -import org.graalvm.compiler.truffle.runtime.OptimizedCallTarget; import org.junit.Assert; import org.junit.Test; @@ -36,6 +35,7 @@ import com.oracle.truffle.api.nodes.ExplodeLoop; import com.oracle.truffle.api.nodes.Node; import com.oracle.truffle.api.nodes.RootNode; +import com.oracle.truffle.runtime.OptimizedCallTarget; public class DFAPartialEvaluationTest extends PartialEvaluationTest { diff --git a/compiler/src/jdk.internal.vm.compiler.test/src/org/graalvm/compiler/truffle/test/DeoptInvalidateListener.java b/compiler/src/jdk.internal.vm.compiler.test/src/org/graalvm/compiler/truffle/test/DeoptInvalidateListener.java index 91d1550dc140..8516e06ee6ab 100644 --- a/compiler/src/jdk.internal.vm.compiler.test/src/org/graalvm/compiler/truffle/test/DeoptInvalidateListener.java +++ b/compiler/src/jdk.internal.vm.compiler.test/src/org/graalvm/compiler/truffle/test/DeoptInvalidateListener.java @@ -25,9 +25,10 @@ package org.graalvm.compiler.truffle.test; import com.oracle.truffle.api.frame.Frame; -import org.graalvm.compiler.truffle.runtime.AbstractGraalTruffleRuntimeListener; -import org.graalvm.compiler.truffle.runtime.GraalTruffleRuntime; -import org.graalvm.compiler.truffle.runtime.OptimizedCallTarget; +import com.oracle.truffle.runtime.AbstractGraalTruffleRuntimeListener; +import com.oracle.truffle.runtime.GraalTruffleRuntime; +import com.oracle.truffle.runtime.OptimizedCallTarget; + import org.junit.Assert; public class DeoptInvalidateListener extends AbstractGraalTruffleRuntimeListener implements AutoCloseable { diff --git a/compiler/src/jdk.internal.vm.compiler.test/src/org/graalvm/compiler/truffle/test/DynamicObjectPartialEvaluationTest.java b/compiler/src/jdk.internal.vm.compiler.test/src/org/graalvm/compiler/truffle/test/DynamicObjectPartialEvaluationTest.java index 7c7d9fb5b8a3..977224ffadbc 100644 --- a/compiler/src/jdk.internal.vm.compiler.test/src/org/graalvm/compiler/truffle/test/DynamicObjectPartialEvaluationTest.java +++ b/compiler/src/jdk.internal.vm.compiler.test/src/org/graalvm/compiler/truffle/test/DynamicObjectPartialEvaluationTest.java @@ -34,7 +34,6 @@ import org.graalvm.compiler.nodes.java.LoadFieldNode; import org.graalvm.compiler.nodes.java.StoreFieldNode; import org.graalvm.compiler.truffle.compiler.nodes.ObjectLocationIdentity; -import org.graalvm.compiler.truffle.runtime.OptimizedCallTarget; import org.graalvm.compiler.truffle.test.nodes.AbstractTestNode; import org.graalvm.compiler.truffle.test.nodes.RootTestNode; import org.junit.Assert; @@ -49,6 +48,7 @@ import com.oracle.truffle.api.object.DynamicObject; import com.oracle.truffle.api.object.DynamicObjectLibrary; import com.oracle.truffle.api.object.Shape; +import com.oracle.truffle.runtime.OptimizedCallTarget; import jdk.vm.ci.meta.JavaKind; diff --git a/compiler/src/jdk.internal.vm.compiler.test/src/org/graalvm/compiler/truffle/test/EncodedGraphCacheTest.java b/compiler/src/jdk.internal.vm.compiler.test/src/org/graalvm/compiler/truffle/test/EncodedGraphCacheTest.java index e6d6cb3cff2d..c644587a5e7d 100644 --- a/compiler/src/jdk.internal.vm.compiler.test/src/org/graalvm/compiler/truffle/test/EncodedGraphCacheTest.java +++ b/compiler/src/jdk.internal.vm.compiler.test/src/org/graalvm/compiler/truffle/test/EncodedGraphCacheTest.java @@ -35,9 +35,6 @@ import org.graalvm.compiler.truffle.compiler.PartialEvaluator; import org.graalvm.compiler.truffle.compiler.TruffleCompilation; import org.graalvm.compiler.truffle.compiler.TruffleCompilerImpl; -import org.graalvm.compiler.truffle.runtime.GraalTruffleRuntime; -import org.graalvm.compiler.truffle.runtime.OptimizedCallTarget; -import org.graalvm.compiler.truffle.runtime.OptimizedRuntimeOptions; import org.graalvm.compiler.truffle.test.nodes.AbstractTestNode; import org.graalvm.compiler.truffle.test.nodes.RootTestNode; import org.graalvm.polyglot.Context; @@ -49,6 +46,9 @@ import com.oracle.truffle.api.frame.VirtualFrame; import com.oracle.truffle.api.nodes.RootNode; import com.oracle.truffle.compiler.TruffleCompilationTask; +import com.oracle.truffle.runtime.GraalTruffleRuntime; +import com.oracle.truffle.runtime.OptimizedCallTarget; +import com.oracle.truffle.runtime.OptimizedRuntimeOptions; import jdk.vm.ci.meta.ResolvedJavaMethod; diff --git a/compiler/src/jdk.internal.vm.compiler.test/src/org/graalvm/compiler/truffle/test/EngineModeTest.java b/compiler/src/jdk.internal.vm.compiler.test/src/org/graalvm/compiler/truffle/test/EngineModeTest.java index ce520110ba12..dee566772fb6 100644 --- a/compiler/src/jdk.internal.vm.compiler.test/src/org/graalvm/compiler/truffle/test/EngineModeTest.java +++ b/compiler/src/jdk.internal.vm.compiler.test/src/org/graalvm/compiler/truffle/test/EngineModeTest.java @@ -24,9 +24,6 @@ */ package org.graalvm.compiler.truffle.test; -import org.graalvm.compiler.truffle.runtime.OptimizedRuntimeOptions; -import org.graalvm.compiler.truffle.runtime.GraalTruffleRuntime; -import org.graalvm.compiler.truffle.runtime.OptimizedCallTarget; import org.junit.Assert; import org.junit.Test; @@ -35,6 +32,9 @@ import com.oracle.truffle.api.frame.VirtualFrame; import com.oracle.truffle.api.nodes.DirectCallNode; import com.oracle.truffle.api.nodes.RootNode; +import com.oracle.truffle.runtime.GraalTruffleRuntime; +import com.oracle.truffle.runtime.OptimizedCallTarget; +import com.oracle.truffle.runtime.OptimizedRuntimeOptions; public class EngineModeTest extends TestWithSynchronousCompiling { diff --git a/compiler/src/jdk.internal.vm.compiler.test/src/org/graalvm/compiler/truffle/test/ExceptionActionTest.java b/compiler/src/jdk.internal.vm.compiler.test/src/org/graalvm/compiler/truffle/test/ExceptionActionTest.java index 9eaa855d55e0..773ebdc25675 100644 --- a/compiler/src/jdk.internal.vm.compiler.test/src/org/graalvm/compiler/truffle/test/ExceptionActionTest.java +++ b/compiler/src/jdk.internal.vm.compiler.test/src/org/graalvm/compiler/truffle/test/ExceptionActionTest.java @@ -37,8 +37,9 @@ import com.oracle.truffle.api.test.SubprocessTestUtils; import com.oracle.truffle.api.test.SubprocessTestUtils.Subprocess; -import org.graalvm.compiler.truffle.runtime.GraalTruffleRuntime; -import org.graalvm.compiler.truffle.runtime.OptimizedCallTarget; +import com.oracle.truffle.runtime.GraalTruffleRuntime; +import com.oracle.truffle.runtime.OptimizedCallTarget; + import org.graalvm.compiler.truffle.test.nodes.AbstractTestNode; import org.graalvm.compiler.truffle.test.nodes.RootTestNode; import org.graalvm.polyglot.Context; @@ -133,7 +134,7 @@ public void testNonPermanentBailout() throws Exception { Assert.assertFalse(formatMessage("Unexpected OptimizationFailedException.", log, output), hasOptFailedException(log)); }; executeInSubProcess(verifier, ExceptionActionTest::createConstantNode, - new String[]{"-Dgraal.CrashAt=org.graalvm.compiler.truffle.runtime.OptimizedCallTarget.profiledPERoot:Bailout"}, + new String[]{"-Dgraal.CrashAt=com.oracle.truffle.runtime.OptimizedCallTarget.profiledPERoot:Bailout"}, "engine.CompilationFailureAction", "ExitVM", "compiler.PerformanceWarningsAreFatal", "all"); } @@ -146,7 +147,7 @@ public void testNonPermanentBailoutTraceCompilationDetails() throws Exception { Assert.assertFalse(formatMessage("Unexpected OptimizationFailedException.", log, output), hasOptFailedException(log)); }; executeInSubProcess(verifier, ExceptionActionTest::createConstantNode, - new String[]{"-Dgraal.CrashAt=org.graalvm.compiler.truffle.runtime.OptimizedCallTarget.profiledPERoot:Bailout"}, + new String[]{"-Dgraal.CrashAt=com.oracle.truffle.runtime.OptimizedCallTarget.profiledPERoot:Bailout"}, "engine.TraceCompilationDetails", "true"); } diff --git a/compiler/src/jdk.internal.vm.compiler.test/src/org/graalvm/compiler/truffle/test/ExitDuringCompilationTest.java b/compiler/src/jdk.internal.vm.compiler.test/src/org/graalvm/compiler/truffle/test/ExitDuringCompilationTest.java index 2bf13d75fb9d..3fdfcb259676 100644 --- a/compiler/src/jdk.internal.vm.compiler.test/src/org/graalvm/compiler/truffle/test/ExitDuringCompilationTest.java +++ b/compiler/src/jdk.internal.vm.compiler.test/src/org/graalvm/compiler/truffle/test/ExitDuringCompilationTest.java @@ -27,11 +27,11 @@ import com.oracle.truffle.api.nodes.RootNode; import com.oracle.truffle.api.test.SubprocessTestUtils; import com.oracle.truffle.compiler.TruffleCompilerListener; +import com.oracle.truffle.runtime.AbstractCompilationTask; +import com.oracle.truffle.runtime.GraalTruffleRuntime; +import com.oracle.truffle.runtime.GraalTruffleRuntimeListener; +import com.oracle.truffle.runtime.OptimizedCallTarget; -import org.graalvm.compiler.truffle.runtime.AbstractCompilationTask; -import org.graalvm.compiler.truffle.runtime.GraalTruffleRuntime; -import org.graalvm.compiler.truffle.runtime.GraalTruffleRuntimeListener; -import org.graalvm.compiler.truffle.runtime.OptimizedCallTarget; import org.junit.Test; import java.io.IOException; diff --git a/compiler/src/jdk.internal.vm.compiler.test/src/org/graalvm/compiler/truffle/test/ExplodeLoopBlockDuplicationTest.java b/compiler/src/jdk.internal.vm.compiler.test/src/org/graalvm/compiler/truffle/test/ExplodeLoopBlockDuplicationTest.java index b153223b0879..e3ce5495c1e4 100644 --- a/compiler/src/jdk.internal.vm.compiler.test/src/org/graalvm/compiler/truffle/test/ExplodeLoopBlockDuplicationTest.java +++ b/compiler/src/jdk.internal.vm.compiler.test/src/org/graalvm/compiler/truffle/test/ExplodeLoopBlockDuplicationTest.java @@ -24,7 +24,6 @@ */ package org.graalvm.compiler.truffle.test; -import org.graalvm.compiler.truffle.runtime.OptimizedCallTarget; import org.junit.Test; import com.oracle.truffle.api.CompilerDirectives; @@ -33,6 +32,7 @@ import com.oracle.truffle.api.frame.VirtualFrame; import com.oracle.truffle.api.nodes.ExplodeLoop; import com.oracle.truffle.api.nodes.ExplodeLoop.LoopExplosionKind; +import com.oracle.truffle.runtime.OptimizedCallTarget; import com.oracle.truffle.api.nodes.Node; import com.oracle.truffle.api.nodes.RootNode; diff --git a/compiler/src/jdk.internal.vm.compiler.test/src/org/graalvm/compiler/truffle/test/FlushEngineQueueTest.java b/compiler/src/jdk.internal.vm.compiler.test/src/org/graalvm/compiler/truffle/test/FlushEngineQueueTest.java index 5e7c00cf9bec..12e5e2f52067 100644 --- a/compiler/src/jdk.internal.vm.compiler.test/src/org/graalvm/compiler/truffle/test/FlushEngineQueueTest.java +++ b/compiler/src/jdk.internal.vm.compiler.test/src/org/graalvm/compiler/truffle/test/FlushEngineQueueTest.java @@ -26,12 +26,12 @@ import static org.junit.Assert.assertNotEquals; -import org.graalvm.compiler.truffle.runtime.OptimizedCallTarget; import org.graalvm.polyglot.Context; import org.junit.Test; import com.oracle.truffle.api.frame.VirtualFrame; import com.oracle.truffle.api.nodes.RootNode; +import com.oracle.truffle.runtime.OptimizedCallTarget; @SuppressWarnings("try") public class FlushEngineQueueTest { diff --git a/compiler/src/jdk.internal.vm.compiler.test/src/org/graalvm/compiler/truffle/test/FrameAccessVerificationTest.java b/compiler/src/jdk.internal.vm.compiler.test/src/org/graalvm/compiler/truffle/test/FrameAccessVerificationTest.java index 571c28b32c74..0e3ea5006820 100644 --- a/compiler/src/jdk.internal.vm.compiler.test/src/org/graalvm/compiler/truffle/test/FrameAccessVerificationTest.java +++ b/compiler/src/jdk.internal.vm.compiler.test/src/org/graalvm/compiler/truffle/test/FrameAccessVerificationTest.java @@ -38,7 +38,6 @@ import org.graalvm.compiler.nodes.java.AbstractNewObjectNode; import org.graalvm.compiler.nodes.java.ExceptionObjectNode; import org.graalvm.compiler.nodes.virtual.AllocatedObjectNode; -import org.graalvm.compiler.truffle.runtime.OptimizedCallTarget; import org.junit.Assert; import org.junit.Assume; import org.junit.Test; @@ -51,6 +50,7 @@ import com.oracle.truffle.api.frame.FrameSlotTypeException; import com.oracle.truffle.api.frame.VirtualFrame; import com.oracle.truffle.api.nodes.RootNode; +import com.oracle.truffle.runtime.OptimizedCallTarget; import jdk.vm.ci.meta.SpeculationLog; diff --git a/compiler/src/jdk.internal.vm.compiler.test/src/org/graalvm/compiler/truffle/test/FrameDescriptorTest.java b/compiler/src/jdk.internal.vm.compiler.test/src/org/graalvm/compiler/truffle/test/FrameDescriptorTest.java index 62a14b122cc5..0da3943f1386 100644 --- a/compiler/src/jdk.internal.vm.compiler.test/src/org/graalvm/compiler/truffle/test/FrameDescriptorTest.java +++ b/compiler/src/jdk.internal.vm.compiler.test/src/org/graalvm/compiler/truffle/test/FrameDescriptorTest.java @@ -27,7 +27,6 @@ import org.graalvm.compiler.nodes.ConstantNode; import org.graalvm.compiler.nodes.ReturnNode; import org.graalvm.compiler.nodes.StructuredGraph; -import org.graalvm.compiler.truffle.runtime.OptimizedCallTarget; import org.junit.Assert; import org.junit.Test; @@ -38,6 +37,7 @@ import com.oracle.truffle.api.frame.MaterializedFrame; import com.oracle.truffle.api.frame.VirtualFrame; import com.oracle.truffle.api.nodes.RootNode; +import com.oracle.truffle.runtime.OptimizedCallTarget; public class FrameDescriptorTest extends PartialEvaluationTest { diff --git a/compiler/src/jdk.internal.vm.compiler.test/src/org/graalvm/compiler/truffle/test/GenerateInlineCompilationTest.java b/compiler/src/jdk.internal.vm.compiler.test/src/org/graalvm/compiler/truffle/test/GenerateInlineCompilationTest.java index 977f915bbe8d..b7546e4c0a1d 100644 --- a/compiler/src/jdk.internal.vm.compiler.test/src/org/graalvm/compiler/truffle/test/GenerateInlineCompilationTest.java +++ b/compiler/src/jdk.internal.vm.compiler.test/src/org/graalvm/compiler/truffle/test/GenerateInlineCompilationTest.java @@ -25,7 +25,6 @@ package org.graalvm.compiler.truffle.test; import org.graalvm.compiler.nodes.ReturnNode; -import org.graalvm.compiler.truffle.runtime.OptimizedCallTarget; import org.graalvm.compiler.truffle.test.GenerateInlineCompilationTestFactory.CustomNodeGen; import org.graalvm.compiler.truffle.test.GenerateInlineCompilationTestFactory.TestChildrenNodeGen; import org.graalvm.compiler.truffle.test.GenerateInlineCompilationTestFactory.TestDimensionsRootNodeGen; @@ -49,6 +48,7 @@ import com.oracle.truffle.api.profiles.ConditionProfile; import com.oracle.truffle.api.profiles.InlinedBranchProfile; import com.oracle.truffle.api.profiles.InlinedConditionProfile; +import com.oracle.truffle.runtime.OptimizedCallTarget; public class GenerateInlineCompilationTest extends PartialEvaluationTest { diff --git a/compiler/src/jdk.internal.vm.compiler.test/src/org/graalvm/compiler/truffle/test/GetRootNodeCompilationTest.java b/compiler/src/jdk.internal.vm.compiler.test/src/org/graalvm/compiler/truffle/test/GetRootNodeCompilationTest.java index 3a292ec2d79f..112f9fde5fc0 100644 --- a/compiler/src/jdk.internal.vm.compiler.test/src/org/graalvm/compiler/truffle/test/GetRootNodeCompilationTest.java +++ b/compiler/src/jdk.internal.vm.compiler.test/src/org/graalvm/compiler/truffle/test/GetRootNodeCompilationTest.java @@ -34,7 +34,6 @@ import org.graalvm.compiler.core.common.PermanentBailoutException; import org.graalvm.compiler.nodes.StructuredGraph; import org.graalvm.compiler.options.OptionValues; -import org.graalvm.compiler.truffle.runtime.OptimizedCallTarget; import org.graalvm.polyglot.Context; import org.junit.Assert; import org.junit.Before; @@ -47,6 +46,7 @@ import com.oracle.truffle.api.nodes.Node; import com.oracle.truffle.api.nodes.NodeUtil; import com.oracle.truffle.api.nodes.RootNode; +import com.oracle.truffle.runtime.OptimizedCallTarget; /** * Tests compilation of {@link Node#getRootNode()} and the getRootNodeImpl() intrinsic. diff --git a/compiler/src/jdk.internal.vm.compiler.test/src/org/graalvm/compiler/truffle/test/GraalTruffleRuntimeListenerTest.java b/compiler/src/jdk.internal.vm.compiler.test/src/org/graalvm/compiler/truffle/test/GraalTruffleRuntimeListenerTest.java index 2afcbca59385..a6cd1acb3bf1 100644 --- a/compiler/src/jdk.internal.vm.compiler.test/src/org/graalvm/compiler/truffle/test/GraalTruffleRuntimeListenerTest.java +++ b/compiler/src/jdk.internal.vm.compiler.test/src/org/graalvm/compiler/truffle/test/GraalTruffleRuntimeListenerTest.java @@ -40,11 +40,11 @@ import com.oracle.truffle.api.test.SubprocessTestUtils; import com.oracle.truffle.compiler.TruffleCompilerListener; +import com.oracle.truffle.runtime.AbstractCompilationTask; +import com.oracle.truffle.runtime.GraalTruffleRuntime; +import com.oracle.truffle.runtime.GraalTruffleRuntimeListener; +import com.oracle.truffle.runtime.OptimizedCallTarget; -import org.graalvm.compiler.truffle.runtime.AbstractCompilationTask; -import org.graalvm.compiler.truffle.runtime.GraalTruffleRuntime; -import org.graalvm.compiler.truffle.runtime.GraalTruffleRuntimeListener; -import org.graalvm.compiler.truffle.runtime.OptimizedCallTarget; import org.graalvm.compiler.truffle.test.nodes.RootTestNode; import org.graalvm.polyglot.Context; import org.junit.Test; diff --git a/compiler/src/jdk.internal.vm.compiler.test/src/org/graalvm/compiler/truffle/test/HashCodeIntrinsicTest.java b/compiler/src/jdk.internal.vm.compiler.test/src/org/graalvm/compiler/truffle/test/HashCodeIntrinsicTest.java index 2c689e02a382..16b7b4f4ba68 100644 --- a/compiler/src/jdk.internal.vm.compiler.test/src/org/graalvm/compiler/truffle/test/HashCodeIntrinsicTest.java +++ b/compiler/src/jdk.internal.vm.compiler.test/src/org/graalvm/compiler/truffle/test/HashCodeIntrinsicTest.java @@ -25,13 +25,13 @@ package org.graalvm.compiler.truffle.test; import org.graalvm.compiler.nodes.StructuredGraph; -import org.graalvm.compiler.truffle.runtime.OptimizedCallTarget; import org.graalvm.polyglot.Context; import org.junit.Test; import com.oracle.truffle.api.CompilerDirectives.TruffleBoundary; import com.oracle.truffle.api.frame.VirtualFrame; import com.oracle.truffle.api.nodes.RootNode; +import com.oracle.truffle.runtime.OptimizedCallTarget; public class HashCodeIntrinsicTest extends PartialEvaluationTest { @TruffleBoundary diff --git a/compiler/src/jdk.internal.vm.compiler.test/src/org/graalvm/compiler/truffle/test/HostInliningTest.java b/compiler/src/jdk.internal.vm.compiler.test/src/org/graalvm/compiler/truffle/test/HostInliningTest.java index 3fdaca98527a..779c12eab85c 100644 --- a/compiler/src/jdk.internal.vm.compiler.test/src/org/graalvm/compiler/truffle/test/HostInliningTest.java +++ b/compiler/src/jdk.internal.vm.compiler.test/src/org/graalvm/compiler/truffle/test/HostInliningTest.java @@ -56,8 +56,6 @@ import org.graalvm.compiler.phases.common.CanonicalizerPhase; import org.graalvm.compiler.phases.tiers.HighTierContext; import org.graalvm.compiler.truffle.compiler.host.HostInliningPhase; -import org.graalvm.compiler.truffle.runtime.OptimizedCallTarget; -import org.graalvm.compiler.truffle.runtime.OptimizedDirectCallNode; import org.graalvm.compiler.truffle.test.HostInliningTestFactory.IfNodeGen; import org.graalvm.polyglot.Context; import org.junit.Assert; @@ -82,6 +80,8 @@ import com.oracle.truffle.api.nodes.Node; import com.oracle.truffle.api.nodes.RootNode; import com.oracle.truffle.api.profiles.InlinedCountingConditionProfile; +import com.oracle.truffle.runtime.OptimizedCallTarget; +import com.oracle.truffle.runtime.OptimizedDirectCallNode; import jdk.vm.ci.meta.JavaKind; import jdk.vm.ci.meta.ResolvedJavaMethod; diff --git a/compiler/src/jdk.internal.vm.compiler.test/src/org/graalvm/compiler/truffle/test/IndirectCallSiteTest.java b/compiler/src/jdk.internal.vm.compiler.test/src/org/graalvm/compiler/truffle/test/IndirectCallSiteTest.java index 0493faeebeb7..fea4e46f5477 100644 --- a/compiler/src/jdk.internal.vm.compiler.test/src/org/graalvm/compiler/truffle/test/IndirectCallSiteTest.java +++ b/compiler/src/jdk.internal.vm.compiler.test/src/org/graalvm/compiler/truffle/test/IndirectCallSiteTest.java @@ -24,11 +24,6 @@ */ package org.graalvm.compiler.truffle.test; -import org.graalvm.compiler.truffle.runtime.OptimizedRuntimeOptions; -import org.graalvm.compiler.truffle.runtime.GraalTruffleRuntime; -import org.graalvm.compiler.truffle.runtime.OptimizedCallTarget; -import org.graalvm.compiler.truffle.runtime.OptimizedDirectCallNode; -import org.graalvm.compiler.truffle.runtime.OptimizedIndirectCallNode; import org.junit.Assert; import org.junit.Before; import org.junit.Test; @@ -39,6 +34,11 @@ import com.oracle.truffle.api.frame.VirtualFrame; import com.oracle.truffle.api.nodes.IndirectCallNode; import com.oracle.truffle.api.nodes.RootNode; +import com.oracle.truffle.runtime.GraalTruffleRuntime; +import com.oracle.truffle.runtime.OptimizedCallTarget; +import com.oracle.truffle.runtime.OptimizedDirectCallNode; +import com.oracle.truffle.runtime.OptimizedIndirectCallNode; +import com.oracle.truffle.runtime.OptimizedRuntimeOptions; @SuppressWarnings("try") public class IndirectCallSiteTest extends TestWithSynchronousCompiling { diff --git a/compiler/src/jdk.internal.vm.compiler.test/src/org/graalvm/compiler/truffle/test/InstrumentBranchesPhaseTest.java b/compiler/src/jdk.internal.vm.compiler.test/src/org/graalvm/compiler/truffle/test/InstrumentBranchesPhaseTest.java index 4f0b433314c0..2f0973e05126 100644 --- a/compiler/src/jdk.internal.vm.compiler.test/src/org/graalvm/compiler/truffle/test/InstrumentBranchesPhaseTest.java +++ b/compiler/src/jdk.internal.vm.compiler.test/src/org/graalvm/compiler/truffle/test/InstrumentBranchesPhaseTest.java @@ -30,7 +30,6 @@ import org.graalvm.compiler.api.directives.GraalDirectives; import org.graalvm.compiler.truffle.compiler.PartialEvaluator; import org.graalvm.compiler.truffle.compiler.phases.InstrumentPhase; -import org.graalvm.compiler.truffle.runtime.OptimizedCallTarget; import org.graalvm.compiler.truffle.test.nodes.AbstractTestNode; import org.graalvm.compiler.truffle.test.nodes.RootTestNode; import org.graalvm.polyglot.Context; @@ -41,6 +40,7 @@ import com.oracle.truffle.api.frame.FrameDescriptor; import com.oracle.truffle.api.frame.VirtualFrame; import com.oracle.truffle.api.test.ReflectionUtils; +import com.oracle.truffle.runtime.OptimizedCallTarget; public class InstrumentBranchesPhaseTest extends PartialEvaluationTest { diff --git a/compiler/src/jdk.internal.vm.compiler.test/src/org/graalvm/compiler/truffle/test/LanguageContextFreedTest.java b/compiler/src/jdk.internal.vm.compiler.test/src/org/graalvm/compiler/truffle/test/LanguageContextFreedTest.java index 39efc1db20fb..dfbbb38f013c 100644 --- a/compiler/src/jdk.internal.vm.compiler.test/src/org/graalvm/compiler/truffle/test/LanguageContextFreedTest.java +++ b/compiler/src/jdk.internal.vm.compiler.test/src/org/graalvm/compiler/truffle/test/LanguageContextFreedTest.java @@ -33,9 +33,10 @@ import java.util.function.Supplier; import com.oracle.truffle.api.test.SubprocessTestUtils; +import com.oracle.truffle.runtime.OptimizedCallTarget; +import com.oracle.truffle.runtime.OptimizedRuntimeOptions; + import org.graalvm.collections.Pair; -import org.graalvm.compiler.truffle.runtime.OptimizedCallTarget; -import org.graalvm.compiler.truffle.runtime.OptimizedRuntimeOptions; import org.graalvm.polyglot.Context; import org.graalvm.polyglot.Engine; import org.graalvm.polyglot.Source; diff --git a/compiler/src/jdk.internal.vm.compiler.test/src/org/graalvm/compiler/truffle/test/LazyClassLoadingTest.java b/compiler/src/jdk.internal.vm.compiler.test/src/org/graalvm/compiler/truffle/test/LazyClassLoadingTest.java index 645c42ffd363..65d2a6c37ff2 100644 --- a/compiler/src/jdk.internal.vm.compiler.test/src/org/graalvm/compiler/truffle/test/LazyClassLoadingTest.java +++ b/compiler/src/jdk.internal.vm.compiler.test/src/org/graalvm/compiler/truffle/test/LazyClassLoadingTest.java @@ -24,9 +24,9 @@ */ package org.graalvm.compiler.truffle.test; +import static com.oracle.truffle.runtime.OptimizedRuntimeOptions.CompileImmediately; import static org.graalvm.compiler.test.SubprocessUtil.getVMCommandLine; import static org.graalvm.compiler.test.SubprocessUtil.withoutDebuggerArguments; -import static org.graalvm.compiler.truffle.runtime.OptimizedRuntimeOptions.CompileImmediately; import java.io.IOException; import java.util.ArrayList; @@ -49,12 +49,12 @@ import org.graalvm.compiler.options.OptionsParser; import org.graalvm.compiler.test.SubprocessUtil; import org.graalvm.compiler.test.SubprocessUtil.Subprocess; -import org.graalvm.compiler.truffle.runtime.OptimizedCallTarget; import org.junit.Assert; import org.junit.Assume; import org.junit.Test; import com.oracle.truffle.api.nodes.RootNode; +import com.oracle.truffle.runtime.OptimizedCallTarget; import jdk.vm.ci.runtime.JVMCICompilerFactory; import jdk.vm.ci.services.JVMCIServiceLocator; diff --git a/compiler/src/jdk.internal.vm.compiler.test/src/org/graalvm/compiler/truffle/test/LibraryCompilationTest.java b/compiler/src/jdk.internal.vm.compiler.test/src/org/graalvm/compiler/truffle/test/LibraryCompilationTest.java index e6fb5c8860ad..103889e87531 100644 --- a/compiler/src/jdk.internal.vm.compiler.test/src/org/graalvm/compiler/truffle/test/LibraryCompilationTest.java +++ b/compiler/src/jdk.internal.vm.compiler.test/src/org/graalvm/compiler/truffle/test/LibraryCompilationTest.java @@ -24,7 +24,6 @@ */ package org.graalvm.compiler.truffle.test; -import org.graalvm.compiler.truffle.runtime.OptimizedCallTarget; import org.junit.Test; import com.oracle.truffle.api.CompilerAsserts; @@ -36,6 +35,7 @@ import com.oracle.truffle.api.library.Library; import com.oracle.truffle.api.library.LibraryFactory; import com.oracle.truffle.api.nodes.RootNode; +import com.oracle.truffle.runtime.OptimizedCallTarget; import jdk.vm.ci.code.BailoutException; diff --git a/compiler/src/jdk.internal.vm.compiler.test/src/org/graalvm/compiler/truffle/test/LibrarySplittingStrategyTest.java b/compiler/src/jdk.internal.vm.compiler.test/src/org/graalvm/compiler/truffle/test/LibrarySplittingStrategyTest.java index 8a215f7762d9..e43e1cb7fb14 100644 --- a/compiler/src/jdk.internal.vm.compiler.test/src/org/graalvm/compiler/truffle/test/LibrarySplittingStrategyTest.java +++ b/compiler/src/jdk.internal.vm.compiler.test/src/org/graalvm/compiler/truffle/test/LibrarySplittingStrategyTest.java @@ -24,7 +24,6 @@ */ package org.graalvm.compiler.truffle.test; -import org.graalvm.compiler.truffle.runtime.OptimizedCallTarget; import org.junit.Before; import org.junit.Test; @@ -45,6 +44,7 @@ import com.oracle.truffle.api.library.Library; import com.oracle.truffle.api.object.DynamicObject; import com.oracle.truffle.api.object.Shape; +import com.oracle.truffle.runtime.OptimizedCallTarget; public class LibrarySplittingStrategyTest extends AbstractSplittingStrategyTest { diff --git a/compiler/src/jdk.internal.vm.compiler.test/src/org/graalvm/compiler/truffle/test/LoopNodeOSRTest.java b/compiler/src/jdk.internal.vm.compiler.test/src/org/graalvm/compiler/truffle/test/LoopNodeOSRTest.java index 7642da4d925f..047c16ad0d8a 100644 --- a/compiler/src/jdk.internal.vm.compiler.test/src/org/graalvm/compiler/truffle/test/LoopNodeOSRTest.java +++ b/compiler/src/jdk.internal.vm.compiler.test/src/org/graalvm/compiler/truffle/test/LoopNodeOSRTest.java @@ -26,8 +26,6 @@ import java.util.stream.IntStream; -import org.graalvm.compiler.truffle.runtime.BytecodeOSRMetadata; -import org.graalvm.compiler.truffle.runtime.OptimizedCallTarget; import org.junit.Assert; import org.junit.Test; @@ -43,6 +41,8 @@ import com.oracle.truffle.api.nodes.Node; import com.oracle.truffle.api.nodes.RepeatingNode; import com.oracle.truffle.api.nodes.RootNode; +import com.oracle.truffle.runtime.BytecodeOSRMetadata; +import com.oracle.truffle.runtime.OptimizedCallTarget; @SuppressWarnings("deprecation") public class LoopNodeOSRTest extends TestWithSynchronousCompiling { diff --git a/compiler/src/jdk.internal.vm.compiler.test/src/org/graalvm/compiler/truffle/test/LoopNodePartialEvaluationTest.java b/compiler/src/jdk.internal.vm.compiler.test/src/org/graalvm/compiler/truffle/test/LoopNodePartialEvaluationTest.java index 3796130670fc..bba78a82b30d 100644 --- a/compiler/src/jdk.internal.vm.compiler.test/src/org/graalvm/compiler/truffle/test/LoopNodePartialEvaluationTest.java +++ b/compiler/src/jdk.internal.vm.compiler.test/src/org/graalvm/compiler/truffle/test/LoopNodePartialEvaluationTest.java @@ -32,7 +32,6 @@ import org.graalvm.compiler.nodes.ProfileData.ProfileSource; import org.graalvm.compiler.nodes.StructuredGraph; import org.graalvm.compiler.nodes.cfg.ControlFlowGraph; -import org.graalvm.compiler.truffle.runtime.OptimizedCallTarget; import org.graalvm.polyglot.Context; import org.junit.Assert; import org.junit.Test; @@ -45,6 +44,7 @@ import com.oracle.truffle.api.nodes.Node; import com.oracle.truffle.api.nodes.RepeatingNode; import com.oracle.truffle.api.nodes.RootNode; +import com.oracle.truffle.runtime.OptimizedCallTarget; public class LoopNodePartialEvaluationTest extends PartialEvaluationTest { diff --git a/compiler/src/jdk.internal.vm.compiler.test/src/org/graalvm/compiler/truffle/test/MaterializedFrameTest.java b/compiler/src/jdk.internal.vm.compiler.test/src/org/graalvm/compiler/truffle/test/MaterializedFrameTest.java index e87a5935e761..1f7edc447da8 100644 --- a/compiler/src/jdk.internal.vm.compiler.test/src/org/graalvm/compiler/truffle/test/MaterializedFrameTest.java +++ b/compiler/src/jdk.internal.vm.compiler.test/src/org/graalvm/compiler/truffle/test/MaterializedFrameTest.java @@ -36,7 +36,6 @@ import org.graalvm.compiler.nodes.calc.IsNullNode; import org.graalvm.compiler.nodes.java.LoadFieldNode; import org.graalvm.compiler.nodes.java.MethodCallTargetNode; -import org.graalvm.compiler.truffle.runtime.OptimizedCallTarget; import org.junit.Test; import com.oracle.truffle.api.CompilerDirectives; @@ -48,6 +47,7 @@ import com.oracle.truffle.api.frame.VirtualFrame; import com.oracle.truffle.api.nodes.RootNode; import com.oracle.truffle.api.profiles.ValueProfile; +import com.oracle.truffle.runtime.OptimizedCallTarget; public class MaterializedFrameTest extends PartialEvaluationTest { private static RootNode createRootNode() { diff --git a/compiler/src/jdk.internal.vm.compiler.test/src/org/graalvm/compiler/truffle/test/MergeExplodeProxyTest.java b/compiler/src/jdk.internal.vm.compiler.test/src/org/graalvm/compiler/truffle/test/MergeExplodeProxyTest.java index 2978b4dc33eb..dae4019dec0a 100644 --- a/compiler/src/jdk.internal.vm.compiler.test/src/org/graalvm/compiler/truffle/test/MergeExplodeProxyTest.java +++ b/compiler/src/jdk.internal.vm.compiler.test/src/org/graalvm/compiler/truffle/test/MergeExplodeProxyTest.java @@ -28,7 +28,6 @@ import org.graalvm.compiler.nodes.ProxyNode; import org.graalvm.compiler.nodes.StructuredGraph; import org.graalvm.compiler.phases.util.GraphOrder; -import org.graalvm.compiler.truffle.runtime.OptimizedCallTarget; import org.junit.Assert; import org.junit.Ignore; import org.junit.Test; @@ -44,6 +43,7 @@ import com.oracle.truffle.api.nodes.DirectCallNode; import com.oracle.truffle.api.nodes.ExplodeLoop; import com.oracle.truffle.api.nodes.ExplodeLoop.LoopExplosionKind; +import com.oracle.truffle.runtime.OptimizedCallTarget; import com.oracle.truffle.api.nodes.RootNode; /** diff --git a/compiler/src/jdk.internal.vm.compiler.test/src/org/graalvm/compiler/truffle/test/MultiTierAssumptionInvalidationTest.java b/compiler/src/jdk.internal.vm.compiler.test/src/org/graalvm/compiler/truffle/test/MultiTierAssumptionInvalidationTest.java index 487d3290ad30..c53897c1e89b 100644 --- a/compiler/src/jdk.internal.vm.compiler.test/src/org/graalvm/compiler/truffle/test/MultiTierAssumptionInvalidationTest.java +++ b/compiler/src/jdk.internal.vm.compiler.test/src/org/graalvm/compiler/truffle/test/MultiTierAssumptionInvalidationTest.java @@ -28,7 +28,6 @@ import static org.junit.Assert.assertFalse; import static org.junit.Assert.assertTrue; -import org.graalvm.compiler.truffle.runtime.OptimizedCallTarget; import org.graalvm.polyglot.Context; import org.junit.Assume; import org.junit.Test; @@ -39,6 +38,7 @@ import com.oracle.truffle.api.frame.VirtualFrame; import com.oracle.truffle.api.nodes.RootNode; import com.oracle.truffle.api.test.CompileImmediatelyCheck; +import com.oracle.truffle.runtime.OptimizedCallTarget; public class MultiTierAssumptionInvalidationTest { diff --git a/compiler/src/jdk.internal.vm.compiler.test/src/org/graalvm/compiler/truffle/test/MultiTierCompilationTest.java b/compiler/src/jdk.internal.vm.compiler.test/src/org/graalvm/compiler/truffle/test/MultiTierCompilationTest.java index f75abcdef8a5..f6eed1e6c0be 100644 --- a/compiler/src/jdk.internal.vm.compiler.test/src/org/graalvm/compiler/truffle/test/MultiTierCompilationTest.java +++ b/compiler/src/jdk.internal.vm.compiler.test/src/org/graalvm/compiler/truffle/test/MultiTierCompilationTest.java @@ -24,10 +24,9 @@ */ package org.graalvm.compiler.truffle.test; -import static org.graalvm.compiler.truffle.runtime.OptimizedRuntimeOptions.FirstTierCompilationThreshold; -import static org.graalvm.compiler.truffle.runtime.OptimizedRuntimeOptions.LastTierCompilationThreshold; +import static com.oracle.truffle.runtime.OptimizedRuntimeOptions.FirstTierCompilationThreshold; +import static com.oracle.truffle.runtime.OptimizedRuntimeOptions.LastTierCompilationThreshold; -import org.graalvm.compiler.truffle.runtime.OptimizedCallTarget; import org.graalvm.polyglot.Context; import org.junit.Assert; import org.junit.Test; @@ -41,6 +40,7 @@ import com.oracle.truffle.api.nodes.Node; import com.oracle.truffle.api.nodes.RepeatingNode; import com.oracle.truffle.api.nodes.RootNode; +import com.oracle.truffle.runtime.OptimizedCallTarget; public class MultiTierCompilationTest extends PartialEvaluationTest { diff --git a/compiler/src/jdk.internal.vm.compiler.test/src/org/graalvm/compiler/truffle/test/NodeLimitTest.java b/compiler/src/jdk.internal.vm.compiler.test/src/org/graalvm/compiler/truffle/test/NodeLimitTest.java index 3aab74159c72..ac4bf235e78f 100644 --- a/compiler/src/jdk.internal.vm.compiler.test/src/org/graalvm/compiler/truffle/test/NodeLimitTest.java +++ b/compiler/src/jdk.internal.vm.compiler.test/src/org/graalvm/compiler/truffle/test/NodeLimitTest.java @@ -30,8 +30,6 @@ import org.graalvm.compiler.core.common.PermanentBailoutException; import org.graalvm.compiler.nodes.StructuredGraph; import org.graalvm.compiler.phases.contract.NodeCostUtil; -import org.graalvm.compiler.truffle.runtime.OptimizedRuntimeOptions; -import org.graalvm.compiler.truffle.runtime.OptimizedCallTarget; import org.graalvm.polyglot.Context; import org.junit.Assert; import org.junit.Assume; @@ -43,6 +41,8 @@ import com.oracle.truffle.api.frame.VirtualFrame; import com.oracle.truffle.api.nodes.ExplodeLoop; import com.oracle.truffle.api.nodes.RootNode; +import com.oracle.truffle.runtime.OptimizedCallTarget; +import com.oracle.truffle.runtime.OptimizedRuntimeOptions; public class NodeLimitTest extends PartialEvaluationTest { diff --git a/compiler/src/jdk.internal.vm.compiler.test/src/org/graalvm/compiler/truffle/test/NodeSplittingStrategyTest.java b/compiler/src/jdk.internal.vm.compiler.test/src/org/graalvm/compiler/truffle/test/NodeSplittingStrategyTest.java index 7d35b5963481..8962c59b1a81 100644 --- a/compiler/src/jdk.internal.vm.compiler.test/src/org/graalvm/compiler/truffle/test/NodeSplittingStrategyTest.java +++ b/compiler/src/jdk.internal.vm.compiler.test/src/org/graalvm/compiler/truffle/test/NodeSplittingStrategyTest.java @@ -24,9 +24,6 @@ */ package org.graalvm.compiler.truffle.test; -import org.graalvm.compiler.truffle.runtime.OptimizedRuntimeOptions; -import org.graalvm.compiler.truffle.runtime.OptimizedCallTarget; -import org.graalvm.compiler.truffle.runtime.OptimizedDirectCallNode; import org.graalvm.polyglot.Context; import org.junit.Assert; import org.junit.Before; @@ -46,6 +43,9 @@ import com.oracle.truffle.api.nodes.Node; import com.oracle.truffle.api.nodes.RootNode; import com.oracle.truffle.api.test.polyglot.ProxyLanguage; +import com.oracle.truffle.runtime.OptimizedCallTarget; +import com.oracle.truffle.runtime.OptimizedDirectCallNode; +import com.oracle.truffle.runtime.OptimizedRuntimeOptions; public class NodeSplittingStrategyTest extends AbstractSplittingStrategyTest { diff --git a/compiler/src/jdk.internal.vm.compiler.test/src/org/graalvm/compiler/truffle/test/OptimizedBlockNodeTest.java b/compiler/src/jdk.internal.vm.compiler.test/src/org/graalvm/compiler/truffle/test/OptimizedBlockNodeTest.java index 12d47c4381a6..bc965e8e9d69 100644 --- a/compiler/src/jdk.internal.vm.compiler.test/src/org/graalvm/compiler/truffle/test/OptimizedBlockNodeTest.java +++ b/compiler/src/jdk.internal.vm.compiler.test/src/org/graalvm/compiler/truffle/test/OptimizedBlockNodeTest.java @@ -39,9 +39,6 @@ import com.oracle.truffle.sl.runtime.SLStrings; import org.graalvm.compiler.test.SubprocessUtil; -import org.graalvm.compiler.truffle.runtime.OptimizedBlockNode; -import org.graalvm.compiler.truffle.runtime.OptimizedBlockNode.PartialBlocks; -import org.graalvm.compiler.truffle.runtime.OptimizedCallTarget; import org.graalvm.polyglot.Context; import org.graalvm.polyglot.Value; import org.junit.After; @@ -64,6 +61,9 @@ import com.oracle.truffle.api.source.Source; import com.oracle.truffle.api.source.SourceSection; import com.oracle.truffle.api.test.polyglot.ProxyLanguage; +import com.oracle.truffle.runtime.OptimizedBlockNode; +import com.oracle.truffle.runtime.OptimizedCallTarget; +import com.oracle.truffle.runtime.OptimizedBlockNode.PartialBlocks; import com.oracle.truffle.sl.runtime.SLContext; public class OptimizedBlockNodeTest { diff --git a/compiler/src/jdk.internal.vm.compiler.test/src/org/graalvm/compiler/truffle/test/OptimizedCallTargetTest.java b/compiler/src/jdk.internal.vm.compiler.test/src/org/graalvm/compiler/truffle/test/OptimizedCallTargetTest.java index b7ff06d5f6a0..a5a8039c3c28 100644 --- a/compiler/src/jdk.internal.vm.compiler.test/src/org/graalvm/compiler/truffle/test/OptimizedCallTargetTest.java +++ b/compiler/src/jdk.internal.vm.compiler.test/src/org/graalvm/compiler/truffle/test/OptimizedCallTargetTest.java @@ -36,10 +36,6 @@ import java.util.stream.Collectors; import java.util.stream.IntStream; -import org.graalvm.compiler.truffle.runtime.OptimizedRuntimeOptions; -import org.graalvm.compiler.truffle.runtime.GraalTruffleRuntime; -import org.graalvm.compiler.truffle.runtime.OptimizedCallTarget; -import org.graalvm.compiler.truffle.runtime.OptimizedOSRLoopNode; import org.graalvm.compiler.truffle.test.nodes.AbstractTestNode; import org.graalvm.compiler.truffle.test.nodes.ConstantTestNode; import org.graalvm.compiler.truffle.test.nodes.RootTestNode; @@ -58,6 +54,10 @@ import com.oracle.truffle.api.nodes.Node; import com.oracle.truffle.api.nodes.RepeatingNode; import com.oracle.truffle.api.nodes.RootNode; +import com.oracle.truffle.runtime.GraalTruffleRuntime; +import com.oracle.truffle.runtime.OptimizedCallTarget; +import com.oracle.truffle.runtime.OptimizedOSRLoopNode; +import com.oracle.truffle.runtime.OptimizedRuntimeOptions; @SuppressWarnings("try") public class OptimizedCallTargetTest extends TestWithSynchronousCompiling { diff --git a/compiler/src/jdk.internal.vm.compiler.test/src/org/graalvm/compiler/truffle/test/OptimizedOSRLoopNodeTest.java b/compiler/src/jdk.internal.vm.compiler.test/src/org/graalvm/compiler/truffle/test/OptimizedOSRLoopNodeTest.java index a23999f849c6..0e202048e726 100644 --- a/compiler/src/jdk.internal.vm.compiler.test/src/org/graalvm/compiler/truffle/test/OptimizedOSRLoopNodeTest.java +++ b/compiler/src/jdk.internal.vm.compiler.test/src/org/graalvm/compiler/truffle/test/OptimizedOSRLoopNodeTest.java @@ -24,9 +24,9 @@ */ package org.graalvm.compiler.truffle.test; -import static org.graalvm.compiler.truffle.runtime.OptimizedRuntimeOptions.MinInvokeThreshold; -import static org.graalvm.compiler.truffle.runtime.OptimizedRuntimeOptions.OSRCompilationThreshold; -import static org.graalvm.compiler.truffle.runtime.OptimizedRuntimeOptions.SingleTierCompilationThreshold; +import static com.oracle.truffle.runtime.OptimizedRuntimeOptions.MinInvokeThreshold; +import static com.oracle.truffle.runtime.OptimizedRuntimeOptions.OSRCompilationThreshold; +import static com.oracle.truffle.runtime.OptimizedRuntimeOptions.SingleTierCompilationThreshold; import static org.junit.Assert.assertSame; import static org.junit.Assert.assertTrue; @@ -38,10 +38,6 @@ import java.util.function.Function; import java.util.stream.IntStream; -import org.graalvm.compiler.truffle.runtime.GraalTruffleRuntime; -import org.graalvm.compiler.truffle.runtime.OptimizedCallTarget; -import org.graalvm.compiler.truffle.runtime.OptimizedDirectCallNode; -import org.graalvm.compiler.truffle.runtime.OptimizedOSRLoopNode; import org.graalvm.polyglot.Context; import org.junit.Assert; import org.junit.Before; @@ -71,6 +67,10 @@ import com.oracle.truffle.api.nodes.RepeatingNode; import com.oracle.truffle.api.nodes.RootNode; import com.oracle.truffle.api.test.polyglot.ProxyLanguage; +import com.oracle.truffle.runtime.GraalTruffleRuntime; +import com.oracle.truffle.runtime.OptimizedCallTarget; +import com.oracle.truffle.runtime.OptimizedDirectCallNode; +import com.oracle.truffle.runtime.OptimizedOSRLoopNode; @RunWith(Theories.class) public class OptimizedOSRLoopNodeTest extends TestWithSynchronousCompiling { diff --git a/compiler/src/jdk.internal.vm.compiler.test/src/org/graalvm/compiler/truffle/test/OverrideOptionsTest.java b/compiler/src/jdk.internal.vm.compiler.test/src/org/graalvm/compiler/truffle/test/OverrideOptionsTest.java index 2fdad2c9e848..482b23d3c037 100644 --- a/compiler/src/jdk.internal.vm.compiler.test/src/org/graalvm/compiler/truffle/test/OverrideOptionsTest.java +++ b/compiler/src/jdk.internal.vm.compiler.test/src/org/graalvm/compiler/truffle/test/OverrideOptionsTest.java @@ -24,14 +24,14 @@ */ package org.graalvm.compiler.truffle.test; -import org.graalvm.compiler.truffle.runtime.OptimizedRuntimeOptions; -import org.graalvm.compiler.truffle.runtime.OptimizedCallTarget; import org.graalvm.options.OptionValues; import org.graalvm.polyglot.Context; import org.junit.Assert; import org.junit.Test; import com.oracle.truffle.api.nodes.RootNode; +import com.oracle.truffle.runtime.OptimizedCallTarget; +import com.oracle.truffle.runtime.OptimizedRuntimeOptions; public class OverrideOptionsTest extends TruffleCompilerImplTest { diff --git a/compiler/src/jdk.internal.vm.compiler.test/src/org/graalvm/compiler/truffle/test/PartialEvaluationTest.java b/compiler/src/jdk.internal.vm.compiler.test/src/org/graalvm/compiler/truffle/test/PartialEvaluationTest.java index 42fb8b5612ad..68d23e7e6648 100644 --- a/compiler/src/jdk.internal.vm.compiler.test/src/org/graalvm/compiler/truffle/test/PartialEvaluationTest.java +++ b/compiler/src/jdk.internal.vm.compiler.test/src/org/graalvm/compiler/truffle/test/PartialEvaluationTest.java @@ -51,8 +51,6 @@ import org.graalvm.compiler.truffle.compiler.TruffleDebugJavaMethod; import org.graalvm.compiler.truffle.compiler.TruffleTierContext; import org.graalvm.compiler.truffle.compiler.phases.TruffleTier; -import org.graalvm.compiler.truffle.runtime.GraalTruffleRuntime; -import org.graalvm.compiler.truffle.runtime.OptimizedCallTarget; import org.junit.Assert; import com.oracle.truffle.api.CallTarget; @@ -61,6 +59,8 @@ import com.oracle.truffle.api.nodes.ControlFlowException; import com.oracle.truffle.api.nodes.RootNode; import com.oracle.truffle.compiler.TruffleCompilationTask; +import com.oracle.truffle.runtime.GraalTruffleRuntime; +import com.oracle.truffle.runtime.OptimizedCallTarget; import jdk.vm.ci.code.BailoutException; import jdk.vm.ci.meta.Constant; diff --git a/compiler/src/jdk.internal.vm.compiler.test/src/org/graalvm/compiler/truffle/test/PerformanceWarningTest.java b/compiler/src/jdk.internal.vm.compiler.test/src/org/graalvm/compiler/truffle/test/PerformanceWarningTest.java index aa25ff12901d..27d087c0a8b3 100644 --- a/compiler/src/jdk.internal.vm.compiler.test/src/org/graalvm/compiler/truffle/test/PerformanceWarningTest.java +++ b/compiler/src/jdk.internal.vm.compiler.test/src/org/graalvm/compiler/truffle/test/PerformanceWarningTest.java @@ -32,9 +32,6 @@ import org.graalvm.compiler.serviceprovider.GraalServices; import org.graalvm.compiler.truffle.compiler.TruffleCompilation; import org.graalvm.compiler.truffle.compiler.TruffleCompilerImpl; -import org.graalvm.compiler.truffle.runtime.GraalTruffleRuntime; -import org.graalvm.compiler.truffle.runtime.OptimizedCallTarget; -import org.graalvm.compiler.truffle.runtime.OptimizedDirectCallNode; import org.graalvm.polyglot.Context; import org.junit.Assert; import org.junit.Before; @@ -46,6 +43,9 @@ import com.oracle.truffle.api.frame.VirtualFrame; import com.oracle.truffle.api.nodes.RootNode; import com.oracle.truffle.compiler.TruffleCompilationTask; +import com.oracle.truffle.runtime.GraalTruffleRuntime; +import com.oracle.truffle.runtime.OptimizedCallTarget; +import com.oracle.truffle.runtime.OptimizedDirectCallNode; public class PerformanceWarningTest extends TruffleCompilerImplTest { diff --git a/compiler/src/jdk.internal.vm.compiler.test/src/org/graalvm/compiler/truffle/test/PolyglotEngineOptionsTest.java b/compiler/src/jdk.internal.vm.compiler.test/src/org/graalvm/compiler/truffle/test/PolyglotEngineOptionsTest.java index 76f7ee34c322..5ebec2955489 100644 --- a/compiler/src/jdk.internal.vm.compiler.test/src/org/graalvm/compiler/truffle/test/PolyglotEngineOptionsTest.java +++ b/compiler/src/jdk.internal.vm.compiler.test/src/org/graalvm/compiler/truffle/test/PolyglotEngineOptionsTest.java @@ -25,8 +25,7 @@ package org.graalvm.compiler.truffle.test; import com.oracle.truffle.sl.runtime.SLStrings; -import org.graalvm.compiler.truffle.runtime.OptimizedRuntimeOptions; -import org.graalvm.compiler.truffle.runtime.OptimizedCallTarget; + import org.graalvm.options.OptionDescriptor; import org.graalvm.options.OptionStability; import org.graalvm.polyglot.Context; @@ -35,6 +34,8 @@ import org.junit.Test; import com.oracle.truffle.api.nodes.RootNode; +import com.oracle.truffle.runtime.OptimizedCallTarget; +import com.oracle.truffle.runtime.OptimizedRuntimeOptions; import com.oracle.truffle.sl.runtime.SLContext; import com.oracle.truffle.sl.runtime.SLFunction; diff --git a/compiler/src/jdk.internal.vm.compiler.test/src/org/graalvm/compiler/truffle/test/PropagateHotnessToLexicalSingleCallerTest.java b/compiler/src/jdk.internal.vm.compiler.test/src/org/graalvm/compiler/truffle/test/PropagateHotnessToLexicalSingleCallerTest.java index c1245100eecd..5b2dac71025d 100644 --- a/compiler/src/jdk.internal.vm.compiler.test/src/org/graalvm/compiler/truffle/test/PropagateHotnessToLexicalSingleCallerTest.java +++ b/compiler/src/jdk.internal.vm.compiler.test/src/org/graalvm/compiler/truffle/test/PropagateHotnessToLexicalSingleCallerTest.java @@ -26,8 +26,6 @@ import java.util.function.Function; -import org.graalvm.compiler.truffle.runtime.GraalTruffleRuntime; -import org.graalvm.compiler.truffle.runtime.OptimizedCallTarget; import org.graalvm.polyglot.Context; import org.junit.Assert; import org.junit.Test; @@ -41,6 +39,8 @@ import com.oracle.truffle.api.nodes.Node; import com.oracle.truffle.api.nodes.RepeatingNode; import com.oracle.truffle.api.nodes.RootNode; +import com.oracle.truffle.runtime.GraalTruffleRuntime; +import com.oracle.truffle.runtime.OptimizedCallTarget; public class PropagateHotnessToLexicalSingleCallerTest extends TestWithSynchronousCompiling { diff --git a/compiler/src/jdk.internal.vm.compiler.test/src/org/graalvm/compiler/truffle/test/ResourceLimitsCompilationTest.java b/compiler/src/jdk.internal.vm.compiler.test/src/org/graalvm/compiler/truffle/test/ResourceLimitsCompilationTest.java index 981e10c626e5..890180f8cc2a 100644 --- a/compiler/src/jdk.internal.vm.compiler.test/src/org/graalvm/compiler/truffle/test/ResourceLimitsCompilationTest.java +++ b/compiler/src/jdk.internal.vm.compiler.test/src/org/graalvm/compiler/truffle/test/ResourceLimitsCompilationTest.java @@ -37,7 +37,6 @@ import org.graalvm.compiler.nodes.java.MethodCallTargetNode; import org.graalvm.compiler.nodes.memory.ReadNode; import org.graalvm.compiler.nodes.memory.WriteNode; -import org.graalvm.compiler.truffle.runtime.OptimizedCallTarget; import org.graalvm.polyglot.Context; import org.graalvm.polyglot.Engine; import org.graalvm.polyglot.ResourceLimits; @@ -46,6 +45,7 @@ import com.oracle.truffle.api.TruffleOptions; import com.oracle.truffle.api.instrumentation.test.InstrumentationTestLanguage; +import com.oracle.truffle.runtime.OptimizedCallTarget; public class ResourceLimitsCompilationTest extends PartialEvaluationTest { diff --git a/compiler/src/jdk.internal.vm.compiler.test/src/org/graalvm/compiler/truffle/test/RewriteDuringCompilationTest.java b/compiler/src/jdk.internal.vm.compiler.test/src/org/graalvm/compiler/truffle/test/RewriteDuringCompilationTest.java index a678116718f2..fd8f7542460d 100644 --- a/compiler/src/jdk.internal.vm.compiler.test/src/org/graalvm/compiler/truffle/test/RewriteDuringCompilationTest.java +++ b/compiler/src/jdk.internal.vm.compiler.test/src/org/graalvm/compiler/truffle/test/RewriteDuringCompilationTest.java @@ -36,8 +36,6 @@ import java.util.concurrent.TimeUnit; import java.util.concurrent.atomic.AtomicReference; -import org.graalvm.compiler.truffle.runtime.OptimizedCallTarget; -import org.graalvm.compiler.truffle.runtime.OptimizedOSRLoopNode; import org.graalvm.polyglot.Context; import org.graalvm.polyglot.Source; import org.junit.Assert; @@ -59,6 +57,8 @@ import com.oracle.truffle.api.source.SourceSection; import com.oracle.truffle.api.test.polyglot.AbstractPolyglotTest; import com.oracle.truffle.api.test.polyglot.ProxyLanguage; +import com.oracle.truffle.runtime.OptimizedCallTarget; +import com.oracle.truffle.runtime.OptimizedOSRLoopNode; public class RewriteDuringCompilationTest extends AbstractPolyglotTest { abstract static class BaseNode extends Node { diff --git a/compiler/src/jdk.internal.vm.compiler.test/src/org/graalvm/compiler/truffle/test/SafepointRethrowDeoptPETest.java b/compiler/src/jdk.internal.vm.compiler.test/src/org/graalvm/compiler/truffle/test/SafepointRethrowDeoptPETest.java index 835cf85ba258..a7c17147eb05 100644 --- a/compiler/src/jdk.internal.vm.compiler.test/src/org/graalvm/compiler/truffle/test/SafepointRethrowDeoptPETest.java +++ b/compiler/src/jdk.internal.vm.compiler.test/src/org/graalvm/compiler/truffle/test/SafepointRethrowDeoptPETest.java @@ -27,7 +27,6 @@ import java.util.concurrent.CountDownLatch; import org.graalvm.compiler.core.common.GraalOptions; -import org.graalvm.compiler.truffle.runtime.OptimizedCallTarget; import org.junit.Assert; import org.junit.Assume; import org.junit.Test; @@ -35,6 +34,7 @@ import com.oracle.truffle.api.frame.VirtualFrame; import com.oracle.truffle.api.nodes.Node; import com.oracle.truffle.api.nodes.RootNode; +import com.oracle.truffle.runtime.OptimizedCallTarget; public class SafepointRethrowDeoptPETest extends PartialEvaluationTest { diff --git a/compiler/src/jdk.internal.vm.compiler.test/src/org/graalvm/compiler/truffle/test/SimplePartialEvaluationTest.java b/compiler/src/jdk.internal.vm.compiler.test/src/org/graalvm/compiler/truffle/test/SimplePartialEvaluationTest.java index 8170c6340293..878c8fb073d6 100644 --- a/compiler/src/jdk.internal.vm.compiler.test/src/org/graalvm/compiler/truffle/test/SimplePartialEvaluationTest.java +++ b/compiler/src/jdk.internal.vm.compiler.test/src/org/graalvm/compiler/truffle/test/SimplePartialEvaluationTest.java @@ -31,7 +31,6 @@ import org.graalvm.compiler.nodes.StructuredGraph; import org.graalvm.compiler.options.OptionValues; import org.graalvm.compiler.replacements.PEGraphDecoder; -import org.graalvm.compiler.truffle.runtime.OptimizedCallTarget; import org.graalvm.compiler.truffle.test.nodes.AbstractTestNode; import org.graalvm.compiler.truffle.test.nodes.AddTestNode; import org.graalvm.compiler.truffle.test.nodes.BlockTestNode; @@ -69,6 +68,7 @@ import com.oracle.truffle.api.frame.FrameSlotKind; import com.oracle.truffle.api.impl.FrameWithoutBoxing; import com.oracle.truffle.api.nodes.RootNode; +import com.oracle.truffle.runtime.OptimizedCallTarget; import jdk.vm.ci.code.BailoutException; diff --git a/compiler/src/jdk.internal.vm.compiler.test/src/org/graalvm/compiler/truffle/test/StringNodeInliningCompilationTest.java b/compiler/src/jdk.internal.vm.compiler.test/src/org/graalvm/compiler/truffle/test/StringNodeInliningCompilationTest.java index dbddc6858d56..e60eab932975 100644 --- a/compiler/src/jdk.internal.vm.compiler.test/src/org/graalvm/compiler/truffle/test/StringNodeInliningCompilationTest.java +++ b/compiler/src/jdk.internal.vm.compiler.test/src/org/graalvm/compiler/truffle/test/StringNodeInliningCompilationTest.java @@ -26,7 +26,6 @@ import static org.junit.Assume.assumeFalse; -import org.graalvm.compiler.truffle.runtime.OptimizedCallTarget; import org.graalvm.polyglot.Context; import org.junit.Test; @@ -35,6 +34,7 @@ import com.oracle.truffle.api.strings.TruffleString; import com.oracle.truffle.api.strings.TruffleString.Encoding; import com.oracle.truffle.api.test.CompileImmediatelyCheck; +import com.oracle.truffle.runtime.OptimizedCallTarget; /** * Basic smoke test to ensure TruffleString inlined nodes compile cleanly. diff --git a/compiler/src/jdk.internal.vm.compiler.test/src/org/graalvm/compiler/truffle/test/TestWithSynchronousCompiling.java b/compiler/src/jdk.internal.vm.compiler.test/src/org/graalvm/compiler/truffle/test/TestWithSynchronousCompiling.java index 6848fe5ac999..63501e0604a3 100644 --- a/compiler/src/jdk.internal.vm.compiler.test/src/org/graalvm/compiler/truffle/test/TestWithSynchronousCompiling.java +++ b/compiler/src/jdk.internal.vm.compiler.test/src/org/graalvm/compiler/truffle/test/TestWithSynchronousCompiling.java @@ -28,10 +28,11 @@ import static org.junit.Assert.assertNotNull; import static org.junit.Assert.assertTrue; -import org.graalvm.compiler.truffle.runtime.OptimizedCallTarget; import org.graalvm.polyglot.Context.Builder; import org.junit.Before; +import com.oracle.truffle.runtime.OptimizedCallTarget; + /** * Base class for Truffle unit tests that require that there be no background compilation. * diff --git a/compiler/src/jdk.internal.vm.compiler.test/src/org/graalvm/compiler/truffle/test/ThreadsActivationCompilationTest.java b/compiler/src/jdk.internal.vm.compiler.test/src/org/graalvm/compiler/truffle/test/ThreadsActivationCompilationTest.java index e314195051bf..1ec41cf25011 100644 --- a/compiler/src/jdk.internal.vm.compiler.test/src/org/graalvm/compiler/truffle/test/ThreadsActivationCompilationTest.java +++ b/compiler/src/jdk.internal.vm.compiler.test/src/org/graalvm/compiler/truffle/test/ThreadsActivationCompilationTest.java @@ -28,7 +28,6 @@ import java.util.concurrent.atomic.AtomicReference; -import org.graalvm.compiler.truffle.runtime.OptimizedCallTarget; import org.graalvm.polyglot.Context; import org.junit.Test; @@ -42,6 +41,7 @@ import com.oracle.truffle.api.nodes.RootNode; import com.oracle.truffle.api.test.polyglot.AbstractPolyglotTest; import com.oracle.truffle.api.test.polyglot.ProxyLanguage.LanguageContext; +import com.oracle.truffle.runtime.OptimizedCallTarget; public class ThreadsActivationCompilationTest extends AbstractPolyglotTest { diff --git a/compiler/src/jdk.internal.vm.compiler.test/src/org/graalvm/compiler/truffle/test/TraceCompilationTest.java b/compiler/src/jdk.internal.vm.compiler.test/src/org/graalvm/compiler/truffle/test/TraceCompilationTest.java index 8becdd99cc3f..e0b9150f7990 100644 --- a/compiler/src/jdk.internal.vm.compiler.test/src/org/graalvm/compiler/truffle/test/TraceCompilationTest.java +++ b/compiler/src/jdk.internal.vm.compiler.test/src/org/graalvm/compiler/truffle/test/TraceCompilationTest.java @@ -41,8 +41,9 @@ import java.util.regex.Pattern; import com.oracle.truffle.api.test.SubprocessTestUtils; +import com.oracle.truffle.runtime.OptimizedCallTarget; + import org.graalvm.compiler.serviceprovider.GraalServices; -import org.graalvm.compiler.truffle.runtime.OptimizedCallTarget; import org.graalvm.compiler.truffle.test.nodes.AbstractTestNode; import org.graalvm.compiler.truffle.test.nodes.RootTestNode; import org.graalvm.polyglot.Context; diff --git a/compiler/src/jdk.internal.vm.compiler.test/src/org/graalvm/compiler/truffle/test/TransferToInterpreterTest.java b/compiler/src/jdk.internal.vm.compiler.test/src/org/graalvm/compiler/truffle/test/TransferToInterpreterTest.java index 8b1ac173fc4f..4571cec911ca 100644 --- a/compiler/src/jdk.internal.vm.compiler.test/src/org/graalvm/compiler/truffle/test/TransferToInterpreterTest.java +++ b/compiler/src/jdk.internal.vm.compiler.test/src/org/graalvm/compiler/truffle/test/TransferToInterpreterTest.java @@ -24,8 +24,6 @@ */ package org.graalvm.compiler.truffle.test; -import org.graalvm.compiler.truffle.runtime.GraalTruffleRuntime; -import org.graalvm.compiler.truffle.runtime.OptimizedCallTarget; import org.junit.Assert; import org.junit.Before; import org.junit.Test; @@ -35,6 +33,8 @@ import com.oracle.truffle.api.nodes.RootNode; import com.oracle.truffle.compiler.TruffleCompilationTask; import com.oracle.truffle.compiler.TruffleCompiler; +import com.oracle.truffle.runtime.GraalTruffleRuntime; +import com.oracle.truffle.runtime.OptimizedCallTarget; public class TransferToInterpreterTest extends TestWithPolyglotOptions { diff --git a/compiler/src/jdk.internal.vm.compiler.test/src/org/graalvm/compiler/truffle/test/TruffleBoundaryExceptionsTest.java b/compiler/src/jdk.internal.vm.compiler.test/src/org/graalvm/compiler/truffle/test/TruffleBoundaryExceptionsTest.java index c6946ee60711..ecc221917eda 100644 --- a/compiler/src/jdk.internal.vm.compiler.test/src/org/graalvm/compiler/truffle/test/TruffleBoundaryExceptionsTest.java +++ b/compiler/src/jdk.internal.vm.compiler.test/src/org/graalvm/compiler/truffle/test/TruffleBoundaryExceptionsTest.java @@ -24,15 +24,10 @@ */ package org.graalvm.compiler.truffle.test; -import static org.graalvm.compiler.truffle.runtime.OptimizedRuntimeOptions.SingleTierCompilationThreshold; +import static com.oracle.truffle.runtime.OptimizedRuntimeOptions.SingleTierCompilationThreshold; import static org.junit.Assert.assertEquals; import static org.junit.Assert.fail; -import org.graalvm.compiler.truffle.runtime.OptimizedRuntimeOptions; -import org.graalvm.compiler.truffle.runtime.AbstractCompilationTask; -import org.graalvm.compiler.truffle.runtime.GraalTruffleRuntime; -import org.graalvm.compiler.truffle.runtime.GraalTruffleRuntimeListener; -import org.graalvm.compiler.truffle.runtime.OptimizedCallTarget; import org.junit.Before; import org.junit.Test; @@ -40,6 +35,11 @@ import com.oracle.truffle.api.Truffle; import com.oracle.truffle.api.frame.VirtualFrame; import com.oracle.truffle.api.nodes.RootNode; +import com.oracle.truffle.runtime.AbstractCompilationTask; +import com.oracle.truffle.runtime.GraalTruffleRuntime; +import com.oracle.truffle.runtime.GraalTruffleRuntimeListener; +import com.oracle.truffle.runtime.OptimizedCallTarget; +import com.oracle.truffle.runtime.OptimizedRuntimeOptions; public class TruffleBoundaryExceptionsTest extends TestWithSynchronousCompiling { diff --git a/compiler/src/jdk.internal.vm.compiler.test/src/org/graalvm/compiler/truffle/test/TruffleBoundaryInliningTest.java b/compiler/src/jdk.internal.vm.compiler.test/src/org/graalvm/compiler/truffle/test/TruffleBoundaryInliningTest.java index 6fd0d4435e93..945ea6518995 100644 --- a/compiler/src/jdk.internal.vm.compiler.test/src/org/graalvm/compiler/truffle/test/TruffleBoundaryInliningTest.java +++ b/compiler/src/jdk.internal.vm.compiler.test/src/org/graalvm/compiler/truffle/test/TruffleBoundaryInliningTest.java @@ -28,7 +28,6 @@ import org.graalvm.compiler.nodes.Invoke; import org.graalvm.compiler.nodes.StructuredGraph; -import org.graalvm.compiler.truffle.runtime.OptimizedCallTarget; import org.junit.Test; import com.oracle.truffle.api.CompilerAsserts; @@ -36,6 +35,7 @@ import com.oracle.truffle.api.RootCallTarget; import com.oracle.truffle.api.frame.VirtualFrame; import com.oracle.truffle.api.nodes.RootNode; +import com.oracle.truffle.runtime.OptimizedCallTarget; public class TruffleBoundaryInliningTest extends PartialEvaluationTest { diff --git a/compiler/src/jdk.internal.vm.compiler.test/src/org/graalvm/compiler/truffle/test/TruffleCompilerImplTest.java b/compiler/src/jdk.internal.vm.compiler.test/src/org/graalvm/compiler/truffle/test/TruffleCompilerImplTest.java index e65ac7c2be76..a611ecaa6428 100644 --- a/compiler/src/jdk.internal.vm.compiler.test/src/org/graalvm/compiler/truffle/test/TruffleCompilerImplTest.java +++ b/compiler/src/jdk.internal.vm.compiler.test/src/org/graalvm/compiler/truffle/test/TruffleCompilerImplTest.java @@ -33,8 +33,6 @@ import org.graalvm.compiler.truffle.compiler.KnownTruffleTypes; import org.graalvm.compiler.truffle.compiler.TruffleCompilation; import org.graalvm.compiler.truffle.compiler.TruffleCompilerImpl; -import org.graalvm.compiler.truffle.runtime.GraalTruffleRuntime; -import org.graalvm.compiler.truffle.runtime.OptimizedCallTarget; import org.graalvm.polyglot.Context; import org.junit.After; import org.junit.Assume; @@ -43,6 +41,8 @@ import com.oracle.truffle.api.TruffleOptions; import com.oracle.truffle.api.nodes.RootNode; import com.oracle.truffle.compiler.TruffleCompiler; +import com.oracle.truffle.runtime.GraalTruffleRuntime; +import com.oracle.truffle.runtime.OptimizedCallTarget; public abstract class TruffleCompilerImplTest extends GraalCompilerTest { diff --git a/compiler/src/jdk.internal.vm.compiler.test/src/org/graalvm/compiler/truffle/test/TruffleContextCompilationTest.java b/compiler/src/jdk.internal.vm.compiler.test/src/org/graalvm/compiler/truffle/test/TruffleContextCompilationTest.java index bfd05151dd14..d52b22a7443b 100644 --- a/compiler/src/jdk.internal.vm.compiler.test/src/org/graalvm/compiler/truffle/test/TruffleContextCompilationTest.java +++ b/compiler/src/jdk.internal.vm.compiler.test/src/org/graalvm/compiler/truffle/test/TruffleContextCompilationTest.java @@ -24,7 +24,6 @@ */ package org.graalvm.compiler.truffle.test; -import org.graalvm.compiler.truffle.runtime.OptimizedCallTarget; import org.junit.Test; import com.oracle.truffle.api.CompilerDirectives; @@ -36,6 +35,7 @@ import com.oracle.truffle.api.TruffleLanguage.Registration; import com.oracle.truffle.api.frame.VirtualFrame; import com.oracle.truffle.api.nodes.RootNode; +import com.oracle.truffle.runtime.OptimizedCallTarget; import jdk.vm.ci.code.BailoutException; diff --git a/compiler/src/jdk.internal.vm.compiler.test/src/org/graalvm/compiler/truffle/test/TruffleReturnBoxedParameterTest.java b/compiler/src/jdk.internal.vm.compiler.test/src/org/graalvm/compiler/truffle/test/TruffleReturnBoxedParameterTest.java index 21edbeb5be44..0a75468e0e3e 100644 --- a/compiler/src/jdk.internal.vm.compiler.test/src/org/graalvm/compiler/truffle/test/TruffleReturnBoxedParameterTest.java +++ b/compiler/src/jdk.internal.vm.compiler.test/src/org/graalvm/compiler/truffle/test/TruffleReturnBoxedParameterTest.java @@ -30,7 +30,6 @@ import org.graalvm.compiler.nodes.StructuredGraph; import org.graalvm.compiler.nodes.extended.ForeignCallNode; -import org.graalvm.compiler.truffle.runtime.OptimizedCallTarget; import org.graalvm.compiler.truffle.test.TruffleReturnBoxedParameterTestFactory.IntNodeFactory; import org.junit.Test; @@ -42,6 +41,7 @@ import com.oracle.truffle.api.nodes.Node; import com.oracle.truffle.api.nodes.RootNode; import com.oracle.truffle.api.nodes.UnexpectedResultException; +import com.oracle.truffle.runtime.OptimizedCallTarget; /** * A simple test to verify that a truffle compilation unit returning a parameter re-uses the boxed diff --git a/compiler/src/jdk.internal.vm.compiler.test/src/org/graalvm/compiler/truffle/test/TruffleToTruffleCallExceptionHandlerTest.java b/compiler/src/jdk.internal.vm.compiler.test/src/org/graalvm/compiler/truffle/test/TruffleToTruffleCallExceptionHandlerTest.java index d5454b626491..4e4330711af4 100644 --- a/compiler/src/jdk.internal.vm.compiler.test/src/org/graalvm/compiler/truffle/test/TruffleToTruffleCallExceptionHandlerTest.java +++ b/compiler/src/jdk.internal.vm.compiler.test/src/org/graalvm/compiler/truffle/test/TruffleToTruffleCallExceptionHandlerTest.java @@ -26,8 +26,6 @@ import org.graalvm.compiler.nodes.StructuredGraph; import org.graalvm.compiler.nodes.UnwindNode; -import org.graalvm.compiler.truffle.runtime.GraalTruffleRuntime; -import org.graalvm.compiler.truffle.runtime.OptimizedCallTarget; import org.graalvm.polyglot.Context; import org.junit.Assert; import org.junit.Test; @@ -36,6 +34,8 @@ import com.oracle.truffle.api.frame.VirtualFrame; import com.oracle.truffle.api.nodes.DirectCallNode; import com.oracle.truffle.api.nodes.RootNode; +import com.oracle.truffle.runtime.GraalTruffleRuntime; +import com.oracle.truffle.runtime.OptimizedCallTarget; /** * A simple test class verifying that a truffle-2-truffle call never results in the compilation of diff --git a/compiler/src/jdk.internal.vm.compiler.test/src/org/graalvm/compiler/truffle/test/UnrollLoopBlockDuplicationTest.java b/compiler/src/jdk.internal.vm.compiler.test/src/org/graalvm/compiler/truffle/test/UnrollLoopBlockDuplicationTest.java index ad74eb976dcf..4e1c45a6ae95 100644 --- a/compiler/src/jdk.internal.vm.compiler.test/src/org/graalvm/compiler/truffle/test/UnrollLoopBlockDuplicationTest.java +++ b/compiler/src/jdk.internal.vm.compiler.test/src/org/graalvm/compiler/truffle/test/UnrollLoopBlockDuplicationTest.java @@ -24,7 +24,6 @@ */ package org.graalvm.compiler.truffle.test; -import org.graalvm.compiler.truffle.runtime.OptimizedCallTarget; import org.junit.Test; import com.oracle.truffle.api.CompilerDirectives; @@ -33,6 +32,7 @@ import com.oracle.truffle.api.frame.VirtualFrame; import com.oracle.truffle.api.nodes.ExplodeLoop; import com.oracle.truffle.api.nodes.ExplodeLoop.LoopExplosionKind; +import com.oracle.truffle.runtime.OptimizedCallTarget; import com.oracle.truffle.api.nodes.Node; import com.oracle.truffle.api.nodes.RootNode; diff --git a/compiler/src/jdk.internal.vm.compiler.test/src/org/graalvm/compiler/truffle/test/builtins/SLCallUntilOptimizedBuiltin.java b/compiler/src/jdk.internal.vm.compiler.test/src/org/graalvm/compiler/truffle/test/builtins/SLCallUntilOptimizedBuiltin.java index 0a26c0ec4818..21a99980d20d 100644 --- a/compiler/src/jdk.internal.vm.compiler.test/src/org/graalvm/compiler/truffle/test/builtins/SLCallUntilOptimizedBuiltin.java +++ b/compiler/src/jdk.internal.vm.compiler.test/src/org/graalvm/compiler/truffle/test/builtins/SLCallUntilOptimizedBuiltin.java @@ -24,13 +24,12 @@ */ package org.graalvm.compiler.truffle.test.builtins; -import org.graalvm.compiler.truffle.runtime.OptimizedCallTarget; - import com.oracle.truffle.api.CompilerDirectives.TruffleBoundary; import com.oracle.truffle.api.Truffle; import com.oracle.truffle.api.dsl.Specialization; import com.oracle.truffle.api.nodes.IndirectCallNode; import com.oracle.truffle.api.nodes.NodeInfo; +import com.oracle.truffle.runtime.OptimizedCallTarget; import com.oracle.truffle.sl.runtime.SLFunction; import com.oracle.truffle.sl.runtime.SLNull; diff --git a/compiler/src/jdk.internal.vm.compiler.test/src/org/graalvm/compiler/truffle/test/builtins/SLDisableSplittingBuiltin.java b/compiler/src/jdk.internal.vm.compiler.test/src/org/graalvm/compiler/truffle/test/builtins/SLDisableSplittingBuiltin.java index 0a815b6d2a81..de0a6995d622 100644 --- a/compiler/src/jdk.internal.vm.compiler.test/src/org/graalvm/compiler/truffle/test/builtins/SLDisableSplittingBuiltin.java +++ b/compiler/src/jdk.internal.vm.compiler.test/src/org/graalvm/compiler/truffle/test/builtins/SLDisableSplittingBuiltin.java @@ -25,13 +25,11 @@ package org.graalvm.compiler.truffle.test.builtins; import com.oracle.truffle.api.CompilerDirectives.TruffleBoundary; - -import org.graalvm.compiler.truffle.runtime.OptimizedCallTarget; - import com.oracle.truffle.api.Truffle; import com.oracle.truffle.api.dsl.Specialization; import com.oracle.truffle.api.nodes.NodeInfo; import com.oracle.truffle.api.nodes.RootNode; +import com.oracle.truffle.runtime.OptimizedCallTarget; import com.oracle.truffle.sl.nodes.SLRootNode; import com.oracle.truffle.sl.runtime.SLFunction; import com.oracle.truffle.sl.runtime.SLNull; diff --git a/compiler/src/jdk.internal.vm.compiler.test/src/org/graalvm/compiler/truffle/test/builtins/SLGetOptionBuiltin.java b/compiler/src/jdk.internal.vm.compiler.test/src/org/graalvm/compiler/truffle/test/builtins/SLGetOptionBuiltin.java index 9a99fa0465f0..94ca268257cf 100644 --- a/compiler/src/jdk.internal.vm.compiler.test/src/org/graalvm/compiler/truffle/test/builtins/SLGetOptionBuiltin.java +++ b/compiler/src/jdk.internal.vm.compiler.test/src/org/graalvm/compiler/truffle/test/builtins/SLGetOptionBuiltin.java @@ -24,8 +24,6 @@ */ package org.graalvm.compiler.truffle.test.builtins; -import org.graalvm.compiler.truffle.runtime.OptimizedRuntimeOptions; -import org.graalvm.compiler.truffle.runtime.OptimizedCallTarget; import org.graalvm.options.OptionDescriptor; import com.oracle.truffle.api.CompilerDirectives.TruffleBoundary; @@ -33,6 +31,8 @@ import com.oracle.truffle.api.dsl.Specialization; import com.oracle.truffle.api.nodes.NodeInfo; import com.oracle.truffle.api.strings.TruffleString; +import com.oracle.truffle.runtime.OptimizedCallTarget; +import com.oracle.truffle.runtime.OptimizedRuntimeOptions; /** * Looks up the value of an option in {@link OptimizedRuntimeOptions}. In the future this builtin diff --git a/compiler/src/jdk.internal.vm.compiler.test/src/org/graalvm/compiler/truffle/test/builtins/SLGraalRuntimeBuiltin.java b/compiler/src/jdk.internal.vm.compiler.test/src/org/graalvm/compiler/truffle/test/builtins/SLGraalRuntimeBuiltin.java index 567d9b1cd320..7dc01af93720 100644 --- a/compiler/src/jdk.internal.vm.compiler.test/src/org/graalvm/compiler/truffle/test/builtins/SLGraalRuntimeBuiltin.java +++ b/compiler/src/jdk.internal.vm.compiler.test/src/org/graalvm/compiler/truffle/test/builtins/SLGraalRuntimeBuiltin.java @@ -27,9 +27,6 @@ import java.util.HashSet; import java.util.Set; -import org.graalvm.compiler.truffle.runtime.GraalTruffleRuntime; -import org.graalvm.compiler.truffle.runtime.OptimizedCallTarget; - import com.oracle.truffle.api.CallTarget; import com.oracle.truffle.api.CompilerDirectives.TruffleBoundary; import com.oracle.truffle.api.Truffle; @@ -37,6 +34,8 @@ import com.oracle.truffle.api.nodes.Node; import com.oracle.truffle.api.nodes.NodeVisitor; import com.oracle.truffle.api.nodes.RootNode; +import com.oracle.truffle.runtime.GraalTruffleRuntime; +import com.oracle.truffle.runtime.OptimizedCallTarget; import com.oracle.truffle.sl.builtins.SLBuiltinNode; public abstract class SLGraalRuntimeBuiltin extends SLBuiltinNode { diff --git a/compiler/src/jdk.internal.vm.compiler.test/src/org/graalvm/compiler/truffle/test/builtins/SLIsOptimizedBuiltin.java b/compiler/src/jdk.internal.vm.compiler.test/src/org/graalvm/compiler/truffle/test/builtins/SLIsOptimizedBuiltin.java index 8376c52cb592..de3a8898d506 100644 --- a/compiler/src/jdk.internal.vm.compiler.test/src/org/graalvm/compiler/truffle/test/builtins/SLIsOptimizedBuiltin.java +++ b/compiler/src/jdk.internal.vm.compiler.test/src/org/graalvm/compiler/truffle/test/builtins/SLIsOptimizedBuiltin.java @@ -24,11 +24,10 @@ */ package org.graalvm.compiler.truffle.test.builtins; -import org.graalvm.compiler.truffle.runtime.OptimizedCallTarget; - import com.oracle.truffle.api.CompilerDirectives.TruffleBoundary; import com.oracle.truffle.api.dsl.Specialization; import com.oracle.truffle.api.nodes.NodeInfo; +import com.oracle.truffle.runtime.OptimizedCallTarget; import com.oracle.truffle.sl.runtime.SLFunction; /** diff --git a/compiler/src/jdk.internal.vm.compiler.test/src/org/graalvm/compiler/truffle/test/builtins/SLWaitForOptimizationBuiltin.java b/compiler/src/jdk.internal.vm.compiler.test/src/org/graalvm/compiler/truffle/test/builtins/SLWaitForOptimizationBuiltin.java index 58d3e0b02e80..ad4d9301e1a1 100644 --- a/compiler/src/jdk.internal.vm.compiler.test/src/org/graalvm/compiler/truffle/test/builtins/SLWaitForOptimizationBuiltin.java +++ b/compiler/src/jdk.internal.vm.compiler.test/src/org/graalvm/compiler/truffle/test/builtins/SLWaitForOptimizationBuiltin.java @@ -27,12 +27,11 @@ import java.util.concurrent.ExecutionException; import java.util.concurrent.TimeoutException; -import org.graalvm.compiler.truffle.runtime.GraalTruffleRuntime; -import org.graalvm.compiler.truffle.runtime.OptimizedCallTarget; - import com.oracle.truffle.api.Truffle; import com.oracle.truffle.api.dsl.Specialization; import com.oracle.truffle.api.nodes.NodeInfo; +import com.oracle.truffle.runtime.GraalTruffleRuntime; +import com.oracle.truffle.runtime.OptimizedCallTarget; import com.oracle.truffle.sl.runtime.SLFunction; import com.oracle.truffle.sl.runtime.SLNull; diff --git a/compiler/src/jdk.internal.vm.compiler.test/src/org/graalvm/compiler/truffle/test/collection/BTreeQueueTest.java b/compiler/src/jdk.internal.vm.compiler.test/src/org/graalvm/compiler/truffle/test/collection/BTreeQueueTest.java index 94ebfd5202a1..bcd2c1cf4844 100644 --- a/compiler/src/jdk.internal.vm.compiler.test/src/org/graalvm/compiler/truffle/test/collection/BTreeQueueTest.java +++ b/compiler/src/jdk.internal.vm.compiler.test/src/org/graalvm/compiler/truffle/test/collection/BTreeQueueTest.java @@ -24,10 +24,11 @@ */ package org.graalvm.compiler.truffle.test.collection; -import org.graalvm.compiler.truffle.runtime.collection.BTreeQueue; import org.junit.Assert; import org.junit.Test; +import com.oracle.truffle.runtime.collection.BTreeQueue; + import java.util.ArrayList; import java.util.Arrays; import java.util.Collections; diff --git a/compiler/src/jdk.internal.vm.compiler.test/src/org/graalvm/compiler/truffle/test/collection/DelegatingBlockingQueueTest.java b/compiler/src/jdk.internal.vm.compiler.test/src/org/graalvm/compiler/truffle/test/collection/DelegatingBlockingQueueTest.java index 12b7414ff4f5..ab5a952b5c64 100644 --- a/compiler/src/jdk.internal.vm.compiler.test/src/org/graalvm/compiler/truffle/test/collection/DelegatingBlockingQueueTest.java +++ b/compiler/src/jdk.internal.vm.compiler.test/src/org/graalvm/compiler/truffle/test/collection/DelegatingBlockingQueueTest.java @@ -24,11 +24,12 @@ */ package org.graalvm.compiler.truffle.test.collection; -import org.graalvm.compiler.truffle.runtime.collection.ArrayQueue; -import org.graalvm.compiler.truffle.runtime.collection.DelegatingBlockingQueue; import org.junit.Assert; import org.junit.Test; +import com.oracle.truffle.runtime.collection.ArrayQueue; +import com.oracle.truffle.runtime.collection.DelegatingBlockingQueue; + import java.util.ArrayList; public class DelegatingBlockingQueueTest { diff --git a/compiler/src/jdk.internal.vm.compiler.test/src/org/graalvm/compiler/truffle/test/libgraal/JNIExceptionWrapperTest.java b/compiler/src/jdk.internal.vm.compiler.test/src/org/graalvm/compiler/truffle/test/libgraal/JNIExceptionWrapperTest.java index 4c9b8fcdb905..2624a4ccd115 100644 --- a/compiler/src/jdk.internal.vm.compiler.test/src/org/graalvm/compiler/truffle/test/libgraal/JNIExceptionWrapperTest.java +++ b/compiler/src/jdk.internal.vm.compiler.test/src/org/graalvm/compiler/truffle/test/libgraal/JNIExceptionWrapperTest.java @@ -37,8 +37,6 @@ import org.graalvm.compiler.core.GraalCompilerOptions; import org.graalvm.compiler.test.SubprocessUtil; import org.graalvm.compiler.truffle.compiler.TruffleCompilerImpl; -import org.graalvm.compiler.truffle.runtime.GraalTruffleRuntime; -import org.graalvm.compiler.truffle.runtime.OptimizedCallTarget; import org.graalvm.compiler.truffle.test.TestWithPolyglotOptions; import org.junit.Test; @@ -47,6 +45,8 @@ import com.oracle.truffle.compiler.TruffleCompilationTask; import com.oracle.truffle.compiler.TruffleCompiler; import com.oracle.truffle.compiler.TruffleCompilerListener; +import com.oracle.truffle.runtime.GraalTruffleRuntime; +import com.oracle.truffle.runtime.OptimizedCallTarget; public class JNIExceptionWrapperTest extends TestWithPolyglotOptions { diff --git a/compiler/src/jdk.internal.vm.compiler.test/src/org/graalvm/compiler/truffle/test/strings/TStringConstantFoldingTest.java b/compiler/src/jdk.internal.vm.compiler.test/src/org/graalvm/compiler/truffle/test/strings/TStringConstantFoldingTest.java index bd5aca403586..cd3ba2453c37 100644 --- a/compiler/src/jdk.internal.vm.compiler.test/src/org/graalvm/compiler/truffle/test/strings/TStringConstantFoldingTest.java +++ b/compiler/src/jdk.internal.vm.compiler.test/src/org/graalvm/compiler/truffle/test/strings/TStringConstantFoldingTest.java @@ -30,7 +30,6 @@ import org.graalvm.compiler.core.common.GraalOptions; import org.graalvm.compiler.nodes.ReturnNode; import org.graalvm.compiler.nodes.StructuredGraph; -import org.graalvm.compiler.truffle.runtime.OptimizedCallTarget; import org.graalvm.compiler.truffle.test.PartialEvaluationTest; import org.junit.Assert; import org.junit.Assume; @@ -39,6 +38,7 @@ import com.oracle.truffle.api.frame.VirtualFrame; import com.oracle.truffle.api.nodes.RootNode; import com.oracle.truffle.api.strings.TruffleString; +import com.oracle.truffle.runtime.OptimizedCallTarget; public class TStringConstantFoldingTest extends PartialEvaluationTest { diff --git a/compiler/src/jdk.internal.vm.compiler/src/org/graalvm/compiler/hotspot/meta/HotSpotGraphBuilderPlugins.java b/compiler/src/jdk.internal.vm.compiler/src/org/graalvm/compiler/hotspot/meta/HotSpotGraphBuilderPlugins.java index ab49c5e66dd2..600c80016b75 100644 --- a/compiler/src/jdk.internal.vm.compiler/src/org/graalvm/compiler/hotspot/meta/HotSpotGraphBuilderPlugins.java +++ b/compiler/src/jdk.internal.vm.compiler/src/org/graalvm/compiler/hotspot/meta/HotSpotGraphBuilderPlugins.java @@ -281,7 +281,7 @@ private static void registerTrufflePlugins(InvocationPlugins plugins, WordTypes return; } - Registration tl = new Registration(plugins, "org.graalvm.compiler.truffle.runtime.hotspot.HotSpotFastThreadLocal"); + Registration tl = new Registration(plugins, "com.oracle.truffle.runtime.hotspot.HotSpotFastThreadLocal"); tl.register(new InvocationPlugin("get", Receiver.class) { @Override public boolean apply(GraphBuilderContext b, ResolvedJavaMethod targetMethod, Receiver receiver) { diff --git a/compiler/src/jdk.internal.vm.compiler/src/org/graalvm/compiler/truffle/compiler/KnownTruffleTypes.java b/compiler/src/jdk.internal.vm.compiler/src/org/graalvm/compiler/truffle/compiler/KnownTruffleTypes.java index a63261d90a4e..6f2ca4bcfa9e 100644 --- a/compiler/src/jdk.internal.vm.compiler/src/org/graalvm/compiler/truffle/compiler/KnownTruffleTypes.java +++ b/compiler/src/jdk.internal.vm.compiler/src/org/graalvm/compiler/truffle/compiler/KnownTruffleTypes.java @@ -149,11 +149,11 @@ public class KnownTruffleTypes extends AbstractKnownTruffleTypes { public final ResolvedJavaField AbstractAssumption_isValid = findField(AbstractAssumption, "isValid"); // truffle.runtime - public final ResolvedJavaType BaseOSRRootNode = lookupTypeCached("org.graalvm.compiler.truffle.runtime.BaseOSRRootNode"); + public final ResolvedJavaType BaseOSRRootNode = lookupTypeCached("com.oracle.truffle.runtime.BaseOSRRootNode"); public final ResolvedJavaField BaseOSRRootNode_loopNode = findField(BaseOSRRootNode, "loopNode"); - public final ResolvedJavaType CompilationState = lookupType("org.graalvm.compiler.truffle.runtime.CompilationState"); + public final ResolvedJavaType CompilationState = lookupType("com.oracle.truffle.runtime.CompilationState"); - public final ResolvedJavaType OptimizedCallTarget = lookupTypeCached("org.graalvm.compiler.truffle.runtime.OptimizedCallTarget"); + public final ResolvedJavaType OptimizedCallTarget = lookupTypeCached("com.oracle.truffle.runtime.OptimizedCallTarget"); public final ResolvedJavaMethod OptimizedCallTarget_callDirect = findMethod(OptimizedCallTarget, "callDirect", Node, Object_Array); public final ResolvedJavaMethod OptimizedCallTarget_callInlined = findMethod(OptimizedCallTarget, "callInlined", Node, Object_Array); public final ResolvedJavaMethod OptimizedCallTarget_callIndirect = findMethod(OptimizedCallTarget, "callIndirect", Node, Object_Array); @@ -164,12 +164,12 @@ public class KnownTruffleTypes extends AbstractKnownTruffleTypes { public final ResolvedJavaField OptimizedCallTarget_validRootAssumption = findField(OptimizedCallTarget, "validRootAssumption"); public final ResolvedJavaField OptimizedCallTarget_rootNode = findField(OptimizedCallTarget, "rootNode"); - public final ResolvedJavaType OptimizedDirectCallNode = lookupTypeCached("org.graalvm.compiler.truffle.runtime.OptimizedDirectCallNode"); + public final ResolvedJavaType OptimizedDirectCallNode = lookupTypeCached("com.oracle.truffle.runtime.OptimizedDirectCallNode"); public final ResolvedJavaField OptimizedDirectCallNode_currentCallTarget = findField(OptimizedDirectCallNode, "currentCallTarget"); public final ResolvedJavaField OptimizedDirectCallNode_inliningForced = findField(OptimizedDirectCallNode, "inliningForced"); public final ResolvedJavaField OptimizedDirectCallNode_callCount = findField(OptimizedDirectCallNode, "callCount"); - public final ResolvedJavaType OptimizedAssumption = lookupType("org.graalvm.compiler.truffle.runtime.OptimizedAssumption"); + public final ResolvedJavaType OptimizedAssumption = lookupType("com.oracle.truffle.runtime.OptimizedAssumption"); public final ResolvedJavaType[] skippedExceptionTypes = createSkippedExceptionTypes(); // Checkstyle: resume field name check diff --git a/compiler/src/jdk.internal.vm.compiler/src/org/graalvm/compiler/truffle/compiler/host/TruffleKnownHostTypes.java b/compiler/src/jdk.internal.vm.compiler/src/org/graalvm/compiler/truffle/compiler/host/TruffleKnownHostTypes.java index e4abd6b7ade8..3d0e364b03c4 100644 --- a/compiler/src/jdk.internal.vm.compiler/src/org/graalvm/compiler/truffle/compiler/host/TruffleKnownHostTypes.java +++ b/compiler/src/jdk.internal.vm.compiler/src/org/graalvm/compiler/truffle/compiler/host/TruffleKnownHostTypes.java @@ -43,7 +43,7 @@ public final class TruffleKnownHostTypes extends AbstractKnownTruffleTypes { // truffle.api.impl public final ResolvedJavaType FrameWithoutBoxing = lookupType("com.oracle.truffle.api.impl.FrameWithoutBoxing"); - public final ResolvedJavaType OptimizedCallTarget = lookupTypeCached("org.graalvm.compiler.truffle.runtime.OptimizedCallTarget"); + public final ResolvedJavaType OptimizedCallTarget = lookupTypeCached("com.oracle.truffle.runtime.OptimizedCallTarget"); public final ResolvedJavaMethod OptimizedCallTarget_call = findMethod(OptimizedCallTarget, "call", lookupType(Object[].class)); // truffle.api diff --git a/compiler/src/jdk.internal.vm.compiler/src/org/graalvm/compiler/truffle/compiler/hotspot/HotSpotKnownTruffleTypes.java b/compiler/src/jdk.internal.vm.compiler/src/org/graalvm/compiler/truffle/compiler/hotspot/HotSpotKnownTruffleTypes.java index b9c16f1b937f..8c170711ced4 100644 --- a/compiler/src/jdk.internal.vm.compiler/src/org/graalvm/compiler/truffle/compiler/hotspot/HotSpotKnownTruffleTypes.java +++ b/compiler/src/jdk.internal.vm.compiler/src/org/graalvm/compiler/truffle/compiler/hotspot/HotSpotKnownTruffleTypes.java @@ -50,10 +50,10 @@ public final class HotSpotKnownTruffleTypes extends KnownTruffleTypes { public final ResolvedJavaField InstalledCode_entryPoint = findField(InstalledCode, "entryPoint"); // truffle.runtime.hotspot - public final ResolvedJavaType HotSpotThreadLocalHandshake = lookupTypeCached("org.graalvm.compiler.truffle.runtime.hotspot.HotSpotThreadLocalHandshake"); + public final ResolvedJavaType HotSpotThreadLocalHandshake = lookupTypeCached("com.oracle.truffle.runtime.hotspot.HotSpotThreadLocalHandshake"); public final ResolvedJavaMethod HotSpotThreadLocalHandshake_doHandshake = findMethod(HotSpotThreadLocalHandshake, "doHandshake", java_lang_Object); - public final ResolvedJavaType HotSpotOptimizedCallTarget = lookupTypeCached("org.graalvm.compiler.truffle.runtime.hotspot.HotSpotOptimizedCallTarget"); + public final ResolvedJavaType HotSpotOptimizedCallTarget = lookupTypeCached("com.oracle.truffle.runtime.hotspot.HotSpotOptimizedCallTarget"); public final ResolvedJavaField HotSpotOptimizedCallTarget_installedCode = findField(HotSpotOptimizedCallTarget, "installedCode"); public HotSpotKnownTruffleTypes(TruffleCompilerRuntime runtime, MetaAccessProvider metaAccess, ConstantReflectionProvider constantReflection) { diff --git a/compiler/src/jdk.internal.vm.compiler/src/org/graalvm/compiler/truffle/compiler/hotspot/HotSpotTruffleGraphBuilderPlugins.java b/compiler/src/jdk.internal.vm.compiler/src/org/graalvm/compiler/truffle/compiler/hotspot/HotSpotTruffleGraphBuilderPlugins.java index 75939af45345..f073af38d9f4 100644 --- a/compiler/src/jdk.internal.vm.compiler/src/org/graalvm/compiler/truffle/compiler/hotspot/HotSpotTruffleGraphBuilderPlugins.java +++ b/compiler/src/jdk.internal.vm.compiler/src/org/graalvm/compiler/truffle/compiler/hotspot/HotSpotTruffleGraphBuilderPlugins.java @@ -72,7 +72,7 @@ public boolean apply(GraphBuilderContext b, ResolvedJavaMethod targetMethod, Rec static void registerHotspotThreadLocalStubPlugins(InvocationPlugins plugins, WordTypes wordTypes, int jvmciReservedReference0Offset) { GraalError.guarantee(jvmciReservedReference0Offset != -1, "jvmciReservedReference0Offset is not available but used."); - InvocationPlugins.Registration tl = new InvocationPlugins.Registration(plugins, "org.graalvm.compiler.truffle.runtime.hotspot.HotSpotFastThreadLocal"); + InvocationPlugins.Registration tl = new InvocationPlugins.Registration(plugins, "com.oracle.truffle.runtime.hotspot.HotSpotFastThreadLocal"); tl.register(new RequiredInvocationPlugin("getJVMCIReservedReference") { @Override public boolean apply(GraphBuilderContext b, ResolvedJavaMethod targetMethod, Receiver receiver) { diff --git a/compiler/src/jdk.internal.vm.compiler/src/org/graalvm/compiler/truffle/compiler/hotspot/HotSpotTruffleSafepointLoweringSnippet.java b/compiler/src/jdk.internal.vm.compiler/src/org/graalvm/compiler/truffle/compiler/hotspot/HotSpotTruffleSafepointLoweringSnippet.java index 3a8e08713937..09d69051abc8 100644 --- a/compiler/src/jdk.internal.vm.compiler/src/org/graalvm/compiler/truffle/compiler/hotspot/HotSpotTruffleSafepointLoweringSnippet.java +++ b/compiler/src/jdk.internal.vm.compiler/src/org/graalvm/compiler/truffle/compiler/hotspot/HotSpotTruffleSafepointLoweringSnippet.java @@ -70,7 +70,7 @@ public final class HotSpotTruffleSafepointLoweringSnippet implements Snippets { /** * Description for a call to - * {@code org.graalvm.compiler.truffle.runtime.hotspot.HotSpotThreadLocalHandshake.doHandshake()} + * {@code com.oracle.truffle.runtime.hotspot.HotSpotThreadLocalHandshake.doHandshake()} * via a stub. */ static final HotSpotForeignCallDescriptor THREAD_LOCAL_HANDSHAKE = new HotSpotForeignCallDescriptor( @@ -84,7 +84,7 @@ public final class HotSpotTruffleSafepointLoweringSnippet implements Snippets { /** * Snippet that does the same as - * {@code org.graalvm.compiler.truffle.runtime.hotspot.HotSpotThreadLocalHandshake.poll()}. + * {@code com.oracle.truffle.runtime.hotspot.HotSpotThreadLocalHandshake.poll()}. * * This condition cannot be hoisted out of loops as it is introduced in a phase late enough. See * {@link TruffleSafepointInsertionPhase}. diff --git a/compiler/src/jdk.internal.vm.compiler/src/org/graalvm/compiler/truffle/compiler/phases/InstrumentPhase.java b/compiler/src/jdk.internal.vm.compiler/src/org/graalvm/compiler/truffle/compiler/phases/InstrumentPhase.java index 4d3c9aca84b4..21f5358fb3b0 100644 --- a/compiler/src/jdk.internal.vm.compiler/src/org/graalvm/compiler/truffle/compiler/phases/InstrumentPhase.java +++ b/compiler/src/jdk.internal.vm.compiler/src/org/graalvm/compiler/truffle/compiler/phases/InstrumentPhase.java @@ -85,10 +85,10 @@ private static String asStackPattern(String declaringClassName, String methodNam } private static final String[] OMITTED_STACK_PATTERNS = new String[]{ - asStackPattern("org.graalvm.compiler.truffle.runtime.OptimizedCallTarget", "executeRootNode"), - asStackPattern("org.graalvm.compiler.truffle.runtime.OptimizedCallTarget", "profiledPERoot"), - asStackPattern("org.graalvm.compiler.truffle.runtime.OptimizedCallTarget", "callDirect"), - asStackPattern("org.graalvm.compiler.truffle.runtime.OptimizedDirectCallNode", "call"), + asStackPattern("com.oracle.truffle.runtime.OptimizedCallTarget", "executeRootNode"), + asStackPattern("com.oracle.truffle.runtime.OptimizedCallTarget", "profiledPERoot"), + asStackPattern("com.oracle.truffle.runtime.OptimizedCallTarget", "callDirect"), + asStackPattern("com.oracle.truffle.runtime.OptimizedDirectCallNode", "call"), }; private final Instrumentation instrumentation; protected final SnippetReflectionProvider snippetReflection; diff --git a/substratevm/src/com.oracle.svm.graal.hotspot.libgraal/src/com/oracle/svm/graal/hotspot/libgraal/truffle/HSTruffleCompilerRuntime.java b/substratevm/src/com.oracle.svm.graal.hotspot.libgraal/src/com/oracle/svm/graal/hotspot/libgraal/truffle/HSTruffleCompilerRuntime.java index 690e015835f7..004f82d13de8 100644 --- a/substratevm/src/com.oracle.svm.graal.hotspot.libgraal/src/com/oracle/svm/graal/hotspot/libgraal/truffle/HSTruffleCompilerRuntime.java +++ b/substratevm/src/com.oracle.svm.graal.hotspot.libgraal/src/com/oracle/svm/graal/hotspot/libgraal/truffle/HSTruffleCompilerRuntime.java @@ -89,7 +89,7 @@ /** * Proxy for a {@link TruffleCompilerRuntime} object in the HotSpot heap. */ -@FromLibGraalEntryPointsResolver(value = TruffleFromLibGraal.Id.class, entryPointsClassName = "org.graalvm.compiler.truffle.runtime.hotspot.libgraal.TruffleFromLibGraalEntryPoints") +@FromLibGraalEntryPointsResolver(value = TruffleFromLibGraal.Id.class, entryPointsClassName = "com.oracle.truffle.runtime.hotspot.libgraal.TruffleFromLibGraalEntryPoints") final class HSTruffleCompilerRuntime extends HSObject implements TruffleCompilerRuntime { private final ResolvedJavaType classLoaderDelegate; diff --git a/substratevm/src/com.oracle.svm.graal.hotspot.libgraal/src/com/oracle/svm/graal/hotspot/libgraal/truffle/TruffleFromLibGraalCalls.java b/substratevm/src/com.oracle.svm.graal.hotspot.libgraal/src/com/oracle/svm/graal/hotspot/libgraal/truffle/TruffleFromLibGraalCalls.java index a0bcb0e700e2..509d0eec4f92 100644 --- a/substratevm/src/com.oracle.svm.graal.hotspot.libgraal/src/com/oracle/svm/graal/hotspot/libgraal/truffle/TruffleFromLibGraalCalls.java +++ b/substratevm/src/com.oracle.svm.graal.hotspot.libgraal/src/com/oracle/svm/graal/hotspot/libgraal/truffle/TruffleFromLibGraalCalls.java @@ -36,7 +36,7 @@ final class TruffleFromLibGraalCalls extends FromLibGraalCalls { - private static final String ENTRY_POINT_CLASS_NAME = "org.graalvm.compiler.truffle.runtime.hotspot.libgraal.TruffleFromLibGraalEntryPoints"; + private static final String ENTRY_POINT_CLASS_NAME = "com.oracle.truffle.runtime.hotspot.libgraal.TruffleFromLibGraalEntryPoints"; private static final String CLASS_ENTRY_POINT_CLASS_NAME = "Class<" + ENTRY_POINT_CLASS_NAME + ">"; TruffleFromLibGraalCalls(JNIEnv env, JClass runtimeClass) { diff --git a/substratevm/src/com.oracle.svm.graal.hotspot.libgraal/src/com/oracle/svm/graal/hotspot/libgraal/truffle/TruffleToLibGraalEntryPoints.java b/substratevm/src/com.oracle.svm.graal.hotspot.libgraal/src/com/oracle/svm/graal/hotspot/libgraal/truffle/TruffleToLibGraalEntryPoints.java index 488e217ab245..7081626be8f5 100644 --- a/substratevm/src/com.oracle.svm.graal.hotspot.libgraal/src/com/oracle/svm/graal/hotspot/libgraal/truffle/TruffleToLibGraalEntryPoints.java +++ b/substratevm/src/com.oracle.svm.graal.hotspot.libgraal/src/com/oracle/svm/graal/hotspot/libgraal/truffle/TruffleToLibGraalEntryPoints.java @@ -100,17 +100,17 @@ */ final class TruffleToLibGraalEntryPoints { - @CEntryPoint(builtin = Builtin.GET_CURRENT_THREAD, name = "Java_org_graalvm_libgraal_LibGraalScope_getIsolateThreadIn") + @CEntryPoint(builtin = Builtin.GET_CURRENT_THREAD, name = "Java_com_oracle_truffle_runtime_hotspot_libgraal_LibGraalScope_getIsolateThreadIn") private static native IsolateThread getIsolateThreadIn(PointerBase env, PointerBase hsClazz, @IsolateContext Isolate isolate); - @CEntryPoint(name = "Java_org_graalvm_libgraal_LibGraalScope_attachThreadTo", builtin = CEntryPoint.Builtin.ATTACH_THREAD) + @CEntryPoint(name = "Java_com_oracle_truffle_runtime_hotspot_libgraal_LibGraalScope_attachThreadTo", builtin = CEntryPoint.Builtin.ATTACH_THREAD) static native long attachThreadTo(PointerBase env, PointerBase hsClazz, @CEntryPoint.IsolateContext long isolate); - @CEntryPoint(name = "Java_org_graalvm_libgraal_LibGraalScope_detachThreadFrom", builtin = CEntryPoint.Builtin.DETACH_THREAD) + @CEntryPoint(name = "Java_com_oracle_truffle_runtime_hotspot_libgraal_LibGraalScope_detachThreadFrom", builtin = CEntryPoint.Builtin.DETACH_THREAD) static native void detachThreadFrom(PointerBase env, PointerBase hsClazz, @CEntryPoint.IsolateThreadContext long isolateThread); @SuppressWarnings({"unused"}) - @CEntryPoint(name = "Java_org_graalvm_libgraal_LibGraalObject_releaseHandle") + @CEntryPoint(name = "Java_com_oracle_truffle_runtime_hotspot_libgraal_LibGraalObject_releaseHandle") public static boolean releaseHandle(PointerBase jniEnv, PointerBase jclass, @CEntryPoint.IsolateThreadContext long isolateThreadId, @@ -124,7 +124,7 @@ public static boolean releaseHandle(PointerBase jniEnv, } @SuppressWarnings({"unused"}) - @CEntryPoint(name = "Java_org_graalvm_libgraal_LibGraalScope_getIsolateId") + @CEntryPoint(name = "Java_com_oracle_truffle_runtime_hotspot_libgraal_LibGraalScope_getIsolateId") public static long getIsolateId(PointerBase jniEnv, PointerBase jclass, @CEntryPoint.IsolateThreadContext long isolateThreadId) { @@ -137,7 +137,7 @@ public static long getIsolateId(PointerBase jniEnv, @TruffleToLibGraal(Id.InitializeIsolate) @SuppressWarnings({"unused", "try"}) - @CEntryPoint(name = "Java_org_graalvm_compiler_truffle_runtime_hotspot_libgraal_TruffleToLibGraalCalls_initializeIsolate") + @CEntryPoint(name = "Java_com_oracle_truffle_runtime_hotspot_libgraal_TruffleToLibGraalCalls_initializeIsolate") public static void initializeIsolate(JNIEnv env, JClass hsClazz, @CEntryPoint.IsolateThreadContext long isolateThreadId, JClass runtimeClass) { try (JNIMethodScope s = LibGraalUtil.openScope(TruffleToLibGraalEntryPoints.class, Id.InitializeIsolate, env)) { TruffleLibGraalShutdownHook.registerShutdownHook(env, runtimeClass); @@ -148,7 +148,7 @@ public static void initializeIsolate(JNIEnv env, JClass hsClazz, @CEntryPoint.Is @TruffleToLibGraal(RegisterRuntime) @SuppressWarnings({"unused", "try"}) - @CEntryPoint(name = "Java_org_graalvm_compiler_truffle_runtime_hotspot_libgraal_TruffleToLibGraalCalls_registerRuntime") + @CEntryPoint(name = "Java_com_oracle_truffle_runtime_hotspot_libgraal_TruffleToLibGraalCalls_registerRuntime") public static boolean registerRuntime(JNIEnv env, JClass hsClazz, @CEntryPoint.IsolateThreadContext long isolateThreadId, JObject truffleRuntime) { try (JNIMethodScope s = LibGraalUtil.openScope(TruffleToLibGraalEntryPoints.class, RegisterRuntime, env)) { return LibGraalTruffleHostEnvironmentLookup.registerRuntime(env, truffleRuntime); @@ -160,7 +160,7 @@ public static boolean registerRuntime(JNIEnv env, JClass hsClazz, @CEntryPoint.I @TruffleToLibGraal(InitializeRuntime) @SuppressWarnings({"unused", "try"}) - @CEntryPoint(name = "Java_org_graalvm_compiler_truffle_runtime_hotspot_libgraal_TruffleToLibGraalCalls_initializeRuntime") + @CEntryPoint(name = "Java_com_oracle_truffle_runtime_hotspot_libgraal_TruffleToLibGraalCalls_initializeRuntime") public static long initializeRuntime(JNIEnv env, JClass hsClazz, @CEntryPoint.IsolateThreadContext long isolateThreadId, JObject truffleRuntime, JClass hsClassLoaderDelegate) { try (JNIMethodScope s = LibGraalUtil.openScope(TruffleToLibGraalEntryPoints.class, InitializeRuntime, env)) { @@ -176,7 +176,7 @@ public static long initializeRuntime(JNIEnv env, JClass hsClazz, @CEntryPoint.Is @TruffleToLibGraal(NewCompiler) @SuppressWarnings({"unused", "try"}) - @CEntryPoint(name = "Java_org_graalvm_compiler_truffle_runtime_hotspot_libgraal_TruffleToLibGraalCalls_newCompiler") + @CEntryPoint(name = "Java_com_oracle_truffle_runtime_hotspot_libgraal_TruffleToLibGraalCalls_newCompiler") public static long newCompiler(JNIEnv env, JClass hsClazz, @CEntryPoint.IsolateThreadContext long isolateThreadId, long truffleRuntimeHandle) { try (JNIMethodScope s = LibGraalUtil.openScope(TruffleToLibGraalEntryPoints.class, NewCompiler, env)) { HSTruffleCompilerRuntime hsTruffleRuntime = LibGraalObjectHandles.resolve(truffleRuntimeHandle, HSTruffleCompilerRuntime.class); @@ -194,7 +194,7 @@ private static JClass getStringClass(JNIEnv env) { @TruffleToLibGraal(InitializeCompiler) @SuppressWarnings("unused") - @CEntryPoint(name = "Java_org_graalvm_compiler_truffle_runtime_hotspot_libgraal_TruffleToLibGraalCalls_initializeCompiler") + @CEntryPoint(name = "Java_com_oracle_truffle_runtime_hotspot_libgraal_TruffleToLibGraalCalls_initializeCompiler") public static void initializeCompiler(JNIEnv env, JClass hsClazz, @CEntryPoint.IsolateThreadContext long isolateThreadId, long compilerHandle, JObject hsCompilable, boolean firstInitialization) { try (JNIMethodScope s = LibGraalUtil.openScope(TruffleToLibGraalEntryPoints.class, InitializeCompiler, env)) { @@ -209,7 +209,7 @@ public static void initializeCompiler(JNIEnv env, JClass hsClazz, @CEntryPoint.I @TruffleToLibGraal(GetCompilerConfigurationFactoryName) @SuppressWarnings({"unused", "try"}) - @CEntryPoint(name = "Java_org_graalvm_compiler_truffle_runtime_hotspot_libgraal_TruffleToLibGraalCalls_getCompilerConfigurationFactoryName") + @CEntryPoint(name = "Java_com_oracle_truffle_runtime_hotspot_libgraal_TruffleToLibGraalCalls_getCompilerConfigurationFactoryName") public static JString getCompilerConfigurationFactoryName(JNIEnv env, JClass hsClazz, @CEntryPoint.IsolateThreadContext long isolateThreadId, long truffleRuntimeHandle) { JNIMethodScope scope = LibGraalUtil.openScope(TruffleToLibGraalEntryPoints.class, GetCompilerConfigurationFactoryName, env); try (JNIMethodScope s = scope) { @@ -224,7 +224,7 @@ public static JString getCompilerConfigurationFactoryName(JNIEnv env, JClass hsC @TruffleToLibGraal(DoCompile) @SuppressWarnings({"unused", "try"}) - @CEntryPoint(name = "Java_org_graalvm_compiler_truffle_runtime_hotspot_libgraal_TruffleToLibGraalCalls_doCompile") + @CEntryPoint(name = "Java_com_oracle_truffle_runtime_hotspot_libgraal_TruffleToLibGraalCalls_doCompile") public static void doCompile(JNIEnv env, JClass hsClazz, @CEntryPoint.IsolateThreadContext long isolateThreadId, @@ -250,7 +250,7 @@ public static void doCompile(JNIEnv env, @TruffleToLibGraal(Shutdown) @SuppressWarnings({"unused", "try"}) - @CEntryPoint(name = "Java_org_graalvm_compiler_truffle_runtime_hotspot_libgraal_TruffleToLibGraalCalls_shutdown") + @CEntryPoint(name = "Java_com_oracle_truffle_runtime_hotspot_libgraal_TruffleToLibGraalCalls_shutdown") public static void shutdown(JNIEnv env, JClass hsClazz, @CEntryPoint.IsolateThreadContext long isolateThreadId, long handle) { try (JNIMethodScope s = LibGraalUtil.openScope(TruffleToLibGraalEntryPoints.class, Shutdown, env)) { HotSpotTruffleCompilerImpl compiler = LibGraalObjectHandles.resolve(handle, HotSpotTruffleCompilerImpl.class); @@ -262,7 +262,7 @@ public static void shutdown(JNIEnv env, JClass hsClazz, @CEntryPoint.IsolateThre @TruffleToLibGraal(InstallTruffleCallBoundaryMethod) @SuppressWarnings({"unused", "try"}) - @CEntryPoint(name = "Java_org_graalvm_compiler_truffle_runtime_hotspot_libgraal_TruffleToLibGraalCalls_installTruffleCallBoundaryMethod") + @CEntryPoint(name = "Java_com_oracle_truffle_runtime_hotspot_libgraal_TruffleToLibGraalCalls_installTruffleCallBoundaryMethod") public static void installTruffleCallBoundaryMethod(JNIEnv env, JClass hsClazz, @CEntryPoint.IsolateThreadContext long isolateThreadId, long handle, long methodHandle) { try (JNIMethodScope s = LibGraalUtil.openScope(TruffleToLibGraalEntryPoints.class, InstallTruffleCallBoundaryMethod, env)) { HotSpotTruffleCompilerImpl compiler = LibGraalObjectHandles.resolve(handle, HotSpotTruffleCompilerImpl.class); @@ -274,7 +274,7 @@ public static void installTruffleCallBoundaryMethod(JNIEnv env, JClass hsClazz, @TruffleToLibGraal(Id.InstallTruffleReservedOopMethod) @SuppressWarnings({"unused", "try"}) - @CEntryPoint(name = "Java_org_graalvm_compiler_truffle_runtime_hotspot_libgraal_TruffleToLibGraalCalls_installTruffleReservedOopMethod") + @CEntryPoint(name = "Java_com_oracle_truffle_runtime_hotspot_libgraal_TruffleToLibGraalCalls_installTruffleReservedOopMethod") public static void installTruffleReservedOopMethod(JNIEnv env, JClass hsClazz, @CEntryPoint.IsolateThreadContext long isolateThreadId, long handle, long methodHandle) { try (JNIMethodScope s = LibGraalUtil.openScope(TruffleToLibGraalEntryPoints.class, Id.InstallTruffleReservedOopMethod, env)) { HotSpotTruffleCompilerImpl compiler = LibGraalObjectHandles.resolve(handle, HotSpotTruffleCompilerImpl.class); @@ -286,7 +286,7 @@ public static void installTruffleReservedOopMethod(JNIEnv env, JClass hsClazz, @ @TruffleToLibGraal(PendingTransferToInterpreterOffset) @SuppressWarnings("unused") - @CEntryPoint(name = "Java_org_graalvm_compiler_truffle_runtime_hotspot_libgraal_TruffleToLibGraalCalls_pendingTransferToInterpreterOffset") + @CEntryPoint(name = "Java_com_oracle_truffle_runtime_hotspot_libgraal_TruffleToLibGraalCalls_pendingTransferToInterpreterOffset") public static int pendingTransferToInterpreterOffset(JNIEnv env, JClass hsClazz, @CEntryPoint.IsolateThreadContext long isolateThreadId, long handle, JObject hsCompilable) { try (JNIMethodScope scope = LibGraalUtil.openScope(TruffleToLibGraalEntryPoints.class, PendingTransferToInterpreterOffset, env)) { HotSpotTruffleCompilerImpl compiler = LibGraalObjectHandles.resolve(handle, HotSpotTruffleCompilerImpl.class); @@ -300,7 +300,7 @@ public static int pendingTransferToInterpreterOffset(JNIEnv env, JClass hsClazz, } @TruffleToLibGraal(GetSuppliedString) - @CEntryPoint(name = "Java_org_graalvm_compiler_truffle_runtime_hotspot_libgraal_TruffleToLibGraalCalls_getSuppliedString") + @CEntryPoint(name = "Java_com_oracle_truffle_runtime_hotspot_libgraal_TruffleToLibGraalCalls_getSuppliedString") @SuppressWarnings({"unused", "unchecked", "try"}) public static JString getString(JNIEnv env, JClass hsClazz, @CEntryPoint.IsolateThreadContext long isolateThreadId, long handle) { JNIMethodScope scope = LibGraalUtil.openScope(TruffleToLibGraalEntryPoints.class, GetSuppliedString, env); @@ -320,7 +320,7 @@ public static JString getString(JNIEnv env, JClass hsClazz, @CEntryPoint.Isolate } @TruffleToLibGraal(GetNodeCount) - @CEntryPoint(name = "Java_org_graalvm_compiler_truffle_runtime_hotspot_libgraal_TruffleToLibGraalCalls_getNodeCount") + @CEntryPoint(name = "Java_com_oracle_truffle_runtime_hotspot_libgraal_TruffleToLibGraalCalls_getNodeCount") @SuppressWarnings({"unused", "try"}) public static int getNodeCount(JNIEnv env, JClass hsClazz, @CEntryPoint.IsolateThreadContext long isolateThreadId, long handle) { try (JNIMethodScope s = LibGraalUtil.openScope(TruffleToLibGraalEntryPoints.class, GetNodeCount, env)) { @@ -333,7 +333,7 @@ public static int getNodeCount(JNIEnv env, JClass hsClazz, @CEntryPoint.IsolateT } @TruffleToLibGraal(GetNodeTypes) - @CEntryPoint(name = "Java_org_graalvm_compiler_truffle_runtime_hotspot_libgraal_TruffleToLibGraalCalls_getNodeTypes") + @CEntryPoint(name = "Java_com_oracle_truffle_runtime_hotspot_libgraal_TruffleToLibGraalCalls_getNodeTypes") @SuppressWarnings({"unused", "try"}) public static JObjectArray getNodeTypes(JNIEnv env, JClass hsClazz, @CEntryPoint.IsolateThreadContext long isolateThreadId, long handle, boolean simpleNames) { JNIMethodScope scope = LibGraalUtil.openScope(TruffleToLibGraalEntryPoints.class, GetNodeTypes, env); @@ -354,7 +354,7 @@ public static JObjectArray getNodeTypes(JNIEnv env, JClass hsClazz, @CEntryPoint } @TruffleToLibGraal(GetTargetCodeSize) - @CEntryPoint(name = "Java_org_graalvm_compiler_truffle_runtime_hotspot_libgraal_TruffleToLibGraalCalls_getTargetCodeSize") + @CEntryPoint(name = "Java_com_oracle_truffle_runtime_hotspot_libgraal_TruffleToLibGraalCalls_getTargetCodeSize") @SuppressWarnings({"unused", "try"}) public static int getTargetCodeSize(JNIEnv env, JClass hsClazz, @CEntryPoint.IsolateThreadContext long isolateThreadId, long handle) { try (JNIMethodScope s = LibGraalUtil.openScope(TruffleToLibGraalEntryPoints.class, GetTargetCodeSize, env)) { @@ -366,7 +366,7 @@ public static int getTargetCodeSize(JNIEnv env, JClass hsClazz, @CEntryPoint.Iso } @TruffleToLibGraal(GetTotalFrameSize) - @CEntryPoint(name = "Java_org_graalvm_compiler_truffle_runtime_hotspot_libgraal_TruffleToLibGraalCalls_getTotalFrameSize") + @CEntryPoint(name = "Java_com_oracle_truffle_runtime_hotspot_libgraal_TruffleToLibGraalCalls_getTotalFrameSize") @SuppressWarnings({"unused", "try"}) public static int getTotalFrameSize(JNIEnv env, JClass hsClazz, @CEntryPoint.IsolateThreadContext long isolateThreadId, long handle) { try (JNIMethodScope s = LibGraalUtil.openScope(TruffleToLibGraalEntryPoints.class, GetTotalFrameSize, env)) { @@ -378,7 +378,7 @@ public static int getTotalFrameSize(JNIEnv env, JClass hsClazz, @CEntryPoint.Iso } @TruffleToLibGraal(GetExceptionHandlersCount) - @CEntryPoint(name = "Java_org_graalvm_compiler_truffle_runtime_hotspot_libgraal_TruffleToLibGraalCalls_getExceptionHandlersCount") + @CEntryPoint(name = "Java_com_oracle_truffle_runtime_hotspot_libgraal_TruffleToLibGraalCalls_getExceptionHandlersCount") @SuppressWarnings({"unused", "try"}) public static int getExceptionHandlersCount(JNIEnv env, JClass hsClazz, @CEntryPoint.IsolateThreadContext long isolateThreadId, long handle) { try (JNIMethodScope s = LibGraalUtil.openScope(TruffleToLibGraalEntryPoints.class, GetExceptionHandlersCount, env)) { @@ -390,7 +390,7 @@ public static int getExceptionHandlersCount(JNIEnv env, JClass hsClazz, @CEntryP } @TruffleToLibGraal(GetInfopointsCount) - @CEntryPoint(name = "Java_org_graalvm_compiler_truffle_runtime_hotspot_libgraal_TruffleToLibGraalCalls_getInfopointsCount") + @CEntryPoint(name = "Java_com_oracle_truffle_runtime_hotspot_libgraal_TruffleToLibGraalCalls_getInfopointsCount") @SuppressWarnings({"unused", "try"}) public static int getInfopointsCount(JNIEnv env, JClass hsClazz, @CEntryPoint.IsolateThreadContext long isolateThreadId, long handle) { try (JNIMethodScope s = LibGraalUtil.openScope(TruffleToLibGraalEntryPoints.class, GetInfopointsCount, env)) { @@ -402,7 +402,7 @@ public static int getInfopointsCount(JNIEnv env, JClass hsClazz, @CEntryPoint.Is } @TruffleToLibGraal(GetInfopoints) - @CEntryPoint(name = "Java_org_graalvm_compiler_truffle_runtime_hotspot_libgraal_TruffleToLibGraalCalls_getInfopoints") + @CEntryPoint(name = "Java_com_oracle_truffle_runtime_hotspot_libgraal_TruffleToLibGraalCalls_getInfopoints") @SuppressWarnings({"unused", "try"}) public static JObjectArray getInfopoints(JNIEnv env, JClass hsClazz, @CEntryPoint.IsolateThreadContext long isolateThreadId, long handle) { JNIMethodScope scope = LibGraalUtil.openScope(TruffleToLibGraalEntryPoints.class, GetInfopoints, env); @@ -422,7 +422,7 @@ public static JObjectArray getInfopoints(JNIEnv env, JClass hsClazz, @CEntryPoin } @TruffleToLibGraal(Id.ListCompilerOptions) - @CEntryPoint(name = "Java_org_graalvm_compiler_truffle_runtime_hotspot_libgraal_TruffleToLibGraalCalls_listCompilerOptions") + @CEntryPoint(name = "Java_com_oracle_truffle_runtime_hotspot_libgraal_TruffleToLibGraalCalls_listCompilerOptions") @SuppressWarnings({"unused", "try"}) public static JByteArray listCompilerOptions(JNIEnv env, JClass hsClazz, @CEntryPoint.IsolateThreadContext long isolateThreadId) { JNIMethodScope scope = LibGraalUtil.openScope(TruffleToLibGraalEntryPoints.class, Id.ListCompilerOptions, env); @@ -451,7 +451,7 @@ public static JByteArray listCompilerOptions(JNIEnv env, JClass hsClazz, @CEntry } @TruffleToLibGraal(Id.CompilerOptionExists) - @CEntryPoint(name = "Java_org_graalvm_compiler_truffle_runtime_hotspot_libgraal_TruffleToLibGraalCalls_compilerOptionExists") + @CEntryPoint(name = "Java_com_oracle_truffle_runtime_hotspot_libgraal_TruffleToLibGraalCalls_compilerOptionExists") @SuppressWarnings({"unused", "try"}) public static boolean existsCompilerOption(JNIEnv env, JClass hsClazz, @CEntryPoint.IsolateThreadContext long isolateThreadId, JString optionName) { JNIMethodScope scope = LibGraalUtil.openScope(TruffleToLibGraalEntryPoints.class, Id.CompilerOptionExists, env); @@ -464,7 +464,7 @@ public static boolean existsCompilerOption(JNIEnv env, JClass hsClazz, @CEntryPo } @TruffleToLibGraal(Id.ValidateCompilerOption) - @CEntryPoint(name = "Java_org_graalvm_compiler_truffle_runtime_hotspot_libgraal_TruffleToLibGraalCalls_validateCompilerOption") + @CEntryPoint(name = "Java_com_oracle_truffle_runtime_hotspot_libgraal_TruffleToLibGraalCalls_validateCompilerOption") @SuppressWarnings({"unused", "try"}) public static JString validateCompilerOption(JNIEnv env, JClass hsClazz, @CEntryPoint.IsolateThreadContext long isolateThreadId, JString optionName, JString optionValue) { JNIMethodScope scope = LibGraalUtil.openScope(TruffleToLibGraalEntryPoints.class, Id.ValidateCompilerOption, env); @@ -477,7 +477,7 @@ public static JString validateCompilerOption(JNIEnv env, JClass hsClazz, @CEntry } @TruffleToLibGraal(GetMarksCount) - @CEntryPoint(name = "Java_org_graalvm_compiler_truffle_runtime_hotspot_libgraal_TruffleToLibGraalCalls_getMarksCount") + @CEntryPoint(name = "Java_com_oracle_truffle_runtime_hotspot_libgraal_TruffleToLibGraalCalls_getMarksCount") @SuppressWarnings({"unused", "try"}) public static int getMarksCount(JNIEnv env, JClass hsClazz, @CEntryPoint.IsolateThreadContext long isolateThreadId, long handle) { try (JNIMethodScope s = LibGraalUtil.openScope(TruffleToLibGraalEntryPoints.class, GetMarksCount, env)) { @@ -489,7 +489,7 @@ public static int getMarksCount(JNIEnv env, JClass hsClazz, @CEntryPoint.Isolate } @TruffleToLibGraal(GetDataPatchesCount) - @CEntryPoint(name = "Java_org_graalvm_compiler_truffle_runtime_hotspot_libgraal_TruffleToLibGraalCalls_getDataPatchesCount") + @CEntryPoint(name = "Java_com_oracle_truffle_runtime_hotspot_libgraal_TruffleToLibGraalCalls_getDataPatchesCount") @SuppressWarnings({"unused", "try"}) public static int getDataPatchesCount(JNIEnv env, JClass hsClazz, @CEntryPoint.IsolateThreadContext long isolateThreadId, long handle) { try (JNIMethodScope s = LibGraalUtil.openScope(TruffleToLibGraalEntryPoints.class, GetDataPatchesCount, env)) { @@ -501,7 +501,7 @@ public static int getDataPatchesCount(JNIEnv env, JClass hsClazz, @CEntryPoint.I } @TruffleToLibGraal(PurgePartialEvaluationCaches) - @CEntryPoint(name = "Java_org_graalvm_compiler_truffle_runtime_hotspot_libgraal_TruffleToLibGraalCalls_purgePartialEvaluationCaches") + @CEntryPoint(name = "Java_com_oracle_truffle_runtime_hotspot_libgraal_TruffleToLibGraalCalls_purgePartialEvaluationCaches") @SuppressWarnings({"unused", "try"}) public static void purgePartialEvaluationCaches(JNIEnv env, JClass hsClass, @CEntryPoint.IsolateThreadContext long isolateThreadId, long compilerHandle) { try (JNIMethodScope s = LibGraalUtil.openScope(TruffleToLibGraalEntryPoints.class, PurgePartialEvaluationCaches, env)) { @@ -516,7 +516,7 @@ public static void purgePartialEvaluationCaches(JNIEnv env, JClass hsClass, @CEn static { try { - Class callsClass = Class.forName("org.graalvm.compiler.truffle.runtime.hotspot.libgraal.TruffleToLibGraalCalls"); + Class callsClass = Class.forName("com.oracle.truffle.runtime.hotspot.libgraal.TruffleToLibGraalCalls"); LibGraalChecker.checkToLibGraalCalls(TruffleToLibGraalEntryPoints.class, callsClass, TruffleToLibGraal.class); } catch (ClassNotFoundException e) { throw new InternalError(e); diff --git a/substratevm/src/com.oracle.svm.truffle.tck/src/META-INF/native-image/native-image.properties b/substratevm/src/com.oracle.svm.truffle.tck/src/META-INF/native-image/native-image.properties index 48b81adde379..c43b228f5498 100644 --- a/substratevm/src/com.oracle.svm.truffle.tck/src/META-INF/native-image/native-image.properties +++ b/substratevm/src/com.oracle.svm.truffle.tck/src/META-INF/native-image/native-image.properties @@ -11,7 +11,7 @@ JavaArgs = --add-exports org.graalvm.nativeimage.base/com.oracle.svm.util=ALL-UN --add-exports jdk.internal.vm.compiler/org.graalvm.compiler.nodes=ALL-UNNAMED \ --add-exports jdk.internal.vm.compiler/org.graalvm.compiler.nodes.java=ALL-UNNAMED \ --add-exports jdk.internal.vm.compiler/org.graalvm.compiler.options=ALL-UNNAMED \ - --add-exports jdk.internal.vm.compiler/org.graalvm.compiler.truffle.runtime=ALL-UNNAMED \ + --add-exports org.graalvm.truffle.runtime/com.oracle.truffle.runtime=ALL-UNNAMED \ --add-exports jdk.internal.vm.compiler/org.graalvm.util.json=ALL-UNNAMED \ --add-exports jdk.internal.vm.ci/jdk.vm.ci.common=ALL-UNNAMED \ --add-exports jdk.internal.vm.ci/jdk.vm.ci.meta=ALL-UNNAMED diff --git a/substratevm/src/com.oracle.svm.truffle.tck/src/com/oracle/svm/truffle/tck/PermissionsFeature.java b/substratevm/src/com.oracle.svm.truffle.tck/src/com/oracle/svm/truffle/tck/PermissionsFeature.java index c75e6603ee4b..feadbaa5e7d8 100644 --- a/substratevm/src/com.oracle.svm.truffle.tck/src/com/oracle/svm/truffle/tck/PermissionsFeature.java +++ b/substratevm/src/com.oracle.svm.truffle.tck/src/com/oracle/svm/truffle/tck/PermissionsFeature.java @@ -60,7 +60,6 @@ import org.graalvm.compiler.nodes.java.NewInstanceNode; import org.graalvm.compiler.options.Option; import org.graalvm.compiler.options.OptionType; -import org.graalvm.compiler.truffle.runtime.OptimizedCallTarget; import org.graalvm.nativeimage.ImageSingletons; import org.graalvm.nativeimage.hosted.Feature; import org.graalvm.polyglot.io.FileSystem; @@ -83,6 +82,7 @@ import com.oracle.svm.hosted.config.ConfigurationParserUtils; import com.oracle.svm.util.ClassUtil; import com.oracle.truffle.api.TruffleLanguage; +import com.oracle.truffle.runtime.OptimizedCallTarget; import jdk.vm.ci.common.JVMCIError; import jdk.vm.ci.meta.ModifiersProvider; diff --git a/substratevm/src/com.oracle.svm.truffle/src/com/oracle/svm/truffle/TruffleFeature.java b/substratevm/src/com.oracle.svm.truffle/src/com/oracle/svm/truffle/TruffleFeature.java index 55fb6f3798e5..d29e423942bd 100644 --- a/substratevm/src/com.oracle.svm.truffle/src/com/oracle/svm/truffle/TruffleFeature.java +++ b/substratevm/src/com.oracle.svm.truffle/src/com/oracle/svm/truffle/TruffleFeature.java @@ -125,7 +125,6 @@ import org.graalvm.compiler.truffle.compiler.host.HostInliningPhase; import org.graalvm.compiler.truffle.compiler.host.TruffleHostEnvironment; import org.graalvm.compiler.truffle.compiler.nodes.asserts.NeverPartOfCompilationNode; -import org.graalvm.compiler.truffle.runtime.TruffleCallBoundary; import org.graalvm.nativeimage.AnnotationAccess; import org.graalvm.nativeimage.ImageSingletons; import org.graalvm.nativeimage.hosted.Feature; @@ -175,6 +174,7 @@ import com.oracle.truffle.api.frame.Frame; import com.oracle.truffle.api.nodes.BytecodeOSRNode; import com.oracle.truffle.api.nodes.ExplodeLoop; +import com.oracle.truffle.runtime.TruffleCallBoundary; import jdk.vm.ci.meta.MetaAccessProvider; import jdk.vm.ci.meta.ResolvedJavaField; @@ -436,7 +436,7 @@ public void beforeAnalysis(BeforeAnalysisAccess access) { DuringAnalysisAccessImpl impl = (DuringAnalysisAccessImpl) acc; /* Pass known reachable classes to the initializer: it will decide there what to do. */ Boolean modified = TruffleBaseFeature.invokeStaticMethod( - "org.graalvm.compiler.truffle.runtime.BytecodeOSRRootNode", + "com.oracle.truffle.runtime.BytecodeOSRRootNode", "initializeClassUsingDeprecatedFrameTransfer", Collections.singleton(Class.class), klass); @@ -1024,8 +1024,8 @@ public void registerGraalPhases(Providers providers, SnippetReflectionProvider s } } -@TargetClass(className = "org.graalvm.compiler.truffle.runtime.OptimizedCallTarget", onlyWith = TruffleFeature.IsEnabled.class) -final class Target_org_graalvm_compiler_truffle_runtime_OptimizedCallTarget { +@TargetClass(className = "com.oracle.truffle.runtime.OptimizedCallTarget", onlyWith = TruffleFeature.IsEnabled.class) +final class Target_com_oracle_truffle_runtime_OptimizedCallTarget { /* * Retry compilation when they failed during image generation. diff --git a/substratevm/src/com.oracle.svm.truffle/src/com/oracle/svm/truffle/TruffleJFRFeature.java b/substratevm/src/com.oracle.svm.truffle/src/com/oracle/svm/truffle/TruffleJFRFeature.java index 2b9d186f67ec..c686f5bd8a48 100644 --- a/substratevm/src/com.oracle.svm.truffle/src/com/oracle/svm/truffle/TruffleJFRFeature.java +++ b/substratevm/src/com.oracle.svm.truffle/src/com/oracle/svm/truffle/TruffleJFRFeature.java @@ -27,15 +27,15 @@ import java.util.Iterator; import org.graalvm.compiler.serviceprovider.JavaVersionUtil; -import org.graalvm.compiler.truffle.jfr.EventFactory; -import org.graalvm.compiler.truffle.jfr.EventFactory.Provider; -import org.graalvm.compiler.truffle.runtime.serviceprovider.TruffleRuntimeServices; import org.graalvm.nativeimage.ImageSingletons; import com.oracle.svm.core.feature.AutomaticallyRegisteredFeature; import com.oracle.svm.core.feature.InternalFeature; import com.oracle.svm.core.jfr.JfrFeature; import com.oracle.svm.core.util.UserError; +import com.oracle.truffle.runtime.jfr.EventFactory; +import com.oracle.truffle.runtime.jfr.EventFactory.Provider; +import com.oracle.truffle.runtime.serviceprovider.TruffleRuntimeServices; @AutomaticallyRegisteredFeature public class TruffleJFRFeature implements InternalFeature { diff --git a/substratevm/src/com.oracle.svm.truffle/src/com/oracle/svm/truffle/TruffleSupport.java b/substratevm/src/com.oracle.svm.truffle/src/com/oracle/svm/truffle/TruffleSupport.java index 4225039c5bff..8f2aea9a7ffd 100644 --- a/substratevm/src/com.oracle.svm.truffle/src/com/oracle/svm/truffle/TruffleSupport.java +++ b/substratevm/src/com.oracle.svm.truffle/src/com/oracle/svm/truffle/TruffleSupport.java @@ -37,11 +37,6 @@ import org.graalvm.compiler.truffle.compiler.TruffleCompilerConfiguration; import org.graalvm.compiler.truffle.compiler.TruffleCompilerImpl; import org.graalvm.compiler.truffle.compiler.TruffleTierConfiguration; -import org.graalvm.compiler.truffle.runtime.BackgroundCompileQueue; -import org.graalvm.compiler.truffle.runtime.EngineData; -import org.graalvm.compiler.truffle.runtime.OptimizedAssumption; -import org.graalvm.compiler.truffle.runtime.OptimizedCallTarget; -import org.graalvm.compiler.truffle.runtime.OptimizedDirectCallNode; import org.graalvm.nativeimage.ImageSingletons; import org.graalvm.nativeimage.hosted.Feature; @@ -65,6 +60,11 @@ import com.oracle.truffle.api.utilities.TriState; import com.oracle.truffle.compiler.OptimizedAssumptionDependency; import com.oracle.truffle.compiler.TruffleCompilable; +import com.oracle.truffle.runtime.BackgroundCompileQueue; +import com.oracle.truffle.runtime.EngineData; +import com.oracle.truffle.runtime.OptimizedAssumption; +import com.oracle.truffle.runtime.OptimizedCallTarget; +import com.oracle.truffle.runtime.OptimizedDirectCallNode; import jdk.vm.ci.meta.JavaConstant; diff --git a/substratevm/src/com.oracle.svm.truffle/src/com/oracle/svm/truffle/api/SubstrateFastThreadLocal.java b/substratevm/src/com.oracle.svm.truffle/src/com/oracle/svm/truffle/api/SubstrateFastThreadLocal.java index a39dcd4e284b..3b1a432eecce 100644 --- a/substratevm/src/com.oracle.svm.truffle/src/com/oracle/svm/truffle/api/SubstrateFastThreadLocal.java +++ b/substratevm/src/com.oracle.svm.truffle/src/com/oracle/svm/truffle/api/SubstrateFastThreadLocal.java @@ -24,7 +24,6 @@ */ package com.oracle.svm.truffle.api; -import org.graalvm.compiler.truffle.runtime.GraalFastThreadLocal; import org.graalvm.nativeimage.Platform; import org.graalvm.nativeimage.Platforms; @@ -32,6 +31,7 @@ import com.oracle.svm.core.threadlocal.FastThreadLocal; import com.oracle.svm.core.threadlocal.FastThreadLocalFactory; import com.oracle.svm.core.threadlocal.FastThreadLocalObject; +import com.oracle.truffle.runtime.GraalFastThreadLocal; final class SubstrateFastThreadLocal extends GraalFastThreadLocal { diff --git a/substratevm/src/com.oracle.svm.truffle/src/com/oracle/svm/truffle/api/SubstrateOptimizedCallTarget.java b/substratevm/src/com.oracle.svm.truffle/src/com/oracle/svm/truffle/api/SubstrateOptimizedCallTarget.java index 8d8afca98e4b..5a9948f633d8 100644 --- a/substratevm/src/com.oracle.svm.truffle/src/com/oracle/svm/truffle/api/SubstrateOptimizedCallTarget.java +++ b/substratevm/src/com.oracle.svm.truffle/src/com/oracle/svm/truffle/api/SubstrateOptimizedCallTarget.java @@ -24,8 +24,6 @@ */ package com.oracle.svm.truffle.api; -import org.graalvm.compiler.truffle.runtime.EngineData; -import org.graalvm.compiler.truffle.runtime.OptimizedCallTarget; import org.graalvm.nativeimage.c.function.CFunctionPointer; import com.oracle.svm.core.Uninterruptible; @@ -34,6 +32,8 @@ import com.oracle.svm.core.thread.VMOperation; import com.oracle.svm.truffle.TruffleSupport; import com.oracle.truffle.api.nodes.RootNode; +import com.oracle.truffle.runtime.EngineData; +import com.oracle.truffle.runtime.OptimizedCallTarget; import jdk.vm.ci.code.InstalledCode; import jdk.vm.ci.meta.SpeculationLog; diff --git a/substratevm/src/com.oracle.svm.truffle/src/com/oracle/svm/truffle/api/SubstrateTruffleRuntime.java b/substratevm/src/com.oracle.svm.truffle/src/com/oracle/svm/truffle/api/SubstrateTruffleRuntime.java index 8dad34d0b1a4..fbb9048e0350 100644 --- a/substratevm/src/com.oracle.svm.truffle/src/com/oracle/svm/truffle/api/SubstrateTruffleRuntime.java +++ b/substratevm/src/com.oracle.svm.truffle/src/com/oracle/svm/truffle/api/SubstrateTruffleRuntime.java @@ -34,13 +34,6 @@ import org.graalvm.compiler.api.replacements.Fold; import org.graalvm.compiler.options.Option; -import org.graalvm.compiler.truffle.runtime.AbstractCompilationTask; -import org.graalvm.compiler.truffle.runtime.BackgroundCompileQueue; -import org.graalvm.compiler.truffle.runtime.CompilationTask; -import org.graalvm.compiler.truffle.runtime.EngineData; -import org.graalvm.compiler.truffle.runtime.GraalTruffleRuntime; -import org.graalvm.compiler.truffle.runtime.OptimizedCallTarget; -import org.graalvm.compiler.truffle.runtime.OptimizedRuntimeOptions.ExceptionAction; import org.graalvm.nativeimage.ImageSingletons; import org.graalvm.nativeimage.Platform; import org.graalvm.nativeimage.Platform.HOSTED_ONLY; @@ -73,6 +66,13 @@ import com.oracle.truffle.compiler.PartialEvaluationMethodInfo; import com.oracle.truffle.compiler.TruffleCompilable; import com.oracle.truffle.compiler.TruffleCompiler; +import com.oracle.truffle.runtime.AbstractCompilationTask; +import com.oracle.truffle.runtime.BackgroundCompileQueue; +import com.oracle.truffle.runtime.CompilationTask; +import com.oracle.truffle.runtime.EngineData; +import com.oracle.truffle.runtime.GraalTruffleRuntime; +import com.oracle.truffle.runtime.OptimizedCallTarget; +import com.oracle.truffle.runtime.OptimizedRuntimeOptions.ExceptionAction; import jdk.vm.ci.code.InstalledCode; import jdk.vm.ci.code.stack.StackIntrospection; diff --git a/substratevm/src/com.oracle.svm.truffle/src/com/oracle/svm/truffle/isolated/IsolatedTruffleRuntimeSupport.java b/substratevm/src/com.oracle.svm.truffle/src/com/oracle/svm/truffle/isolated/IsolatedTruffleRuntimeSupport.java index 6832be914166..a0146fe72d13 100644 --- a/substratevm/src/com.oracle.svm.truffle/src/com/oracle/svm/truffle/isolated/IsolatedTruffleRuntimeSupport.java +++ b/substratevm/src/com.oracle.svm.truffle/src/com/oracle/svm/truffle/isolated/IsolatedTruffleRuntimeSupport.java @@ -27,9 +27,6 @@ import java.util.function.Consumer; import java.util.function.Supplier; -import org.graalvm.compiler.truffle.runtime.OptimizedAssumption; -import org.graalvm.compiler.truffle.runtime.OptimizedCallTarget; -import org.graalvm.compiler.truffle.runtime.OptimizedDirectCallNode; import org.graalvm.nativeimage.c.function.CEntryPoint; import com.oracle.svm.core.deopt.SubstrateInstalledCode; @@ -50,6 +47,9 @@ import com.oracle.truffle.api.utilities.TriState; import com.oracle.truffle.compiler.OptimizedAssumptionDependency; import com.oracle.truffle.compiler.TruffleCompilable; +import com.oracle.truffle.runtime.OptimizedAssumption; +import com.oracle.truffle.runtime.OptimizedCallTarget; +import com.oracle.truffle.runtime.OptimizedDirectCallNode; import jdk.vm.ci.meta.JavaConstant; diff --git a/truffle/docs/HostCompilation.md b/truffle/docs/HostCompilation.md index 1719bae5058f..635470a35d9c 100644 --- a/truffle/docs/HostCompilation.md +++ b/truffle/docs/HostCompilation.md @@ -178,7 +178,7 @@ This prints: CUTOFF org.graalvm.compiler.truffle.test.HostInliningBytecodeInterpreterExampleTest$BytecodeNode.protectedByInIntepreter() [inlined -1, monomorphic false, deopt false, inInterpreter true, propDeopt false, subTreeInvokes 1, subTreeCost 0, incomplete false, reason protected by inInterpreter()] INLINE com.oracle.truffle.api.CompilerDirectives.transferToInterpreterAndInvalidate() [inlined 3, monomorphic false, deopt true, inInterpreter false, propDeopt false, subTreeInvokes 0, subTreeCost 32, incomplete false, reason null] INLINE com.oracle.truffle.api.CompilerDirectives.inInterpreter() [inlined 3, monomorphic false, deopt true, inInterpreter false, propDeopt false, subTreeInvokes 0, subTreeCost 6, incomplete false, reason null] - CUTOFF org.graalvm.compiler.truffle.runtime.hotspot.AbstractHotSpotTruffleRuntime.traceTransferToInterpreter() [inlined -1, monomorphic false, deopt true, inInterpreter true, propDeopt false, subTreeInvokes 0, subTreeCost 0, incomplete false, reason dominated by transferToInterpreter()] + CUTOFF com.oracle.truffle.runtime.hotspot.AbstractHotSpotTruffleRuntime.traceTransferToInterpreter() [inlined -1, monomorphic false, deopt true, inInterpreter true, propDeopt false, subTreeInvokes 0, subTreeCost 0, incomplete false, reason dominated by transferToInterpreter()] CUTOFF org.graalvm.compiler.truffle.test.HostInliningBytecodeInterpreterExampleTest$BytecodeNode.dominatedByTransferToInterpreter() [inlined -1, monomorphic false, deopt true, inInterpreter false, propDeopt false, subTreeInvokes 0, subTreeCost 0, incomplete false, reason dominated by transferToInterpreter()] INLINE org.graalvm.compiler.truffle.test.HostInliningBytecodeInterpreterExampleTest$BytecodeNode.recursive(int) [inlined 4, monomorphic false, deopt false, inInterpreter false, propDeopt false, subTreeInvokes 1, subTreeCost 20, incomplete false, reason null] CUTOFF org.graalvm.compiler.truffle.test.HostInliningBytecodeInterpreterExampleTest$BytecodeNode.recursive(int) [inlined -1, monomorphic false, deopt false, inInterpreter false, propDeopt false, subTreeInvokes 1, subTreeCost 0, incomplete false, reason recursive] diff --git a/truffle/docs/Optimizing.md b/truffle/docs/Optimizing.md index de3170fdb5b8..ffd232b9f174 100644 --- a/truffle/docs/Optimizing.md +++ b/truffle/docs/Optimizing.md @@ -149,8 +149,8 @@ The `store` enables warnings when the store location argument is not a partial e at com.oracle.truffle.js.nodes.function.FunctionBodyNode.execute(FunctionBodyNode.java:73) at com.oracle.truffle.js.nodes.function.FunctionRootNode.executeInRealm(FunctionRootNode.java:147) at com.oracle.truffle.js.runtime.JavaScriptRealmBoundaryRootNode.execute(JavaScriptRealmBoundaryRootNode.java:93) - at org.graalvm.compiler.truffle.runtime.OptimizedCallTarget.executeRootNode(OptimizedCallTarget.java:503) - at org.graalvm.compiler.truffle.runtime.OptimizedCallTarget.profiledPERoot(OptimizedCallTarget.java:480) + at com.oracle.truffle.runtime.OptimizedCallTarget.executeRootNode(OptimizedCallTarget.java:503) + at com.oracle.truffle.runtime.OptimizedCallTarget.profiledPERoot(OptimizedCallTarget.java:480) ``` The `--engine.CompilationStatistics` command prints statistics on compilations at the end of the process: @@ -571,8 +571,8 @@ This is often the most efficient way to find where a deoptimization comes from t at org.truffleruby.core.string.StringNodes$GetIndexNode.getIndex(StringNodes.java:650) at org.truffleruby.core.string.StringNodesFactory$GetIndexNodeFactory$GetIndexNodeGen.execute(StringNodesFactory.java:1435) at org.truffleruby.language.RubyCoreMethodRootNode.execute(RubyCoreMethodRootNode.java:53) - at org.graalvm.compiler.truffle.runtime.OptimizedCallTarget.executeRootNode(OptimizedCallTarget.java:632) - at org.graalvm.compiler.truffle.runtime.OptimizedCallTarget.profiledPERoot(OptimizedCallTarget.java:603) + at com.oracle.truffle.runtime.OptimizedCallTarget.executeRootNode(OptimizedCallTarget.java:632) + at com.oracle.truffle.runtime.OptimizedCallTarget.profiledPERoot(OptimizedCallTarget.java:603) [Deoptimization of frame name: String#[] sp: 0x7ffd7b992710 ip: 0x7f26a8d8079f @@ -582,8 +582,8 @@ This is often the most efficient way to find where a deoptimization comes from t at org.truffleruby.core.string.StringNodes$GetIndexNode.getIndex(StringNodes.java:650) bci 25 duringCall return address 0x415f197 at org.truffleruby.core.string.StringNodesFactory$GetIndexNodeFactory$GetIndexNodeGen.execute(StringNodesFactory.java:1435) bci 109 duringCall return address 0x4182391 at org.truffleruby.language.RubyCoreMethodRootNode.execute(RubyCoreMethodRootNode.java:53) bci 14 duringCall return address 0x4239a29 - at org.graalvm.compiler.truffle.runtime.OptimizedCallTarget.executeRootNode(OptimizedCallTarget.java:632) bci 9 duringCall return address 0x3f1c4c9 - at org.graalvm.compiler.truffle.runtime.OptimizedCallTarget.profiledPERoot(OptimizedCallTarget.java:603) bci 37 duringCall return address 0x3f1d965 + at com.oracle.truffle.runtime.OptimizedCallTarget.executeRootNode(OptimizedCallTarget.java:632) bci 9 duringCall return address 0x3f1c4c9 + at com.oracle.truffle.runtime.OptimizedCallTarget.profiledPERoot(OptimizedCallTarget.java:603) bci 37 duringCall return address 0x3f1d965 ] ] ``` @@ -616,7 +616,7 @@ The `TraceDeoptimization` option might require using a `fastdebug` JDK. ```shell Uncommon trap bci=9 pc=0x00000001097f2235, relative_pc=501, method=com.oracle.truffle.js.nodes.access.PropertyNode.executeInt(Ljava/lang/Object;Ljava/lang/Object;)I, debug_id=0 -Uncommon trap occurred in org.graalvm.compiler.truffle.runtime.OptimizedCallTarget::profiledPERoot compiler=JVMCI compile_id=2686 (JVMCI: installed code name=BinaryConstraint.output#2) (@0x00000001097f2235) thread=5891 reason=transfer_to_interpreter action=reinterpret unloaded_class_index=-1 debug_id=0 +Uncommon trap occurred in com.oracle.truffle.runtime.OptimizedCallTarget::profiledPERoot compiler=JVMCI compile_id=2686 (JVMCI: installed code name=BinaryConstraint.output#2) (@0x00000001097f2235) thread=5891 reason=transfer_to_interpreter action=reinterpret unloaded_class_index=-1 debug_id=0 ``` Finally, on native images, `--vm.XX:+TraceDeoptimizationDetails` prints additional information: @@ -631,8 +631,8 @@ Finally, on native images, `--vm.XX:+TraceDeoptimizationDetails` prints addition name: BinaryConstraint.output sp: 0x7ffee7324d90 ip: 0x1126c51a8 stack trace where execution continues: - at org.graalvm.compiler.truffle.runtime.OptimizedCallTarget.profiledPERoot(OptimizedCallTarget.java:475) bci 0 return address 0x10aab9e5e - org.graalvm.compiler.truffle.runtime.OptimizedCallTarget.profiledPERoot(OptimizedCallTarget.java:475) + at com.oracle.truffle.runtime.OptimizedCallTarget.profiledPERoot(OptimizedCallTarget.java:475) bci 0 return address 0x10aab9e5e + com.oracle.truffle.runtime.OptimizedCallTarget.profiledPERoot(OptimizedCallTarget.java:475) bci: 0 deoptMethodOffset: 35524160 deoptMethod: 0x10aab9e40 return address: 0x10aab9e5e offset: 0 slot 0 kind: Object value: com.oracle.svm.truffle.api.SubstrateOptimizedCallTarget@0x112cbbaa0 offset: 64 slot 1 kind: Object value: [Ljava.lang.Object;@0x1144a7db0 offset: 56 diff --git a/truffle/docs/TraversingCompilationQueue.md b/truffle/docs/TraversingCompilationQueue.md index cf21a618561f..f009e984b778 100644 --- a/truffle/docs/TraversingCompilationQueue.md +++ b/truffle/docs/TraversingCompilationQueue.md @@ -13,7 +13,7 @@ This document gives motivation and an overview of this approach. During execution of guest code each Truffle call target counts how many times it was executed as well as how many loop iterations happened during those executions (i.e. the target's "call and loop count"). Once this counter reaches a certain threshold the call target is deemed "hot" and scheduled for compilation. -In order to minimize the impact this has on the execution of the guest code the notion that the target should be compiled is made concrete as a [compilation task](https://github.com/oracle/graal/blob/master/compiler/src/jdk.internal.vm.compiler/src/org/graalvm/compiler/hotspot/CompilationTask.java) and placed into a [compilation queue](https://github.com/oracle/graal/blob/master/compiler/src/jdk.internal.vm.compiler/src/org/graalvm/compiler/truffle/runtime/BackgroundCompileQueue.java) to await compilation. +In order to minimize the impact this has on the execution of the guest code the notion that the target should be compiled is made concrete as a [compilation task](https://github.com/oracle/graal/blob/master/truffle/src/com.oracle.truffle.runtime/src/com/oracle/truffle/runtime/CompilationTask.java) and placed into a [compilation queue](https://github.com/oracle/graal/blob/master/compiler/src/com.oracle.truffle.runtime/src/com/oracle/truffle/runtime/BackgroundCompileQueue.java) to await compilation. The Truffle runtime spawns several compiler threads (`--engine.CompilerThreads`) that take tasks from the queue and compile the specified call targets. The initial implementation of the compilation queue in Truffle was a straightforward FIFO queue. @@ -48,10 +48,10 @@ Using a FIFO queue, we would compile the `lowUsage` function first, even though ## Traversing Compilation Queue -The new compilation queue in Truffle, colloquially called ["Traversing Compilation Queue"](https://github.com/oracle/graal/blob/master/compiler/src/jdk.internal.vm.compiler/src/org/graalvm/compiler/truffle/runtime/TraversingBlockingQueue.java), takes a more dynamic approach to selecting the order in which targets are compiled. +The new compilation queue in Truffle, colloquially called ["Traversing Compilation Queue"](https://github.com/oracle/graal/blob/master/truffle/src/com.oracle.truffle.runtime/src/com/oracle/truffle/runtime/TraversingBlockingQueue.java), takes a more dynamic approach to selecting the order in which targets are compiled. Every time a compiler thread requests the next compilation task the queue will traverse all the entries in the queue and pick the one with the highest priority. -A task's priority is [determined based on several factors](https://github.com/oracle/graal/blob/master/compiler/src/jdk.internal.vm.compiler/src/org/graalvm/compiler/hotspot/CompilationTask.java#L209). +A task's priority is [determined based on several factors](https://github.com/oracle/graal/blob/master/truffle/src/com.oracle.truffle.runtime/src/com/oracle/truffle/runtime/CompilationTask.java#L209). For starters, targets scheduled for [first-tier compilation](https://medium.com/graalvm/multi-tier-compilation-in-graalvm-5fbc65f92402) (i.e. first-tier tasks) always have higher priority than second-tier tasks. The rational behind this is that performance difference between executing code in the interpreter and executing it in first-tier compiled code is much greater then the difference between tier-one and tier-two compiled code, meaning that we get more benefit from compiling these targets sooner. @@ -78,7 +78,7 @@ One problem of the traversing compilation queue is that it needs to traverse all This does not have a significant performance impact as long as the size of the queue remains reasonable. This means that in order to always choose the highest priority task in a reasonable about of time we need to ensure that the queue does not grow indefinitely. -This is achieved by an approach we call ["dynamic compilation thresholds"](https://github.com/oracle/graal/blob/master/compiler/src/jdk.internal.vm.compiler/src/org/graalvm/compiler/truffle/runtime/DynamicThresholdsQueue.java). +This is achieved by an approach we call ["dynamic compilation thresholds"](https://github.com/oracle/graal/blob/master/truffle/src/com.oracle.truffle.runtime/src/com/oracle/truffle/runtime/DynamicThresholdsQueue.java). Simply put, dynamic compilation thresholds means that the compilation threshold (the one each call target's call and loop count is compared against when determining whether to compile it) may change over time depending on the state of the queue. If the queue is overloaded we aim to increase the compilation thresholds to reduce the number of incoming compilation tasks, i.e. targets need to be "more hot" to get scheduled for compilation. On the other hand, if the queue is close to empty, we can reduce the compilation thresholds to allow more targets to get scheduled for compilation, i.e. the compilation threads are in danger of idling so let's give them even "less hot" targets to compile. diff --git a/truffle/docs/splitting/Splitting.md b/truffle/docs/splitting/Splitting.md index 35e626ca1a86..8067b91739b3 100644 --- a/truffle/docs/splitting/Splitting.md +++ b/truffle/docs/splitting/Splitting.md @@ -28,7 +28,7 @@ re-profiled specifically for this call site, since it is the only call site call Following recursive algorithm (expressed as pseudo code) is a simplified version of the approach used to decide which call targets need to be marked "needs split". This algorithm is applied to every call target once one of its nodes reports a polymorphic specialization. -The full implementation can be found in `org.graalvm.compiler.truffle.runtime.OptimizedCallTarget#maybeSetNeedsSplit`. +The full implementation can be found in `com.oracle.truffle.runtime.OptimizedCallTarget#maybeSetNeedsSplit`. ```java setNeedsSplit(callTarget) diff --git a/truffle/mx.truffle/macro-truffle.properties b/truffle/mx.truffle/macro-truffle.properties index 3c9001f0a496..d33125463435 100644 --- a/truffle/mx.truffle/macro-truffle.properties +++ b/truffle/mx.truffle/macro-truffle.properties @@ -15,7 +15,7 @@ JavaArgs = -Dtruffle.TruffleRuntime=com.oracle.svm.truffle.api.SubstrateTruffleR -Dgraalvm.ForcePolyglotInvalid=false \ --add-exports com.oracle.truffle.enterprise/com.oracle.truffle.polyglot.enterprise=ALL-UNNAMED \ --add-exports com.oracle.truffle.enterprise/com.oracle.truffle.runtime.enterprise=ALL-UNNAMED \ - --add-exports org.graalvm.truffle.runtime/org.graalvm.compiler.truffle.runtime=ALL-UNNAMED \ + --add-exports org.graalvm.truffle.runtime/com.oracle.truffle.runtime=ALL-UNNAMED \ --add-exports org.graalvm.truffle.compiler/com.oracle.truffle.compiler=ALL-UNNAMED \ --add-exports org.graalvm.truffle/com.oracle.truffle.api=ALL-UNNAMED \ --add-exports org.graalvm.truffle/com.oracle.truffle.api.debug=ALL-UNNAMED \ diff --git a/truffle/mx.truffle/suite.py b/truffle/mx.truffle/suite.py index 7fc1065de59c..20a278ccbe40 100644 --- a/truffle/mx.truffle/suite.py +++ b/truffle/mx.truffle/suite.py @@ -1199,17 +1199,17 @@ ], "exports" : [ # Qualified exports - "org.graalvm.compiler.truffle.runtime to org.graalvm.truffle, jdk.internal.vm.compiler, com.oracle.truffle.enterprise, com.oracle.svm.svm_enterprise, org.graalvm.nativeimage.builder", - "org.graalvm.compiler.truffle.runtime.hotspot to org.graalvm.truffle, jdk.internal.vm.compiler", + "com.oracle.truffle.runtime to org.graalvm.truffle, jdk.internal.vm.compiler, com.oracle.truffle.enterprise, com.oracle.svm.svm_enterprise, org.graalvm.nativeimage.builder", + "com.oracle.truffle.runtime.hotspot to org.graalvm.truffle, jdk.internal.vm.compiler", ], "uses" : [ "com.oracle.truffle.api.impl.TruffleLocator", "com.oracle.truffle.api.object.LayoutFactory", - "org.graalvm.compiler.truffle.runtime.LoopNodeFactory", - "org.graalvm.compiler.truffle.runtime.TruffleTypes", - "org.graalvm.compiler.truffle.runtime.EngineCacheSupport", - "org.graalvm.compiler.truffle.jfr.EventFactory.Provider", - "org.graalvm.compiler.truffle.runtime.FloodControlHandler", + "com.oracle.truffle.runtime.LoopNodeFactory", + "com.oracle.truffle.runtime.TruffleTypes", + "com.oracle.truffle.runtime.EngineCacheSupport", + "com.oracle.truffle.runtime.jfr.EventFactory.Provider", + "com.oracle.truffle.runtime.FloodControlHandler", "org.graalvm.home.HomeFinder", ], }, diff --git a/truffle/src/com.oracle.truffle.api/src/com/oracle/truffle/api/Truffle.java b/truffle/src/com.oracle.truffle.api/src/com/oracle/truffle/api/Truffle.java index cc49bc580ae4..5ade940da787 100644 --- a/truffle/src/com.oracle.truffle.api/src/com/oracle/truffle/api/Truffle.java +++ b/truffle/src/com.oracle.truffle.api/src/com/oracle/truffle/api/Truffle.java @@ -116,7 +116,7 @@ public TruffleRuntime run() { ClassLoader cl = Thread.currentThread().getContextClassLoader(); Class runtimeClass = Class.forName(runtimeClassName, false, cl); try { - Class modulesSupport = Class.forName("org.graalvm.compiler.truffle.runtime.ModulesSupport"); + Class modulesSupport = Class.forName("com.oracle.truffle.runtime.ModulesSupport"); modulesSupport.getMethod("exportJVMCI", Class.class).invoke(null, runtimeClass); } catch (ClassNotFoundException e) { // we ignore if modules support is not available. diff --git a/truffle/src/com.oracle.truffle.api/src/com/oracle/truffle/api/impl/Accessor.java b/truffle/src/com.oracle.truffle.api/src/com/oracle/truffle/api/impl/Accessor.java index 984538ca17c4..255065a7f81a 100644 --- a/truffle/src/com.oracle.truffle.api/src/com/oracle/truffle/api/impl/Accessor.java +++ b/truffle/src/com.oracle.truffle.api/src/com/oracle/truffle/api/impl/Accessor.java @@ -1354,7 +1354,7 @@ protected Accessor() { "com.oracle.truffle.api.test.TestAPIAccessor".equals(thisClassName) || "com.oracle.truffle.api.impl.TVMCIAccessor".equals(thisClassName) || "com.oracle.truffle.api.impl.DefaultRuntimeAccessor".equals(thisClassName) || - "org.graalvm.compiler.truffle.runtime.GraalRuntimeAccessor".equals(thisClassName) || + "com.oracle.truffle.runtime.GraalRuntimeAccessor".equals(thisClassName) || "com.oracle.truffle.api.dsl.DSLAccessor".equals(thisClassName) || "com.oracle.truffle.api.impl.ImplAccessor".equals(thisClassName) || "com.oracle.truffle.api.memory.MemoryFenceAccessor".equals(thisClassName) || diff --git a/truffle/src/com.oracle.truffle.api/src/com/oracle/truffle/api/impl/TVMCI.java b/truffle/src/com.oracle.truffle.api/src/com/oracle/truffle/api/impl/TVMCI.java index 88bb3f0b3af4..4d6ac1fdc41a 100644 --- a/truffle/src/com.oracle.truffle.api/src/com/oracle/truffle/api/impl/TVMCI.java +++ b/truffle/src/com.oracle.truffle.api/src/com/oracle/truffle/api/impl/TVMCI.java @@ -110,7 +110,7 @@ protected TVMCI() { private boolean checkCaller() { final String packageName = getClass().getPackage().getName(); - assert packageName.equals("org.graalvm.compiler.truffle.runtime") || + assert packageName.equals("com.oracle.truffle.runtime") || packageName.equals("org.graalvm.graal.truffle") || packageName.equals("com.oracle.graal.truffle") || packageName.equals("com.oracle.truffle.api.impl") : // diff --git a/truffle/src/com.oracle.truffle.api/src/com/oracle/truffle/api/nodes/BlockNode.java b/truffle/src/com.oracle.truffle.api/src/com/oracle/truffle/api/nodes/BlockNode.java index 7a79c576a4bb..3ed1aa7880aa 100644 --- a/truffle/src/com.oracle.truffle.api/src/com/oracle/truffle/api/nodes/BlockNode.java +++ b/truffle/src/com.oracle.truffle.api/src/com/oracle/truffle/api/nodes/BlockNode.java @@ -100,7 +100,7 @@ public abstract class BlockNode extends Node { protected BlockNode(T[] elements) { this.elements = elements; assert getClass().getName().equals("com.oracle.truffle.api.impl.DefaultBlockNode") || - getClass().getName().equals("org.graalvm.compiler.truffle.runtime.OptimizedBlockNode") : "Custom block implementations are not allowed."; + getClass().getName().equals("com.oracle.truffle.runtime.OptimizedBlockNode") : "Custom block implementations are not allowed."; } /** diff --git a/truffle/src/com.oracle.truffle.runtime/src/META-INF/services/com.oracle.truffle.api.TruffleRuntimeAccess b/truffle/src/com.oracle.truffle.runtime/src/META-INF/services/com.oracle.truffle.api.TruffleRuntimeAccess index 0b91504eb67a..e23812cfb47e 100644 --- a/truffle/src/com.oracle.truffle.runtime/src/META-INF/services/com.oracle.truffle.api.TruffleRuntimeAccess +++ b/truffle/src/com.oracle.truffle.runtime/src/META-INF/services/com.oracle.truffle.api.TruffleRuntimeAccess @@ -1 +1 @@ -org.graalvm.compiler.truffle.runtime.hotspot.HotSpotTruffleRuntimeAccess +com.oracle.truffle.runtime.hotspot.HotSpotTruffleRuntimeAccess diff --git a/truffle/src/com.oracle.truffle.runtime/src/META-INF/services/com.oracle.truffle.runtime.LoopNodeFactory b/truffle/src/com.oracle.truffle.runtime/src/META-INF/services/com.oracle.truffle.runtime.LoopNodeFactory new file mode 100644 index 000000000000..7b030b8cb8b4 --- /dev/null +++ b/truffle/src/com.oracle.truffle.runtime/src/META-INF/services/com.oracle.truffle.runtime.LoopNodeFactory @@ -0,0 +1 @@ +com.oracle.truffle.runtime.DefaultLoopNodeFactory diff --git a/truffle/src/com.oracle.truffle.runtime/src/META-INF/services/com.oracle.truffle.runtime.jfr.EventFactory$Provider b/truffle/src/com.oracle.truffle.runtime/src/META-INF/services/com.oracle.truffle.runtime.jfr.EventFactory$Provider new file mode 100644 index 000000000000..f2facffe6e9c --- /dev/null +++ b/truffle/src/com.oracle.truffle.runtime/src/META-INF/services/com.oracle.truffle.runtime.jfr.EventFactory$Provider @@ -0,0 +1 @@ +com.oracle.truffle.runtime.jfr.impl.ProviderImpl diff --git a/truffle/src/com.oracle.truffle.runtime/src/META-INF/services/org.graalvm.compiler.truffle.jfr.EventFactory$Provider b/truffle/src/com.oracle.truffle.runtime/src/META-INF/services/org.graalvm.compiler.truffle.jfr.EventFactory$Provider deleted file mode 100644 index d4d957ce2d5f..000000000000 --- a/truffle/src/com.oracle.truffle.runtime/src/META-INF/services/org.graalvm.compiler.truffle.jfr.EventFactory$Provider +++ /dev/null @@ -1 +0,0 @@ -org.graalvm.compiler.truffle.jfr.impl.ProviderImpl diff --git a/truffle/src/com.oracle.truffle.runtime/src/META-INF/services/org.graalvm.compiler.truffle.runtime.LoopNodeFactory b/truffle/src/com.oracle.truffle.runtime/src/META-INF/services/org.graalvm.compiler.truffle.runtime.LoopNodeFactory deleted file mode 100644 index dc9422d0a2e1..000000000000 --- a/truffle/src/com.oracle.truffle.runtime/src/META-INF/services/org.graalvm.compiler.truffle.runtime.LoopNodeFactory +++ /dev/null @@ -1 +0,0 @@ -org.graalvm.compiler.truffle.runtime.DefaultLoopNodeFactory diff --git a/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/AbstractCompilationTask.java b/truffle/src/com.oracle.truffle.runtime/src/com/oracle/truffle/runtime/AbstractCompilationTask.java similarity index 98% rename from truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/AbstractCompilationTask.java rename to truffle/src/com.oracle.truffle.runtime/src/com/oracle/truffle/runtime/AbstractCompilationTask.java index b70443543bc7..c2dbb89505c2 100644 --- a/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/AbstractCompilationTask.java +++ b/truffle/src/com.oracle.truffle.runtime/src/com/oracle/truffle/runtime/AbstractCompilationTask.java @@ -38,9 +38,9 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ -package org.graalvm.compiler.truffle.runtime; +package com.oracle.truffle.runtime; -import static org.graalvm.compiler.truffle.runtime.OptimizedCallTarget.runtime; +import static com.oracle.truffle.runtime.OptimizedCallTarget.runtime; import java.net.URI; import java.util.ArrayList; diff --git a/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/AbstractGraalTruffleRuntimeListener.java b/truffle/src/com.oracle.truffle.runtime/src/com/oracle/truffle/runtime/AbstractGraalTruffleRuntimeListener.java similarity index 98% rename from truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/AbstractGraalTruffleRuntimeListener.java rename to truffle/src/com.oracle.truffle.runtime/src/com/oracle/truffle/runtime/AbstractGraalTruffleRuntimeListener.java index 846921e12ef9..2ad839e8b714 100644 --- a/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/AbstractGraalTruffleRuntimeListener.java +++ b/truffle/src/com.oracle.truffle.runtime/src/com/oracle/truffle/runtime/AbstractGraalTruffleRuntimeListener.java @@ -38,7 +38,7 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ -package org.graalvm.compiler.truffle.runtime; +package com.oracle.truffle.runtime; public abstract class AbstractGraalTruffleRuntimeListener implements GraalTruffleRuntimeListener { diff --git a/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/AbstractOptimizedLoopNode.java b/truffle/src/com.oracle.truffle.runtime/src/com/oracle/truffle/runtime/AbstractOptimizedLoopNode.java similarity index 98% rename from truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/AbstractOptimizedLoopNode.java rename to truffle/src/com.oracle.truffle.runtime/src/com/oracle/truffle/runtime/AbstractOptimizedLoopNode.java index a712200cc70a..0d77f7d59ab4 100644 --- a/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/AbstractOptimizedLoopNode.java +++ b/truffle/src/com.oracle.truffle.runtime/src/com/oracle/truffle/runtime/AbstractOptimizedLoopNode.java @@ -38,7 +38,7 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ -package org.graalvm.compiler.truffle.runtime; +package com.oracle.truffle.runtime; import java.util.Objects; diff --git a/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/BackgroundCompileQueue.java b/truffle/src/com.oracle.truffle.runtime/src/com/oracle/truffle/runtime/BackgroundCompileQueue.java similarity index 99% rename from truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/BackgroundCompileQueue.java rename to truffle/src/com.oracle.truffle.runtime/src/com/oracle/truffle/runtime/BackgroundCompileQueue.java index cbe4281baf7f..aec294c53d13 100644 --- a/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/BackgroundCompileQueue.java +++ b/truffle/src/com.oracle.truffle.runtime/src/com/oracle/truffle/runtime/BackgroundCompileQueue.java @@ -38,7 +38,7 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ -package org.graalvm.compiler.truffle.runtime; +package com.oracle.truffle.runtime; import java.lang.ref.WeakReference; import java.util.ArrayList; diff --git a/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/BaseOSRRootNode.java b/truffle/src/com.oracle.truffle.runtime/src/com/oracle/truffle/runtime/BaseOSRRootNode.java similarity index 98% rename from truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/BaseOSRRootNode.java rename to truffle/src/com.oracle.truffle.runtime/src/com/oracle/truffle/runtime/BaseOSRRootNode.java index d2f6783bb662..8a68b47561b3 100644 --- a/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/BaseOSRRootNode.java +++ b/truffle/src/com.oracle.truffle.runtime/src/com/oracle/truffle/runtime/BaseOSRRootNode.java @@ -38,7 +38,7 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ -package org.graalvm.compiler.truffle.runtime; +package com.oracle.truffle.runtime; import java.lang.ref.Reference; diff --git a/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/BytecodeOSRMetadata.java b/truffle/src/com.oracle.truffle.runtime/src/com/oracle/truffle/runtime/BytecodeOSRMetadata.java similarity index 99% rename from truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/BytecodeOSRMetadata.java rename to truffle/src/com.oracle.truffle.runtime/src/com/oracle/truffle/runtime/BytecodeOSRMetadata.java index 27762e3394f0..14b5c4ef1338 100644 --- a/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/BytecodeOSRMetadata.java +++ b/truffle/src/com.oracle.truffle.runtime/src/com/oracle/truffle/runtime/BytecodeOSRMetadata.java @@ -38,7 +38,7 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ -package org.graalvm.compiler.truffle.runtime; +package com.oracle.truffle.runtime; import java.util.HashSet; import java.util.Map; diff --git a/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/BytecodeOSRRootNode.java b/truffle/src/com.oracle.truffle.runtime/src/com/oracle/truffle/runtime/BytecodeOSRRootNode.java similarity index 99% rename from truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/BytecodeOSRRootNode.java rename to truffle/src/com.oracle.truffle.runtime/src/com/oracle/truffle/runtime/BytecodeOSRRootNode.java index 28a36ab7c7d3..a38650642a07 100644 --- a/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/BytecodeOSRRootNode.java +++ b/truffle/src/com.oracle.truffle.runtime/src/com/oracle/truffle/runtime/BytecodeOSRRootNode.java @@ -38,7 +38,7 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ -package org.graalvm.compiler.truffle.runtime; +package com.oracle.truffle.runtime; import java.lang.reflect.Method; import java.util.Map; diff --git a/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/CompilationState.java b/truffle/src/com.oracle.truffle.runtime/src/com/oracle/truffle/runtime/CompilationState.java similarity index 98% rename from truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/CompilationState.java rename to truffle/src/com.oracle.truffle.runtime/src/com/oracle/truffle/runtime/CompilationState.java index 11159434940f..a148421d64a6 100644 --- a/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/CompilationState.java +++ b/truffle/src/com.oracle.truffle.runtime/src/com/oracle/truffle/runtime/CompilationState.java @@ -38,7 +38,7 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ -package org.graalvm.compiler.truffle.runtime; +package com.oracle.truffle.runtime; import com.oracle.truffle.api.CompilerDirectives; diff --git a/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/CompilationTask.java b/truffle/src/com.oracle.truffle.runtime/src/com/oracle/truffle/runtime/CompilationTask.java similarity index 99% rename from truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/CompilationTask.java rename to truffle/src/com.oracle.truffle.runtime/src/com/oracle/truffle/runtime/CompilationTask.java index 875a765a534d..729bfb9e7299 100644 --- a/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/CompilationTask.java +++ b/truffle/src/com.oracle.truffle.runtime/src/com/oracle/truffle/runtime/CompilationTask.java @@ -38,7 +38,7 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ -package org.graalvm.compiler.truffle.runtime; +package com.oracle.truffle.runtime; import java.lang.ref.WeakReference; import java.util.concurrent.Callable; diff --git a/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/DefaultLoopNodeFactory.java b/truffle/src/com.oracle.truffle.runtime/src/com/oracle/truffle/runtime/DefaultLoopNodeFactory.java similarity index 98% rename from truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/DefaultLoopNodeFactory.java rename to truffle/src/com.oracle.truffle.runtime/src/com/oracle/truffle/runtime/DefaultLoopNodeFactory.java index 82ecec9f4b3d..898207df4a9b 100644 --- a/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/DefaultLoopNodeFactory.java +++ b/truffle/src/com.oracle.truffle.runtime/src/com/oracle/truffle/runtime/DefaultLoopNodeFactory.java @@ -38,7 +38,7 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ -package org.graalvm.compiler.truffle.runtime; +package com.oracle.truffle.runtime; import com.oracle.truffle.api.nodes.LoopNode; import com.oracle.truffle.api.nodes.RepeatingNode; diff --git a/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/DynamicThresholdsQueue.java b/truffle/src/com.oracle.truffle.runtime/src/com/oracle/truffle/runtime/DynamicThresholdsQueue.java similarity index 98% rename from truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/DynamicThresholdsQueue.java rename to truffle/src/com.oracle.truffle.runtime/src/com/oracle/truffle/runtime/DynamicThresholdsQueue.java index abfc50a5bed4..eeb3e6d528e1 100644 --- a/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/DynamicThresholdsQueue.java +++ b/truffle/src/com.oracle.truffle.runtime/src/com/oracle/truffle/runtime/DynamicThresholdsQueue.java @@ -38,7 +38,7 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ -package org.graalvm.compiler.truffle.runtime; +package com.oracle.truffle.runtime; import java.util.concurrent.BlockingQueue; import java.util.concurrent.TimeUnit; diff --git a/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/EngineCacheSupport.java b/truffle/src/com.oracle.truffle.runtime/src/com/oracle/truffle/runtime/EngineCacheSupport.java similarity index 98% rename from truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/EngineCacheSupport.java rename to truffle/src/com.oracle.truffle.runtime/src/com/oracle/truffle/runtime/EngineCacheSupport.java index 790ea6b3000f..b8f0ab9cfc8f 100644 --- a/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/EngineCacheSupport.java +++ b/truffle/src/com.oracle.truffle.runtime/src/com/oracle/truffle/runtime/EngineCacheSupport.java @@ -38,7 +38,7 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ -package org.graalvm.compiler.truffle.runtime; +package com.oracle.truffle.runtime; import java.util.function.Function; diff --git a/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/EngineData.java b/truffle/src/com.oracle.truffle.runtime/src/com/oracle/truffle/runtime/EngineData.java similarity index 82% rename from truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/EngineData.java rename to truffle/src/com.oracle.truffle.runtime/src/com/oracle/truffle/runtime/EngineData.java index 8366f22fac09..be0ef17369ab 100644 --- a/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/EngineData.java +++ b/truffle/src/com.oracle.truffle.runtime/src/com/oracle/truffle/runtime/EngineData.java @@ -38,46 +38,46 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ -package org.graalvm.compiler.truffle.runtime; - -import static org.graalvm.compiler.truffle.runtime.GraalTruffleRuntime.getRuntime; -import static org.graalvm.compiler.truffle.runtime.OptimizedRuntimeOptions.ArgumentTypeSpeculation; -import static org.graalvm.compiler.truffle.runtime.OptimizedRuntimeOptions.BackgroundCompilation; -import static org.graalvm.compiler.truffle.runtime.OptimizedRuntimeOptions.Compilation; -import static org.graalvm.compiler.truffle.runtime.OptimizedRuntimeOptions.CompilationFailureAction; -import static org.graalvm.compiler.truffle.runtime.OptimizedRuntimeOptions.CompilationStatisticDetails; -import static org.graalvm.compiler.truffle.runtime.OptimizedRuntimeOptions.CompilationStatistics; -import static org.graalvm.compiler.truffle.runtime.OptimizedRuntimeOptions.CompileAOTOnCreate; -import static org.graalvm.compiler.truffle.runtime.OptimizedRuntimeOptions.CompileImmediately; -import static org.graalvm.compiler.truffle.runtime.OptimizedRuntimeOptions.CompileOnly; -import static org.graalvm.compiler.truffle.runtime.OptimizedRuntimeOptions.FirstTierCompilationThreshold; -import static org.graalvm.compiler.truffle.runtime.OptimizedRuntimeOptions.FirstTierMinInvokeThreshold; -import static org.graalvm.compiler.truffle.runtime.OptimizedRuntimeOptions.LastTierCompilationThreshold; -import static org.graalvm.compiler.truffle.runtime.OptimizedRuntimeOptions.MinInvokeThreshold; -import static org.graalvm.compiler.truffle.runtime.OptimizedRuntimeOptions.Mode; -import static org.graalvm.compiler.truffle.runtime.OptimizedRuntimeOptions.MultiTier; -import static org.graalvm.compiler.truffle.runtime.OptimizedRuntimeOptions.PriorityQueue; -import static org.graalvm.compiler.truffle.runtime.OptimizedRuntimeOptions.Profiling; -import static org.graalvm.compiler.truffle.runtime.OptimizedRuntimeOptions.PropagateLoopCountToLexicalSingleCaller; -import static org.graalvm.compiler.truffle.runtime.OptimizedRuntimeOptions.PropagateLoopCountToLexicalSingleCallerMaxDepth; -import static org.graalvm.compiler.truffle.runtime.OptimizedRuntimeOptions.ReturnTypeSpeculation; -import static org.graalvm.compiler.truffle.runtime.OptimizedRuntimeOptions.SingleTierCompilationThreshold; -import static org.graalvm.compiler.truffle.runtime.OptimizedRuntimeOptions.Splitting; -import static org.graalvm.compiler.truffle.runtime.OptimizedRuntimeOptions.SplittingAllowForcedSplits; -import static org.graalvm.compiler.truffle.runtime.OptimizedRuntimeOptions.SplittingDumpDecisions; -import static org.graalvm.compiler.truffle.runtime.OptimizedRuntimeOptions.SplittingGrowthLimit; -import static org.graalvm.compiler.truffle.runtime.OptimizedRuntimeOptions.SplittingMaxCalleeSize; -import static org.graalvm.compiler.truffle.runtime.OptimizedRuntimeOptions.SplittingMaxPropagationDepth; -import static org.graalvm.compiler.truffle.runtime.OptimizedRuntimeOptions.SplittingTraceEvents; -import static org.graalvm.compiler.truffle.runtime.OptimizedRuntimeOptions.TraceCompilation; -import static org.graalvm.compiler.truffle.runtime.OptimizedRuntimeOptions.TraceCompilationDetails; -import static org.graalvm.compiler.truffle.runtime.OptimizedRuntimeOptions.TraceDeoptimizeFrame; -import static org.graalvm.compiler.truffle.runtime.OptimizedRuntimeOptions.TraceSplitting; -import static org.graalvm.compiler.truffle.runtime.OptimizedRuntimeOptions.TraceSplittingSummary; -import static org.graalvm.compiler.truffle.runtime.OptimizedRuntimeOptions.TraceTransferToInterpreter; -import static org.graalvm.compiler.truffle.runtime.OptimizedRuntimeOptions.TraversingQueueFirstTierBonus; -import static org.graalvm.compiler.truffle.runtime.OptimizedRuntimeOptions.TraversingQueueFirstTierPriority; -import static org.graalvm.compiler.truffle.runtime.OptimizedRuntimeOptions.TraversingQueueWeightingBothTiers; +package com.oracle.truffle.runtime; + +import static com.oracle.truffle.runtime.GraalTruffleRuntime.getRuntime; +import static com.oracle.truffle.runtime.OptimizedRuntimeOptions.ArgumentTypeSpeculation; +import static com.oracle.truffle.runtime.OptimizedRuntimeOptions.BackgroundCompilation; +import static com.oracle.truffle.runtime.OptimizedRuntimeOptions.Compilation; +import static com.oracle.truffle.runtime.OptimizedRuntimeOptions.CompilationFailureAction; +import static com.oracle.truffle.runtime.OptimizedRuntimeOptions.CompilationStatisticDetails; +import static com.oracle.truffle.runtime.OptimizedRuntimeOptions.CompilationStatistics; +import static com.oracle.truffle.runtime.OptimizedRuntimeOptions.CompileAOTOnCreate; +import static com.oracle.truffle.runtime.OptimizedRuntimeOptions.CompileImmediately; +import static com.oracle.truffle.runtime.OptimizedRuntimeOptions.CompileOnly; +import static com.oracle.truffle.runtime.OptimizedRuntimeOptions.FirstTierCompilationThreshold; +import static com.oracle.truffle.runtime.OptimizedRuntimeOptions.FirstTierMinInvokeThreshold; +import static com.oracle.truffle.runtime.OptimizedRuntimeOptions.LastTierCompilationThreshold; +import static com.oracle.truffle.runtime.OptimizedRuntimeOptions.MinInvokeThreshold; +import static com.oracle.truffle.runtime.OptimizedRuntimeOptions.Mode; +import static com.oracle.truffle.runtime.OptimizedRuntimeOptions.MultiTier; +import static com.oracle.truffle.runtime.OptimizedRuntimeOptions.PriorityQueue; +import static com.oracle.truffle.runtime.OptimizedRuntimeOptions.Profiling; +import static com.oracle.truffle.runtime.OptimizedRuntimeOptions.PropagateLoopCountToLexicalSingleCaller; +import static com.oracle.truffle.runtime.OptimizedRuntimeOptions.PropagateLoopCountToLexicalSingleCallerMaxDepth; +import static com.oracle.truffle.runtime.OptimizedRuntimeOptions.ReturnTypeSpeculation; +import static com.oracle.truffle.runtime.OptimizedRuntimeOptions.SingleTierCompilationThreshold; +import static com.oracle.truffle.runtime.OptimizedRuntimeOptions.Splitting; +import static com.oracle.truffle.runtime.OptimizedRuntimeOptions.SplittingAllowForcedSplits; +import static com.oracle.truffle.runtime.OptimizedRuntimeOptions.SplittingDumpDecisions; +import static com.oracle.truffle.runtime.OptimizedRuntimeOptions.SplittingGrowthLimit; +import static com.oracle.truffle.runtime.OptimizedRuntimeOptions.SplittingMaxCalleeSize; +import static com.oracle.truffle.runtime.OptimizedRuntimeOptions.SplittingMaxPropagationDepth; +import static com.oracle.truffle.runtime.OptimizedRuntimeOptions.SplittingTraceEvents; +import static com.oracle.truffle.runtime.OptimizedRuntimeOptions.TraceCompilation; +import static com.oracle.truffle.runtime.OptimizedRuntimeOptions.TraceCompilationDetails; +import static com.oracle.truffle.runtime.OptimizedRuntimeOptions.TraceDeoptimizeFrame; +import static com.oracle.truffle.runtime.OptimizedRuntimeOptions.TraceSplitting; +import static com.oracle.truffle.runtime.OptimizedRuntimeOptions.TraceSplittingSummary; +import static com.oracle.truffle.runtime.OptimizedRuntimeOptions.TraceTransferToInterpreter; +import static com.oracle.truffle.runtime.OptimizedRuntimeOptions.TraversingQueueFirstTierBonus; +import static com.oracle.truffle.runtime.OptimizedRuntimeOptions.TraversingQueueFirstTierPriority; +import static com.oracle.truffle.runtime.OptimizedRuntimeOptions.TraversingQueueWeightingBothTiers; import java.util.ArrayList; import java.util.Collection; @@ -90,9 +90,6 @@ import java.util.logging.Level; import org.graalvm.collections.Pair; -import org.graalvm.compiler.truffle.runtime.OptimizedRuntimeOptions.EngineModeEnum; -import org.graalvm.compiler.truffle.runtime.OptimizedRuntimeOptions.ExceptionAction; -import org.graalvm.compiler.truffle.runtime.debug.StatisticsListener; import org.graalvm.options.OptionValues; import com.oracle.truffle.api.CompilerDirectives.CompilationFinal; @@ -101,6 +98,9 @@ import com.oracle.truffle.api.TruffleOptions; import com.oracle.truffle.api.nodes.RootNode; import com.oracle.truffle.api.source.Source; +import com.oracle.truffle.runtime.OptimizedRuntimeOptions.EngineModeEnum; +import com.oracle.truffle.runtime.OptimizedRuntimeOptions.ExceptionAction; +import com.oracle.truffle.runtime.debug.StatisticsListener; /** * Class used to store data used by the compiler in the Engine. Enables "global" compiler state per diff --git a/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/FixedPointMath.java b/truffle/src/com.oracle.truffle.runtime/src/com/oracle/truffle/runtime/FixedPointMath.java similarity index 98% rename from truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/FixedPointMath.java rename to truffle/src/com.oracle.truffle.runtime/src/com/oracle/truffle/runtime/FixedPointMath.java index a8d42332cb1a..be7e26bda1dd 100644 --- a/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/FixedPointMath.java +++ b/truffle/src/com.oracle.truffle.runtime/src/com/oracle/truffle/runtime/FixedPointMath.java @@ -38,7 +38,7 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ -package org.graalvm.compiler.truffle.runtime; +package com.oracle.truffle.runtime; public final class FixedPointMath { private static final int SCALE = 4; diff --git a/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/FloodControlHandler.java b/truffle/src/com.oracle.truffle.runtime/src/com/oracle/truffle/runtime/FloodControlHandler.java similarity index 98% rename from truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/FloodControlHandler.java rename to truffle/src/com.oracle.truffle.runtime/src/com/oracle/truffle/runtime/FloodControlHandler.java index d2bca6b2ae8a..b90c141d9d31 100644 --- a/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/FloodControlHandler.java +++ b/truffle/src/com.oracle.truffle.runtime/src/com/oracle/truffle/runtime/FloodControlHandler.java @@ -38,7 +38,7 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ -package org.graalvm.compiler.truffle.runtime; +package com.oracle.truffle.runtime; import java.util.function.Supplier; diff --git a/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/GraalFastThreadLocal.java b/truffle/src/com.oracle.truffle.runtime/src/com/oracle/truffle/runtime/GraalFastThreadLocal.java similarity index 94% rename from truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/GraalFastThreadLocal.java rename to truffle/src/com.oracle.truffle.runtime/src/com/oracle/truffle/runtime/GraalFastThreadLocal.java index 5dab2902ffea..83e08ea1ea52 100644 --- a/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/GraalFastThreadLocal.java +++ b/truffle/src/com.oracle.truffle.runtime/src/com/oracle/truffle/runtime/GraalFastThreadLocal.java @@ -38,12 +38,12 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ -package org.graalvm.compiler.truffle.runtime; +package com.oracle.truffle.runtime; import static com.oracle.truffle.api.CompilerAsserts.partialEvaluationConstant; import static com.oracle.truffle.api.CompilerDirectives.inCompiledCode; -import static org.graalvm.compiler.truffle.runtime.OptimizedCallTarget.castArrayFixedLength; -import static org.graalvm.compiler.truffle.runtime.OptimizedCallTarget.unsafeCast; +import static com.oracle.truffle.runtime.OptimizedCallTarget.castArrayFixedLength; +import static com.oracle.truffle.runtime.OptimizedCallTarget.unsafeCast; import com.oracle.truffle.api.CompilerDirectives; import com.oracle.truffle.api.impl.AbstractFastThreadLocal; diff --git a/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/GraalFrameInstance.java b/truffle/src/com.oracle.truffle.runtime/src/com/oracle/truffle/runtime/GraalFrameInstance.java similarity index 99% rename from truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/GraalFrameInstance.java rename to truffle/src/com.oracle.truffle.runtime/src/com/oracle/truffle/runtime/GraalFrameInstance.java index 7aee5d866f0d..4dcdcd2d23ae 100644 --- a/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/GraalFrameInstance.java +++ b/truffle/src/com.oracle.truffle.runtime/src/com/oracle/truffle/runtime/GraalFrameInstance.java @@ -38,7 +38,7 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ -package org.graalvm.compiler.truffle.runtime; +package com.oracle.truffle.runtime; import java.lang.reflect.Method; diff --git a/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/GraalOSRFrameInstance.java b/truffle/src/com.oracle.truffle.runtime/src/com/oracle/truffle/runtime/GraalOSRFrameInstance.java similarity index 98% rename from truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/GraalOSRFrameInstance.java rename to truffle/src/com.oracle.truffle.runtime/src/com/oracle/truffle/runtime/GraalOSRFrameInstance.java index d14f8ba108eb..7a60638f9af1 100644 --- a/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/GraalOSRFrameInstance.java +++ b/truffle/src/com.oracle.truffle.runtime/src/com/oracle/truffle/runtime/GraalOSRFrameInstance.java @@ -38,7 +38,7 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ -package org.graalvm.compiler.truffle.runtime; +package com.oracle.truffle.runtime; import com.oracle.truffle.api.CompilerDirectives.TruffleBoundary; import com.oracle.truffle.api.frame.Frame; diff --git a/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/GraalRuntimeAccessor.java b/truffle/src/com.oracle.truffle.runtime/src/com/oracle/truffle/runtime/GraalRuntimeAccessor.java similarity index 98% rename from truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/GraalRuntimeAccessor.java rename to truffle/src/com.oracle.truffle.runtime/src/com/oracle/truffle/runtime/GraalRuntimeAccessor.java index 5766d7a911b3..6f2dc7ad6a28 100644 --- a/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/GraalRuntimeAccessor.java +++ b/truffle/src/com.oracle.truffle.runtime/src/com/oracle/truffle/runtime/GraalRuntimeAccessor.java @@ -38,7 +38,7 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ -package org.graalvm.compiler.truffle.runtime; +package com.oracle.truffle.runtime; import com.oracle.truffle.api.impl.Accessor; diff --git a/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/GraalRuntimeServiceProvider.java b/truffle/src/com.oracle.truffle.runtime/src/com/oracle/truffle/runtime/GraalRuntimeServiceProvider.java similarity index 98% rename from truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/GraalRuntimeServiceProvider.java rename to truffle/src/com.oracle.truffle.runtime/src/com/oracle/truffle/runtime/GraalRuntimeServiceProvider.java index 0716f3c8cbfd..e194514e72b1 100644 --- a/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/GraalRuntimeServiceProvider.java +++ b/truffle/src/com.oracle.truffle.runtime/src/com/oracle/truffle/runtime/GraalRuntimeServiceProvider.java @@ -38,7 +38,7 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ -package org.graalvm.compiler.truffle.runtime; +package com.oracle.truffle.runtime; import org.graalvm.options.OptionDescriptors; diff --git a/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/GraalRuntimeSupport.java b/truffle/src/com.oracle.truffle.runtime/src/com/oracle/truffle/runtime/GraalRuntimeSupport.java similarity index 99% rename from truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/GraalRuntimeSupport.java rename to truffle/src/com.oracle.truffle.runtime/src/com/oracle/truffle/runtime/GraalRuntimeSupport.java index 549b582dbb7e..a95166789ee6 100644 --- a/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/GraalRuntimeSupport.java +++ b/truffle/src/com.oracle.truffle.runtime/src/com/oracle/truffle/runtime/GraalRuntimeSupport.java @@ -38,13 +38,12 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ -package org.graalvm.compiler.truffle.runtime; +package com.oracle.truffle.runtime; import java.util.function.Consumer; import java.util.function.Function; import java.util.function.Supplier; -import org.graalvm.compiler.truffle.runtime.GraalTruffleRuntime.CompilerOptionsDescriptors; import org.graalvm.options.OptionDescriptors; import org.graalvm.options.OptionValues; @@ -62,6 +61,7 @@ import com.oracle.truffle.api.impl.ThreadLocalHandshake; import com.oracle.truffle.api.nodes.BlockNode; import com.oracle.truffle.api.nodes.BlockNode.ElementExecutor; +import com.oracle.truffle.runtime.GraalTruffleRuntime.CompilerOptionsDescriptors; import com.oracle.truffle.api.nodes.BytecodeOSRNode; import com.oracle.truffle.api.nodes.ExplodeLoop; import com.oracle.truffle.api.nodes.Node; diff --git a/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/GraalTVMCI.java b/truffle/src/com.oracle.truffle.runtime/src/com/oracle/truffle/runtime/GraalTVMCI.java similarity index 98% rename from truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/GraalTVMCI.java rename to truffle/src/com.oracle.truffle.runtime/src/com/oracle/truffle/runtime/GraalTVMCI.java index 541b1d6a9492..1a444ecb9308 100644 --- a/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/GraalTVMCI.java +++ b/truffle/src/com.oracle.truffle.runtime/src/com/oracle/truffle/runtime/GraalTVMCI.java @@ -38,7 +38,7 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ -package org.graalvm.compiler.truffle.runtime; +package com.oracle.truffle.runtime; import com.oracle.truffle.api.impl.Accessor.EngineSupport; import com.oracle.truffle.api.impl.Accessor.RuntimeSupport; diff --git a/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/GraalTestTVMCI.java b/truffle/src/com.oracle.truffle.runtime/src/com/oracle/truffle/runtime/GraalTestTVMCI.java similarity index 95% rename from truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/GraalTestTVMCI.java rename to truffle/src/com.oracle.truffle.runtime/src/com/oracle/truffle/runtime/GraalTestTVMCI.java index 3c690cfb1e42..40a2af093a59 100644 --- a/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/GraalTestTVMCI.java +++ b/truffle/src/com.oracle.truffle.runtime/src/com/oracle/truffle/runtime/GraalTestTVMCI.java @@ -38,15 +38,14 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ -package org.graalvm.compiler.truffle.runtime; +package com.oracle.truffle.runtime; import java.io.Closeable; import java.io.IOException; -import org.graalvm.compiler.truffle.runtime.GraalTestTVMCI.GraalTestContext; - import com.oracle.truffle.api.impl.TVMCI; import com.oracle.truffle.api.nodes.RootNode; +import com.oracle.truffle.runtime.GraalTestTVMCI.GraalTestContext; final class GraalTestTVMCI extends TVMCI.Test { diff --git a/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/GraalTruffleRuntime.java b/truffle/src/com.oracle.truffle.runtime/src/com/oracle/truffle/runtime/GraalTruffleRuntime.java similarity index 98% rename from truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/GraalTruffleRuntime.java rename to truffle/src/com.oracle.truffle.runtime/src/com/oracle/truffle/runtime/GraalTruffleRuntime.java index ac76b631a7ac..9c0f11a81b8c 100644 --- a/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/GraalTruffleRuntime.java +++ b/truffle/src/com.oracle.truffle.runtime/src/com/oracle/truffle/runtime/GraalTruffleRuntime.java @@ -38,9 +38,9 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ -package org.graalvm.compiler.truffle.runtime; +package com.oracle.truffle.runtime; -import static org.graalvm.compiler.truffle.runtime.OptimizedRuntimeOptions.CompilerIdleDelay; +import static com.oracle.truffle.runtime.OptimizedRuntimeOptions.CompilerIdleDelay; import java.io.CharArrayWriter; import java.io.PrintWriter; @@ -69,15 +69,6 @@ import org.graalvm.collections.EconomicMap; import org.graalvm.collections.UnmodifiableEconomicMap; -import org.graalvm.compiler.truffle.runtime.BackgroundCompileQueue.Priority; -import org.graalvm.compiler.truffle.runtime.OptimizedRuntimeOptions.ExceptionAction; -import org.graalvm.compiler.truffle.runtime.debug.JFRListener; -import org.graalvm.compiler.truffle.runtime.debug.StatisticsListener; -import org.graalvm.compiler.truffle.runtime.debug.TraceASTCompilationListener; -import org.graalvm.compiler.truffle.runtime.debug.TraceCompilationListener; -import org.graalvm.compiler.truffle.runtime.debug.TraceCompilationPolymorphismListener; -import org.graalvm.compiler.truffle.runtime.debug.TraceSplittingListener; -import org.graalvm.compiler.truffle.runtime.serviceprovider.TruffleRuntimeServices; import org.graalvm.nativeimage.ImageInfo; import org.graalvm.options.OptionCategory; import org.graalvm.options.OptionDescriptor; @@ -145,6 +136,15 @@ import com.oracle.truffle.compiler.TruffleCompiler; import com.oracle.truffle.compiler.TruffleCompilerOptionDescriptor; import com.oracle.truffle.compiler.TruffleCompilerRuntime; +import com.oracle.truffle.runtime.BackgroundCompileQueue.Priority; +import com.oracle.truffle.runtime.OptimizedRuntimeOptions.ExceptionAction; +import com.oracle.truffle.runtime.debug.JFRListener; +import com.oracle.truffle.runtime.debug.StatisticsListener; +import com.oracle.truffle.runtime.debug.TraceASTCompilationListener; +import com.oracle.truffle.runtime.debug.TraceCompilationListener; +import com.oracle.truffle.runtime.debug.TraceCompilationPolymorphismListener; +import com.oracle.truffle.runtime.debug.TraceSplittingListener; +import com.oracle.truffle.runtime.serviceprovider.TruffleRuntimeServices; import jdk.vm.ci.code.BailoutException; import jdk.vm.ci.code.InstalledCode; diff --git a/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/GraalTruffleRuntimeListener.java b/truffle/src/com.oracle.truffle.runtime/src/com/oracle/truffle/runtime/GraalTruffleRuntimeListener.java similarity index 99% rename from truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/GraalTruffleRuntimeListener.java rename to truffle/src/com.oracle.truffle.runtime/src/com/oracle/truffle/runtime/GraalTruffleRuntimeListener.java index c2696b37f495..8c206f8fb13e 100644 --- a/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/GraalTruffleRuntimeListener.java +++ b/truffle/src/com.oracle.truffle.runtime/src/com/oracle/truffle/runtime/GraalTruffleRuntimeListener.java @@ -38,7 +38,7 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ -package org.graalvm.compiler.truffle.runtime; +package com.oracle.truffle.runtime; import java.util.Map; diff --git a/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/GraalTruffleRuntimeListenerDispatcher.java b/truffle/src/com.oracle.truffle.runtime/src/com/oracle/truffle/runtime/GraalTruffleRuntimeListenerDispatcher.java similarity index 99% rename from truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/GraalTruffleRuntimeListenerDispatcher.java rename to truffle/src/com.oracle.truffle.runtime/src/com/oracle/truffle/runtime/GraalTruffleRuntimeListenerDispatcher.java index a89aae945524..5d4d34caac5a 100644 --- a/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/GraalTruffleRuntimeListenerDispatcher.java +++ b/truffle/src/com.oracle.truffle.runtime/src/com/oracle/truffle/runtime/GraalTruffleRuntimeListenerDispatcher.java @@ -38,7 +38,7 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ -package org.graalvm.compiler.truffle.runtime; +package com.oracle.truffle.runtime; import java.util.concurrent.CopyOnWriteArrayList; import java.util.function.Consumer; diff --git a/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/InlineDecision.java b/truffle/src/com.oracle.truffle.runtime/src/com/oracle/truffle/runtime/InlineDecision.java similarity index 98% rename from truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/InlineDecision.java rename to truffle/src/com.oracle.truffle.runtime/src/com/oracle/truffle/runtime/InlineDecision.java index fcfa52785c79..f93d0512170d 100644 --- a/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/InlineDecision.java +++ b/truffle/src/com.oracle.truffle.runtime/src/com/oracle/truffle/runtime/InlineDecision.java @@ -38,7 +38,7 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ -package org.graalvm.compiler.truffle.runtime; +package com.oracle.truffle.runtime; /** * Since SVM overrides {@link OptimizedCallTarget#doInvoke(Object[])} to specialize behaviour on diff --git a/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/LoopNodeFactory.java b/truffle/src/com.oracle.truffle.runtime/src/com/oracle/truffle/runtime/LoopNodeFactory.java similarity index 98% rename from truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/LoopNodeFactory.java rename to truffle/src/com.oracle.truffle.runtime/src/com/oracle/truffle/runtime/LoopNodeFactory.java index 665b69252cff..353c3713c990 100644 --- a/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/LoopNodeFactory.java +++ b/truffle/src/com.oracle.truffle.runtime/src/com/oracle/truffle/runtime/LoopNodeFactory.java @@ -38,7 +38,7 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ -package org.graalvm.compiler.truffle.runtime; +package com.oracle.truffle.runtime; import com.oracle.truffle.api.nodes.LoopNode; import com.oracle.truffle.api.nodes.RepeatingNode; diff --git a/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/ModuleUtil.java b/truffle/src/com.oracle.truffle.runtime/src/com/oracle/truffle/runtime/ModuleUtil.java similarity index 98% rename from truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/ModuleUtil.java rename to truffle/src/com.oracle.truffle.runtime/src/com/oracle/truffle/runtime/ModuleUtil.java index 12f385b8ac2b..7a6c6161756e 100644 --- a/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/ModuleUtil.java +++ b/truffle/src/com.oracle.truffle.runtime/src/com/oracle/truffle/runtime/ModuleUtil.java @@ -38,7 +38,7 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ -package org.graalvm.compiler.truffle.runtime; +package com.oracle.truffle.runtime; import java.util.Set; diff --git a/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/ModulesSupport.java b/truffle/src/com.oracle.truffle.runtime/src/com/oracle/truffle/runtime/ModulesSupport.java similarity index 97% rename from truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/ModulesSupport.java rename to truffle/src/com.oracle.truffle.runtime/src/com/oracle/truffle/runtime/ModulesSupport.java index 6383c0c89c61..0e9f911bc519 100644 --- a/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/ModulesSupport.java +++ b/truffle/src/com.oracle.truffle.runtime/src/com/oracle/truffle/runtime/ModulesSupport.java @@ -38,11 +38,11 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ -package org.graalvm.compiler.truffle.runtime; +package com.oracle.truffle.runtime; import java.lang.module.ModuleDescriptor.Requires; -import org.graalvm.compiler.truffle.runtime.hotspot.HotSpotTruffleRuntimeAccess; +import com.oracle.truffle.runtime.hotspot.HotSpotTruffleRuntimeAccess; import jdk.internal.module.Modules; diff --git a/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/OptimizedAssumption.java b/truffle/src/com.oracle.truffle.runtime/src/com/oracle/truffle/runtime/OptimizedAssumption.java similarity index 99% rename from truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/OptimizedAssumption.java rename to truffle/src/com.oracle.truffle.runtime/src/com/oracle/truffle/runtime/OptimizedAssumption.java index 0e905723fa54..627932776c0f 100644 --- a/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/OptimizedAssumption.java +++ b/truffle/src/com.oracle.truffle.runtime/src/com/oracle/truffle/runtime/OptimizedAssumption.java @@ -38,7 +38,7 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ -package org.graalvm.compiler.truffle.runtime; +package com.oracle.truffle.runtime; import java.util.function.Consumer; import java.util.logging.Level; diff --git a/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/OptimizedBlockNode.java b/truffle/src/com.oracle.truffle.runtime/src/com/oracle/truffle/runtime/OptimizedBlockNode.java similarity index 99% rename from truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/OptimizedBlockNode.java rename to truffle/src/com.oracle.truffle.runtime/src/com/oracle/truffle/runtime/OptimizedBlockNode.java index 6d3ae4c7ecb5..343c74d8e81c 100644 --- a/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/OptimizedBlockNode.java +++ b/truffle/src/com.oracle.truffle.runtime/src/com/oracle/truffle/runtime/OptimizedBlockNode.java @@ -38,7 +38,7 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ -package org.graalvm.compiler.truffle.runtime; +package com.oracle.truffle.runtime; import java.util.ArrayList; import java.util.Arrays; diff --git a/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/OptimizedCallTarget.java b/truffle/src/com.oracle.truffle.runtime/src/com/oracle/truffle/runtime/OptimizedCallTarget.java similarity index 99% rename from truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/OptimizedCallTarget.java rename to truffle/src/com.oracle.truffle.runtime/src/com/oracle/truffle/runtime/OptimizedCallTarget.java index c233ff84c997..7e992bccc729 100644 --- a/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/OptimizedCallTarget.java +++ b/truffle/src/com.oracle.truffle.runtime/src/com/oracle/truffle/runtime/OptimizedCallTarget.java @@ -38,7 +38,7 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ -package org.graalvm.compiler.truffle.runtime; +package com.oracle.truffle.runtime; import java.lang.ref.Reference; import java.lang.ref.WeakReference; @@ -52,7 +52,6 @@ import java.util.concurrent.atomic.AtomicReferenceFieldUpdater; import java.util.function.Supplier; -import org.graalvm.compiler.truffle.runtime.OptimizedRuntimeOptions.ExceptionAction; import org.graalvm.options.OptionKey; import org.graalvm.options.OptionValues; @@ -79,6 +78,7 @@ import com.oracle.truffle.api.nodes.NodeVisitor; import com.oracle.truffle.api.nodes.RootNode; import com.oracle.truffle.compiler.TruffleCompilable; +import com.oracle.truffle.runtime.OptimizedRuntimeOptions.ExceptionAction; import jdk.vm.ci.meta.JavaConstant; import jdk.vm.ci.meta.SpeculationLog; diff --git a/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/OptimizedDirectCallNode.java b/truffle/src/com.oracle.truffle.runtime/src/com/oracle/truffle/runtime/OptimizedDirectCallNode.java similarity index 99% rename from truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/OptimizedDirectCallNode.java rename to truffle/src/com.oracle.truffle.runtime/src/com/oracle/truffle/runtime/OptimizedDirectCallNode.java index f9c00367410d..7cb97f74b7e9 100644 --- a/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/OptimizedDirectCallNode.java +++ b/truffle/src/com.oracle.truffle.runtime/src/com/oracle/truffle/runtime/OptimizedDirectCallNode.java @@ -38,7 +38,7 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ -package org.graalvm.compiler.truffle.runtime; +package com.oracle.truffle.runtime; import com.oracle.truffle.api.CallTarget; import com.oracle.truffle.api.CompilerAsserts; diff --git a/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/OptimizedIndirectCallNode.java b/truffle/src/com.oracle.truffle.runtime/src/com/oracle/truffle/runtime/OptimizedIndirectCallNode.java similarity index 98% rename from truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/OptimizedIndirectCallNode.java rename to truffle/src/com.oracle.truffle.runtime/src/com/oracle/truffle/runtime/OptimizedIndirectCallNode.java index fab558673d71..efac75377826 100644 --- a/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/OptimizedIndirectCallNode.java +++ b/truffle/src/com.oracle.truffle.runtime/src/com/oracle/truffle/runtime/OptimizedIndirectCallNode.java @@ -38,7 +38,7 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ -package org.graalvm.compiler.truffle.runtime; +package com.oracle.truffle.runtime; import com.oracle.truffle.api.CallTarget; import com.oracle.truffle.api.CompilerDirectives; diff --git a/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/OptimizedLoopNode.java b/truffle/src/com.oracle.truffle.runtime/src/com/oracle/truffle/runtime/OptimizedLoopNode.java similarity index 98% rename from truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/OptimizedLoopNode.java rename to truffle/src/com.oracle.truffle.runtime/src/com/oracle/truffle/runtime/OptimizedLoopNode.java index b1adeea85c8d..21426459cae4 100644 --- a/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/OptimizedLoopNode.java +++ b/truffle/src/com.oracle.truffle.runtime/src/com/oracle/truffle/runtime/OptimizedLoopNode.java @@ -38,7 +38,7 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ -package org.graalvm.compiler.truffle.runtime; +package com.oracle.truffle.runtime; import com.oracle.truffle.api.CompilerDirectives; import com.oracle.truffle.api.TruffleSafepoint; diff --git a/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/OptimizedOSRLoopNode.java b/truffle/src/com.oracle.truffle.runtime/src/com/oracle/truffle/runtime/OptimizedOSRLoopNode.java similarity index 99% rename from truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/OptimizedOSRLoopNode.java rename to truffle/src/com.oracle.truffle.runtime/src/com/oracle/truffle/runtime/OptimizedOSRLoopNode.java index 0a4135f9c838..4902e3993e86 100644 --- a/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/OptimizedOSRLoopNode.java +++ b/truffle/src/com.oracle.truffle.runtime/src/com/oracle/truffle/runtime/OptimizedOSRLoopNode.java @@ -38,7 +38,7 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ -package org.graalvm.compiler.truffle.runtime; +package com.oracle.truffle.runtime; import org.graalvm.options.OptionValues; diff --git a/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/OptimizedRuntimeOptions.java b/truffle/src/com.oracle.truffle.runtime/src/com/oracle/truffle/runtime/OptimizedRuntimeOptions.java similarity index 99% rename from truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/OptimizedRuntimeOptions.java rename to truffle/src/com.oracle.truffle.runtime/src/com/oracle/truffle/runtime/OptimizedRuntimeOptions.java index 61ce592443d3..ea8794885bf6 100644 --- a/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/OptimizedRuntimeOptions.java +++ b/truffle/src/com.oracle.truffle.runtime/src/com/oracle/truffle/runtime/OptimizedRuntimeOptions.java @@ -38,7 +38,7 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ -package org.graalvm.compiler.truffle.runtime; +package com.oracle.truffle.runtime; import java.util.function.Function; diff --git a/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/SuppressFBWarnings.java b/truffle/src/com.oracle.truffle.runtime/src/com/oracle/truffle/runtime/SuppressFBWarnings.java similarity index 98% rename from truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/SuppressFBWarnings.java rename to truffle/src/com.oracle.truffle.runtime/src/com/oracle/truffle/runtime/SuppressFBWarnings.java index 5c36842e92e8..2b2fc7b0f035 100644 --- a/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/SuppressFBWarnings.java +++ b/truffle/src/com.oracle.truffle.runtime/src/com/oracle/truffle/runtime/SuppressFBWarnings.java @@ -38,7 +38,7 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ -package org.graalvm.compiler.truffle.runtime; +package com.oracle.truffle.runtime; import java.lang.annotation.Retention; import java.lang.annotation.RetentionPolicy; diff --git a/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/TraversingBlockingQueue.java b/truffle/src/com.oracle.truffle.runtime/src/com/oracle/truffle/runtime/TraversingBlockingQueue.java similarity index 99% rename from truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/TraversingBlockingQueue.java rename to truffle/src/com.oracle.truffle.runtime/src/com/oracle/truffle/runtime/TraversingBlockingQueue.java index 84b2b4961637..3547541fc10e 100644 --- a/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/TraversingBlockingQueue.java +++ b/truffle/src/com.oracle.truffle.runtime/src/com/oracle/truffle/runtime/TraversingBlockingQueue.java @@ -38,7 +38,7 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ -package org.graalvm.compiler.truffle.runtime; +package com.oracle.truffle.runtime; import java.util.Collection; import java.util.Iterator; diff --git a/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/TruffleCallBoundary.java b/truffle/src/com.oracle.truffle.runtime/src/com/oracle/truffle/runtime/TruffleCallBoundary.java similarity index 98% rename from truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/TruffleCallBoundary.java rename to truffle/src/com.oracle.truffle.runtime/src/com/oracle/truffle/runtime/TruffleCallBoundary.java index fb7e352208c7..40c6111fc4c3 100644 --- a/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/TruffleCallBoundary.java +++ b/truffle/src/com.oracle.truffle.runtime/src/com/oracle/truffle/runtime/TruffleCallBoundary.java @@ -38,7 +38,7 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ -package org.graalvm.compiler.truffle.runtime; +package com.oracle.truffle.runtime; import java.lang.annotation.ElementType; import java.lang.annotation.Retention; diff --git a/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/TruffleInlining.java b/truffle/src/com.oracle.truffle.runtime/src/com/oracle/truffle/runtime/TruffleInlining.java similarity index 98% rename from truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/TruffleInlining.java rename to truffle/src/com.oracle.truffle.runtime/src/com/oracle/truffle/runtime/TruffleInlining.java index c42779caacbd..0e6b37500c2c 100644 --- a/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/TruffleInlining.java +++ b/truffle/src/com.oracle.truffle.runtime/src/com/oracle/truffle/runtime/TruffleInlining.java @@ -38,7 +38,7 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ -package org.graalvm.compiler.truffle.runtime; +package com.oracle.truffle.runtime; import com.oracle.truffle.compiler.TruffleCompilable; diff --git a/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/TruffleSplittingStrategy.java b/truffle/src/com.oracle.truffle.runtime/src/com/oracle/truffle/runtime/TruffleSplittingStrategy.java similarity index 99% rename from truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/TruffleSplittingStrategy.java rename to truffle/src/com.oracle.truffle.runtime/src/com/oracle/truffle/runtime/TruffleSplittingStrategy.java index bfec1bc68de5..8ad846487a86 100644 --- a/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/TruffleSplittingStrategy.java +++ b/truffle/src/com.oracle.truffle.runtime/src/com/oracle/truffle/runtime/TruffleSplittingStrategy.java @@ -38,7 +38,7 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ -package org.graalvm.compiler.truffle.runtime; +package com.oracle.truffle.runtime; import java.util.ArrayList; import java.util.Collections; diff --git a/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/TruffleTypes.java b/truffle/src/com.oracle.truffle.runtime/src/com/oracle/truffle/runtime/TruffleTypes.java similarity index 98% rename from truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/TruffleTypes.java rename to truffle/src/com.oracle.truffle.runtime/src/com/oracle/truffle/runtime/TruffleTypes.java index 43b48403b1f4..8030caad675d 100644 --- a/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/TruffleTypes.java +++ b/truffle/src/com.oracle.truffle.runtime/src/com/oracle/truffle/runtime/TruffleTypes.java @@ -38,7 +38,7 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ -package org.graalvm.compiler.truffle.runtime; +package com.oracle.truffle.runtime; /** * A service for getting types that can be resolved by diff --git a/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/collection/ArrayQueue.java b/truffle/src/com.oracle.truffle.runtime/src/com/oracle/truffle/runtime/collection/ArrayQueue.java similarity index 98% rename from truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/collection/ArrayQueue.java rename to truffle/src/com.oracle.truffle.runtime/src/com/oracle/truffle/runtime/collection/ArrayQueue.java index ccab33d73751..d96e702a13bf 100644 --- a/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/collection/ArrayQueue.java +++ b/truffle/src/com.oracle.truffle.runtime/src/com/oracle/truffle/runtime/collection/ArrayQueue.java @@ -38,7 +38,7 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ -package org.graalvm.compiler.truffle.runtime.collection; +package com.oracle.truffle.runtime.collection; import java.util.Arrays; diff --git a/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/collection/BTreeQueue.java b/truffle/src/com.oracle.truffle.runtime/src/com/oracle/truffle/runtime/collection/BTreeQueue.java similarity index 99% rename from truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/collection/BTreeQueue.java rename to truffle/src/com.oracle.truffle.runtime/src/com/oracle/truffle/runtime/collection/BTreeQueue.java index c98774e8a4a7..8c6ce5e76855 100644 --- a/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/collection/BTreeQueue.java +++ b/truffle/src/com.oracle.truffle.runtime/src/com/oracle/truffle/runtime/collection/BTreeQueue.java @@ -38,7 +38,7 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ -package org.graalvm.compiler.truffle.runtime.collection; +package com.oracle.truffle.runtime.collection; import java.util.ArrayList; import java.util.Arrays; diff --git a/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/collection/DelegatingBlockingQueue.java b/truffle/src/com.oracle.truffle.runtime/src/com/oracle/truffle/runtime/collection/DelegatingBlockingQueue.java similarity index 99% rename from truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/collection/DelegatingBlockingQueue.java rename to truffle/src/com.oracle.truffle.runtime/src/com/oracle/truffle/runtime/collection/DelegatingBlockingQueue.java index 49ba292dce3b..1e595e0b93ba 100644 --- a/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/collection/DelegatingBlockingQueue.java +++ b/truffle/src/com.oracle.truffle.runtime/src/com/oracle/truffle/runtime/collection/DelegatingBlockingQueue.java @@ -38,7 +38,7 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ -package org.graalvm.compiler.truffle.runtime.collection; +package com.oracle.truffle.runtime.collection; import java.util.Arrays; import java.util.Collection; diff --git a/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/collection/SerialQueue.java b/truffle/src/com.oracle.truffle.runtime/src/com/oracle/truffle/runtime/collection/SerialQueue.java similarity index 97% rename from truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/collection/SerialQueue.java rename to truffle/src/com.oracle.truffle.runtime/src/com/oracle/truffle/runtime/collection/SerialQueue.java index acb0b51d6b76..88c81070a94e 100644 --- a/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/collection/SerialQueue.java +++ b/truffle/src/com.oracle.truffle.runtime/src/com/oracle/truffle/runtime/collection/SerialQueue.java @@ -38,7 +38,7 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ -package org.graalvm.compiler.truffle.runtime.collection; +package com.oracle.truffle.runtime.collection; interface SerialQueue { void add(E x); diff --git a/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/debug/JFRListener.java b/truffle/src/com.oracle.truffle.runtime/src/com/oracle/truffle/runtime/debug/JFRListener.java similarity index 95% rename from truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/debug/JFRListener.java rename to truffle/src/com.oracle.truffle.runtime/src/com/oracle/truffle/runtime/debug/JFRListener.java index 82cbffa6144b..23253332049d 100644 --- a/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/debug/JFRListener.java +++ b/truffle/src/com.oracle.truffle.runtime/src/com/oracle/truffle/runtime/debug/JFRListener.java @@ -38,7 +38,7 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ -package org.graalvm.compiler.truffle.runtime.debug; +package com.oracle.truffle.runtime.debug; import java.lang.annotation.Annotation; import java.lang.reflect.AnnotatedElement; @@ -48,23 +48,23 @@ import java.util.concurrent.atomic.AtomicLong; import java.util.concurrent.atomic.AtomicReference; -import org.graalvm.compiler.truffle.jfr.CompilationEvent; -import org.graalvm.compiler.truffle.jfr.CompilationStatisticsEvent; -import org.graalvm.compiler.truffle.jfr.DeoptimizationEvent; -import org.graalvm.compiler.truffle.jfr.EventFactory; -import org.graalvm.compiler.truffle.jfr.InvalidationEvent; -import org.graalvm.compiler.truffle.runtime.AbstractCompilationTask; -import org.graalvm.compiler.truffle.runtime.AbstractGraalTruffleRuntimeListener; -import org.graalvm.compiler.truffle.runtime.GraalTruffleRuntime; -import org.graalvm.compiler.truffle.runtime.ModuleUtil; -import org.graalvm.compiler.truffle.runtime.OptimizedCallTarget; -import org.graalvm.compiler.truffle.runtime.serviceprovider.TruffleRuntimeServices; import org.graalvm.nativeimage.ImageInfo; import org.graalvm.nativeimage.ImageSingletons; import com.oracle.truffle.api.frame.Frame; import com.oracle.truffle.compiler.TruffleCompilerListener.CompilationResultInfo; import com.oracle.truffle.compiler.TruffleCompilerListener.GraphInfo; +import com.oracle.truffle.runtime.AbstractCompilationTask; +import com.oracle.truffle.runtime.AbstractGraalTruffleRuntimeListener; +import com.oracle.truffle.runtime.GraalTruffleRuntime; +import com.oracle.truffle.runtime.ModuleUtil; +import com.oracle.truffle.runtime.OptimizedCallTarget; +import com.oracle.truffle.runtime.jfr.CompilationEvent; +import com.oracle.truffle.runtime.jfr.CompilationStatisticsEvent; +import com.oracle.truffle.runtime.jfr.DeoptimizationEvent; +import com.oracle.truffle.runtime.jfr.EventFactory; +import com.oracle.truffle.runtime.jfr.InvalidationEvent; +import com.oracle.truffle.runtime.serviceprovider.TruffleRuntimeServices; import jdk.vm.ci.meta.ResolvedJavaMethod; import jdk.vm.ci.meta.ResolvedJavaType; diff --git a/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/debug/StatisticsListener.java b/truffle/src/com.oracle.truffle.runtime/src/com/oracle/truffle/runtime/debug/StatisticsListener.java similarity index 98% rename from truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/debug/StatisticsListener.java rename to truffle/src/com.oracle.truffle.runtime/src/com/oracle/truffle/runtime/debug/StatisticsListener.java index 2e1bc2dc2e6e..1108dd41f990 100644 --- a/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/debug/StatisticsListener.java +++ b/truffle/src/com.oracle.truffle.runtime/src/com/oracle/truffle/runtime/debug/StatisticsListener.java @@ -38,7 +38,7 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ -package org.graalvm.compiler.truffle.runtime.debug; +package com.oracle.truffle.runtime.debug; import java.io.PrintWriter; import java.io.StringWriter; @@ -54,13 +54,6 @@ import java.util.function.Function; import java.util.logging.Level; -import org.graalvm.compiler.truffle.runtime.AbstractCompilationTask; -import org.graalvm.compiler.truffle.runtime.AbstractGraalTruffleRuntimeListener; -import org.graalvm.compiler.truffle.runtime.EngineData; -import org.graalvm.compiler.truffle.runtime.GraalTruffleRuntime; -import org.graalvm.compiler.truffle.runtime.OptimizedCallTarget; -import org.graalvm.compiler.truffle.runtime.OptimizedDirectCallNode; - import com.oracle.truffle.api.TruffleLogger; import com.oracle.truffle.api.nodes.DirectCallNode; import com.oracle.truffle.api.nodes.IndirectCallNode; @@ -71,6 +64,12 @@ import com.oracle.truffle.compiler.TruffleCompilable; import com.oracle.truffle.compiler.TruffleCompilerListener.CompilationResultInfo; import com.oracle.truffle.compiler.TruffleCompilerListener.GraphInfo; +import com.oracle.truffle.runtime.AbstractCompilationTask; +import com.oracle.truffle.runtime.AbstractGraalTruffleRuntimeListener; +import com.oracle.truffle.runtime.EngineData; +import com.oracle.truffle.runtime.GraalTruffleRuntime; +import com.oracle.truffle.runtime.OptimizedCallTarget; +import com.oracle.truffle.runtime.OptimizedDirectCallNode; public final class StatisticsListener extends AbstractGraalTruffleRuntimeListener { diff --git a/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/debug/TraceASTCompilationListener.java b/truffle/src/com.oracle.truffle.runtime/src/com/oracle/truffle/runtime/debug/TraceASTCompilationListener.java similarity index 91% rename from truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/debug/TraceASTCompilationListener.java rename to truffle/src/com.oracle.truffle.runtime/src/com/oracle/truffle/runtime/debug/TraceASTCompilationListener.java index 9530392dcfcc..4e61a30605e8 100644 --- a/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/debug/TraceASTCompilationListener.java +++ b/truffle/src/com.oracle.truffle.runtime/src/com/oracle/truffle/runtime/debug/TraceASTCompilationListener.java @@ -38,22 +38,21 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ -package org.graalvm.compiler.truffle.runtime.debug; +package com.oracle.truffle.runtime.debug; import java.io.PrintWriter; import java.io.StringWriter; -import org.graalvm.compiler.truffle.runtime.AbstractCompilationTask; -import org.graalvm.compiler.truffle.runtime.AbstractGraalTruffleRuntimeListener; -import org.graalvm.compiler.truffle.runtime.GraalTruffleRuntime; -import org.graalvm.compiler.truffle.runtime.OptimizedCallTarget; -import org.graalvm.compiler.truffle.runtime.OptimizedRuntimeOptions; - import com.oracle.truffle.api.nodes.Node; import com.oracle.truffle.api.nodes.NodeUtil; import com.oracle.truffle.api.nodes.NodeVisitor; import com.oracle.truffle.compiler.TruffleCompilerListener.CompilationResultInfo; import com.oracle.truffle.compiler.TruffleCompilerListener.GraphInfo; +import com.oracle.truffle.runtime.AbstractCompilationTask; +import com.oracle.truffle.runtime.AbstractGraalTruffleRuntimeListener; +import com.oracle.truffle.runtime.GraalTruffleRuntime; +import com.oracle.truffle.runtime.OptimizedCallTarget; +import com.oracle.truffle.runtime.OptimizedRuntimeOptions; /** * Traces all polymorphic and generic nodes after each successful Truffle compilation. diff --git a/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/debug/TraceCompilationListener.java b/truffle/src/com.oracle.truffle.runtime/src/com/oracle/truffle/runtime/debug/TraceCompilationListener.java similarity index 96% rename from truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/debug/TraceCompilationListener.java rename to truffle/src/com.oracle.truffle.runtime/src/com/oracle/truffle/runtime/debug/TraceCompilationListener.java index 2ed7cea6ae02..16604926182d 100644 --- a/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/debug/TraceCompilationListener.java +++ b/truffle/src/com.oracle.truffle.runtime/src/com/oracle/truffle/runtime/debug/TraceCompilationListener.java @@ -38,16 +38,7 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ -package org.graalvm.compiler.truffle.runtime.debug; - -import org.graalvm.compiler.truffle.runtime.AbstractCompilationTask; -import org.graalvm.compiler.truffle.runtime.AbstractGraalTruffleRuntimeListener; -import org.graalvm.compiler.truffle.runtime.CompilationTask; -import org.graalvm.compiler.truffle.runtime.FixedPointMath; -import org.graalvm.compiler.truffle.runtime.GraalTruffleRuntime; -import org.graalvm.compiler.truffle.runtime.GraalTruffleRuntimeListener; -import org.graalvm.compiler.truffle.runtime.OptimizedCallTarget; -import org.graalvm.compiler.truffle.runtime.OptimizedDirectCallNode; +package com.oracle.truffle.runtime.debug; import com.oracle.truffle.api.frame.Frame; import com.oracle.truffle.api.nodes.Node; @@ -55,6 +46,14 @@ import com.oracle.truffle.api.source.SourceSection; import com.oracle.truffle.compiler.TruffleCompilerListener.CompilationResultInfo; import com.oracle.truffle.compiler.TruffleCompilerListener.GraphInfo; +import com.oracle.truffle.runtime.AbstractCompilationTask; +import com.oracle.truffle.runtime.AbstractGraalTruffleRuntimeListener; +import com.oracle.truffle.runtime.CompilationTask; +import com.oracle.truffle.runtime.FixedPointMath; +import com.oracle.truffle.runtime.GraalTruffleRuntime; +import com.oracle.truffle.runtime.GraalTruffleRuntimeListener; +import com.oracle.truffle.runtime.OptimizedCallTarget; +import com.oracle.truffle.runtime.OptimizedDirectCallNode; /** * Traces AST-level compilation events with a detailed log message sent to the Truffle log stream diff --git a/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/debug/TraceCompilationPolymorphismListener.java b/truffle/src/com.oracle.truffle.runtime/src/com/oracle/truffle/runtime/debug/TraceCompilationPolymorphismListener.java similarity index 90% rename from truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/debug/TraceCompilationPolymorphismListener.java rename to truffle/src/com.oracle.truffle.runtime/src/com/oracle/truffle/runtime/debug/TraceCompilationPolymorphismListener.java index 77610b6eaf23..306fccc5b1f2 100644 --- a/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/debug/TraceCompilationPolymorphismListener.java +++ b/truffle/src/com.oracle.truffle.runtime/src/com/oracle/truffle/runtime/debug/TraceCompilationPolymorphismListener.java @@ -38,23 +38,22 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ -package org.graalvm.compiler.truffle.runtime.debug; +package com.oracle.truffle.runtime.debug; import java.util.LinkedHashMap; import java.util.Map; -import org.graalvm.compiler.truffle.runtime.AbstractCompilationTask; -import org.graalvm.compiler.truffle.runtime.AbstractGraalTruffleRuntimeListener; -import org.graalvm.compiler.truffle.runtime.GraalTruffleRuntime; -import org.graalvm.compiler.truffle.runtime.OptimizedCallTarget; -import org.graalvm.compiler.truffle.runtime.OptimizedRuntimeOptions; - import com.oracle.truffle.api.nodes.Node; import com.oracle.truffle.api.nodes.NodeCost; import com.oracle.truffle.api.nodes.NodeUtil; import com.oracle.truffle.api.nodes.NodeVisitor; import com.oracle.truffle.compiler.TruffleCompilerListener.CompilationResultInfo; import com.oracle.truffle.compiler.TruffleCompilerListener.GraphInfo; +import com.oracle.truffle.runtime.AbstractCompilationTask; +import com.oracle.truffle.runtime.AbstractGraalTruffleRuntimeListener; +import com.oracle.truffle.runtime.GraalTruffleRuntime; +import com.oracle.truffle.runtime.OptimizedCallTarget; +import com.oracle.truffle.runtime.OptimizedRuntimeOptions; public final class TraceCompilationPolymorphismListener extends AbstractGraalTruffleRuntimeListener { diff --git a/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/debug/TraceSplittingListener.java b/truffle/src/com.oracle.truffle.runtime/src/com/oracle/truffle/runtime/debug/TraceSplittingListener.java similarity index 93% rename from truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/debug/TraceSplittingListener.java rename to truffle/src/com.oracle.truffle.runtime/src/com/oracle/truffle/runtime/debug/TraceSplittingListener.java index c5df622c25ae..ad318f443db3 100644 --- a/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/debug/TraceSplittingListener.java +++ b/truffle/src/com.oracle.truffle.runtime/src/com/oracle/truffle/runtime/debug/TraceSplittingListener.java @@ -38,19 +38,18 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ -package org.graalvm.compiler.truffle.runtime.debug; +package com.oracle.truffle.runtime.debug; import java.util.Map; -import org.graalvm.compiler.truffle.runtime.GraalTruffleRuntime; -import org.graalvm.compiler.truffle.runtime.GraalTruffleRuntimeListener; -import org.graalvm.compiler.truffle.runtime.OptimizedCallTarget; -import org.graalvm.compiler.truffle.runtime.OptimizedDirectCallNode; -import org.graalvm.compiler.truffle.runtime.OptimizedRuntimeOptions; - import com.oracle.truffle.api.nodes.Node; import com.oracle.truffle.api.nodes.RootNode; import com.oracle.truffle.api.source.SourceSection; +import com.oracle.truffle.runtime.GraalTruffleRuntime; +import com.oracle.truffle.runtime.GraalTruffleRuntimeListener; +import com.oracle.truffle.runtime.OptimizedCallTarget; +import com.oracle.truffle.runtime.OptimizedDirectCallNode; +import com.oracle.truffle.runtime.OptimizedRuntimeOptions; public final class TraceSplittingListener implements GraalTruffleRuntimeListener { diff --git a/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/hotspot/HotSpotFastThreadLocal.java b/truffle/src/com.oracle.truffle.runtime/src/com/oracle/truffle/runtime/hotspot/HotSpotFastThreadLocal.java similarity index 98% rename from truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/hotspot/HotSpotFastThreadLocal.java rename to truffle/src/com.oracle.truffle.runtime/src/com/oracle/truffle/runtime/hotspot/HotSpotFastThreadLocal.java index 3f0fdd046a3d..26f3abae9cd8 100644 --- a/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/hotspot/HotSpotFastThreadLocal.java +++ b/truffle/src/com.oracle.truffle.runtime/src/com/oracle/truffle/runtime/hotspot/HotSpotFastThreadLocal.java @@ -38,12 +38,13 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ -package org.graalvm.compiler.truffle.runtime.hotspot; +package com.oracle.truffle.runtime.hotspot; import java.lang.invoke.MethodHandle; -import org.graalvm.compiler.truffle.runtime.GraalFastThreadLocal; import com.oracle.truffle.api.CompilerDirectives; +import com.oracle.truffle.runtime.GraalFastThreadLocal; + import jdk.vm.ci.hotspot.HotSpotJVMCIRuntime; final class HotSpotFastThreadLocal extends GraalFastThreadLocal { diff --git a/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/hotspot/HotSpotOptimizedCallTarget.java b/truffle/src/com.oracle.truffle.runtime/src/com/oracle/truffle/runtime/hotspot/HotSpotOptimizedCallTarget.java similarity index 95% rename from truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/hotspot/HotSpotOptimizedCallTarget.java rename to truffle/src/com.oracle.truffle.runtime/src/com/oracle/truffle/runtime/hotspot/HotSpotOptimizedCallTarget.java index 9189d05ba31f..b0b1eca6a8ee 100644 --- a/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/hotspot/HotSpotOptimizedCallTarget.java +++ b/truffle/src/com.oracle.truffle.runtime/src/com/oracle/truffle/runtime/hotspot/HotSpotOptimizedCallTarget.java @@ -38,16 +38,15 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ -package org.graalvm.compiler.truffle.runtime.hotspot; +package com.oracle.truffle.runtime.hotspot; import java.lang.reflect.Method; -import org.graalvm.compiler.truffle.runtime.EngineData; -import org.graalvm.compiler.truffle.runtime.OptimizedCallTarget; -import org.graalvm.compiler.truffle.runtime.TruffleCallBoundary; - import com.oracle.truffle.api.nodes.RootNode; import com.oracle.truffle.compiler.TruffleCompiler; +import com.oracle.truffle.runtime.EngineData; +import com.oracle.truffle.runtime.OptimizedCallTarget; +import com.oracle.truffle.runtime.TruffleCallBoundary; import jdk.vm.ci.code.InstalledCode; import jdk.vm.ci.hotspot.HotSpotNmethod; @@ -163,7 +162,7 @@ private void tetherSpeculationLog(HotSpotNmethod nmethod) throws Error, Internal HotSpotSpeculationLog log = (HotSpotSpeculationLog) speculationLog; if (log.managesFailedSpeculations() && log.hasSpeculations()) { try { - // org.graalvm.compiler.truffle.runtime.hotspot.HotSpotTruffleRuntime.createSpeculationLog() + // com.oracle.truffle.runtime.hotspot.HotSpotTruffleRuntime.createSpeculationLog() setSpeculationLog.invoke(nmethod, log); } catch (Error e) { throw e; diff --git a/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/hotspot/HotSpotThreadLocalHandshake.java b/truffle/src/com.oracle.truffle.runtime/src/com/oracle/truffle/runtime/hotspot/HotSpotThreadLocalHandshake.java similarity index 98% rename from truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/hotspot/HotSpotThreadLocalHandshake.java rename to truffle/src/com.oracle.truffle.runtime/src/com/oracle/truffle/runtime/hotspot/HotSpotThreadLocalHandshake.java index 760d03693b67..3127d72e48f4 100644 --- a/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/hotspot/HotSpotThreadLocalHandshake.java +++ b/truffle/src/com.oracle.truffle.runtime/src/com/oracle/truffle/runtime/hotspot/HotSpotThreadLocalHandshake.java @@ -38,7 +38,7 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ -package org.graalvm.compiler.truffle.runtime.hotspot; +package com.oracle.truffle.runtime.hotspot; import com.oracle.truffle.api.CompilerDirectives; import com.oracle.truffle.api.CompilerDirectives.TruffleBoundary; diff --git a/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/hotspot/HotSpotTruffleRuntime.java b/truffle/src/com.oracle.truffle.runtime/src/com/oracle/truffle/runtime/hotspot/HotSpotTruffleRuntime.java similarity index 98% rename from truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/hotspot/HotSpotTruffleRuntime.java rename to truffle/src/com.oracle.truffle.runtime/src/com/oracle/truffle/runtime/hotspot/HotSpotTruffleRuntime.java index d2505eec6c6e..7801644f94be 100644 --- a/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/hotspot/HotSpotTruffleRuntime.java +++ b/truffle/src/com.oracle.truffle.runtime/src/com/oracle/truffle/runtime/hotspot/HotSpotTruffleRuntime.java @@ -38,7 +38,7 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ -package org.graalvm.compiler.truffle.runtime.hotspot; +package com.oracle.truffle.runtime.hotspot; import java.lang.invoke.MethodHandle; import java.lang.invoke.MethodHandles; @@ -54,15 +54,6 @@ import java.util.function.Consumer; import java.util.function.Supplier; -import org.graalvm.compiler.truffle.runtime.BackgroundCompileQueue; -import org.graalvm.compiler.truffle.runtime.CompilationTask; -import org.graalvm.compiler.truffle.runtime.EngineData; -import org.graalvm.compiler.truffle.runtime.GraalTruffleRuntime; -import org.graalvm.compiler.truffle.runtime.OptimizedCallTarget; -import org.graalvm.compiler.truffle.runtime.OptimizedOSRLoopNode; -import org.graalvm.compiler.truffle.runtime.TruffleCallBoundary; -import org.graalvm.compiler.truffle.runtime.hotspot.libgraal.LibGraalTruffleCompilationSupport; - import com.oracle.truffle.api.CompilerDirectives; import com.oracle.truffle.api.CompilerDirectives.TruffleBoundary; import com.oracle.truffle.api.impl.AbstractFastThreadLocal; @@ -72,6 +63,14 @@ import com.oracle.truffle.compiler.TruffleCompilationSupport; import com.oracle.truffle.compiler.TruffleCompiler; import com.oracle.truffle.compiler.hotspot.HotSpotTruffleCompiler; +import com.oracle.truffle.runtime.BackgroundCompileQueue; +import com.oracle.truffle.runtime.CompilationTask; +import com.oracle.truffle.runtime.EngineData; +import com.oracle.truffle.runtime.GraalTruffleRuntime; +import com.oracle.truffle.runtime.OptimizedCallTarget; +import com.oracle.truffle.runtime.OptimizedOSRLoopNode; +import com.oracle.truffle.runtime.TruffleCallBoundary; +import com.oracle.truffle.runtime.hotspot.libgraal.LibGraalTruffleCompilationSupport; import jdk.vm.ci.code.InstalledCode; import jdk.vm.ci.code.stack.StackIntrospection; diff --git a/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/hotspot/HotSpotTruffleRuntimeAccess.java b/truffle/src/com.oracle.truffle.runtime/src/com/oracle/truffle/runtime/hotspot/HotSpotTruffleRuntimeAccess.java similarity index 95% rename from truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/hotspot/HotSpotTruffleRuntimeAccess.java rename to truffle/src/com.oracle.truffle.runtime/src/com/oracle/truffle/runtime/hotspot/HotSpotTruffleRuntimeAccess.java index 052df247267e..ec96936646a5 100644 --- a/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/hotspot/HotSpotTruffleRuntimeAccess.java +++ b/truffle/src/com.oracle.truffle.runtime/src/com/oracle/truffle/runtime/hotspot/HotSpotTruffleRuntimeAccess.java @@ -38,16 +38,15 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ -package org.graalvm.compiler.truffle.runtime.hotspot; - -import org.graalvm.compiler.truffle.runtime.ModulesSupport; -import org.graalvm.compiler.truffle.runtime.hotspot.libgraal.LibGraalTruffleCompilationSupport; -import org.graalvm.libgraal.LibGraal; +package com.oracle.truffle.runtime.hotspot; import com.oracle.truffle.api.TruffleRuntime; import com.oracle.truffle.api.TruffleRuntimeAccess; import com.oracle.truffle.api.impl.DefaultTruffleRuntime; import com.oracle.truffle.compiler.TruffleCompilationSupport; +import com.oracle.truffle.runtime.ModulesSupport; +import com.oracle.truffle.runtime.hotspot.libgraal.LibGraal; +import com.oracle.truffle.runtime.hotspot.libgraal.LibGraalTruffleCompilationSupport; import jdk.internal.module.Modules; import jdk.vm.ci.hotspot.HotSpotJVMCIRuntime; diff --git a/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/hotspot/HotSpotTruffleRuntimeServices.java b/truffle/src/com.oracle.truffle.runtime/src/com/oracle/truffle/runtime/hotspot/HotSpotTruffleRuntimeServices.java similarity index 96% rename from truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/hotspot/HotSpotTruffleRuntimeServices.java rename to truffle/src/com.oracle.truffle.runtime/src/com/oracle/truffle/runtime/hotspot/HotSpotTruffleRuntimeServices.java index 4625e19d2ba3..cd8e816d50c2 100644 --- a/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/hotspot/HotSpotTruffleRuntimeServices.java +++ b/truffle/src/com.oracle.truffle.runtime/src/com/oracle/truffle/runtime/hotspot/HotSpotTruffleRuntimeServices.java @@ -38,9 +38,9 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ -package org.graalvm.compiler.truffle.runtime.hotspot; +package com.oracle.truffle.runtime.hotspot; -import org.graalvm.compiler.truffle.runtime.OptimizedCallTarget; +import com.oracle.truffle.runtime.OptimizedCallTarget; import jdk.vm.ci.hotspot.HotSpotSpeculationLog; import jdk.vm.ci.meta.SpeculationLog; diff --git a/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/hotspot/libgraal/BinaryInput.java b/truffle/src/com.oracle.truffle.runtime/src/com/oracle/truffle/runtime/hotspot/libgraal/BinaryInput.java similarity index 95% rename from truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/hotspot/libgraal/BinaryInput.java rename to truffle/src/com.oracle.truffle.runtime/src/com/oracle/truffle/runtime/hotspot/libgraal/BinaryInput.java index 2c52fcae0a98..067ef4241656 100644 --- a/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/hotspot/libgraal/BinaryInput.java +++ b/truffle/src/com.oracle.truffle.runtime/src/com/oracle/truffle/runtime/hotspot/libgraal/BinaryInput.java @@ -38,21 +38,21 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ -package org.graalvm.compiler.truffle.runtime.hotspot.libgraal; - -import static org.graalvm.compiler.truffle.runtime.hotspot.libgraal.BinaryOutput.ARRAY; -import static org.graalvm.compiler.truffle.runtime.hotspot.libgraal.BinaryOutput.BOOLEAN; -import static org.graalvm.compiler.truffle.runtime.hotspot.libgraal.BinaryOutput.BYTE; -import static org.graalvm.compiler.truffle.runtime.hotspot.libgraal.BinaryOutput.CHAR; -import static org.graalvm.compiler.truffle.runtime.hotspot.libgraal.BinaryOutput.DOUBLE; -import static org.graalvm.compiler.truffle.runtime.hotspot.libgraal.BinaryOutput.FLOAT; -import static org.graalvm.compiler.truffle.runtime.hotspot.libgraal.BinaryOutput.INT; -import static org.graalvm.compiler.truffle.runtime.hotspot.libgraal.BinaryOutput.LARGE_STRING_TAG; -import static org.graalvm.compiler.truffle.runtime.hotspot.libgraal.BinaryOutput.LONG; -import static org.graalvm.compiler.truffle.runtime.hotspot.libgraal.BinaryOutput.NULL; -import static org.graalvm.compiler.truffle.runtime.hotspot.libgraal.BinaryOutput.SHORT; -import static org.graalvm.compiler.truffle.runtime.hotspot.libgraal.BinaryOutput.STRING; -import static org.graalvm.compiler.truffle.runtime.hotspot.libgraal.BinaryOutput.bufferSize; +package com.oracle.truffle.runtime.hotspot.libgraal; + +import static com.oracle.truffle.runtime.hotspot.libgraal.BinaryOutput.ARRAY; +import static com.oracle.truffle.runtime.hotspot.libgraal.BinaryOutput.BOOLEAN; +import static com.oracle.truffle.runtime.hotspot.libgraal.BinaryOutput.BYTE; +import static com.oracle.truffle.runtime.hotspot.libgraal.BinaryOutput.CHAR; +import static com.oracle.truffle.runtime.hotspot.libgraal.BinaryOutput.DOUBLE; +import static com.oracle.truffle.runtime.hotspot.libgraal.BinaryOutput.FLOAT; +import static com.oracle.truffle.runtime.hotspot.libgraal.BinaryOutput.INT; +import static com.oracle.truffle.runtime.hotspot.libgraal.BinaryOutput.LARGE_STRING_TAG; +import static com.oracle.truffle.runtime.hotspot.libgraal.BinaryOutput.LONG; +import static com.oracle.truffle.runtime.hotspot.libgraal.BinaryOutput.NULL; +import static com.oracle.truffle.runtime.hotspot.libgraal.BinaryOutput.SHORT; +import static com.oracle.truffle.runtime.hotspot.libgraal.BinaryOutput.STRING; +import static com.oracle.truffle.runtime.hotspot.libgraal.BinaryOutput.bufferSize; import java.nio.ByteBuffer; import java.nio.ByteOrder; diff --git a/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/hotspot/libgraal/BinaryOutput.java b/truffle/src/com.oracle.truffle.runtime/src/com/oracle/truffle/runtime/hotspot/libgraal/BinaryOutput.java similarity index 99% rename from truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/hotspot/libgraal/BinaryOutput.java rename to truffle/src/com.oracle.truffle.runtime/src/com/oracle/truffle/runtime/hotspot/libgraal/BinaryOutput.java index c66791209118..c127987fdda9 100644 --- a/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/hotspot/libgraal/BinaryOutput.java +++ b/truffle/src/com.oracle.truffle.runtime/src/com/oracle/truffle/runtime/hotspot/libgraal/BinaryOutput.java @@ -38,7 +38,7 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ -package org.graalvm.compiler.truffle.runtime.hotspot.libgraal; +package com.oracle.truffle.runtime.hotspot.libgraal; import org.graalvm.nativeimage.UnmanagedMemory; import org.graalvm.nativeimage.c.type.CCharPointer; diff --git a/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/libgraal/DestroyedIsolateException.java b/truffle/src/com.oracle.truffle.runtime/src/com/oracle/truffle/runtime/hotspot/libgraal/DestroyedIsolateException.java similarity index 98% rename from truffle/src/com.oracle.truffle.runtime/src/org/graalvm/libgraal/DestroyedIsolateException.java rename to truffle/src/com.oracle.truffle.runtime/src/com/oracle/truffle/runtime/hotspot/libgraal/DestroyedIsolateException.java index 3e759d42b4aa..e4b7203ad5ef 100644 --- a/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/libgraal/DestroyedIsolateException.java +++ b/truffle/src/com.oracle.truffle.runtime/src/com/oracle/truffle/runtime/hotspot/libgraal/DestroyedIsolateException.java @@ -38,7 +38,7 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ -package org.graalvm.libgraal; +package com.oracle.truffle.runtime.hotspot.libgraal; /** * Exception thrown when a {@link LibGraalObject} associated with a destroyed isolate context is diff --git a/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/libgraal/LibGraal.java b/truffle/src/com.oracle.truffle.runtime/src/com/oracle/truffle/runtime/hotspot/libgraal/LibGraal.java similarity index 99% rename from truffle/src/com.oracle.truffle.runtime/src/org/graalvm/libgraal/LibGraal.java rename to truffle/src/com.oracle.truffle.runtime/src/com/oracle/truffle/runtime/hotspot/libgraal/LibGraal.java index b7e6ff0da395..121b8cd9a6f6 100644 --- a/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/libgraal/LibGraal.java +++ b/truffle/src/com.oracle.truffle.runtime/src/com/oracle/truffle/runtime/hotspot/libgraal/LibGraal.java @@ -38,7 +38,7 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ -package org.graalvm.libgraal; +package com.oracle.truffle.runtime.hotspot.libgraal; import static jdk.vm.ci.hotspot.HotSpotJVMCIRuntime.runtime; diff --git a/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/hotspot/libgraal/LibGraalCompilationResultInfo.java b/truffle/src/com.oracle.truffle.runtime/src/com/oracle/truffle/runtime/hotspot/libgraal/LibGraalCompilationResultInfo.java similarity index 96% rename from truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/hotspot/libgraal/LibGraalCompilationResultInfo.java rename to truffle/src/com.oracle.truffle.runtime/src/com/oracle/truffle/runtime/hotspot/libgraal/LibGraalCompilationResultInfo.java index b952930c521c..6542b433b53f 100644 --- a/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/hotspot/libgraal/LibGraalCompilationResultInfo.java +++ b/truffle/src/com.oracle.truffle.runtime/src/com/oracle/truffle/runtime/hotspot/libgraal/LibGraalCompilationResultInfo.java @@ -38,9 +38,9 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ -package org.graalvm.compiler.truffle.runtime.hotspot.libgraal; +package com.oracle.truffle.runtime.hotspot.libgraal; -import static org.graalvm.libgraal.LibGraalScope.getIsolateThread; +import static com.oracle.truffle.runtime.hotspot.libgraal.LibGraalScope.getIsolateThread; import com.oracle.truffle.compiler.TruffleCompilerListener; diff --git a/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/hotspot/libgraal/LibGraalGraphInfo.java b/truffle/src/com.oracle.truffle.runtime/src/com/oracle/truffle/runtime/hotspot/libgraal/LibGraalGraphInfo.java similarity index 95% rename from truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/hotspot/libgraal/LibGraalGraphInfo.java rename to truffle/src/com.oracle.truffle.runtime/src/com/oracle/truffle/runtime/hotspot/libgraal/LibGraalGraphInfo.java index 61baf7ffa06a..f6f8d3dcc659 100644 --- a/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/hotspot/libgraal/LibGraalGraphInfo.java +++ b/truffle/src/com.oracle.truffle.runtime/src/com/oracle/truffle/runtime/hotspot/libgraal/LibGraalGraphInfo.java @@ -38,9 +38,9 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ -package org.graalvm.compiler.truffle.runtime.hotspot.libgraal; +package com.oracle.truffle.runtime.hotspot.libgraal; -import static org.graalvm.libgraal.LibGraalScope.getIsolateThread; +import static com.oracle.truffle.runtime.hotspot.libgraal.LibGraalScope.getIsolateThread; import com.oracle.truffle.compiler.TruffleCompilerListener; import com.oracle.truffle.compiler.TruffleCompilerListener.GraphInfo; diff --git a/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/hotspot/libgraal/LibGraalHotSpotTruffleCompiler.java b/truffle/src/com.oracle.truffle.runtime/src/com/oracle/truffle/runtime/hotspot/libgraal/LibGraalHotSpotTruffleCompiler.java similarity index 95% rename from truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/hotspot/libgraal/LibGraalHotSpotTruffleCompiler.java rename to truffle/src/com.oracle.truffle.runtime/src/com/oracle/truffle/runtime/hotspot/libgraal/LibGraalHotSpotTruffleCompiler.java index e40a203a5aa3..2e0332579100 100644 --- a/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/hotspot/libgraal/LibGraalHotSpotTruffleCompiler.java +++ b/truffle/src/com.oracle.truffle.runtime/src/com/oracle/truffle/runtime/hotspot/libgraal/LibGraalHotSpotTruffleCompiler.java @@ -38,22 +38,17 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ -package org.graalvm.compiler.truffle.runtime.hotspot.libgraal; +package com.oracle.truffle.runtime.hotspot.libgraal; -import static org.graalvm.libgraal.LibGraalScope.getIsolateThread; +import static com.oracle.truffle.runtime.hotspot.libgraal.LibGraalScope.getIsolateThread; import java.util.function.Supplier; -import org.graalvm.compiler.truffle.runtime.hotspot.HotSpotTruffleRuntime; -import org.graalvm.libgraal.DestroyedIsolateException; -import org.graalvm.libgraal.LibGraal; -import org.graalvm.libgraal.LibGraalObject; -import org.graalvm.libgraal.LibGraalScope; - import com.oracle.truffle.compiler.TruffleCompilable; import com.oracle.truffle.compiler.TruffleCompilationTask; import com.oracle.truffle.compiler.TruffleCompilerListener; import com.oracle.truffle.compiler.hotspot.HotSpotTruffleCompiler; +import com.oracle.truffle.runtime.hotspot.HotSpotTruffleRuntime; import jdk.vm.ci.meta.ResolvedJavaMethod; diff --git a/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/libgraal/LibGraalIsolate.java b/truffle/src/com.oracle.truffle.runtime/src/com/oracle/truffle/runtime/hotspot/libgraal/LibGraalIsolate.java similarity index 99% rename from truffle/src/com.oracle.truffle.runtime/src/org/graalvm/libgraal/LibGraalIsolate.java rename to truffle/src/com.oracle.truffle.runtime/src/com/oracle/truffle/runtime/hotspot/libgraal/LibGraalIsolate.java index c652eabf644b..705e527cd7da 100644 --- a/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/libgraal/LibGraalIsolate.java +++ b/truffle/src/com.oracle.truffle.runtime/src/com/oracle/truffle/runtime/hotspot/libgraal/LibGraalIsolate.java @@ -38,7 +38,7 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ -package org.graalvm.libgraal; +package com.oracle.truffle.runtime.hotspot.libgraal; import java.lang.ref.ReferenceQueue; import java.lang.ref.WeakReference; diff --git a/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/libgraal/LibGraalObject.java b/truffle/src/com.oracle.truffle.runtime/src/com/oracle/truffle/runtime/hotspot/libgraal/LibGraalObject.java similarity index 98% rename from truffle/src/com.oracle.truffle.runtime/src/org/graalvm/libgraal/LibGraalObject.java rename to truffle/src/com.oracle.truffle.runtime/src/com/oracle/truffle/runtime/hotspot/libgraal/LibGraalObject.java index 2b1eac1d92bb..2be214f75e43 100644 --- a/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/libgraal/LibGraalObject.java +++ b/truffle/src/com.oracle.truffle.runtime/src/com/oracle/truffle/runtime/hotspot/libgraal/LibGraalObject.java @@ -38,7 +38,7 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ -package org.graalvm.libgraal; +package com.oracle.truffle.runtime.hotspot.libgraal; /** * Encapsulates a handle to an object in a libgraal isolate where the object's lifetime is bound to diff --git a/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/libgraal/LibGraalScope.java b/truffle/src/com.oracle.truffle.runtime/src/com/oracle/truffle/runtime/hotspot/libgraal/LibGraalScope.java similarity index 98% rename from truffle/src/com.oracle.truffle.runtime/src/org/graalvm/libgraal/LibGraalScope.java rename to truffle/src/com.oracle.truffle.runtime/src/com/oracle/truffle/runtime/hotspot/libgraal/LibGraalScope.java index b838aeb33eac..b9a078d1e519 100644 --- a/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/libgraal/LibGraalScope.java +++ b/truffle/src/com.oracle.truffle.runtime/src/com/oracle/truffle/runtime/hotspot/libgraal/LibGraalScope.java @@ -38,12 +38,10 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ -package org.graalvm.libgraal; +package com.oracle.truffle.runtime.hotspot.libgraal; import java.util.concurrent.atomic.AtomicInteger; -import org.graalvm.compiler.truffle.runtime.hotspot.libgraal.LibGraalTruffleCompilationSupport; - /** * Scope for calling CEntryPoints in libgraal. {@linkplain #LibGraalScope() Opening} a scope ensures * the current thread is attached to libgraal and {@linkplain #close() closing} the outer most scope diff --git a/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/hotspot/libgraal/LibGraalScopedHandle.java b/truffle/src/com.oracle.truffle.runtime/src/com/oracle/truffle/runtime/hotspot/libgraal/LibGraalScopedHandle.java similarity index 97% rename from truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/hotspot/libgraal/LibGraalScopedHandle.java rename to truffle/src/com.oracle.truffle.runtime/src/com/oracle/truffle/runtime/hotspot/libgraal/LibGraalScopedHandle.java index 40caae59bef7..0a2d29ca0c56 100644 --- a/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/hotspot/libgraal/LibGraalScopedHandle.java +++ b/truffle/src/com.oracle.truffle.runtime/src/com/oracle/truffle/runtime/hotspot/libgraal/LibGraalScopedHandle.java @@ -38,7 +38,7 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ -package org.graalvm.compiler.truffle.runtime.hotspot.libgraal; +package com.oracle.truffle.runtime.hotspot.libgraal; /** * Encapsulates a handle to an object in the libgraal heap where the handle is only valid within the diff --git a/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/hotspot/libgraal/LibGraalStringSupplier.java b/truffle/src/com.oracle.truffle.runtime/src/com/oracle/truffle/runtime/hotspot/libgraal/LibGraalStringSupplier.java similarity index 93% rename from truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/hotspot/libgraal/LibGraalStringSupplier.java rename to truffle/src/com.oracle.truffle.runtime/src/com/oracle/truffle/runtime/hotspot/libgraal/LibGraalStringSupplier.java index 85d76383661c..1dbbb87d15b2 100644 --- a/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/hotspot/libgraal/LibGraalStringSupplier.java +++ b/truffle/src/com.oracle.truffle.runtime/src/com/oracle/truffle/runtime/hotspot/libgraal/LibGraalStringSupplier.java @@ -38,14 +38,12 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ -package org.graalvm.compiler.truffle.runtime.hotspot.libgraal; +package com.oracle.truffle.runtime.hotspot.libgraal; -import static org.graalvm.libgraal.LibGraalScope.getIsolateThread; +import static com.oracle.truffle.runtime.hotspot.libgraal.LibGraalScope.getIsolateThread; import java.util.function.Supplier; -import org.graalvm.libgraal.LibGraalObject; - /** * Encapsulates a handle to a {@link Supplier} object in the libgraal heap. */ diff --git a/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/hotspot/libgraal/LibGraalTruffleCompilationSupport.java b/truffle/src/com.oracle.truffle.runtime/src/com/oracle/truffle/runtime/hotspot/libgraal/LibGraalTruffleCompilationSupport.java similarity index 94% rename from truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/hotspot/libgraal/LibGraalTruffleCompilationSupport.java rename to truffle/src/com.oracle.truffle.runtime/src/com/oracle/truffle/runtime/hotspot/libgraal/LibGraalTruffleCompilationSupport.java index 204888646302..95ebd17e751f 100644 --- a/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/hotspot/libgraal/LibGraalTruffleCompilationSupport.java +++ b/truffle/src/com.oracle.truffle.runtime/src/com/oracle/truffle/runtime/hotspot/libgraal/LibGraalTruffleCompilationSupport.java @@ -38,22 +38,18 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ -package org.graalvm.compiler.truffle.runtime.hotspot.libgraal; +package com.oracle.truffle.runtime.hotspot.libgraal; +import static com.oracle.truffle.runtime.hotspot.libgraal.LibGraalScope.getIsolateThread; import static jdk.vm.ci.hotspot.HotSpotJVMCIRuntime.runtime; -import static org.graalvm.libgraal.LibGraalScope.getIsolateThread; - -import org.graalvm.compiler.truffle.runtime.hotspot.HotSpotTruffleRuntime; -import org.graalvm.libgraal.DestroyedIsolateException; -import org.graalvm.libgraal.LibGraalObject; -import org.graalvm.libgraal.LibGraalScope; -import org.graalvm.libgraal.LibGraalScope.DetachAction; import com.oracle.truffle.compiler.TruffleCompilationSupport; import com.oracle.truffle.compiler.TruffleCompiler; import com.oracle.truffle.compiler.TruffleCompilerOptionDescriptor; import com.oracle.truffle.compiler.TruffleCompilerRuntime; import com.oracle.truffle.compiler.TruffleCompilerOptionDescriptor.Type; +import com.oracle.truffle.runtime.hotspot.HotSpotTruffleRuntime; +import com.oracle.truffle.runtime.hotspot.libgraal.LibGraalScope.DetachAction; /** * Represents a truffle compilation bundling compilable and task into a single object. Also installs diff --git a/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/hotspot/libgraal/TruffleFromLibGraalEntryPoints.java b/truffle/src/com.oracle.truffle.runtime/src/com/oracle/truffle/runtime/hotspot/libgraal/TruffleFromLibGraalEntryPoints.java similarity index 98% rename from truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/hotspot/libgraal/TruffleFromLibGraalEntryPoints.java rename to truffle/src/com.oracle.truffle.runtime/src/com/oracle/truffle/runtime/hotspot/libgraal/TruffleFromLibGraalEntryPoints.java index 15ce4929aa34..220e936fc238 100644 --- a/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/hotspot/libgraal/TruffleFromLibGraalEntryPoints.java +++ b/truffle/src/com.oracle.truffle.runtime/src/com/oracle/truffle/runtime/hotspot/libgraal/TruffleFromLibGraalEntryPoints.java @@ -38,7 +38,7 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ -package org.graalvm.compiler.truffle.runtime.hotspot.libgraal; +package com.oracle.truffle.runtime.hotspot.libgraal; import static com.oracle.truffle.compiler.hotspot.libgraal.TruffleFromLibGraal.Id.AddInlinedTarget; import static com.oracle.truffle.compiler.hotspot.libgraal.TruffleFromLibGraal.Id.AddTargetToDequeue; @@ -98,11 +98,6 @@ import java.util.function.Supplier; import java.util.stream.Stream; -import org.graalvm.compiler.truffle.runtime.OptimizedCallTarget; -import org.graalvm.compiler.truffle.runtime.hotspot.libgraal.BinaryOutput.ByteArrayBinaryOutput; -import org.graalvm.libgraal.LibGraal; -import org.graalvm.libgraal.LibGraalIsolate; - import com.oracle.truffle.compiler.ConstantFieldInfo; import com.oracle.truffle.compiler.HostMethodInfo; import com.oracle.truffle.compiler.OptimizedAssumptionDependency; @@ -115,6 +110,8 @@ import com.oracle.truffle.compiler.TruffleSourceLanguagePosition; import com.oracle.truffle.compiler.hotspot.libgraal.TruffleFromLibGraal; import com.oracle.truffle.compiler.hotspot.libgraal.TruffleFromLibGraal.Id; +import com.oracle.truffle.runtime.OptimizedCallTarget; +import com.oracle.truffle.runtime.hotspot.libgraal.BinaryOutput.ByteArrayBinaryOutput; import jdk.vm.ci.code.InstalledCode; import jdk.vm.ci.hotspot.HotSpotSpeculationLog; diff --git a/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/hotspot/libgraal/TruffleToLibGraalCalls.java b/truffle/src/com.oracle.truffle.runtime/src/com/oracle/truffle/runtime/hotspot/libgraal/TruffleToLibGraalCalls.java similarity index 99% rename from truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/hotspot/libgraal/TruffleToLibGraalCalls.java rename to truffle/src/com.oracle.truffle.runtime/src/com/oracle/truffle/runtime/hotspot/libgraal/TruffleToLibGraalCalls.java index 4de0848a0834..6642caddb409 100644 --- a/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/hotspot/libgraal/TruffleToLibGraalCalls.java +++ b/truffle/src/com.oracle.truffle.runtime/src/com/oracle/truffle/runtime/hotspot/libgraal/TruffleToLibGraalCalls.java @@ -38,7 +38,7 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ -package org.graalvm.compiler.truffle.runtime.hotspot.libgraal; +package com.oracle.truffle.runtime.hotspot.libgraal; import static com.oracle.truffle.compiler.hotspot.libgraal.TruffleToLibGraal.Id.DoCompile; import static com.oracle.truffle.compiler.hotspot.libgraal.TruffleToLibGraal.Id.GetCompilerConfigurationFactoryName; diff --git a/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/jfr/CompilationEvent.java b/truffle/src/com.oracle.truffle.runtime/src/com/oracle/truffle/runtime/jfr/CompilationEvent.java similarity index 98% rename from truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/jfr/CompilationEvent.java rename to truffle/src/com.oracle.truffle.runtime/src/com/oracle/truffle/runtime/jfr/CompilationEvent.java index d5cbed5fff3b..2e85d28134ab 100644 --- a/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/jfr/CompilationEvent.java +++ b/truffle/src/com.oracle.truffle.runtime/src/com/oracle/truffle/runtime/jfr/CompilationEvent.java @@ -38,7 +38,7 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ -package org.graalvm.compiler.truffle.jfr; +package com.oracle.truffle.runtime.jfr; /** * The JFR event describing a Truffle compilation. diff --git a/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/jfr/CompilationStatisticsEvent.java b/truffle/src/com.oracle.truffle.runtime/src/com/oracle/truffle/runtime/jfr/CompilationStatisticsEvent.java similarity index 98% rename from truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/jfr/CompilationStatisticsEvent.java rename to truffle/src/com.oracle.truffle.runtime/src/com/oracle/truffle/runtime/jfr/CompilationStatisticsEvent.java index 0b5431c37109..7e7bb5d3c48e 100644 --- a/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/jfr/CompilationStatisticsEvent.java +++ b/truffle/src/com.oracle.truffle.runtime/src/com/oracle/truffle/runtime/jfr/CompilationStatisticsEvent.java @@ -38,7 +38,7 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ -package org.graalvm.compiler.truffle.jfr; +package com.oracle.truffle.runtime.jfr; public interface CompilationStatisticsEvent extends Event { diff --git a/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/jfr/DeoptimizationEvent.java b/truffle/src/com.oracle.truffle.runtime/src/com/oracle/truffle/runtime/jfr/DeoptimizationEvent.java similarity index 98% rename from truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/jfr/DeoptimizationEvent.java rename to truffle/src/com.oracle.truffle.runtime/src/com/oracle/truffle/runtime/jfr/DeoptimizationEvent.java index 471d6dc6c1ac..ba291db11c47 100644 --- a/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/jfr/DeoptimizationEvent.java +++ b/truffle/src/com.oracle.truffle.runtime/src/com/oracle/truffle/runtime/jfr/DeoptimizationEvent.java @@ -38,7 +38,7 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ -package org.graalvm.compiler.truffle.jfr; +package com.oracle.truffle.runtime.jfr; public interface DeoptimizationEvent extends RootFunctionEvent { } diff --git a/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/jfr/Event.java b/truffle/src/com.oracle.truffle.runtime/src/com/oracle/truffle/runtime/jfr/Event.java similarity index 98% rename from truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/jfr/Event.java rename to truffle/src/com.oracle.truffle.runtime/src/com/oracle/truffle/runtime/jfr/Event.java index 0b65f17c20ed..a301b020590e 100644 --- a/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/jfr/Event.java +++ b/truffle/src/com.oracle.truffle.runtime/src/com/oracle/truffle/runtime/jfr/Event.java @@ -38,7 +38,7 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ -package org.graalvm.compiler.truffle.jfr; +package com.oracle.truffle.runtime.jfr; public interface Event { diff --git a/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/jfr/EventFactory.java b/truffle/src/com.oracle.truffle.runtime/src/com/oracle/truffle/runtime/jfr/EventFactory.java similarity index 98% rename from truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/jfr/EventFactory.java rename to truffle/src/com.oracle.truffle.runtime/src/com/oracle/truffle/runtime/jfr/EventFactory.java index 82adcdf5aa14..0815f347cd2b 100644 --- a/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/jfr/EventFactory.java +++ b/truffle/src/com.oracle.truffle.runtime/src/com/oracle/truffle/runtime/jfr/EventFactory.java @@ -38,7 +38,7 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ -package org.graalvm.compiler.truffle.jfr; +package com.oracle.truffle.runtime.jfr; import java.lang.annotation.Annotation; diff --git a/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/jfr/InvalidationEvent.java b/truffle/src/com.oracle.truffle.runtime/src/com/oracle/truffle/runtime/jfr/InvalidationEvent.java similarity index 98% rename from truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/jfr/InvalidationEvent.java rename to truffle/src/com.oracle.truffle.runtime/src/com/oracle/truffle/runtime/jfr/InvalidationEvent.java index 9041810361bf..527af872e1d4 100644 --- a/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/jfr/InvalidationEvent.java +++ b/truffle/src/com.oracle.truffle.runtime/src/com/oracle/truffle/runtime/jfr/InvalidationEvent.java @@ -38,7 +38,7 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ -package org.graalvm.compiler.truffle.jfr; +package com.oracle.truffle.runtime.jfr; public interface InvalidationEvent extends RootFunctionEvent { diff --git a/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/jfr/RootFunctionEvent.java b/truffle/src/com.oracle.truffle.runtime/src/com/oracle/truffle/runtime/jfr/RootFunctionEvent.java similarity index 98% rename from truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/jfr/RootFunctionEvent.java rename to truffle/src/com.oracle.truffle.runtime/src/com/oracle/truffle/runtime/jfr/RootFunctionEvent.java index b9e95590668a..7685e41f40ce 100644 --- a/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/jfr/RootFunctionEvent.java +++ b/truffle/src/com.oracle.truffle.runtime/src/com/oracle/truffle/runtime/jfr/RootFunctionEvent.java @@ -38,7 +38,7 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ -package org.graalvm.compiler.truffle.jfr; +package com.oracle.truffle.runtime.jfr; import com.oracle.truffle.api.RootCallTarget; diff --git a/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/jfr/impl/CompilationEventImpl.java b/truffle/src/com.oracle.truffle.runtime/src/com/oracle/truffle/runtime/jfr/impl/CompilationEventImpl.java similarity index 97% rename from truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/jfr/impl/CompilationEventImpl.java rename to truffle/src/com.oracle.truffle.runtime/src/com/oracle/truffle/runtime/jfr/impl/CompilationEventImpl.java index fd1418866021..3733cedd2974 100644 --- a/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/jfr/impl/CompilationEventImpl.java +++ b/truffle/src/com.oracle.truffle.runtime/src/com/oracle/truffle/runtime/jfr/impl/CompilationEventImpl.java @@ -38,7 +38,9 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ -package org.graalvm.compiler.truffle.jfr.impl; +package com.oracle.truffle.runtime.jfr.impl; + +import com.oracle.truffle.runtime.jfr.CompilationEvent; import jdk.jfr.BooleanFlag; import jdk.jfr.Category; @@ -49,7 +51,6 @@ import jdk.jfr.Name; import jdk.jfr.StackTrace; import jdk.jfr.Unsigned; -import org.graalvm.compiler.truffle.jfr.CompilationEvent; @Name("org.graalvm.compiler.truffle.Compilation") @Category("Truffle Compiler") diff --git a/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/jfr/impl/CompilationFailureEventImpl.java b/truffle/src/com.oracle.truffle.runtime/src/com/oracle/truffle/runtime/jfr/impl/CompilationFailureEventImpl.java similarity index 98% rename from truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/jfr/impl/CompilationFailureEventImpl.java rename to truffle/src/com.oracle.truffle.runtime/src/com/oracle/truffle/runtime/jfr/impl/CompilationFailureEventImpl.java index 5c5549b3a27d..15e3b8902f25 100644 --- a/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/jfr/impl/CompilationFailureEventImpl.java +++ b/truffle/src/com.oracle.truffle.runtime/src/com/oracle/truffle/runtime/jfr/impl/CompilationFailureEventImpl.java @@ -38,7 +38,7 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ -package org.graalvm.compiler.truffle.jfr.impl; +package com.oracle.truffle.runtime.jfr.impl; import jdk.jfr.BooleanFlag; import jdk.jfr.Category; diff --git a/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/jfr/impl/CompilationStatisticsEventImpl.java b/truffle/src/com.oracle.truffle.runtime/src/com/oracle/truffle/runtime/jfr/impl/CompilationStatisticsEventImpl.java similarity index 97% rename from truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/jfr/impl/CompilationStatisticsEventImpl.java rename to truffle/src/com.oracle.truffle.runtime/src/com/oracle/truffle/runtime/jfr/impl/CompilationStatisticsEventImpl.java index 7c91b937c4df..db688dd92d1a 100644 --- a/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/jfr/impl/CompilationStatisticsEventImpl.java +++ b/truffle/src/com.oracle.truffle.runtime/src/com/oracle/truffle/runtime/jfr/impl/CompilationStatisticsEventImpl.java @@ -38,7 +38,9 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ -package org.graalvm.compiler.truffle.jfr.impl; +package com.oracle.truffle.runtime.jfr.impl; + +import com.oracle.truffle.runtime.jfr.CompilationStatisticsEvent; import jdk.jfr.Category; import jdk.jfr.Description; @@ -50,7 +52,6 @@ import jdk.jfr.StackTrace; import jdk.jfr.Timespan; import jdk.jfr.Unsigned; -import org.graalvm.compiler.truffle.jfr.CompilationStatisticsEvent; @Name("org.graalvm.compiler.truffle.CompilerStatistics") @Category("Truffle Compiler") diff --git a/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/jfr/impl/DeoptimizationEventImpl.java b/truffle/src/com.oracle.truffle.runtime/src/com/oracle/truffle/runtime/jfr/impl/DeoptimizationEventImpl.java similarity index 95% rename from truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/jfr/impl/DeoptimizationEventImpl.java rename to truffle/src/com.oracle.truffle.runtime/src/com/oracle/truffle/runtime/jfr/impl/DeoptimizationEventImpl.java index 26f9180b4451..9cafa9a20427 100644 --- a/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/jfr/impl/DeoptimizationEventImpl.java +++ b/truffle/src/com.oracle.truffle.runtime/src/com/oracle/truffle/runtime/jfr/impl/DeoptimizationEventImpl.java @@ -38,14 +38,15 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ -package org.graalvm.compiler.truffle.jfr.impl; +package com.oracle.truffle.runtime.jfr.impl; + +import com.oracle.truffle.runtime.jfr.DeoptimizationEvent; import jdk.jfr.Category; import jdk.jfr.Description; import jdk.jfr.Label; import jdk.jfr.Name; import jdk.jfr.StackTrace; -import org.graalvm.compiler.truffle.jfr.DeoptimizationEvent; @Name("org.graalvm.compiler.truffle.Deoptimization") @Category("Truffle Compiler") diff --git a/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/jfr/impl/EventFactoryImpl.java b/truffle/src/com.oracle.truffle.runtime/src/com/oracle/truffle/runtime/jfr/impl/EventFactoryImpl.java similarity index 92% rename from truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/jfr/impl/EventFactoryImpl.java rename to truffle/src/com.oracle.truffle.runtime/src/com/oracle/truffle/runtime/jfr/impl/EventFactoryImpl.java index 7fa2d188c9d6..9ef657d94ba9 100644 --- a/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/jfr/impl/EventFactoryImpl.java +++ b/truffle/src/com.oracle.truffle.runtime/src/com/oracle/truffle/runtime/jfr/impl/EventFactoryImpl.java @@ -38,21 +38,23 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ -package org.graalvm.compiler.truffle.jfr.impl; +package com.oracle.truffle.runtime.jfr.impl; import java.lang.annotation.Annotation; import java.util.HashMap; import java.util.Map; import java.util.Objects; + +import com.oracle.truffle.runtime.jfr.CompilationEvent; +import com.oracle.truffle.runtime.jfr.CompilationStatisticsEvent; +import com.oracle.truffle.runtime.jfr.DeoptimizationEvent; +import com.oracle.truffle.runtime.jfr.Event; +import com.oracle.truffle.runtime.jfr.EventFactory; +import com.oracle.truffle.runtime.jfr.InvalidationEvent; + import jdk.jfr.FlightRecorder; import jdk.jfr.FlightRecorderListener; import jdk.jfr.Name; -import org.graalvm.compiler.truffle.jfr.Event; -import org.graalvm.compiler.truffle.jfr.EventFactory; -import org.graalvm.compiler.truffle.jfr.CompilationEvent; -import org.graalvm.compiler.truffle.jfr.CompilationStatisticsEvent; -import org.graalvm.compiler.truffle.jfr.DeoptimizationEvent; -import org.graalvm.compiler.truffle.jfr.InvalidationEvent; final class EventFactoryImpl implements EventFactory { diff --git a/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/jfr/impl/InvalidationEventImpl.java b/truffle/src/com.oracle.truffle.runtime/src/com/oracle/truffle/runtime/jfr/impl/InvalidationEventImpl.java similarity index 96% rename from truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/jfr/impl/InvalidationEventImpl.java rename to truffle/src/com.oracle.truffle.runtime/src/com/oracle/truffle/runtime/jfr/impl/InvalidationEventImpl.java index 48d3490cb616..bbe448fa9015 100644 --- a/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/jfr/impl/InvalidationEventImpl.java +++ b/truffle/src/com.oracle.truffle.runtime/src/com/oracle/truffle/runtime/jfr/impl/InvalidationEventImpl.java @@ -38,14 +38,15 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ -package org.graalvm.compiler.truffle.jfr.impl; +package com.oracle.truffle.runtime.jfr.impl; + +import com.oracle.truffle.runtime.jfr.InvalidationEvent; import jdk.jfr.Category; import jdk.jfr.Description; import jdk.jfr.Label; import jdk.jfr.Name; import jdk.jfr.StackTrace; -import org.graalvm.compiler.truffle.jfr.InvalidationEvent; @Name("org.graalvm.compiler.truffle.AssumptionInvalidation") @Category("Truffle Compiler") diff --git a/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/jfr/impl/ProviderImpl.java b/truffle/src/com.oracle.truffle.runtime/src/com/oracle/truffle/runtime/jfr/impl/ProviderImpl.java similarity index 95% rename from truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/jfr/impl/ProviderImpl.java rename to truffle/src/com.oracle.truffle.runtime/src/com/oracle/truffle/runtime/jfr/impl/ProviderImpl.java index f33031bcaa6d..4a34e780bf47 100644 --- a/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/jfr/impl/ProviderImpl.java +++ b/truffle/src/com.oracle.truffle.runtime/src/com/oracle/truffle/runtime/jfr/impl/ProviderImpl.java @@ -38,10 +38,11 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ -package org.graalvm.compiler.truffle.jfr.impl; +package com.oracle.truffle.runtime.jfr.impl; + +import com.oracle.truffle.runtime.jfr.EventFactory; import jdk.jfr.FlightRecorder; -import org.graalvm.compiler.truffle.jfr.EventFactory; public final class ProviderImpl implements EventFactory.Provider { @Override diff --git a/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/jfr/impl/RootFunctionEventImpl.java b/truffle/src/com.oracle.truffle.runtime/src/com/oracle/truffle/runtime/jfr/impl/RootFunctionEventImpl.java similarity index 97% rename from truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/jfr/impl/RootFunctionEventImpl.java rename to truffle/src/com.oracle.truffle.runtime/src/com/oracle/truffle/runtime/jfr/impl/RootFunctionEventImpl.java index 108ac48bfbd0..8e28a05807b4 100644 --- a/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/jfr/impl/RootFunctionEventImpl.java +++ b/truffle/src/com.oracle.truffle.runtime/src/com/oracle/truffle/runtime/jfr/impl/RootFunctionEventImpl.java @@ -38,7 +38,7 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ -package org.graalvm.compiler.truffle.jfr.impl; +package com.oracle.truffle.runtime.jfr.impl; import com.oracle.truffle.api.nodes.LanguageInfo; import jdk.jfr.Event; @@ -46,8 +46,8 @@ import jdk.jfr.Description; import com.oracle.truffle.api.RootCallTarget; import com.oracle.truffle.api.source.SourceSection; +import com.oracle.truffle.runtime.jfr.RootFunctionEvent; import com.oracle.truffle.api.nodes.RootNode; -import org.graalvm.compiler.truffle.jfr.RootFunctionEvent; abstract class RootFunctionEventImpl extends Event implements RootFunctionEvent { diff --git a/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/serviceprovider/TruffleRuntimeServices.java b/truffle/src/com.oracle.truffle.runtime/src/com/oracle/truffle/runtime/serviceprovider/TruffleRuntimeServices.java similarity index 97% rename from truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/serviceprovider/TruffleRuntimeServices.java rename to truffle/src/com.oracle.truffle.runtime/src/com/oracle/truffle/runtime/serviceprovider/TruffleRuntimeServices.java index 1dd5d5e7a340..a38bd1058e2e 100644 --- a/truffle/src/com.oracle.truffle.runtime/src/org/graalvm/compiler/truffle/runtime/serviceprovider/TruffleRuntimeServices.java +++ b/truffle/src/com.oracle.truffle.runtime/src/com/oracle/truffle/runtime/serviceprovider/TruffleRuntimeServices.java @@ -38,7 +38,7 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ -package org.graalvm.compiler.truffle.runtime.serviceprovider; +package com.oracle.truffle.runtime.serviceprovider; import java.util.ServiceLoader; diff --git a/truffle/src/org.graalvm.compiler.truffle.libgraal.truffleattach/src/truffle_attach.cc b/truffle/src/org.graalvm.compiler.truffle.libgraal.truffleattach/src/truffle_attach.cc index 0b1a480bb8e6..d714c6708ce9 100644 --- a/truffle/src/org.graalvm.compiler.truffle.libgraal.truffleattach/src/truffle_attach.cc +++ b/truffle/src/org.graalvm.compiler.truffle.libgraal.truffleattach/src/truffle_attach.cc @@ -47,7 +47,7 @@ static void addExports(JNIEnv* jniEnv, jobject m1, jobject pn, jobject m2) { extern "C" { #endif -JNIEXPORT void JNICALL Java_org_graalvm_compiler_truffle_runtime_ModulesSupport_addExports0(JNIEnv *env, jclass clz, jobject m1, jobject pn, jobject m2) { +JNIEXPORT void JNICALL Java_com_oracle_truffle_runtime_ModulesSupport_addExports0(JNIEnv *env, jclass clz, jobject m1, jobject pn, jobject m2) { addExports(env, m1, pn, m2); } diff --git a/wasm/README.md b/wasm/README.md index c3421e38b84c..600168e4bb37 100644 --- a/wasm/README.md +++ b/wasm/README.md @@ -91,7 +91,7 @@ $ mx --dy /truffle,/compiler --jdk jvmci unittest \ -Dwasmtest.watToWasmExecutable=$WABT_DIR/wat2wasm \ -Dwasmtest.testFilter="^.*branch.*\$" \ WasmTestSuite -``` +`` This command results in the following output: @@ -99,7 +99,7 @@ This command results in the following output: -------------------------------------------------------------------------------- Running: BranchBlockSuite (4/16 tests - you have enabled filters) -------------------------------------------------------------------------------- -Using runtime: org.graalvm.compiler.truffle.runtime.hotspot.java.HotSpotTruffleRuntime@7b1d7fff +Using runtime: com.oracle.truffle.runtime.hotspot.HotSpotTruffleRuntime@7b1d7fff 😍😍😍😍 Finished running: BranchBlockSuite 🍀 4/4 Wasm tests passed. @@ -179,7 +179,7 @@ This will result in the following output: -------------------------------------------------------------------------------- Running: CSuite (1 tests) -------------------------------------------------------------------------------- -Using runtime: org.graalvm.compiler.truffle.runtime.hotspot.java.HotSpotTruffleRuntime@368239c8 +Using runtime: com.oracle.truffle.runtime.hotspot.HotSpotTruffleRuntime@368239c8 😍 Finished running: CSuite 🍀 1/1 Wasm tests passed. From f1a11374a5d782d7c79cbaca67644428127f6206 Mon Sep 17 00:00:00 2001 From: Christian Humer Date: Fri, 30 Jun 2023 16:38:37 +0200 Subject: [PATCH 18/43] Refactor Truffle runtime classes to consistently use optimizing prefix. (breaking change for runtime dependencies) --- .../core/test/VerifyBailoutUsage.java | 2 +- .../core/test/VerifyUnsafeAccess.java | 2 +- .../test/AbstractSplittingStrategyTest.java | 8 +-- .../truffle/test/BytecodeOSRNodeTest.java | 4 +- .../truffle/test/CompilationMemoryTest.java | 10 +-- .../test/CompilerInitializationTest.java | 4 +- .../truffle/test/CompilerLoggingTest.java | 16 ++--- .../test/ContextLookupCompilationTest.java | 8 +-- .../truffle/test/DeoptInvalidateListener.java | 4 +- .../truffle/test/EncodedGraphCacheTest.java | 4 +- .../compiler/truffle/test/EngineModeTest.java | 6 +- .../truffle/test/ExceptionActionTest.java | 4 +- .../test/ExitDuringCompilationTest.java | 8 +-- .../test/GraalTruffleRuntimeListenerTest.java | 18 ++--- .../truffle/test/IndirectCallSiteTest.java | 6 +- .../truffle/test/OptimizedCallTargetTest.java | 4 +- .../test/OptimizedOSRLoopNodeTest.java | 4 +- .../truffle/test/PartialEvaluationTest.java | 4 +- .../truffle/test/PerformanceWarningTest.java | 4 +- ...agateHotnessToLexicalSingleCallerTest.java | 6 +- .../test/TransferToInterpreterTest.java | 4 +- .../test/TruffleBoundaryExceptionsTest.java | 8 +-- .../truffle/test/TruffleCompilerImplTest.java | 6 +- .../truffle/test/TruffleRuntimeTest.java | 2 +- ...ffleToTruffleCallExceptionHandlerTest.java | 4 +- .../test/builtins/SLGraalRuntimeBuiltin.java | 4 +- .../SLWaitForOptimizationBuiltin.java | 4 +- .../libgraal/JNIExceptionWrapperTest.java | 4 +- .../truffle/api/SubstrateFastThreadLocal.java | 4 +- .../truffle/api/SubstrateTruffleRuntime.java | 4 +- .../chromeinspector/test/EnginesGCedTest.java | 2 +- .../com/oracle/truffle/api/impl/Accessor.java | 2 +- .../AbstractGraalTruffleRuntimeListener.java | 6 +- .../runtime/BackgroundCompileQueue.java | 10 +-- .../truffle/runtime/BytecodeOSRMetadata.java | 8 +-- .../truffle/runtime/BytecodeOSRRootNode.java | 2 +- .../truffle/runtime/CompilationTask.java | 2 +- .../runtime/DynamicThresholdsQueue.java | 2 +- .../truffle/runtime/EngineCacheSupport.java | 4 +- .../oracle/truffle/runtime/EngineData.java | 22 +++--- .../truffle/runtime/FloodControlHandler.java | 2 +- .../truffle/runtime/LoopNodeFactory.java | 2 +- .../truffle/runtime/ModulesSupport.java | 12 +++- .../truffle/runtime/OptimizedAssumption.java | 2 +- .../truffle/runtime/OptimizedBlockNode.java | 4 +- .../truffle/runtime/OptimizedCallTarget.java | 40 +++++------ .../runtime/OptimizedDirectCallNode.java | 2 +- ...cal.java => OptimizedFastThreadLocal.java} | 4 +- ...tance.java => OptimizedFrameInstance.java} | 8 +-- .../runtime/OptimizedIndirectCallNode.java | 2 +- ...ce.java => OptimizedOSRFrameInstance.java} | 6 +- .../truffle/runtime/OptimizedOSRLoopNode.java | 4 +- ...sor.java => OptimizedRuntimeAccessor.java} | 6 +- ...a => OptimizedRuntimeServiceProvider.java} | 2 +- ...port.java => OptimizedRuntimeSupport.java} | 34 ++++----- .../{GraalTVMCI.java => OptimizedTVMCI.java} | 8 +-- ...TestTVMCI.java => OptimizedTestTVMCI.java} | 4 +- ...time.java => OptimizedTruffleRuntime.java} | 70 +++++++++---------- ...a => OptimizedTruffleRuntimeListener.java} | 6 +- ...izedTruffleRuntimeListenerDispatcher.java} | 14 ++-- .../runtime/TruffleSplittingStrategy.java | 6 +- .../oracle/truffle/runtime/TruffleTypes.java | 2 +- .../truffle/runtime/debug/JFRListener.java | 6 +- .../runtime/debug/StatisticsListener.java | 12 ++-- .../debug/TraceASTCompilationListener.java | 6 +- .../debug/TraceCompilationListener.java | 10 +-- .../TraceCompilationPolymorphismListener.java | 6 +- .../runtime/debug/TraceSplittingListener.java | 12 ++-- .../hotspot/HotSpotFastThreadLocal.java | 4 +- .../hotspot/HotSpotTruffleRuntime.java | 6 +- 70 files changed, 269 insertions(+), 263 deletions(-) rename truffle/src/com.oracle.truffle.runtime/src/com/oracle/truffle/runtime/{GraalFastThreadLocal.java => OptimizedFastThreadLocal.java} (96%) rename truffle/src/com.oracle.truffle.runtime/src/com/oracle/truffle/runtime/{GraalFrameInstance.java => OptimizedFrameInstance.java} (92%) rename truffle/src/com.oracle.truffle.runtime/src/com/oracle/truffle/runtime/{GraalOSRFrameInstance.java => OptimizedOSRFrameInstance.java} (92%) rename truffle/src/com.oracle.truffle.runtime/src/com/oracle/truffle/runtime/{GraalRuntimeAccessor.java => OptimizedRuntimeAccessor.java} (93%) rename truffle/src/com.oracle.truffle.runtime/src/com/oracle/truffle/runtime/{GraalRuntimeServiceProvider.java => OptimizedRuntimeServiceProvider.java} (97%) rename truffle/src/com.oracle.truffle.runtime/src/com/oracle/truffle/runtime/{GraalRuntimeSupport.java => OptimizedRuntimeSupport.java} (90%) rename truffle/src/com.oracle.truffle.runtime/src/com/oracle/truffle/runtime/{GraalTVMCI.java => OptimizedTVMCI.java} (91%) rename truffle/src/com.oracle.truffle.runtime/src/com/oracle/truffle/runtime/{GraalTestTVMCI.java => OptimizedTestTVMCI.java} (94%) rename truffle/src/com.oracle.truffle.runtime/src/com/oracle/truffle/runtime/{GraalTruffleRuntime.java => OptimizedTruffleRuntime.java} (95%) rename truffle/src/com.oracle.truffle.runtime/src/com/oracle/truffle/runtime/{GraalTruffleRuntimeListener.java => OptimizedTruffleRuntimeListener.java} (98%) rename truffle/src/com.oracle.truffle.runtime/src/com/oracle/truffle/runtime/{GraalTruffleRuntimeListenerDispatcher.java => OptimizedTruffleRuntimeListenerDispatcher.java} (91%) diff --git a/compiler/src/jdk.internal.vm.compiler.test/src/org/graalvm/compiler/core/test/VerifyBailoutUsage.java b/compiler/src/jdk.internal.vm.compiler.test/src/org/graalvm/compiler/core/test/VerifyBailoutUsage.java index acc91efe54b5..6e532341187f 100644 --- a/compiler/src/jdk.internal.vm.compiler.test/src/org/graalvm/compiler/core/test/VerifyBailoutUsage.java +++ b/compiler/src/jdk.internal.vm.compiler.test/src/org/graalvm/compiler/core/test/VerifyBailoutUsage.java @@ -52,7 +52,7 @@ private static String getPackageName(Class c) { getPackageName(PermanentBailoutException.class), "jdk.vm.ci", - // Allows GraalTruffleRuntime.handleAnnotationFailure to throw + // Allows OptimizedTruffleRuntime.handleAnnotationFailure to throw // a BailoutException since the com.oracle.truffle.runtime // project can not see the PermanentBailoutException or // RetryableBailoutException types. diff --git a/compiler/src/jdk.internal.vm.compiler.test/src/org/graalvm/compiler/core/test/VerifyUnsafeAccess.java b/compiler/src/jdk.internal.vm.compiler.test/src/org/graalvm/compiler/core/test/VerifyUnsafeAccess.java index 1c753f2f0724..fe46883700ca 100644 --- a/compiler/src/jdk.internal.vm.compiler.test/src/org/graalvm/compiler/core/test/VerifyUnsafeAccess.java +++ b/compiler/src/jdk.internal.vm.compiler.test/src/org/graalvm/compiler/core/test/VerifyUnsafeAccess.java @@ -63,7 +63,7 @@ protected void verify(StructuredGraph graph, CoreProviders context) { // This is the blessed way access Unsafe in Graal and JVMCI return; } else if (packageName.startsWith("com.oracle.truffle") || packageName.startsWith("com.oracle.truffle.runtime")) { - // Truffle and GraalTruffleRuntime do not depend on Graal and so cannot use + // Truffle and OptimizedTruffleRuntime do not depend on Graal and so cannot use // GraalUnsafeAccess return; } diff --git a/compiler/src/jdk.internal.vm.compiler.test/src/org/graalvm/compiler/truffle/test/AbstractSplittingStrategyTest.java b/compiler/src/jdk.internal.vm.compiler.test/src/org/graalvm/compiler/truffle/test/AbstractSplittingStrategyTest.java index c6d7fcd7daf7..8f8b945a6667 100644 --- a/compiler/src/jdk.internal.vm.compiler.test/src/org/graalvm/compiler/truffle/test/AbstractSplittingStrategyTest.java +++ b/compiler/src/jdk.internal.vm.compiler.test/src/org/graalvm/compiler/truffle/test/AbstractSplittingStrategyTest.java @@ -38,14 +38,14 @@ import com.oracle.truffle.api.nodes.NodeCost; import com.oracle.truffle.api.nodes.RootNode; import com.oracle.truffle.api.test.ReflectionUtils; -import com.oracle.truffle.runtime.GraalTruffleRuntime; -import com.oracle.truffle.runtime.GraalTruffleRuntimeListener; +import com.oracle.truffle.runtime.OptimizedTruffleRuntime; +import com.oracle.truffle.runtime.OptimizedTruffleRuntimeListener; import com.oracle.truffle.runtime.OptimizedCallTarget; import com.oracle.truffle.runtime.OptimizedDirectCallNode; public class AbstractSplittingStrategyTest extends TestWithPolyglotOptions { - protected static final GraalTruffleRuntime runtime = (GraalTruffleRuntime) Truffle.getRuntime(); + protected static final OptimizedTruffleRuntime runtime = (OptimizedTruffleRuntime) Truffle.getRuntime(); static final Object[] noArguments = {}; protected SplitCountingListener listener; @@ -170,7 +170,7 @@ public void removeListener() { runtime.removeListener(listener); } - static class SplitCountingListener implements GraalTruffleRuntimeListener { + static class SplitCountingListener implements OptimizedTruffleRuntimeListener { int splitCount = 0; diff --git a/compiler/src/jdk.internal.vm.compiler.test/src/org/graalvm/compiler/truffle/test/BytecodeOSRNodeTest.java b/compiler/src/jdk.internal.vm.compiler.test/src/org/graalvm/compiler/truffle/test/BytecodeOSRNodeTest.java index 8c6665a33cdf..3c602db3cf5c 100644 --- a/compiler/src/jdk.internal.vm.compiler.test/src/org/graalvm/compiler/truffle/test/BytecodeOSRNodeTest.java +++ b/compiler/src/jdk.internal.vm.compiler.test/src/org/graalvm/compiler/truffle/test/BytecodeOSRNodeTest.java @@ -30,7 +30,7 @@ import com.oracle.truffle.api.test.SubprocessTestUtils; import com.oracle.truffle.runtime.BytecodeOSRMetadata; -import com.oracle.truffle.runtime.GraalTruffleRuntime; +import com.oracle.truffle.runtime.OptimizedTruffleRuntime; import com.oracle.truffle.runtime.OptimizedCallTarget; import org.graalvm.compiler.test.GraalTest; @@ -61,7 +61,7 @@ public class BytecodeOSRNodeTest extends TestWithSynchronousCompiling { - private static final GraalTruffleRuntime runtime = (GraalTruffleRuntime) Truffle.getRuntime(); + private static final OptimizedTruffleRuntime runtime = (OptimizedTruffleRuntime) Truffle.getRuntime(); @Rule public TestRule timeout = GraalTest.createTimeout(30, TimeUnit.SECONDS); diff --git a/compiler/src/jdk.internal.vm.compiler.test/src/org/graalvm/compiler/truffle/test/CompilationMemoryTest.java b/compiler/src/jdk.internal.vm.compiler.test/src/org/graalvm/compiler/truffle/test/CompilationMemoryTest.java index f8f05911655f..29abca34d896 100644 --- a/compiler/src/jdk.internal.vm.compiler.test/src/org/graalvm/compiler/truffle/test/CompilationMemoryTest.java +++ b/compiler/src/jdk.internal.vm.compiler.test/src/org/graalvm/compiler/truffle/test/CompilationMemoryTest.java @@ -38,8 +38,8 @@ import com.oracle.truffle.api.test.GCUtils; import com.oracle.truffle.compiler.TruffleCompilerListener; import com.oracle.truffle.runtime.AbstractCompilationTask; -import com.oracle.truffle.runtime.GraalTruffleRuntime; -import com.oracle.truffle.runtime.GraalTruffleRuntimeListener; +import com.oracle.truffle.runtime.OptimizedTruffleRuntime; +import com.oracle.truffle.runtime.OptimizedTruffleRuntimeListener; import com.oracle.truffle.runtime.OptimizedCallTarget; public class CompilationMemoryTest extends TestWithPolyglotOptions { @@ -54,13 +54,13 @@ public void testFieldsFreedAfterCompilation() throws InterruptedException { TestObject expected = new TestObject(); OptimizedCallTarget callTarget = (OptimizedCallTarget) RootNode.createConstantNode(expected).getCallTarget(); GraalTruffleRuntimeListenerImpl listener = new GraalTruffleRuntimeListenerImpl(callTarget); - GraalTruffleRuntime.getRuntime().addListener(listener); + OptimizedTruffleRuntime.getRuntime().addListener(listener); try { Assert.assertEquals(expected, callTarget.call()); Assert.assertEquals(expected, callTarget.call()); Assert.assertTrue(callTarget.isValid()); } finally { - GraalTruffleRuntime.getRuntime().removeListener(listener); + OptimizedTruffleRuntime.getRuntime().removeListener(listener); } Thread compilerTread = listener.thread; Assert.assertNotNull("Calltarget was not successfully compiled", compilerTread); @@ -88,7 +88,7 @@ private static boolean awaitDone(Thread t, long timeout) throws InterruptedExcep return false; } - private static final class GraalTruffleRuntimeListenerImpl implements GraalTruffleRuntimeListener { + private static final class GraalTruffleRuntimeListenerImpl implements OptimizedTruffleRuntimeListener { private volatile OptimizedCallTarget callTarget; volatile Thread thread; diff --git a/compiler/src/jdk.internal.vm.compiler.test/src/org/graalvm/compiler/truffle/test/CompilerInitializationTest.java b/compiler/src/jdk.internal.vm.compiler.test/src/org/graalvm/compiler/truffle/test/CompilerInitializationTest.java index e2523c4f6f45..9d94c90e5ada 100644 --- a/compiler/src/jdk.internal.vm.compiler.test/src/org/graalvm/compiler/truffle/test/CompilerInitializationTest.java +++ b/compiler/src/jdk.internal.vm.compiler.test/src/org/graalvm/compiler/truffle/test/CompilerInitializationTest.java @@ -39,7 +39,7 @@ import com.oracle.truffle.api.TruffleOptions; import com.oracle.truffle.api.instrumentation.test.InstrumentationTestLanguage; import com.oracle.truffle.api.test.ReflectionUtils; -import com.oracle.truffle.runtime.GraalTruffleRuntime; +import com.oracle.truffle.runtime.OptimizedTruffleRuntime; public class CompilerInitializationTest { @@ -102,7 +102,7 @@ public static void assertTruffleCompilerInitialized(boolean expected) throws Exc } private static Field compilerField() throws NoSuchFieldException { - Field f = GraalTruffleRuntime.class.getDeclaredField("truffleCompiler"); + Field f = OptimizedTruffleRuntime.class.getDeclaredField("truffleCompiler"); ReflectionUtils.setAccessible(f, true); return f; } diff --git a/compiler/src/jdk.internal.vm.compiler.test/src/org/graalvm/compiler/truffle/test/CompilerLoggingTest.java b/compiler/src/jdk.internal.vm.compiler.test/src/org/graalvm/compiler/truffle/test/CompilerLoggingTest.java index 52736c3a0b85..9927096d591a 100644 --- a/compiler/src/jdk.internal.vm.compiler.test/src/org/graalvm/compiler/truffle/test/CompilerLoggingTest.java +++ b/compiler/src/jdk.internal.vm.compiler.test/src/org/graalvm/compiler/truffle/test/CompilerLoggingTest.java @@ -46,8 +46,8 @@ import com.oracle.truffle.compiler.TruffleCompiler; import com.oracle.truffle.compiler.TruffleCompilerListener; import com.oracle.truffle.runtime.AbstractCompilationTask; -import com.oracle.truffle.runtime.GraalTruffleRuntime; -import com.oracle.truffle.runtime.GraalTruffleRuntimeListener; +import com.oracle.truffle.runtime.OptimizedTruffleRuntime; +import com.oracle.truffle.runtime.OptimizedTruffleRuntimeListener; import com.oracle.truffle.runtime.OptimizedCallTarget; import static org.junit.Assert.assertFalse; @@ -63,13 +63,13 @@ public class CompilerLoggingTest extends TestWithPolyglotOptions { @Test public void testLogging() throws IOException { if (!TruffleOptions.AOT) { - GraalTruffleRuntime runtime = GraalTruffleRuntime.getRuntime(); + OptimizedTruffleRuntime runtime = OptimizedTruffleRuntime.getRuntime(); TruffleCompiler compiler = runtime.newTruffleCompiler(); Assume.assumeTrue("Not supported in isolated compiler.", compiler instanceof TruffleCompilerImpl); } try (ByteArrayOutputStream logOut = new ByteArrayOutputStream()) { setupContext(Context.newBuilder().logHandler(logOut).option("engine.CompileImmediately", "true").option("engine.MultiTier", "false").option("engine.BackgroundCompilation", "false")); - GraalTruffleRuntime runtime = GraalTruffleRuntime.getRuntime(); + OptimizedTruffleRuntime runtime = OptimizedTruffleRuntime.getRuntime(); TestListener listener = new TestListener(); try { runtime.addListener(listener); @@ -84,7 +84,7 @@ public void testLogging() throws IOException { } } - private static final class TestListener implements GraalTruffleRuntimeListener { + private static final class TestListener implements OptimizedTruffleRuntimeListener { @Override public void onCompilationSuccess(OptimizedCallTarget target, AbstractCompilationTask task, TruffleCompilerListener.GraphInfo graph, @@ -127,8 +127,8 @@ public void testGR46391() throws InterruptedException, BrokenBarrierException, T private void testGR46391Impl(String testName, Context.Builder builder) throws InterruptedException, BrokenBarrierException, TimeoutException { CyclicBarrier barrier = new CyclicBarrier(2); String rootName = String.format("%s.%s", TestRootNode.class.getName(), testName); - GraalTruffleRuntimeListener listener = new LogAfterEngineClose(rootName, barrier); - var runtime = GraalTruffleRuntime.getRuntime(); + OptimizedTruffleRuntimeListener listener = new LogAfterEngineClose(rootName, barrier); + var runtime = OptimizedTruffleRuntime.getRuntime(); runtime.addListener(listener); try { builder.option("engine.CompileImmediately", "true"); @@ -169,7 +169,7 @@ public Object execute(VirtualFrame frame) { } } - private static final class LogAfterEngineClose implements GraalTruffleRuntimeListener { + private static final class LogAfterEngineClose implements OptimizedTruffleRuntimeListener { private static final String BEFORE_CLOSE = String.format("%s#BEFORE CLOSE", LogAfterEngineClose.class.getSimpleName()); private static final String AFTER_CLOSE = String.format("%s#AFTER CLOSE", LogAfterEngineClose.class.getSimpleName()); private final String expectedRootName; diff --git a/compiler/src/jdk.internal.vm.compiler.test/src/org/graalvm/compiler/truffle/test/ContextLookupCompilationTest.java b/compiler/src/jdk.internal.vm.compiler.test/src/org/graalvm/compiler/truffle/test/ContextLookupCompilationTest.java index 5bcb87aba4fa..bbc580aa67fd 100644 --- a/compiler/src/jdk.internal.vm.compiler.test/src/org/graalvm/compiler/truffle/test/ContextLookupCompilationTest.java +++ b/compiler/src/jdk.internal.vm.compiler.test/src/org/graalvm/compiler/truffle/test/ContextLookupCompilationTest.java @@ -60,7 +60,7 @@ import com.oracle.truffle.api.frame.VirtualFrame; import com.oracle.truffle.api.nodes.ExplodeLoop; import com.oracle.truffle.api.nodes.RootNode; -import com.oracle.truffle.runtime.GraalTruffleRuntime; +import com.oracle.truffle.runtime.OptimizedTruffleRuntime; import com.oracle.truffle.runtime.OptimizedCallTarget; import jdk.vm.ci.code.BailoutException; @@ -96,12 +96,12 @@ private static Context createContext(Engine engine, String... languages) { } /* - * This test verifies that JVMCI has all the features it needs for a GraalTruffleRuntime. + * This test verifies that JVMCI has all the features it needs for a OptimizedTruffleRuntime. */ @Test public void testJVMCIIsLatest() { - Assume.assumeTrue(Truffle.getRuntime() instanceof GraalTruffleRuntime); - GraalTruffleRuntime runtime = (GraalTruffleRuntime) Truffle.getRuntime(); + Assume.assumeTrue(Truffle.getRuntime() instanceof OptimizedTruffleRuntime); + OptimizedTruffleRuntime runtime = (OptimizedTruffleRuntime) Truffle.getRuntime(); assertTrue(runtime.isLatestJVMCI()); } diff --git a/compiler/src/jdk.internal.vm.compiler.test/src/org/graalvm/compiler/truffle/test/DeoptInvalidateListener.java b/compiler/src/jdk.internal.vm.compiler.test/src/org/graalvm/compiler/truffle/test/DeoptInvalidateListener.java index 8516e06ee6ab..52b00cb1b89b 100644 --- a/compiler/src/jdk.internal.vm.compiler.test/src/org/graalvm/compiler/truffle/test/DeoptInvalidateListener.java +++ b/compiler/src/jdk.internal.vm.compiler.test/src/org/graalvm/compiler/truffle/test/DeoptInvalidateListener.java @@ -26,7 +26,7 @@ import com.oracle.truffle.api.frame.Frame; import com.oracle.truffle.runtime.AbstractGraalTruffleRuntimeListener; -import com.oracle.truffle.runtime.GraalTruffleRuntime; +import com.oracle.truffle.runtime.OptimizedTruffleRuntime; import com.oracle.truffle.runtime.OptimizedCallTarget; import org.junit.Assert; @@ -38,7 +38,7 @@ public class DeoptInvalidateListener extends AbstractGraalTruffleRuntimeListener boolean invalidated = false; @SuppressWarnings("this-escape") - protected DeoptInvalidateListener(GraalTruffleRuntime runtime, OptimizedCallTarget focus) { + protected DeoptInvalidateListener(OptimizedTruffleRuntime runtime, OptimizedCallTarget focus) { super(runtime); this.focus = focus; runtime.addListener(this); diff --git a/compiler/src/jdk.internal.vm.compiler.test/src/org/graalvm/compiler/truffle/test/EncodedGraphCacheTest.java b/compiler/src/jdk.internal.vm.compiler.test/src/org/graalvm/compiler/truffle/test/EncodedGraphCacheTest.java index c644587a5e7d..20063c60ba0d 100644 --- a/compiler/src/jdk.internal.vm.compiler.test/src/org/graalvm/compiler/truffle/test/EncodedGraphCacheTest.java +++ b/compiler/src/jdk.internal.vm.compiler.test/src/org/graalvm/compiler/truffle/test/EncodedGraphCacheTest.java @@ -46,7 +46,7 @@ import com.oracle.truffle.api.frame.VirtualFrame; import com.oracle.truffle.api.nodes.RootNode; import com.oracle.truffle.compiler.TruffleCompilationTask; -import com.oracle.truffle.runtime.GraalTruffleRuntime; +import com.oracle.truffle.runtime.OptimizedTruffleRuntime; import com.oracle.truffle.runtime.OptimizedCallTarget; import com.oracle.truffle.runtime.OptimizedRuntimeOptions; @@ -96,7 +96,7 @@ static void runWithBooleanFlag(TruffleCompilerImpl truffleCompiler, BiFunction verifier, Supplier { try { var cond = new NotifyCompilation(); - GraalTruffleRuntime.getRuntime().addListener(cond); + OptimizedTruffleRuntime.getRuntime().addListener(cond); setupContext("engine.CompileImmediately", "true", "engine.CompilationFailureAction", "ExitVM"); OptimizedCallTarget callTarget = (OptimizedCallTarget) RootNode.createConstantNode(42).getCallTarget(); callTarget.call(); @@ -68,7 +68,7 @@ public void testExit() throws IOException, InterruptedException { } } - private static final class NotifyCompilation implements GraalTruffleRuntimeListener { + private static final class NotifyCompilation implements OptimizedTruffleRuntimeListener { private final CountDownLatch signal = new CountDownLatch(1); @Override diff --git a/compiler/src/jdk.internal.vm.compiler.test/src/org/graalvm/compiler/truffle/test/GraalTruffleRuntimeListenerTest.java b/compiler/src/jdk.internal.vm.compiler.test/src/org/graalvm/compiler/truffle/test/GraalTruffleRuntimeListenerTest.java index a6cd1acb3bf1..12bc13bd4411 100644 --- a/compiler/src/jdk.internal.vm.compiler.test/src/org/graalvm/compiler/truffle/test/GraalTruffleRuntimeListenerTest.java +++ b/compiler/src/jdk.internal.vm.compiler.test/src/org/graalvm/compiler/truffle/test/GraalTruffleRuntimeListenerTest.java @@ -41,8 +41,8 @@ import com.oracle.truffle.api.test.SubprocessTestUtils; import com.oracle.truffle.compiler.TruffleCompilerListener; import com.oracle.truffle.runtime.AbstractCompilationTask; -import com.oracle.truffle.runtime.GraalTruffleRuntime; -import com.oracle.truffle.runtime.GraalTruffleRuntimeListener; +import com.oracle.truffle.runtime.OptimizedTruffleRuntime; +import com.oracle.truffle.runtime.OptimizedTruffleRuntimeListener; import com.oracle.truffle.runtime.OptimizedCallTarget; import org.graalvm.compiler.truffle.test.nodes.RootTestNode; @@ -66,7 +66,7 @@ protected Context.Builder newContextBuilder() { @Test public void testCompilationSuccess() { setupContext("engine.CompileImmediately", "true", "engine.BackgroundCompilation", "false"); - GraalTruffleRuntime runtime = GraalTruffleRuntime.getRuntime(); + OptimizedTruffleRuntime runtime = OptimizedTruffleRuntime.getRuntime(); OptimizedCallTarget compilable = (OptimizedCallTarget) RootNode.createConstantNode(true).getCallTarget(); TestListener listener = new TestListener(compilable); try { @@ -91,7 +91,7 @@ public void testCompilationFailure() throws IOException, InterruptedException { builder.option("engine.CompileImmediately", "true"); builder.option("engine.BackgroundCompilation", "false"); setupContext(builder); - GraalTruffleRuntime runtime = GraalTruffleRuntime.getRuntime(); + OptimizedTruffleRuntime runtime = OptimizedTruffleRuntime.getRuntime(); OptimizedCallTarget compilable = (OptimizedCallTarget) createFailureNode().getCallTarget(); TestListener listener = new TestListener(compilable); try { @@ -116,7 +116,7 @@ public void testCompilationFailureRetry() throws IOException, InterruptedExcepti public void write(int b) throws IOException { } }).allowExperimentalOptions(true).option("engine.CompileImmediately", "true").option("engine.BackgroundCompilation", "false").option("engine.CompilationFailureAction", "Diagnose")); - GraalTruffleRuntime runtime = GraalTruffleRuntime.getRuntime(); + OptimizedTruffleRuntime runtime = OptimizedTruffleRuntime.getRuntime(); OptimizedCallTarget compilable = (OptimizedCallTarget) createFailureNode().getCallTarget(); TestListener listener = new TestListener(compilable); try { @@ -140,7 +140,7 @@ public void testBlockCompilation() { setupContext("engine.CompileImmediately", "true", "engine.BackgroundCompilation", "false", "engine.PartialBlockCompilationSize", "1"); - GraalTruffleRuntime runtime = GraalTruffleRuntime.getRuntime(); + OptimizedTruffleRuntime runtime = OptimizedTruffleRuntime.getRuntime(); OptimizedCallTarget compilable = (OptimizedCallTarget) createBlocks().getCallTarget(); compilable.computeBlockCompilations(); TestListener listener = new TestListener(compilable); @@ -178,7 +178,7 @@ public void testBlockCompilationLargeBlocks() { "engine.BackgroundCompilation", "false", "engine.PartialBlockCompilationSize", "1", "engine.PartialBlockMaximumSize", "0"); - GraalTruffleRuntime runtime = GraalTruffleRuntime.getRuntime(); + OptimizedTruffleRuntime runtime = OptimizedTruffleRuntime.getRuntime(); OptimizedCallTarget compilable = (OptimizedCallTarget) createBlocks().getCallTarget(); compilable.computeBlockCompilations(); TestListener listener = new TestListener(compilable); @@ -212,7 +212,7 @@ public void testBlockCompilationMaximumGraalGraphSize() { "engine.BackgroundCompilation", "false", "engine.PartialBlockCompilationSize", String.valueOf(blockSize), "compiler.MaximumGraalGraphSize", "20000"); - GraalTruffleRuntime runtime = GraalTruffleRuntime.getRuntime(); + OptimizedTruffleRuntime runtime = OptimizedTruffleRuntime.getRuntime(); AbstractTestNode[] children = new AbstractTestNode[nodeCount]; for (int i = 0; i < children.length; i++) { children[i] = new ExpensiveTestNode(); @@ -361,7 +361,7 @@ private enum EventType { DEQUEUED, } - private static final class TestListener implements GraalTruffleRuntimeListener { + private static final class TestListener implements OptimizedTruffleRuntimeListener { private static final long TIMEOUT = 10_000; diff --git a/compiler/src/jdk.internal.vm.compiler.test/src/org/graalvm/compiler/truffle/test/IndirectCallSiteTest.java b/compiler/src/jdk.internal.vm.compiler.test/src/org/graalvm/compiler/truffle/test/IndirectCallSiteTest.java index fea4e46f5477..d0c4bfbd0b5c 100644 --- a/compiler/src/jdk.internal.vm.compiler.test/src/org/graalvm/compiler/truffle/test/IndirectCallSiteTest.java +++ b/compiler/src/jdk.internal.vm.compiler.test/src/org/graalvm/compiler/truffle/test/IndirectCallSiteTest.java @@ -34,7 +34,7 @@ import com.oracle.truffle.api.frame.VirtualFrame; import com.oracle.truffle.api.nodes.IndirectCallNode; import com.oracle.truffle.api.nodes.RootNode; -import com.oracle.truffle.runtime.GraalTruffleRuntime; +import com.oracle.truffle.runtime.OptimizedTruffleRuntime; import com.oracle.truffle.runtime.OptimizedCallTarget; import com.oracle.truffle.runtime.OptimizedDirectCallNode; import com.oracle.truffle.runtime.OptimizedIndirectCallNode; @@ -43,7 +43,7 @@ @SuppressWarnings("try") public class IndirectCallSiteTest extends TestWithSynchronousCompiling { - private static final GraalTruffleRuntime runtime = (GraalTruffleRuntime) Truffle.getRuntime(); + private static final OptimizedTruffleRuntime runtime = (OptimizedTruffleRuntime) Truffle.getRuntime(); @Before @Override @@ -134,7 +134,7 @@ class DirectlyCallsTargetWithArguments extends DeoptimizeAwareRootNode { DirectlyCallsTargetWithArguments(OptimizedCallTarget target, Object[] arguments) { super(); - this.directCallNode = (OptimizedDirectCallNode) GraalTruffleRuntime.getRuntime().createDirectCallNode(target); + this.directCallNode = (OptimizedDirectCallNode) OptimizedTruffleRuntime.getRuntime().createDirectCallNode(target); this.arguments = arguments; } diff --git a/compiler/src/jdk.internal.vm.compiler.test/src/org/graalvm/compiler/truffle/test/OptimizedCallTargetTest.java b/compiler/src/jdk.internal.vm.compiler.test/src/org/graalvm/compiler/truffle/test/OptimizedCallTargetTest.java index a5a8039c3c28..32ef40671f32 100644 --- a/compiler/src/jdk.internal.vm.compiler.test/src/org/graalvm/compiler/truffle/test/OptimizedCallTargetTest.java +++ b/compiler/src/jdk.internal.vm.compiler.test/src/org/graalvm/compiler/truffle/test/OptimizedCallTargetTest.java @@ -54,14 +54,14 @@ import com.oracle.truffle.api.nodes.Node; import com.oracle.truffle.api.nodes.RepeatingNode; import com.oracle.truffle.api.nodes.RootNode; -import com.oracle.truffle.runtime.GraalTruffleRuntime; +import com.oracle.truffle.runtime.OptimizedTruffleRuntime; import com.oracle.truffle.runtime.OptimizedCallTarget; import com.oracle.truffle.runtime.OptimizedOSRLoopNode; import com.oracle.truffle.runtime.OptimizedRuntimeOptions; @SuppressWarnings("try") public class OptimizedCallTargetTest extends TestWithSynchronousCompiling { - private static final GraalTruffleRuntime runtime = (GraalTruffleRuntime) Truffle.getRuntime(); + private static final OptimizedTruffleRuntime runtime = (OptimizedTruffleRuntime) Truffle.getRuntime(); private static final Field nodeRewritingAssumptionField; static { try { diff --git a/compiler/src/jdk.internal.vm.compiler.test/src/org/graalvm/compiler/truffle/test/OptimizedOSRLoopNodeTest.java b/compiler/src/jdk.internal.vm.compiler.test/src/org/graalvm/compiler/truffle/test/OptimizedOSRLoopNodeTest.java index 0e202048e726..a0510040f601 100644 --- a/compiler/src/jdk.internal.vm.compiler.test/src/org/graalvm/compiler/truffle/test/OptimizedOSRLoopNodeTest.java +++ b/compiler/src/jdk.internal.vm.compiler.test/src/org/graalvm/compiler/truffle/test/OptimizedOSRLoopNodeTest.java @@ -67,7 +67,7 @@ import com.oracle.truffle.api.nodes.RepeatingNode; import com.oracle.truffle.api.nodes.RootNode; import com.oracle.truffle.api.test.polyglot.ProxyLanguage; -import com.oracle.truffle.runtime.GraalTruffleRuntime; +import com.oracle.truffle.runtime.OptimizedTruffleRuntime; import com.oracle.truffle.runtime.OptimizedCallTarget; import com.oracle.truffle.runtime.OptimizedDirectCallNode; import com.oracle.truffle.runtime.OptimizedOSRLoopNode; @@ -75,7 +75,7 @@ @RunWith(Theories.class) public class OptimizedOSRLoopNodeTest extends TestWithSynchronousCompiling { - private static final GraalTruffleRuntime runtime = (GraalTruffleRuntime) Truffle.getRuntime(); + private static final OptimizedTruffleRuntime runtime = (OptimizedTruffleRuntime) Truffle.getRuntime(); @DataPoint public static final OSRLoopFactory DEFAULT = (threshold, repeating) -> (OptimizedOSRLoopNode) OptimizedOSRLoopNode.create(repeating); diff --git a/compiler/src/jdk.internal.vm.compiler.test/src/org/graalvm/compiler/truffle/test/PartialEvaluationTest.java b/compiler/src/jdk.internal.vm.compiler.test/src/org/graalvm/compiler/truffle/test/PartialEvaluationTest.java index 68d23e7e6648..6002bd21cc3e 100644 --- a/compiler/src/jdk.internal.vm.compiler.test/src/org/graalvm/compiler/truffle/test/PartialEvaluationTest.java +++ b/compiler/src/jdk.internal.vm.compiler.test/src/org/graalvm/compiler/truffle/test/PartialEvaluationTest.java @@ -59,7 +59,7 @@ import com.oracle.truffle.api.nodes.ControlFlowException; import com.oracle.truffle.api.nodes.RootNode; import com.oracle.truffle.compiler.TruffleCompilationTask; -import com.oracle.truffle.runtime.GraalTruffleRuntime; +import com.oracle.truffle.runtime.OptimizedTruffleRuntime; import com.oracle.truffle.runtime.OptimizedCallTarget; import jdk.vm.ci.code.BailoutException; @@ -113,7 +113,7 @@ protected OptimizedCallTarget compileHelper(String methodName, RootNode root, Ob } // Ensure the invoke stub is installed - GraalTruffleRuntime runtime = (GraalTruffleRuntime) Truffle.getRuntime(); + OptimizedTruffleRuntime runtime = (OptimizedTruffleRuntime) Truffle.getRuntime(); runtime.bypassedInstalledCode(compilable); return compilable; diff --git a/compiler/src/jdk.internal.vm.compiler.test/src/org/graalvm/compiler/truffle/test/PerformanceWarningTest.java b/compiler/src/jdk.internal.vm.compiler.test/src/org/graalvm/compiler/truffle/test/PerformanceWarningTest.java index 27d087c0a8b3..b9eb9bef92f7 100644 --- a/compiler/src/jdk.internal.vm.compiler.test/src/org/graalvm/compiler/truffle/test/PerformanceWarningTest.java +++ b/compiler/src/jdk.internal.vm.compiler.test/src/org/graalvm/compiler/truffle/test/PerformanceWarningTest.java @@ -43,7 +43,7 @@ import com.oracle.truffle.api.frame.VirtualFrame; import com.oracle.truffle.api.nodes.RootNode; import com.oracle.truffle.compiler.TruffleCompilationTask; -import com.oracle.truffle.runtime.GraalTruffleRuntime; +import com.oracle.truffle.runtime.OptimizedTruffleRuntime; import com.oracle.truffle.runtime.OptimizedCallTarget; import com.oracle.truffle.runtime.OptimizedDirectCallNode; @@ -429,7 +429,7 @@ protected class TrivialCallsInnerNode extends RootNode { public TrivialCallsInnerNode() { super(null); - this.callNode = (OptimizedDirectCallNode) GraalTruffleRuntime.getRuntime().createDirectCallNode(new RootNode(null) { + this.callNode = (OptimizedDirectCallNode) OptimizedTruffleRuntime.getRuntime().createDirectCallNode(new RootNode(null) { @Override public Object execute(VirtualFrame frame) { return 0; diff --git a/compiler/src/jdk.internal.vm.compiler.test/src/org/graalvm/compiler/truffle/test/PropagateHotnessToLexicalSingleCallerTest.java b/compiler/src/jdk.internal.vm.compiler.test/src/org/graalvm/compiler/truffle/test/PropagateHotnessToLexicalSingleCallerTest.java index 5b2dac71025d..c6db218df1f2 100644 --- a/compiler/src/jdk.internal.vm.compiler.test/src/org/graalvm/compiler/truffle/test/PropagateHotnessToLexicalSingleCallerTest.java +++ b/compiler/src/jdk.internal.vm.compiler.test/src/org/graalvm/compiler/truffle/test/PropagateHotnessToLexicalSingleCallerTest.java @@ -39,7 +39,7 @@ import com.oracle.truffle.api.nodes.Node; import com.oracle.truffle.api.nodes.RepeatingNode; import com.oracle.truffle.api.nodes.RootNode; -import com.oracle.truffle.runtime.GraalTruffleRuntime; +import com.oracle.truffle.runtime.OptimizedTruffleRuntime; import com.oracle.truffle.runtime.OptimizedCallTarget; public class PropagateHotnessToLexicalSingleCallerTest extends TestWithSynchronousCompiling { @@ -86,7 +86,7 @@ public FrameDescriptor getParentFrameDescriptor() { static class RootNodeWithLoop extends NamedRootNode { - @Child LoopNode loopNode = GraalTruffleRuntime.getRuntime().createLoopNode(new SimpleLoopNode()); + @Child LoopNode loopNode = OptimizedTruffleRuntime.getRuntime().createLoopNode(new SimpleLoopNode()); protected RootNodeWithLoop(String name, FrameDescriptor parentFrameDescriptor) { super(name, parentFrameDescriptor); @@ -122,7 +122,7 @@ public Object execute(VirtualFrame frame) { @CompilerDirectives.TruffleBoundary private void createCallNode(FrameDescriptor frameDescriptor) { target = (OptimizedCallTarget) rootNodeFactory.apply(frameDescriptor).getCallTarget(); - callNode = insert(GraalTruffleRuntime.getRuntime().createDirectCallNode(target)); + callNode = insert(OptimizedTruffleRuntime.getRuntime().createDirectCallNode(target)); } } diff --git a/compiler/src/jdk.internal.vm.compiler.test/src/org/graalvm/compiler/truffle/test/TransferToInterpreterTest.java b/compiler/src/jdk.internal.vm.compiler.test/src/org/graalvm/compiler/truffle/test/TransferToInterpreterTest.java index 4571cec911ca..5495aa68947f 100644 --- a/compiler/src/jdk.internal.vm.compiler.test/src/org/graalvm/compiler/truffle/test/TransferToInterpreterTest.java +++ b/compiler/src/jdk.internal.vm.compiler.test/src/org/graalvm/compiler/truffle/test/TransferToInterpreterTest.java @@ -33,7 +33,7 @@ import com.oracle.truffle.api.nodes.RootNode; import com.oracle.truffle.compiler.TruffleCompilationTask; import com.oracle.truffle.compiler.TruffleCompiler; -import com.oracle.truffle.runtime.GraalTruffleRuntime; +import com.oracle.truffle.runtime.OptimizedTruffleRuntime; import com.oracle.truffle.runtime.OptimizedCallTarget; public class TransferToInterpreterTest extends TestWithPolyglotOptions { @@ -46,7 +46,7 @@ public void setup() { @Test public void test() { RootNode rootNode = new TestRootNode(); - GraalTruffleRuntime runtime = GraalTruffleRuntime.getRuntime(); + OptimizedTruffleRuntime runtime = OptimizedTruffleRuntime.getRuntime(); OptimizedCallTarget target = (OptimizedCallTarget) rootNode.getCallTarget(); target.call(0); Assert.assertFalse(target.isValid()); diff --git a/compiler/src/jdk.internal.vm.compiler.test/src/org/graalvm/compiler/truffle/test/TruffleBoundaryExceptionsTest.java b/compiler/src/jdk.internal.vm.compiler.test/src/org/graalvm/compiler/truffle/test/TruffleBoundaryExceptionsTest.java index ecc221917eda..c0b8314a3f3d 100644 --- a/compiler/src/jdk.internal.vm.compiler.test/src/org/graalvm/compiler/truffle/test/TruffleBoundaryExceptionsTest.java +++ b/compiler/src/jdk.internal.vm.compiler.test/src/org/graalvm/compiler/truffle/test/TruffleBoundaryExceptionsTest.java @@ -36,14 +36,14 @@ import com.oracle.truffle.api.frame.VirtualFrame; import com.oracle.truffle.api.nodes.RootNode; import com.oracle.truffle.runtime.AbstractCompilationTask; -import com.oracle.truffle.runtime.GraalTruffleRuntime; -import com.oracle.truffle.runtime.GraalTruffleRuntimeListener; +import com.oracle.truffle.runtime.OptimizedTruffleRuntime; +import com.oracle.truffle.runtime.OptimizedTruffleRuntimeListener; import com.oracle.truffle.runtime.OptimizedCallTarget; import com.oracle.truffle.runtime.OptimizedRuntimeOptions; public class TruffleBoundaryExceptionsTest extends TestWithSynchronousCompiling { - private static final GraalTruffleRuntime runtime = (GraalTruffleRuntime) Truffle.getRuntime(); + private static final OptimizedTruffleRuntime runtime = (OptimizedTruffleRuntime) Truffle.getRuntime(); @Override @Before @@ -87,7 +87,7 @@ public void throwExceptionBoundary() { } } final int[] compilationCount = {0}; - GraalTruffleRuntimeListener listener = new GraalTruffleRuntimeListener() { + OptimizedTruffleRuntimeListener listener = new OptimizedTruffleRuntimeListener() { @Override public void onCompilationStarted(OptimizedCallTarget target, AbstractCompilationTask task) { compilationCount[0]++; diff --git a/compiler/src/jdk.internal.vm.compiler.test/src/org/graalvm/compiler/truffle/test/TruffleCompilerImplTest.java b/compiler/src/jdk.internal.vm.compiler.test/src/org/graalvm/compiler/truffle/test/TruffleCompilerImplTest.java index a611ecaa6428..baae27b6cbdb 100644 --- a/compiler/src/jdk.internal.vm.compiler.test/src/org/graalvm/compiler/truffle/test/TruffleCompilerImplTest.java +++ b/compiler/src/jdk.internal.vm.compiler.test/src/org/graalvm/compiler/truffle/test/TruffleCompilerImplTest.java @@ -41,7 +41,7 @@ import com.oracle.truffle.api.TruffleOptions; import com.oracle.truffle.api.nodes.RootNode; import com.oracle.truffle.compiler.TruffleCompiler; -import com.oracle.truffle.runtime.GraalTruffleRuntime; +import com.oracle.truffle.runtime.OptimizedTruffleRuntime; import com.oracle.truffle.runtime.OptimizedCallTarget; public abstract class TruffleCompilerImplTest extends GraalCompilerTest { @@ -52,7 +52,7 @@ public abstract class TruffleCompilerImplTest extends GraalCompilerTest { protected TruffleCompilerImplTest() { if (!TruffleOptions.AOT) { - GraalTruffleRuntime runtime = GraalTruffleRuntime.getRuntime(); + OptimizedTruffleRuntime runtime = OptimizedTruffleRuntime.getRuntime(); TruffleCompiler compiler = runtime.newTruffleCompiler(); Assume.assumeTrue("cannot get whitebox interface to Truffle compiler", compiler instanceof TruffleCompilerImpl); this.truffleCompiler = (TruffleCompilerImpl) compiler; @@ -62,7 +62,7 @@ protected TruffleCompilerImplTest() { @Before public void onlyWhiteBox() { if (TruffleOptions.AOT) { - TruffleCompiler compiler = GraalTruffleRuntime.getRuntime().getTruffleCompiler(getInitCallTarget()); + TruffleCompiler compiler = OptimizedTruffleRuntime.getRuntime().getTruffleCompiler(getInitCallTarget()); Assume.assumeTrue("cannot get whitebox interface to Truffle compiler", compiler instanceof TruffleCompilerImpl); this.truffleCompiler = (TruffleCompilerImpl) compiler; } diff --git a/compiler/src/jdk.internal.vm.compiler.test/src/org/graalvm/compiler/truffle/test/TruffleRuntimeTest.java b/compiler/src/jdk.internal.vm.compiler.test/src/org/graalvm/compiler/truffle/test/TruffleRuntimeTest.java index 78c3b9702a99..344218e98c70 100644 --- a/compiler/src/jdk.internal.vm.compiler.test/src/org/graalvm/compiler/truffle/test/TruffleRuntimeTest.java +++ b/compiler/src/jdk.internal.vm.compiler.test/src/org/graalvm/compiler/truffle/test/TruffleRuntimeTest.java @@ -61,7 +61,7 @@ public void testGetTVMCI() { TruffleRuntime runtime = Truffle.getRuntime(); TVMCI tvmci = runtime.getCapability(TVMCI.class); assertNotNull("Truffle Virtual Machine Compiler Interface not found", tvmci); - assertEquals("GraalTVMCI", tvmci.getClass().getSimpleName()); + assertEquals("OptimizedTVMCI", tvmci.getClass().getSimpleName()); abstract class TVMCISubclass extends TVMCI { } diff --git a/compiler/src/jdk.internal.vm.compiler.test/src/org/graalvm/compiler/truffle/test/TruffleToTruffleCallExceptionHandlerTest.java b/compiler/src/jdk.internal.vm.compiler.test/src/org/graalvm/compiler/truffle/test/TruffleToTruffleCallExceptionHandlerTest.java index 4e4330711af4..c7c413de695c 100644 --- a/compiler/src/jdk.internal.vm.compiler.test/src/org/graalvm/compiler/truffle/test/TruffleToTruffleCallExceptionHandlerTest.java +++ b/compiler/src/jdk.internal.vm.compiler.test/src/org/graalvm/compiler/truffle/test/TruffleToTruffleCallExceptionHandlerTest.java @@ -34,7 +34,7 @@ import com.oracle.truffle.api.frame.VirtualFrame; import com.oracle.truffle.api.nodes.DirectCallNode; import com.oracle.truffle.api.nodes.RootNode; -import com.oracle.truffle.runtime.GraalTruffleRuntime; +import com.oracle.truffle.runtime.OptimizedTruffleRuntime; import com.oracle.truffle.runtime.OptimizedCallTarget; /** @@ -43,7 +43,7 @@ */ public class TruffleToTruffleCallExceptionHandlerTest extends PartialEvaluationTest { - private static final GraalTruffleRuntime runtime = (GraalTruffleRuntime) Truffle.getRuntime(); + private static final OptimizedTruffleRuntime runtime = (OptimizedTruffleRuntime) Truffle.getRuntime(); private static final class Compilables { diff --git a/compiler/src/jdk.internal.vm.compiler.test/src/org/graalvm/compiler/truffle/test/builtins/SLGraalRuntimeBuiltin.java b/compiler/src/jdk.internal.vm.compiler.test/src/org/graalvm/compiler/truffle/test/builtins/SLGraalRuntimeBuiltin.java index 7dc01af93720..6a3237886ba5 100644 --- a/compiler/src/jdk.internal.vm.compiler.test/src/org/graalvm/compiler/truffle/test/builtins/SLGraalRuntimeBuiltin.java +++ b/compiler/src/jdk.internal.vm.compiler.test/src/org/graalvm/compiler/truffle/test/builtins/SLGraalRuntimeBuiltin.java @@ -34,14 +34,14 @@ import com.oracle.truffle.api.nodes.Node; import com.oracle.truffle.api.nodes.NodeVisitor; import com.oracle.truffle.api.nodes.RootNode; -import com.oracle.truffle.runtime.GraalTruffleRuntime; +import com.oracle.truffle.runtime.OptimizedTruffleRuntime; import com.oracle.truffle.runtime.OptimizedCallTarget; import com.oracle.truffle.sl.builtins.SLBuiltinNode; public abstract class SLGraalRuntimeBuiltin extends SLBuiltinNode { protected SLGraalRuntimeBuiltin() { - if (!(Truffle.getRuntime() instanceof GraalTruffleRuntime)) { + if (!(Truffle.getRuntime() instanceof OptimizedTruffleRuntime)) { throw new AssertionError("Graal runtime builtins can only be used inside of a Graal runtime."); } } diff --git a/compiler/src/jdk.internal.vm.compiler.test/src/org/graalvm/compiler/truffle/test/builtins/SLWaitForOptimizationBuiltin.java b/compiler/src/jdk.internal.vm.compiler.test/src/org/graalvm/compiler/truffle/test/builtins/SLWaitForOptimizationBuiltin.java index ad4d9301e1a1..003b62e5f52d 100644 --- a/compiler/src/jdk.internal.vm.compiler.test/src/org/graalvm/compiler/truffle/test/builtins/SLWaitForOptimizationBuiltin.java +++ b/compiler/src/jdk.internal.vm.compiler.test/src/org/graalvm/compiler/truffle/test/builtins/SLWaitForOptimizationBuiltin.java @@ -30,7 +30,7 @@ import com.oracle.truffle.api.Truffle; import com.oracle.truffle.api.dsl.Specialization; import com.oracle.truffle.api.nodes.NodeInfo; -import com.oracle.truffle.runtime.GraalTruffleRuntime; +import com.oracle.truffle.runtime.OptimizedTruffleRuntime; import com.oracle.truffle.runtime.OptimizedCallTarget; import com.oracle.truffle.sl.runtime.SLFunction; import com.oracle.truffle.sl.runtime.SLNull; @@ -45,7 +45,7 @@ public abstract class SLWaitForOptimizationBuiltin extends SLGraalRuntimeBuiltin @Specialization public SLFunction waitForOptimization(SLFunction function, long timeout) { OptimizedCallTarget target = (OptimizedCallTarget) function.getCallTarget(); - GraalTruffleRuntime runtime = ((GraalTruffleRuntime) Truffle.getRuntime()); + OptimizedTruffleRuntime runtime = ((OptimizedTruffleRuntime) Truffle.getRuntime()); try { runtime.waitForCompilation(target, timeout); } catch (ExecutionException | TimeoutException e) { diff --git a/compiler/src/jdk.internal.vm.compiler.test/src/org/graalvm/compiler/truffle/test/libgraal/JNIExceptionWrapperTest.java b/compiler/src/jdk.internal.vm.compiler.test/src/org/graalvm/compiler/truffle/test/libgraal/JNIExceptionWrapperTest.java index 2624a4ccd115..46a724e8f6ba 100644 --- a/compiler/src/jdk.internal.vm.compiler.test/src/org/graalvm/compiler/truffle/test/libgraal/JNIExceptionWrapperTest.java +++ b/compiler/src/jdk.internal.vm.compiler.test/src/org/graalvm/compiler/truffle/test/libgraal/JNIExceptionWrapperTest.java @@ -45,7 +45,7 @@ import com.oracle.truffle.compiler.TruffleCompilationTask; import com.oracle.truffle.compiler.TruffleCompiler; import com.oracle.truffle.compiler.TruffleCompilerListener; -import com.oracle.truffle.runtime.GraalTruffleRuntime; +import com.oracle.truffle.runtime.OptimizedTruffleRuntime; import com.oracle.truffle.runtime.OptimizedCallTarget; public class JNIExceptionWrapperTest extends TestWithPolyglotOptions { @@ -85,7 +85,7 @@ private static List makeSilent(List vmArgs) { private void testMergedStackTraceImpl() throws Exception { setupContext("engine.CompilationFailureAction", "Throw", "engine.BackgroundCompilation", Boolean.FALSE.toString()); - GraalTruffleRuntime runtime = GraalTruffleRuntime.getRuntime(); + OptimizedTruffleRuntime runtime = OptimizedTruffleRuntime.getRuntime(); OptimizedCallTarget compilable = (OptimizedCallTarget) RootNode.createConstantNode(42).getCallTarget(); TruffleCompiler compiler = runtime.getTruffleCompiler(compilable); TestTruffleCompilationTask task = new TestTruffleCompilationTask(); diff --git a/substratevm/src/com.oracle.svm.truffle/src/com/oracle/svm/truffle/api/SubstrateFastThreadLocal.java b/substratevm/src/com.oracle.svm.truffle/src/com/oracle/svm/truffle/api/SubstrateFastThreadLocal.java index 3b1a432eecce..bce05f40b04c 100644 --- a/substratevm/src/com.oracle.svm.truffle/src/com/oracle/svm/truffle/api/SubstrateFastThreadLocal.java +++ b/substratevm/src/com.oracle.svm.truffle/src/com/oracle/svm/truffle/api/SubstrateFastThreadLocal.java @@ -31,9 +31,9 @@ import com.oracle.svm.core.threadlocal.FastThreadLocal; import com.oracle.svm.core.threadlocal.FastThreadLocalFactory; import com.oracle.svm.core.threadlocal.FastThreadLocalObject; -import com.oracle.truffle.runtime.GraalFastThreadLocal; +import com.oracle.truffle.runtime.OptimizedFastThreadLocal; -final class SubstrateFastThreadLocal extends GraalFastThreadLocal { +final class SubstrateFastThreadLocal extends OptimizedFastThreadLocal { static final SubstrateFastThreadLocal SINGLETON = new SubstrateFastThreadLocal(); private static final FastThreadLocalObject CONTEXT = FastThreadLocalFactory.createObject(Object[].class, "SubstrateFastThreadLocal.CONTEXT") diff --git a/substratevm/src/com.oracle.svm.truffle/src/com/oracle/svm/truffle/api/SubstrateTruffleRuntime.java b/substratevm/src/com.oracle.svm.truffle/src/com/oracle/svm/truffle/api/SubstrateTruffleRuntime.java index fbb9048e0350..2144ce1905eb 100644 --- a/substratevm/src/com.oracle.svm.truffle/src/com/oracle/svm/truffle/api/SubstrateTruffleRuntime.java +++ b/substratevm/src/com.oracle.svm.truffle/src/com/oracle/svm/truffle/api/SubstrateTruffleRuntime.java @@ -70,7 +70,7 @@ import com.oracle.truffle.runtime.BackgroundCompileQueue; import com.oracle.truffle.runtime.CompilationTask; import com.oracle.truffle.runtime.EngineData; -import com.oracle.truffle.runtime.GraalTruffleRuntime; +import com.oracle.truffle.runtime.OptimizedTruffleRuntime; import com.oracle.truffle.runtime.OptimizedCallTarget; import com.oracle.truffle.runtime.OptimizedRuntimeOptions.ExceptionAction; @@ -103,7 +103,7 @@ static boolean isMultiThreaded() { } } -public final class SubstrateTruffleRuntime extends GraalTruffleRuntime { +public final class SubstrateTruffleRuntime extends OptimizedTruffleRuntime { private static final int DEBUG_TEAR_DOWN_TIMEOUT = 2_000; private static final int PRODUCTION_TEAR_DOWN_TIMEOUT = 10_000; diff --git a/tools/src/com.oracle.truffle.tools.chromeinspector.test/src/com/oracle/truffle/tools/chromeinspector/test/EnginesGCedTest.java b/tools/src/com.oracle.truffle.tools.chromeinspector.test/src/com/oracle/truffle/tools/chromeinspector/test/EnginesGCedTest.java index e5db7c524d8b..2eff548caba0 100644 --- a/tools/src/com.oracle.truffle.tools.chromeinspector.test/src/com/oracle/truffle/tools/chromeinspector/test/EnginesGCedTest.java +++ b/tools/src/com.oracle.truffle.tools.chromeinspector.test/src/com/oracle/truffle/tools/chromeinspector/test/EnginesGCedTest.java @@ -81,7 +81,7 @@ void checkCollected() { for (Thread t : threads) { if (t != null) { if (!threadIDs.contains(getThreadId(t))) { - if (t.getClass().getPackage().getName().startsWith("org.graalvm.compiler")) { + if (t.getClass().getPackage().getName().startsWith("com.oracle.truffle.runtime")) { // A compiler thread continue; } diff --git a/truffle/src/com.oracle.truffle.api/src/com/oracle/truffle/api/impl/Accessor.java b/truffle/src/com.oracle.truffle.api/src/com/oracle/truffle/api/impl/Accessor.java index 255065a7f81a..571801885ebc 100644 --- a/truffle/src/com.oracle.truffle.api/src/com/oracle/truffle/api/impl/Accessor.java +++ b/truffle/src/com.oracle.truffle.api/src/com/oracle/truffle/api/impl/Accessor.java @@ -1354,7 +1354,7 @@ protected Accessor() { "com.oracle.truffle.api.test.TestAPIAccessor".equals(thisClassName) || "com.oracle.truffle.api.impl.TVMCIAccessor".equals(thisClassName) || "com.oracle.truffle.api.impl.DefaultRuntimeAccessor".equals(thisClassName) || - "com.oracle.truffle.runtime.GraalRuntimeAccessor".equals(thisClassName) || + "com.oracle.truffle.runtime.OptimizedRuntimeAccessor".equals(thisClassName) || "com.oracle.truffle.api.dsl.DSLAccessor".equals(thisClassName) || "com.oracle.truffle.api.impl.ImplAccessor".equals(thisClassName) || "com.oracle.truffle.api.memory.MemoryFenceAccessor".equals(thisClassName) || diff --git a/truffle/src/com.oracle.truffle.runtime/src/com/oracle/truffle/runtime/AbstractGraalTruffleRuntimeListener.java b/truffle/src/com.oracle.truffle.runtime/src/com/oracle/truffle/runtime/AbstractGraalTruffleRuntimeListener.java index 2ad839e8b714..5b40c2952804 100644 --- a/truffle/src/com.oracle.truffle.runtime/src/com/oracle/truffle/runtime/AbstractGraalTruffleRuntimeListener.java +++ b/truffle/src/com.oracle.truffle.runtime/src/com/oracle/truffle/runtime/AbstractGraalTruffleRuntimeListener.java @@ -40,11 +40,11 @@ */ package com.oracle.truffle.runtime; -public abstract class AbstractGraalTruffleRuntimeListener implements GraalTruffleRuntimeListener { +public abstract class AbstractGraalTruffleRuntimeListener implements OptimizedTruffleRuntimeListener { - protected final GraalTruffleRuntime runtime; + protected final OptimizedTruffleRuntime runtime; - protected AbstractGraalTruffleRuntimeListener(GraalTruffleRuntime runtime) { + protected AbstractGraalTruffleRuntimeListener(OptimizedTruffleRuntime runtime) { this.runtime = runtime; } } diff --git a/truffle/src/com.oracle.truffle.runtime/src/com/oracle/truffle/runtime/BackgroundCompileQueue.java b/truffle/src/com.oracle.truffle.runtime/src/com/oracle/truffle/runtime/BackgroundCompileQueue.java index aec294c53d13..bd4009f37cfa 100644 --- a/truffle/src/com.oracle.truffle.runtime/src/com/oracle/truffle/runtime/BackgroundCompileQueue.java +++ b/truffle/src/com.oracle.truffle.runtime/src/com/oracle/truffle/runtime/BackgroundCompileQueue.java @@ -70,14 +70,14 @@ */ public class BackgroundCompileQueue { - protected final GraalTruffleRuntime runtime; + protected final OptimizedTruffleRuntime runtime; private final AtomicLong idCounter; private volatile ThreadPoolExecutor compilationExecutorService; private volatile BlockingQueue compilationQueue; private boolean shutdown = false; private long delayMillis; - public BackgroundCompileQueue(GraalTruffleRuntime runtime) { + public BackgroundCompileQueue(OptimizedTruffleRuntime runtime) { this.runtime = runtime; this.idCounter = new AtomicLong(); } @@ -283,9 +283,9 @@ public enum Tier { private final class TruffleCompilerThreadFactory implements ThreadFactory { private final String namePrefix; - private final GraalTruffleRuntime runtime; + private final OptimizedTruffleRuntime runtime; - TruffleCompilerThreadFactory(final String namePrefix, GraalTruffleRuntime runtime) { + TruffleCompilerThreadFactory(final String namePrefix, OptimizedTruffleRuntime runtime) { this.namePrefix = namePrefix; this.runtime = runtime; } @@ -299,7 +299,7 @@ public Thread newThread(Runnable r) { public void run() { setContextClassLoader(getClass().getClassLoader()); try (AutoCloseable compilerThreadScope = runtime.openCompilerThreadScope(); - AutoCloseable polyglotThreadScope = GraalRuntimeAccessor.ENGINE.createPolyglotThreadScope()) { + AutoCloseable polyglotThreadScope = OptimizedRuntimeAccessor.ENGINE.createPolyglotThreadScope()) { super.run(); if (compilationExecutorService.allowsCoreThreadTimeOut()) { // If core threads are always kept alive (no timeout), the diff --git a/truffle/src/com.oracle.truffle.runtime/src/com/oracle/truffle/runtime/BytecodeOSRMetadata.java b/truffle/src/com.oracle.truffle.runtime/src/com/oracle/truffle/runtime/BytecodeOSRMetadata.java index 14b5c4ef1338..dfe2f31483ac 100644 --- a/truffle/src/com.oracle.truffle.runtime/src/com/oracle/truffle/runtime/BytecodeOSRMetadata.java +++ b/truffle/src/com.oracle.truffle.runtime/src/com/oracle/truffle/runtime/BytecodeOSRMetadata.java @@ -66,7 +66,7 @@ *

    * Performance note: We do not require the metadata field to be {@code volatile}. As long as the * field is initialized under double-checked locking (as is done in - * {@link GraalRuntimeSupport#pollBytecodeOSRBackEdge}, all threads will observe the same metadata + * {@link OptimizedRuntimeSupport#pollBytecodeOSRBackEdge}, all threads will observe the same metadata * instance. The JMM guarantees that the instance's final fields will be safely initialized before * it is published; the non-final + non-volatile fields (e.g., the back edge counter) may not be, * but we tolerate this inaccuracy in order to avoid volatile accesses in the hot path. @@ -335,7 +335,7 @@ private void resetCounter() { * AST lock should be held when this is invoked. */ private OptimizedCallTarget createOSRTarget(int target, Object interpreterState, FrameDescriptor frameDescriptor, Object frameEntryState) { - TruffleLanguage language = GraalRuntimeAccessor.NODES.getLanguage(((Node) osrNode).getRootNode()); + TruffleLanguage language = OptimizedRuntimeAccessor.NODES.getLanguage(((Node) osrNode).getRootNode()); return (OptimizedCallTarget) new BytecodeOSRRootNode(language, frameDescriptor, osrNode, target, interpreterState, frameEntryState).getCallTarget(); } @@ -412,7 +412,7 @@ public void transferFrame(FrameWithoutBoxing source, FrameWithoutBoxing target, OsrEntryDescription description = (OsrEntryDescription) targetMetadata; CompilerAsserts.partialEvaluationConstant(description); - GraalRuntimeAccessor.ACCESSOR.startOSRFrameTransfer(target); + OptimizedRuntimeAccessor.ACCESSOR.startOSRFrameTransfer(target); // Transfer indexed frame slots transferLoop(description.indexedFrameTags.length, source, target, description.indexedFrameTags); // transfer auxiliary slots @@ -553,7 +553,7 @@ private static void transferIndexedFrameSlot(FrameWithoutBoxing source, FrameWit target.setObject(slot, source.getObject(slot)); break; case FrameWithoutBoxing.STATIC_TAG: - GraalRuntimeAccessor.ACCESSOR.transferOSRFrameStaticSlot(source, target, slot); + OptimizedRuntimeAccessor.ACCESSOR.transferOSRFrameStaticSlot(source, target, slot); break; case FrameWithoutBoxing.ILLEGAL_TAG: target.clear(slot); diff --git a/truffle/src/com.oracle.truffle.runtime/src/com/oracle/truffle/runtime/BytecodeOSRRootNode.java b/truffle/src/com.oracle.truffle.runtime/src/com/oracle/truffle/runtime/BytecodeOSRRootNode.java index a38650642a07..dd86ba17c94a 100644 --- a/truffle/src/com.oracle.truffle.runtime/src/com/oracle/truffle/runtime/BytecodeOSRRootNode.java +++ b/truffle/src/com.oracle.truffle.runtime/src/com/oracle/truffle/runtime/BytecodeOSRRootNode.java @@ -73,7 +73,7 @@ final class BytecodeOSRRootNode extends BaseOSRRootNode { } private static boolean materializeCalled(FrameDescriptor frameDescriptor) { - return ((GraalTruffleRuntime) Truffle.getRuntime()).getFrameMaterializeCalled(frameDescriptor); + return ((OptimizedTruffleRuntime) Truffle.getRuntime()).getFrameMaterializeCalled(frameDescriptor); } Object getEntryTagsCache() { diff --git a/truffle/src/com.oracle.truffle.runtime/src/com/oracle/truffle/runtime/CompilationTask.java b/truffle/src/com.oracle.truffle.runtime/src/com/oracle/truffle/runtime/CompilationTask.java index 729bfb9e7299..c75e69efcda0 100644 --- a/truffle/src/com.oracle.truffle.runtime/src/com/oracle/truffle/runtime/CompilationTask.java +++ b/truffle/src/com.oracle.truffle.runtime/src/com/oracle/truffle/runtime/CompilationTask.java @@ -60,7 +60,7 @@ public void accept(CompilationTask task) { OptimizedCallTarget callTarget = task.targetRef.get(); if (callTarget != null && task.start()) { try { - ((GraalTruffleRuntime) Truffle.getRuntime()).doCompile(callTarget, task); + ((OptimizedTruffleRuntime) Truffle.getRuntime()).doCompile(callTarget, task); } finally { callTarget.compiledTier(task.tier()); task.finished(); diff --git a/truffle/src/com.oracle.truffle.runtime/src/com/oracle/truffle/runtime/DynamicThresholdsQueue.java b/truffle/src/com.oracle.truffle.runtime/src/com/oracle/truffle/runtime/DynamicThresholdsQueue.java index eeb3e6d528e1..991351ed5ae8 100644 --- a/truffle/src/com.oracle.truffle.runtime/src/com/oracle/truffle/runtime/DynamicThresholdsQueue.java +++ b/truffle/src/com.oracle.truffle.runtime/src/com/oracle/truffle/runtime/DynamicThresholdsQueue.java @@ -98,7 +98,7 @@ public Runnable poll() { } private void scaleThresholds() { - GraalTruffleRuntime.getRuntime().setCompilationThresholdScale(FixedPointMath.toFixedPoint(scale())); + OptimizedTruffleRuntime.getRuntime().setCompilationThresholdScale(FixedPointMath.toFixedPoint(scale())); } /** diff --git a/truffle/src/com.oracle.truffle.runtime/src/com/oracle/truffle/runtime/EngineCacheSupport.java b/truffle/src/com.oracle.truffle.runtime/src/com/oracle/truffle/runtime/EngineCacheSupport.java index b8f0ab9cfc8f..0e51145fb2e1 100644 --- a/truffle/src/com.oracle.truffle.runtime/src/com/oracle/truffle/runtime/EngineCacheSupport.java +++ b/truffle/src/com.oracle.truffle.runtime/src/com/oracle/truffle/runtime/EngineCacheSupport.java @@ -47,7 +47,7 @@ import com.oracle.truffle.api.TruffleLogger; -public interface EngineCacheSupport extends GraalRuntimeServiceProvider { +public interface EngineCacheSupport extends OptimizedRuntimeServiceProvider { void onEngineCreated(EngineData e); @@ -104,7 +104,7 @@ public OptionDescriptors getEngineOptions() { } static EngineCacheSupport get() { - return GraalTruffleRuntime.getRuntime().getEngineCacheSupport(); + return OptimizedTruffleRuntime.getRuntime().getEngineCacheSupport(); } } diff --git a/truffle/src/com.oracle.truffle.runtime/src/com/oracle/truffle/runtime/EngineData.java b/truffle/src/com.oracle.truffle.runtime/src/com/oracle/truffle/runtime/EngineData.java index be0ef17369ab..71bc2f81bc4a 100644 --- a/truffle/src/com.oracle.truffle.runtime/src/com/oracle/truffle/runtime/EngineData.java +++ b/truffle/src/com.oracle.truffle.runtime/src/com/oracle/truffle/runtime/EngineData.java @@ -40,7 +40,7 @@ */ package com.oracle.truffle.runtime; -import static com.oracle.truffle.runtime.GraalTruffleRuntime.getRuntime; +import static com.oracle.truffle.runtime.OptimizedTruffleRuntime.getRuntime; import static com.oracle.truffle.runtime.OptimizedRuntimeOptions.ArgumentTypeSpeculation; import static com.oracle.truffle.runtime.OptimizedRuntimeOptions.BackgroundCompilation; import static com.oracle.truffle.runtime.OptimizedRuntimeOptions.Compilation; @@ -189,15 +189,15 @@ public final class EngineData { } public void preinitializeContext() { - GraalRuntimeAccessor.ENGINE.preinitializeContext(this.polyglotEngine); + OptimizedRuntimeAccessor.ENGINE.preinitializeContext(this.polyglotEngine); } public void finalizeStore() { - GraalRuntimeAccessor.ENGINE.finalizeStore(this.polyglotEngine); + OptimizedRuntimeAccessor.ENGINE.finalizeStore(this.polyglotEngine); } public Object getEngineLock() { - return GraalRuntimeAccessor.ENGINE.getEngineLock(this.polyglotEngine); + return OptimizedRuntimeAccessor.ENGINE.getEngineLock(this.polyglotEngine); } @SuppressWarnings("unchecked") @@ -304,7 +304,7 @@ private void loadOptions(OptionValues options) { this.callAndLoopThresholdInFirstTier = computeCallAndLoopThresholdInFirstTier(options); this.callTargetStatisticDetails = options.get(CompilationStatisticDetails); this.callTargetStatistics = options.get(CompilationStatistics) || this.callTargetStatisticDetails; - this.statisticsListener = this.callTargetStatistics ? StatisticsListener.createEngineListener(GraalTruffleRuntime.getRuntime()) : null; + this.statisticsListener = this.callTargetStatistics ? StatisticsListener.createEngineListener(OptimizedTruffleRuntime.getRuntime()) : null; this.profilingEnabled = options.get(Profiling); this.traceTransferToInterpreter = options.get(TraceTransferToInterpreter); this.traceDeoptimizeFrame = options.get(TraceDeoptimizeFrame); @@ -312,7 +312,7 @@ private void loadOptions(OptionValues options) { validateOptions(); parsedCompileOnly = null; - Map compilerOptionValues = GraalTruffleRuntime.CompilerOptionsDescriptors.extractOptions(engineOptions); + Map compilerOptionValues = OptimizedTruffleRuntime.CompilerOptionsDescriptors.extractOptions(engineOptions); updateCompilerOptions(compilerOptionValues); this.compilerOptions = compilerOptionValues; } @@ -412,7 +412,7 @@ public Collection getCallTargets() { if (polyglotEngine == null) { throw new IllegalStateException("The polyglot engine is closed."); } - return (Collection) GraalRuntimeAccessor.ENGINE.findCallTargets(polyglotEngine); + return (Collection) OptimizedRuntimeAccessor.ENGINE.findCallTargets(polyglotEngine); } private void validateOptions() { @@ -467,23 +467,23 @@ public TruffleLogger getLogger(String loggerId) { @SuppressWarnings("static-method") public void mergeLoadedSources(Source[] sources) { - GraalRuntimeAccessor.SOURCE.mergeLoadedSources(sources); + OptimizedRuntimeAccessor.SOURCE.mergeLoadedSources(sources); } @SuppressWarnings("static-method") public Object enterLanguage(TruffleLanguage language) { - return GraalRuntimeAccessor.ENGINE.enterLanguageFromRuntime(language); + return OptimizedRuntimeAccessor.ENGINE.enterLanguageFromRuntime(language); } @SuppressWarnings("static-method") public void leaveLanguage(TruffleLanguage language, Object prev) { - GraalRuntimeAccessor.ENGINE.leaveLanguageFromRuntime(language, prev); + OptimizedRuntimeAccessor.ENGINE.leaveLanguageFromRuntime(language, prev); } @SuppressWarnings("static-method") public TruffleLanguage getLanguage(OptimizedCallTarget target) { RootNode root = target.getRootNode(); - return GraalRuntimeAccessor.NODES.getLanguage(root); + return OptimizedRuntimeAccessor.NODES.getLanguage(root); } } diff --git a/truffle/src/com.oracle.truffle.runtime/src/com/oracle/truffle/runtime/FloodControlHandler.java b/truffle/src/com.oracle.truffle.runtime/src/com/oracle/truffle/runtime/FloodControlHandler.java index b90c141d9d31..1a15d37a2c3c 100644 --- a/truffle/src/com.oracle.truffle.runtime/src/com/oracle/truffle/runtime/FloodControlHandler.java +++ b/truffle/src/com.oracle.truffle.runtime/src/com/oracle/truffle/runtime/FloodControlHandler.java @@ -48,7 +48,7 @@ * Support for an embedder to impose control over logging and dumping during Truffle compilation * failure handling. */ -public interface FloodControlHandler extends GraalRuntimeServiceProvider { +public interface FloodControlHandler extends OptimizedRuntimeServiceProvider { /** * Return {@code true} to suppress logging and dumping of a given exception. diff --git a/truffle/src/com.oracle.truffle.runtime/src/com/oracle/truffle/runtime/LoopNodeFactory.java b/truffle/src/com.oracle.truffle.runtime/src/com/oracle/truffle/runtime/LoopNodeFactory.java index 353c3713c990..be6163dc6ceb 100644 --- a/truffle/src/com.oracle.truffle.runtime/src/com/oracle/truffle/runtime/LoopNodeFactory.java +++ b/truffle/src/com.oracle.truffle.runtime/src/com/oracle/truffle/runtime/LoopNodeFactory.java @@ -43,7 +43,7 @@ import com.oracle.truffle.api.nodes.LoopNode; import com.oracle.truffle.api.nodes.RepeatingNode; -public interface LoopNodeFactory extends GraalRuntimeServiceProvider { +public interface LoopNodeFactory extends OptimizedRuntimeServiceProvider { LoopNode create(RepeatingNode repeatingNode); diff --git a/truffle/src/com.oracle.truffle.runtime/src/com/oracle/truffle/runtime/ModulesSupport.java b/truffle/src/com.oracle.truffle.runtime/src/com/oracle/truffle/runtime/ModulesSupport.java index 0e9f911bc519..edeefba48171 100644 --- a/truffle/src/com.oracle.truffle.runtime/src/com/oracle/truffle/runtime/ModulesSupport.java +++ b/truffle/src/com.oracle.truffle.runtime/src/com/oracle/truffle/runtime/ModulesSupport.java @@ -42,8 +42,6 @@ import java.lang.module.ModuleDescriptor.Requires; -import com.oracle.truffle.runtime.hotspot.HotSpotTruffleRuntimeAccess; - import jdk.internal.module.Modules; public final class ModulesSupport { @@ -64,7 +62,15 @@ private ModulesSupport() { } public static boolean exportJVMCI(Class toClass) { - Module jvmciModule = HotSpotTruffleRuntimeAccess.class.getModule().getLayer().findModule("jdk.internal.vm.ci").orElse(null); + ModuleLayer layer = toClass.getModule().getLayer(); + if (layer == null) { + /* + * Truffle is running in an unnamed module, so we cannot export jvmci to it. + */ + return false; + } + + Module jvmciModule = layer.findModule("jdk.internal.vm.ci").orElse(null); if (jvmciModule == null) { // jvmci not found -> fallback to default runtime return false; diff --git a/truffle/src/com.oracle.truffle.runtime/src/com/oracle/truffle/runtime/OptimizedAssumption.java b/truffle/src/com.oracle.truffle.runtime/src/com/oracle/truffle/runtime/OptimizedAssumption.java index 627932776c0f..c6f10e6e8989 100644 --- a/truffle/src/com.oracle.truffle.runtime/src/com/oracle/truffle/runtime/OptimizedAssumption.java +++ b/truffle/src/com.oracle.truffle.runtime/src/com/oracle/truffle/runtime/OptimizedAssumption.java @@ -207,7 +207,7 @@ private synchronized void invalidateImpl(String message) { engineOptions = callTarget.getOptionValues(); logger = callTarget.engine.getEngineLogger(); } else { - EngineData engineData = GraalTVMCI.getEngineData(null); + EngineData engineData = OptimizedTVMCI.getEngineData(null); engineOptions = engineData.engineOptions; logger = engineData.getEngineLogger(); } diff --git a/truffle/src/com.oracle.truffle.runtime/src/com/oracle/truffle/runtime/OptimizedBlockNode.java b/truffle/src/com.oracle.truffle.runtime/src/com/oracle/truffle/runtime/OptimizedBlockNode.java index 343c74d8e81c..41fa6c312fe3 100644 --- a/truffle/src/com.oracle.truffle.runtime/src/com/oracle/truffle/runtime/OptimizedBlockNode.java +++ b/truffle/src/com.oracle.truffle.runtime/src/com/oracle/truffle/runtime/OptimizedBlockNode.java @@ -647,7 +647,7 @@ public static final class PartialBlocks { RootNode rootNode = rootCompilation.getRootNode(); assert rootNode == block.getRootNode(); - GraalTruffleRuntime runtime = GraalTruffleRuntime.getRuntime(); + OptimizedTruffleRuntime runtime = OptimizedTruffleRuntime.getRuntime(); Class materializedFrameClass = runtime.createMaterializedFrame(new Object[0]).getClass(); FrameDescriptor descriptor = rootNode.getFrameDescriptor(); runtime.markFrameMaterializeCalled(descriptor); @@ -662,7 +662,7 @@ public static final class PartialBlocks { } PartialBlockRootNode partialRootNode = new PartialBlockRootNode<>(new FrameDescriptor(), block, startIndex, endIndex, blockIndex); - GraalRuntimeAccessor.NODES.applySharingLayer(rootNode, partialRootNode); + OptimizedRuntimeAccessor.NODES.applySharingLayer(rootNode, partialRootNode); targets[i] = (OptimizedCallTarget) partialRootNode.getCallTarget(); targets[i].setNonTrivialNodeCount(blockSizes[i]); diff --git a/truffle/src/com.oracle.truffle.runtime/src/com/oracle/truffle/runtime/OptimizedCallTarget.java b/truffle/src/com.oracle.truffle.runtime/src/com/oracle/truffle/runtime/OptimizedCallTarget.java index 7e992bccc729..70b325e5f004 100644 --- a/truffle/src/com.oracle.truffle.runtime/src/com/oracle/truffle/runtime/OptimizedCallTarget.java +++ b/truffle/src/com.oracle.truffle.runtime/src/com/oracle/truffle/runtime/OptimizedCallTarget.java @@ -96,7 +96,7 @@ * depending on the type of call. * *

    - *              GraalRuntimeSupport#callProfiled                    GraalRuntimeSupport#callInlined
    + *              OptimizedRuntimeSupport#callProfiled                    OptimizedRuntimeSupport#callInlined
      *                                |                                               |
      *                                |                                               V
      *  PUBLIC   call -> callIndirect | callOSR   callDirect <================> callInlined
    @@ -363,7 +363,7 @@ protected OptimizedCallTarget(OptimizedCallTarget sourceCallTarget, RootNode roo
             this.sourceCallTarget = sourceCallTarget;
             this.speculationLog = sourceCallTarget != null ? sourceCallTarget.getSpeculationLog() : null;
             this.rootNode = rootNode;
    -        this.engine = GraalTVMCI.getEngineData(rootNode);
    +        this.engine = OptimizedTVMCI.getEngineData(rootNode);
             this.resetCompilationProfile();
             // Do not adopt children of OSRRootNodes; we want to preserve the parent of the child
             // node(s).
    @@ -387,8 +387,8 @@ private int uninitializedNodeCount(RootNode rootNode) {
             if (isOSR()) {
                 return -1;
             }
    -        int childrenCount = GraalRuntimeAccessor.NODES.adoptChildrenAndCount(rootNode);
    -        int size = GraalRuntimeAccessor.NODES.computeSize(rootNode);
    +        int childrenCount = OptimizedRuntimeAccessor.NODES.adoptChildrenAndCount(rootNode);
    +        int size = OptimizedRuntimeAccessor.NODES.computeSize(rootNode);
             return size > 0 ? size : childrenCount;
         }
     
    @@ -423,11 +423,11 @@ final Assumption getValidRootAssumption() {
     
         @Override
         public boolean isTrivial() {
    -        return GraalRuntimeAccessor.NODES.isTrivial(rootNode);
    +        return OptimizedRuntimeAccessor.NODES.isTrivial(rootNode);
         }
     
         private FrameDescriptor getParentFrameDescriptor() {
    -        return GraalRuntimeAccessor.NODES.getParentFrameDescriptor(rootNode);
    +        return OptimizedRuntimeAccessor.NODES.getParentFrameDescriptor(rootNode);
         }
     
         /**
    @@ -499,7 +499,7 @@ public final Object call(Object... args) {
             try {
                 return callIndirect(prev, args);
             } catch (Throwable t) {
    -            GraalRuntimeAccessor.LANGUAGE.addStackFrameInfo(prev, null, t, null);
    +            OptimizedRuntimeAccessor.LANGUAGE.addStackFrameInfo(prev, null, t, null);
                 throw rethrow(t);
             } finally {
                 encapsulating.set(prev);
    @@ -761,7 +761,7 @@ private Object executeRootNode(VirtualFrame frame, CompilationState tier) {
     
         private RuntimeException handleException(VirtualFrame frame, Throwable t) {
             Throwable profiledT = profileExceptionType(t);
    -        GraalRuntimeAccessor.LANGUAGE.addStackFrameInfo(null, this, profiledT, frame);
    +        OptimizedRuntimeAccessor.LANGUAGE.addStackFrameInfo(null, this, profiledT, frame);
             throw rethrow(profiledT);
         }
     
    @@ -769,8 +769,8 @@ private void notifyDeoptimized(VirtualFrame frame) {
             runtime().getListener().onCompilationDeoptimized(this, frame);
         }
     
    -    protected static GraalTruffleRuntime runtime() {
    -        return (GraalTruffleRuntime) Truffle.getRuntime();
    +    protected static OptimizedTruffleRuntime runtime() {
    +        return (OptimizedTruffleRuntime) Truffle.getRuntime();
         }
     
         // This should be private but can't be due to SVM bug.
    @@ -787,14 +787,14 @@ public final boolean isInitialized() {
     
         private synchronized void initialize(boolean validate) {
             if (!initialized) {
    -            if (isSourceCallTarget() && rootNode.isCloningAllowed() && !GraalRuntimeAccessor.NODES.isCloneUninitializedSupported(rootNode)) {
    +            if (isSourceCallTarget() && rootNode.isCloningAllowed() && !OptimizedRuntimeAccessor.NODES.isCloneUninitializedSupported(rootNode)) {
                     // We are the source CallTarget, so make a copy.
                     this.uninitializedRootNode = NodeUtil.cloneNode(rootNode);
                 }
     
    -            assert !validate || GraalRuntimeAccessor.NODES.getCallTargetWithoutInitialization(rootNode) == this : "Call target out of sync.";
    +            assert !validate || OptimizedRuntimeAccessor.NODES.getCallTargetWithoutInitialization(rootNode) == this : "Call target out of sync.";
     
    -            GraalRuntimeAccessor.INSTRUMENT.onFirstExecution(getRootNode(), validate);
    +            OptimizedRuntimeAccessor.INSTRUMENT.onFirstExecution(getRootNode(), validate);
                 if (engine.callTargetStatistics) {
                     this.initializedTimestamp = System.nanoTime();
                 } else {
    @@ -941,7 +941,7 @@ public final boolean invalidate(CharSequence reason) {
         final OptimizedCallTarget cloneUninitialized() {
             assert !isSplit() : "Cannot clone a clone.";
             ensureInitialized();
    -        RootNode clonedRoot = GraalRuntimeAccessor.NODES.cloneUninitialized(this, rootNode, uninitializedRootNode);
    +        RootNode clonedRoot = OptimizedRuntimeAccessor.NODES.cloneUninitialized(this, rootNode, uninitializedRootNode);
             return (OptimizedCallTarget) clonedRoot.getCallTarget();
         }
     
    @@ -952,7 +952,7 @@ final OptimizedCallTarget cloneUninitialized() {
          */
         public SpeculationLog getSpeculationLog() {
             if (speculationLog == null) {
    -            SPECULATION_LOG_UPDATER.compareAndSet(this, null, ((GraalTruffleRuntime) Truffle.getRuntime()).createSpeculationLog());
    +            SPECULATION_LOG_UPDATER.compareAndSet(this, null, ((OptimizedTruffleRuntime) Truffle.getRuntime()).createSpeculationLog());
             }
             return speculationLog;
         }
    @@ -963,7 +963,7 @@ final void setSpeculationLog(SpeculationLog speculationLog) {
     
         @Override
         public final JavaConstant asJavaConstant() {
    -        return GraalTruffleRuntime.getRuntime().forObject(this);
    +        return OptimizedTruffleRuntime.getRuntime().forObject(this);
         }
     
         @SuppressWarnings({"unchecked"})
    @@ -1026,7 +1026,7 @@ public final boolean computeBlockCompilations() {
         public final boolean onInvalidate(Object source, CharSequence reason, boolean wasActive) {
             cachedNonTrivialNodeCount = -1;
             if (wasActive) {
    -            GraalTruffleRuntime.getRuntime().getListener().onCompilationInvalidated(this, source, reason);
    +            OptimizedTruffleRuntime.getRuntime().getListener().onCompilationInvalidated(this, source, reason);
             }
             return cancelCompilation(reason) || wasActive;
         }
    @@ -1059,7 +1059,7 @@ public final void onCompilationFailed(Supplier serializedException, bool
                 throw new OptimizationFailedException(error, this);
             }
             if (action.ordinal() >= ExceptionAction.Print.ordinal()) {
    -            GraalTruffleRuntime rt = runtime();
    +            OptimizedTruffleRuntime rt = runtime();
                 Map properties = new LinkedHashMap<>();
                 properties.put("AST", getNonTrivialNodeCount());
                 rt.logEvent(this, 0, "opt fail", toString(), properties, serializedException.get());
    @@ -1184,7 +1184,7 @@ public static int calculateNonTrivialNodes(Node node) {
     
         public final Map getDebugProperties() {
             Map properties = new LinkedHashMap<>();
    -        GraalTruffleRuntimeListener.addASTSizeProperty(this, properties);
    +        OptimizedTruffleRuntimeListener.addASTSizeProperty(this, properties);
             String callsThresholdInInterpreter = String.format("%7d/%5d", getCallCount(), engine.callThresholdInInterpreter);
             String loopsThresholdInInterpreter = String.format("%7d/%5d", getCallAndLoopCount(), engine.callAndLoopThresholdInInterpreter);
             if (engine.multiTier) {
    @@ -1784,7 +1784,7 @@ private boolean prepareForAOTImpl() {
                 return false;
             }
     
    -        ExecutionSignature profile = GraalRuntimeAccessor.NODES.prepareForAOT(rootNode);
    +        ExecutionSignature profile = OptimizedRuntimeAccessor.NODES.prepareForAOT(rootNode);
             if (profile == null) {
                 return false;
             }
    diff --git a/truffle/src/com.oracle.truffle.runtime/src/com/oracle/truffle/runtime/OptimizedDirectCallNode.java b/truffle/src/com.oracle.truffle.runtime/src/com/oracle/truffle/runtime/OptimizedDirectCallNode.java
    index 7cb97f74b7e9..2e4f03f66371 100644
    --- a/truffle/src/com.oracle.truffle.runtime/src/com/oracle/truffle/runtime/OptimizedDirectCallNode.java
    +++ b/truffle/src/com.oracle.truffle.runtime/src/com/oracle/truffle/runtime/OptimizedDirectCallNode.java
    @@ -99,7 +99,7 @@ public Object call(Object... arguments) {
     
         private RuntimeException handleException(Throwable t) {
             Throwable profiledT = profileExceptionType(t);
    -        GraalRuntimeAccessor.LANGUAGE.addStackFrameInfo(this, null, profiledT, null);
    +        OptimizedRuntimeAccessor.LANGUAGE.addStackFrameInfo(this, null, profiledT, null);
             throw OptimizedCallTarget.rethrow(profiledT);
         }
     
    diff --git a/truffle/src/com.oracle.truffle.runtime/src/com/oracle/truffle/runtime/GraalFastThreadLocal.java b/truffle/src/com.oracle.truffle.runtime/src/com/oracle/truffle/runtime/OptimizedFastThreadLocal.java
    similarity index 96%
    rename from truffle/src/com.oracle.truffle.runtime/src/com/oracle/truffle/runtime/GraalFastThreadLocal.java
    rename to truffle/src/com.oracle.truffle.runtime/src/com/oracle/truffle/runtime/OptimizedFastThreadLocal.java
    index 83e08ea1ea52..fd444eeff48b 100644
    --- a/truffle/src/com.oracle.truffle.runtime/src/com/oracle/truffle/runtime/GraalFastThreadLocal.java
    +++ b/truffle/src/com.oracle.truffle.runtime/src/com/oracle/truffle/runtime/OptimizedFastThreadLocal.java
    @@ -48,9 +48,9 @@
     import com.oracle.truffle.api.CompilerDirectives;
     import com.oracle.truffle.api.impl.AbstractFastThreadLocal;
     
    -public abstract class GraalFastThreadLocal extends AbstractFastThreadLocal {
    +public abstract class OptimizedFastThreadLocal extends AbstractFastThreadLocal {
     
    -    protected GraalFastThreadLocal() {
    +    protected OptimizedFastThreadLocal() {
         }
     
         @Override
    diff --git a/truffle/src/com.oracle.truffle.runtime/src/com/oracle/truffle/runtime/GraalFrameInstance.java b/truffle/src/com.oracle.truffle.runtime/src/com/oracle/truffle/runtime/OptimizedFrameInstance.java
    similarity index 92%
    rename from truffle/src/com.oracle.truffle.runtime/src/com/oracle/truffle/runtime/GraalFrameInstance.java
    rename to truffle/src/com.oracle.truffle.runtime/src/com/oracle/truffle/runtime/OptimizedFrameInstance.java
    index 4dcdcd2d23ae..9714731e368d 100644
    --- a/truffle/src/com.oracle.truffle.runtime/src/com/oracle/truffle/runtime/GraalFrameInstance.java
    +++ b/truffle/src/com.oracle.truffle.runtime/src/com/oracle/truffle/runtime/OptimizedFrameInstance.java
    @@ -51,7 +51,7 @@
     
     import jdk.vm.ci.code.stack.InspectedFrame;
     
    -public class GraalFrameInstance implements FrameInstance {
    +public class OptimizedFrameInstance implements FrameInstance {
         static final int CALL_TARGET_INDEX = 0;
         static final int FRAME_INDEX = 1;
         static final int OPTIMIZATION_TIER_FRAME_INDEX = 2;
    @@ -68,7 +68,7 @@ public class GraalFrameInstance implements FrameInstance {
             try {
                 CALL_DIRECT = OptimizedCallTarget.class.getDeclaredMethod("callDirect", Node.class, Object[].class);
                 CALL_INLINED = OptimizedCallTarget.class.getDeclaredMethod("callInlined", Node.class, Object[].class);
    -            CALL_INLINED_CALL = GraalRuntimeSupport.class.getDeclaredMethod(GraalRuntimeSupport.CALL_INLINED_METHOD_NAME, Node.class, CallTarget.class, Object[].class);
    +            CALL_INLINED_CALL = OptimizedRuntimeSupport.class.getDeclaredMethod(OptimizedRuntimeSupport.CALL_INLINED_METHOD_NAME, Node.class, CallTarget.class, Object[].class);
                 CALL_INDIRECT = OptimizedCallTarget.class.getDeclaredMethod("callIndirect", Node.class, Object[].class);
                 CALL_TARGET_METHOD = OptimizedCallTarget.class.getDeclaredMethod("executeRootNode", VirtualFrame.class, CompilationState.class);
             } catch (NoSuchMethodException | SecurityException e) {
    @@ -79,7 +79,7 @@ public class GraalFrameInstance implements FrameInstance {
         private final InspectedFrame callTargetFrame;
         private final InspectedFrame callNodeFrame;
     
    -    GraalFrameInstance(InspectedFrame callTargetFrame, InspectedFrame callNodeFrame) {
    +    OptimizedFrameInstance(InspectedFrame callTargetFrame, InspectedFrame callNodeFrame) {
             this.callTargetFrame = callTargetFrame;
             this.callNodeFrame = callNodeFrame;
         }
    @@ -90,7 +90,7 @@ protected Frame getFrameFrom(InspectedFrame inspectedFrame, FrameAccess access)
                 if (inspectedFrame.isVirtual(FRAME_INDEX)) {
                     final OptimizedCallTarget callTarget = (OptimizedCallTarget) getCallTarget();
                     if (callTarget.engine.traceDeoptimizeFrame) {
    -                    GraalTruffleRuntime.StackTraceHelper.logHostAndGuestStacktrace("FrameInstance#getFrame(MATERIALIZE)", callTarget);
    +                    OptimizedTruffleRuntime.StackTraceHelper.logHostAndGuestStacktrace("FrameInstance#getFrame(MATERIALIZE)", callTarget);
                     }
                     inspectedFrame.materializeVirtualObjects(false);
                 }
    diff --git a/truffle/src/com.oracle.truffle.runtime/src/com/oracle/truffle/runtime/OptimizedIndirectCallNode.java b/truffle/src/com.oracle.truffle.runtime/src/com/oracle/truffle/runtime/OptimizedIndirectCallNode.java
    index efac75377826..1fd0e2d2a75e 100644
    --- a/truffle/src/com.oracle.truffle.runtime/src/com/oracle/truffle/runtime/OptimizedIndirectCallNode.java
    +++ b/truffle/src/com.oracle.truffle.runtime/src/com/oracle/truffle/runtime/OptimizedIndirectCallNode.java
    @@ -72,7 +72,7 @@ public Object call(CallTarget target, Object... arguments) {
     
         private RuntimeException handleException(Throwable t) {
             Throwable profiledT = profileExceptionType(t);
    -        GraalRuntimeAccessor.LANGUAGE.addStackFrameInfo(this, null, profiledT, null);
    +        OptimizedRuntimeAccessor.LANGUAGE.addStackFrameInfo(this, null, profiledT, null);
             throw OptimizedCallTarget.rethrow(profiledT);
         }
     
    diff --git a/truffle/src/com.oracle.truffle.runtime/src/com/oracle/truffle/runtime/GraalOSRFrameInstance.java b/truffle/src/com.oracle.truffle.runtime/src/com/oracle/truffle/runtime/OptimizedOSRFrameInstance.java
    similarity index 92%
    rename from truffle/src/com.oracle.truffle.runtime/src/com/oracle/truffle/runtime/GraalOSRFrameInstance.java
    rename to truffle/src/com.oracle.truffle.runtime/src/com/oracle/truffle/runtime/OptimizedOSRFrameInstance.java
    index 7a60638f9af1..618b47bfaeb7 100644
    --- a/truffle/src/com.oracle.truffle.runtime/src/com/oracle/truffle/runtime/GraalOSRFrameInstance.java
    +++ b/truffle/src/com.oracle.truffle.runtime/src/com/oracle/truffle/runtime/OptimizedOSRFrameInstance.java
    @@ -51,10 +51,10 @@
      *
      * Contains a separate field for the {@link InspectedFrame} containing the most up-to-date Frame.
      */
    -public final class GraalOSRFrameInstance extends GraalFrameInstance {
    +final class OptimizedOSRFrameInstance extends OptimizedFrameInstance {
         private final InspectedFrame osrFrame;
     
    -    GraalOSRFrameInstance(InspectedFrame callTargetFrame, InspectedFrame callNodeFrame, InspectedFrame osrFrame) {
    +    OptimizedOSRFrameInstance(InspectedFrame callTargetFrame, InspectedFrame callNodeFrame, InspectedFrame osrFrame) {
             super(callTargetFrame, callNodeFrame);
             this.osrFrame = osrFrame;
         }
    @@ -70,7 +70,7 @@ public Frame getFrame(FrameAccess access) {
         }
     
         private RootNode getOSRRootNode() {
    -        return ((OptimizedCallTarget) osrFrame.getLocal(GraalFrameInstance.CALL_TARGET_INDEX)).getRootNode();
    +        return ((OptimizedCallTarget) osrFrame.getLocal(OptimizedFrameInstance.CALL_TARGET_INDEX)).getRootNode();
         }
     
         @TruffleBoundary
    diff --git a/truffle/src/com.oracle.truffle.runtime/src/com/oracle/truffle/runtime/OptimizedOSRLoopNode.java b/truffle/src/com.oracle.truffle.runtime/src/com/oracle/truffle/runtime/OptimizedOSRLoopNode.java
    index 4902e3993e86..1497be1e77c8 100644
    --- a/truffle/src/com.oracle.truffle.runtime/src/com/oracle/truffle/runtime/OptimizedOSRLoopNode.java
    +++ b/truffle/src/com.oracle.truffle.runtime/src/com/oracle/truffle/runtime/OptimizedOSRLoopNode.java
    @@ -274,7 +274,7 @@ private AbstractLoopOSRRootNode createRootNodeImpl(RootNode root, Class T unsafeCast(Object value, Class type, boolean condition, boolean
         @Override
         public void flushCompileQueue(Object runtimeData) {
             EngineData engine = (EngineData) runtimeData;
    -        BackgroundCompileQueue queue = GraalTruffleRuntime.getRuntime().getCompileQueue();
    +        BackgroundCompileQueue queue = OptimizedTruffleRuntime.getRuntime().getCompileQueue();
             // compile queue might be null if no call target was yet created
             if (queue != null) {
                 for (OptimizedCallTarget target : queue.getQueuedTargets(engine)) {
    @@ -293,7 +293,7 @@ public void flushCompileQueue(Object runtimeData) {
     
         @Override
         public Object tryLoadCachedEngine(OptionValues options, Function loggerFactory) {
    -        return GraalTruffleRuntime.getRuntime().getEngineCacheSupport().tryLoadingCachedEngine(options, loggerFactory);
    +        return OptimizedTruffleRuntime.getRuntime().getEngineCacheSupport().tryLoadingCachedEngine(options, loggerFactory);
         }
     
         @Override
    @@ -333,22 +333,22 @@ public boolean isOSRRootNode(RootNode rootNode) {
     
         @Override
         public int getObjectAlignment() {
    -        return GraalTruffleRuntime.getRuntime().getObjectAlignment();
    +        return OptimizedTruffleRuntime.getRuntime().getObjectAlignment();
         }
     
         @Override
         public int getArrayBaseOffset(Class componentType) {
    -        return GraalTruffleRuntime.getRuntime().getArrayBaseOffset(componentType);
    +        return OptimizedTruffleRuntime.getRuntime().getArrayBaseOffset(componentType);
         }
     
         @Override
         public int getArrayIndexScale(Class componentType) {
    -        return GraalTruffleRuntime.getRuntime().getArrayIndexScale(componentType);
    +        return OptimizedTruffleRuntime.getRuntime().getArrayIndexScale(componentType);
         }
     
         @Override
         public int getBaseInstanceSize(Class type) {
    -        return GraalTruffleRuntime.getRuntime().getBaseInstanceSize(type);
    +        return OptimizedTruffleRuntime.getRuntime().getBaseInstanceSize(type);
         }
     
         @Override
    @@ -358,12 +358,12 @@ public boolean isLegacyCompilerOption(String key) {
     
         @Override
         public int[] getFieldOffsets(Class type, boolean includePrimitive, boolean includeSuperclasses) {
    -        return GraalTruffleRuntime.getRuntime().getFieldOffsets(type, includePrimitive, includeSuperclasses);
    +        return OptimizedTruffleRuntime.getRuntime().getFieldOffsets(type, includePrimitive, includeSuperclasses);
         }
     
         @Override
         public AbstractFastThreadLocal getContextThreadLocal() {
    -        AbstractFastThreadLocal local = GraalTruffleRuntime.getRuntime().getFastThreadLocalImpl();
    +        AbstractFastThreadLocal local = OptimizedTruffleRuntime.getRuntime().getFastThreadLocalImpl();
             if (local == null) {
                 return super.getContextThreadLocal();
             }
    diff --git a/truffle/src/com.oracle.truffle.runtime/src/com/oracle/truffle/runtime/GraalTVMCI.java b/truffle/src/com.oracle.truffle.runtime/src/com/oracle/truffle/runtime/OptimizedTVMCI.java
    similarity index 91%
    rename from truffle/src/com.oracle.truffle.runtime/src/com/oracle/truffle/runtime/GraalTVMCI.java
    rename to truffle/src/com.oracle.truffle.runtime/src/com/oracle/truffle/runtime/OptimizedTVMCI.java
    index 1a444ecb9308..13975b20bdfc 100644
    --- a/truffle/src/com.oracle.truffle.runtime/src/com/oracle/truffle/runtime/GraalTVMCI.java
    +++ b/truffle/src/com.oracle.truffle.runtime/src/com/oracle/truffle/runtime/OptimizedTVMCI.java
    @@ -45,20 +45,20 @@
     import com.oracle.truffle.api.impl.TVMCI;
     import com.oracle.truffle.api.nodes.RootNode;
     
    -public final class GraalTVMCI extends TVMCI {
    +public final class OptimizedTVMCI extends TVMCI {
     
         @Override
         protected RuntimeSupport createRuntimeSupport(Object permission) {
    -        return new GraalRuntimeSupport(permission);
    +        return new OptimizedRuntimeSupport(permission);
         }
     
         static EngineData getEngineData(RootNode rootNode) {
    -        final EngineSupport engineAccess = GraalRuntimeAccessor.ENGINE;
    +        final EngineSupport engineAccess = OptimizedRuntimeAccessor.ENGINE;
             final Object layer;
             if (rootNode == null) {
                 layer = engineAccess.getCurrentSharingLayer();
             } else {
    -            layer = GraalRuntimeAccessor.NODES.getSharingLayer(rootNode);
    +            layer = OptimizedRuntimeAccessor.NODES.getSharingLayer(rootNode);
             }
             return engineAccess.getOrCreateRuntimeData(layer);
         }
    diff --git a/truffle/src/com.oracle.truffle.runtime/src/com/oracle/truffle/runtime/GraalTestTVMCI.java b/truffle/src/com.oracle.truffle.runtime/src/com/oracle/truffle/runtime/OptimizedTestTVMCI.java
    similarity index 94%
    rename from truffle/src/com.oracle.truffle.runtime/src/com/oracle/truffle/runtime/GraalTestTVMCI.java
    rename to truffle/src/com.oracle.truffle.runtime/src/com/oracle/truffle/runtime/OptimizedTestTVMCI.java
    index 40a2af093a59..a20b5717e3f6 100644
    --- a/truffle/src/com.oracle.truffle.runtime/src/com/oracle/truffle/runtime/GraalTestTVMCI.java
    +++ b/truffle/src/com.oracle.truffle.runtime/src/com/oracle/truffle/runtime/OptimizedTestTVMCI.java
    @@ -45,9 +45,9 @@
     
     import com.oracle.truffle.api.impl.TVMCI;
     import com.oracle.truffle.api.nodes.RootNode;
    -import com.oracle.truffle.runtime.GraalTestTVMCI.GraalTestContext;
    +import com.oracle.truffle.runtime.OptimizedTestTVMCI.GraalTestContext;
     
    -final class GraalTestTVMCI extends TVMCI.Test {
    +final class OptimizedTestTVMCI extends TVMCI.Test {
     
         static final class GraalTestContext implements Closeable {
     
    diff --git a/truffle/src/com.oracle.truffle.runtime/src/com/oracle/truffle/runtime/GraalTruffleRuntime.java b/truffle/src/com.oracle.truffle.runtime/src/com/oracle/truffle/runtime/OptimizedTruffleRuntime.java
    similarity index 95%
    rename from truffle/src/com.oracle.truffle.runtime/src/com/oracle/truffle/runtime/GraalTruffleRuntime.java
    rename to truffle/src/com.oracle.truffle.runtime/src/com/oracle/truffle/runtime/OptimizedTruffleRuntime.java
    index 9c0f11a81b8c..1da381ee380e 100644
    --- a/truffle/src/com.oracle.truffle.runtime/src/com/oracle/truffle/runtime/GraalTruffleRuntime.java
    +++ b/truffle/src/com.oracle.truffle.runtime/src/com/oracle/truffle/runtime/OptimizedTruffleRuntime.java
    @@ -164,7 +164,7 @@
      * Implementation of the Truffle runtime when running on top of Graal. There is only one per VM.
      */
     
    -public abstract class GraalTruffleRuntime implements TruffleRuntime, TruffleCompilerRuntime {
    +public abstract class OptimizedTruffleRuntime implements TruffleRuntime, TruffleCompilerRuntime {
     
         private static final int JAVA_SPECIFICATION_VERSION = Runtime.version().feature();
     
    @@ -176,21 +176,21 @@ protected void clearState() {
             knownMethods = null;
         }
     
    -    private final GraalTruffleRuntimeListenerDispatcher listeners = new GraalTruffleRuntimeListenerDispatcher();
    +    private final OptimizedTruffleRuntimeListenerDispatcher listeners = new OptimizedTruffleRuntimeListenerDispatcher();
     
         protected volatile TruffleCompiler truffleCompiler;
         protected volatile OptimizedCallTarget initializeCallTarget;
     
         protected KnownMethods knownMethods;
     
    -    private final GraalTVMCI tvmci = new GraalTVMCI();
    -    private volatile GraalTestTVMCI testTvmci;
    +    private final OptimizedTVMCI tvmci = new OptimizedTVMCI();
    +    private volatile OptimizedTestTVMCI testTvmci;
     
         /**
          * Utility method that casts the singleton {@link TruffleRuntime}.
          */
    -    public static GraalTruffleRuntime getRuntime() {
    -        return (GraalTruffleRuntime) Truffle.getRuntime();
    +    public static OptimizedTruffleRuntime getRuntime() {
    +        return (OptimizedTruffleRuntime) Truffle.getRuntime();
         }
     
         private final LoopNodeFactory loopNodeFactory;
    @@ -202,7 +202,7 @@ public static GraalTruffleRuntime getRuntime() {
     
         protected final TruffleCompilationSupport compilationSupport;
     
    -    public GraalTruffleRuntime(TruffleCompilationSupport compilationSupport, Iterable> extraLookupTypes) {
    +    public OptimizedTruffleRuntime(TruffleCompilationSupport compilationSupport, Iterable> extraLookupTypes) {
             this.compilationSupport = compilationSupport;
             this.lookupTypes = initLookupTypes(extraLookupTypes);
             List options = new ArrayList<>();
    @@ -264,7 +264,7 @@ public final String validateCompilerOption(String key, String value) {
             return compilationSupport.validateCompilerOption(key, value);
         }
     
    -    protected GraalTVMCI getTvmci() {
    +    protected OptimizedTVMCI getTvmci() {
             return tvmci;
         }
     
    @@ -272,7 +272,7 @@ protected GraalTVMCI getTvmci() {
             if (testTvmci == null) {
                 synchronized (this) {
                     if (testTvmci == null) {
    -                    testTvmci = new GraalTestTVMCI();
    +                    testTvmci = new OptimizedTestTVMCI();
                     }
                 }
             }
    @@ -305,13 +305,13 @@ private static  T loadServiceProvider(Class clazz, boolean failIfNotFound)
             } else {
                 providers = TruffleRuntimeServices.load(clazz);
             }
    -        boolean priorityService = GraalRuntimeServiceProvider.class.isAssignableFrom(clazz);
    +        boolean priorityService = OptimizedRuntimeServiceProvider.class.isAssignableFrom(clazz);
             T bestFactory = null;
             int bestPriority = 0;
             for (T factory : providers) {
                 int currentPriority;
                 if (priorityService) {
    -                currentPriority = ((GraalRuntimeServiceProvider) factory).getPriority();
    +                currentPriority = ((OptimizedRuntimeServiceProvider) factory).getPriority();
                 } else {
                     currentPriority = 0;
                 }
    @@ -326,7 +326,7 @@ private static  T loadServiceProvider(Class clazz, boolean failIfNotFound)
             return bestFactory;
         }
     
    -    private static  T loadGraalRuntimeServiceProvider(Class clazz, List descriptors, boolean failIfNotFound) {
    +    private static  T loadGraalRuntimeServiceProvider(Class clazz, List descriptors, boolean failIfNotFound) {
             T bestFactory = loadServiceProvider(clazz, failIfNotFound);
             if (descriptors != null && bestFactory != null) {
                 OptionDescriptors serviceOptions = bestFactory.getEngineOptions();
    @@ -603,12 +603,12 @@ public final void initializeKnownMethods(MetaAccessProvider metaAccess) {
     
         /** Accessor for non-public state in {@link FrameDescriptor}. */
         public void markFrameMaterializeCalled(FrameDescriptor descriptor) {
    -        GraalRuntimeAccessor.FRAME.markMaterializeCalled(descriptor);
    +        OptimizedRuntimeAccessor.FRAME.markMaterializeCalled(descriptor);
         }
     
         /** Accessor for non-public state in {@link FrameDescriptor}. */
         public boolean getFrameMaterializeCalled(FrameDescriptor descriptor) {
    -        return GraalRuntimeAccessor.FRAME.getMaterializeCalled(descriptor);
    +        return OptimizedRuntimeAccessor.FRAME.getMaterializeCalled(descriptor);
         }
     
         @Override
    @@ -669,7 +669,7 @@ public final Assumption createAssumption(String name) {
             return new OptimizedAssumption(name);
         }
     
    -    public final GraalTruffleRuntimeListener getListener() {
    +    public final OptimizedTruffleRuntimeListener getListener() {
             return listeners;
         }
     
    @@ -776,9 +776,9 @@ public T visitFrame(InspectedFrame frame) {
                 } else {
                     try {
                         if (osrFrame != null) {
    -                        return visitor.visitFrame(new GraalOSRFrameInstance(frame, callNodeFrame, osrFrame));
    +                        return visitor.visitFrame(new OptimizedOSRFrameInstance(frame, callNodeFrame, osrFrame));
                         } else {
    -                        return visitor.visitFrame(new GraalFrameInstance(frame, callNodeFrame));
    +                        return visitor.visitFrame(new OptimizedFrameInstance(frame, callNodeFrame));
                         }
                     } finally {
                         osrFrame = null;
    @@ -788,7 +788,7 @@ public T visitFrame(InspectedFrame frame) {
             }
     
             private static boolean isOSRFrame(InspectedFrame frame) {
    -            return ((OptimizedCallTarget) frame.getLocal(GraalFrameInstance.CALL_TARGET_INDEX)).getRootNode() instanceof BaseOSRRootNode;
    +            return ((OptimizedCallTarget) frame.getLocal(OptimizedFrameInstance.CALL_TARGET_INDEX)).getRootNode() instanceof BaseOSRRootNode;
             }
         }
     
    @@ -827,11 +827,11 @@ public  T getCapability(Class capability) {
     
         protected abstract OptimizedCallTarget createInitializationCallTarget(EngineData engine);
     
    -    public void addListener(GraalTruffleRuntimeListener listener) {
    +    public void addListener(OptimizedTruffleRuntimeListener listener) {
             listeners.add(listener);
         }
     
    -    public void removeListener(GraalTruffleRuntimeListener listener) {
    +    public void removeListener(OptimizedTruffleRuntimeListener listener) {
             listeners.remove(listener);
         }
     
    @@ -998,7 +998,7 @@ public KnownMethods getKnownMethods() {
          * Use {@link OptimizedCallTarget#engine} whenever possible as it's much faster.
          */
         protected static EngineData getEngineData(RootNode rootNode) {
    -        return GraalTVMCI.getEngineData(rootNode);
    +        return OptimizedTVMCI.getEngineData(rootNode);
         }
     
         @SuppressWarnings("deprecation")
    @@ -1007,7 +1007,7 @@ private static com.oracle.truffle.api.object.LayoutFactory loadObjectLayoutFacto
         }
     
         private static  List> loadService(Class service) {
    -        ClassLoader runtimeClassLoader = GraalTruffleRuntime.class.getClassLoader();
    +        ClassLoader runtimeClassLoader = OptimizedTruffleRuntime.class.getClassLoader();
             ClassLoader appClassLoader = service.getClassLoader();
             ServiceLoader appLoader = ServiceLoader.load(service, appClassLoader);
             if (runtimeClassLoader.equals(appClassLoader)) {
    @@ -1065,11 +1065,11 @@ public final class KnownMethods {
             public final ResolvedJavaMethod[] anyFrameMethod;
     
             public KnownMethods(MetaAccessProvider metaAccess) {
    -            this.callDirectMethod = metaAccess.lookupJavaMethod(GraalFrameInstance.CALL_DIRECT);
    -            this.callIndirectMethod = metaAccess.lookupJavaMethod(GraalFrameInstance.CALL_INDIRECT);
    -            this.callInlinedMethod = metaAccess.lookupJavaMethod(GraalFrameInstance.CALL_INLINED);
    -            this.callInlinedCallMethod = metaAccess.lookupJavaMethod(GraalFrameInstance.CALL_INLINED_CALL);
    -            this.callTargetMethod = metaAccess.lookupJavaMethod(GraalFrameInstance.CALL_TARGET_METHOD);
    +            this.callDirectMethod = metaAccess.lookupJavaMethod(OptimizedFrameInstance.CALL_DIRECT);
    +            this.callIndirectMethod = metaAccess.lookupJavaMethod(OptimizedFrameInstance.CALL_INDIRECT);
    +            this.callInlinedMethod = metaAccess.lookupJavaMethod(OptimizedFrameInstance.CALL_INLINED);
    +            this.callInlinedCallMethod = metaAccess.lookupJavaMethod(OptimizedFrameInstance.CALL_INLINED_CALL);
    +            this.callTargetMethod = metaAccess.lookupJavaMethod(OptimizedFrameInstance.CALL_TARGET_METHOD);
                 this.anyFrameMethod = new ResolvedJavaMethod[]{callDirectMethod, callIndirectMethod, callInlinedMethod, callTargetMethod, callInlinedCallMethod};
             }
         }
    @@ -1094,7 +1094,7 @@ public boolean isSuppressedFailure(TruffleCompilable compilable, Supplier() {
    @@ -1316,7 +1316,7 @@ public OptionDescriptor get(String optionName) {
                     newOptionName = convertFromLegacyOptionName(optionName);
                 }
     
    -            if (newOptionName != null && GraalTruffleRuntime.getRuntime().existsCompilerOption(newOptionName)) {
    +            if (newOptionName != null && OptimizedTruffleRuntime.getRuntime().existsCompilerOption(newOptionName)) {
                     OptionDescriptor.Builder b = OptionDescriptor.newBuilder(getOrCreateOptionKey(optionName), optionName);
                     if (isLegacyOption(optionName)) {
                         b.deprecated(true).deprecationMessage(
    @@ -1335,7 +1335,7 @@ static OptionKey getOrCreateOptionKey(String name) {
                         if (isLegacyOption(optionName)) {
                             optionName = convertFromLegacyOptionName(optionName);
                         }
    -                    String result = GraalTruffleRuntime.getRuntime().validateCompilerOption(optionName, v);
    +                    String result = OptimizedTruffleRuntime.getRuntime().validateCompilerOption(optionName, v);
                         if (result != null) {
                             throw new IllegalArgumentException(result);
                         }
    @@ -1400,7 +1400,7 @@ public Iterator iterator() {
                     /*
                      * Compiler options descriptor never change so it is save to cache them per runtime.
                      */
    -                options = optionsArray = GraalTruffleRuntime.getRuntime().listCompilerOptions();
    +                options = optionsArray = OptimizedTruffleRuntime.getRuntime().listCompilerOptions();
                 }
                 List descriptors = new ArrayList<>();
                 for (TruffleCompilerOptionDescriptor descriptor : optionsArray) {
    diff --git a/truffle/src/com.oracle.truffle.runtime/src/com/oracle/truffle/runtime/GraalTruffleRuntimeListener.java b/truffle/src/com.oracle.truffle.runtime/src/com/oracle/truffle/runtime/OptimizedTruffleRuntimeListener.java
    similarity index 98%
    rename from truffle/src/com.oracle.truffle.runtime/src/com/oracle/truffle/runtime/GraalTruffleRuntimeListener.java
    rename to truffle/src/com.oracle.truffle.runtime/src/com/oracle/truffle/runtime/OptimizedTruffleRuntimeListener.java
    index 8c206f8fb13e..c5c2609b8296 100644
    --- a/truffle/src/com.oracle.truffle.runtime/src/com/oracle/truffle/runtime/GraalTruffleRuntimeListener.java
    +++ b/truffle/src/com.oracle.truffle.runtime/src/com/oracle/truffle/runtime/OptimizedTruffleRuntimeListener.java
    @@ -66,7 +66,7 @@
      * * represents the Kleene Closure.
      * 

    */ -public interface GraalTruffleRuntimeListener { +public interface OptimizedTruffleRuntimeListener { /** * Notifies this object when the target of a Truffle call node is @@ -268,13 +268,13 @@ default void onCompilationDeoptimized(OptimizedCallTarget target, Frame frame) { } /** - * Notifies this object the {@link GraalTruffleRuntime} is being shut down. + * Notifies this object the {@link OptimizedTruffleRuntime} is being shut down. */ default void onShutdown() { } /** - * Notifies this object an engine using the {@link GraalTruffleRuntime} was closed. + * Notifies this object an engine using the {@link OptimizedTruffleRuntime} was closed. * * @param runtimeData the engine's compiler configuration */ diff --git a/truffle/src/com.oracle.truffle.runtime/src/com/oracle/truffle/runtime/GraalTruffleRuntimeListenerDispatcher.java b/truffle/src/com.oracle.truffle.runtime/src/com/oracle/truffle/runtime/OptimizedTruffleRuntimeListenerDispatcher.java similarity index 91% rename from truffle/src/com.oracle.truffle.runtime/src/com/oracle/truffle/runtime/GraalTruffleRuntimeListenerDispatcher.java rename to truffle/src/com.oracle.truffle.runtime/src/com/oracle/truffle/runtime/OptimizedTruffleRuntimeListenerDispatcher.java index 5d4d34caac5a..18da6c8f6ffd 100644 --- a/truffle/src/com.oracle.truffle.runtime/src/com/oracle/truffle/runtime/GraalTruffleRuntimeListenerDispatcher.java +++ b/truffle/src/com.oracle.truffle.runtime/src/com/oracle/truffle/runtime/OptimizedTruffleRuntimeListenerDispatcher.java @@ -49,14 +49,14 @@ import com.oracle.truffle.compiler.TruffleCompilerListener; /** - * A collection for broadcasting {@link GraalTruffleRuntimeListener} events and converting - * {@link TruffleCompilerListener} events to {@link GraalTruffleRuntimeListener} events. + * A collection for broadcasting {@link OptimizedTruffleRuntimeListener} events and converting + * {@link TruffleCompilerListener} events to {@link OptimizedTruffleRuntimeListener} events. */ @SuppressWarnings("serial") -final class GraalTruffleRuntimeListenerDispatcher extends CopyOnWriteArrayList implements GraalTruffleRuntimeListener, TruffleCompilerListener { +final class OptimizedTruffleRuntimeListenerDispatcher extends CopyOnWriteArrayList implements OptimizedTruffleRuntimeListener, TruffleCompilerListener { @Override - public boolean add(GraalTruffleRuntimeListener e) { + public boolean add(OptimizedTruffleRuntimeListener e) { if (e != this && !contains(e)) { return super.add(e); } @@ -128,9 +128,9 @@ public void onEngineClosed(EngineData runtimeData) { invokeListeners((l) -> l.onEngineClosed(runtimeData)); } - private void invokeListeners(Consumer action) { + private void invokeListeners(Consumer action) { Throwable exception = null; - for (GraalTruffleRuntimeListener l : this) { + for (OptimizedTruffleRuntimeListener l : this) { try { action.accept(l); } catch (ThreadDeath t) { @@ -153,7 +153,7 @@ private static RuntimeException sthrow(Class type, Thro throw (E) ex; } - // Conversion from TruffleCompilerListener events to GraalTruffleRuntimeListener events + // Conversion from TruffleCompilerListener events to OptimizedTruffleRuntimeListener events @Override public void onTruffleTierFinished(TruffleCompilable compilable, TruffleCompilationTask task, GraphInfo graph) { diff --git a/truffle/src/com.oracle.truffle.runtime/src/com/oracle/truffle/runtime/TruffleSplittingStrategy.java b/truffle/src/com.oracle.truffle.runtime/src/com/oracle/truffle/runtime/TruffleSplittingStrategy.java index 8ad846487a86..61dd96b122b4 100644 --- a/truffle/src/com.oracle.truffle.runtime/src/com/oracle/truffle/runtime/TruffleSplittingStrategy.java +++ b/truffle/src/com.oracle.truffle.runtime/src/com/oracle/truffle/runtime/TruffleSplittingStrategy.java @@ -154,7 +154,7 @@ private static String recursiveSplitMessageFactory(OptimizedDirectCallNode node, private static void maybeTraceFail(EngineData engine, OptimizedDirectCallNode call, BiFunction messageFactory) { if (engine.traceSplits) { - GraalTruffleRuntime.getRuntime().getListener().onCompilationSplitFailed(call, messageFactory.apply(call, engine)); + OptimizedTruffleRuntime.getRuntime().getListener().onCompilationSplitFailed(call, messageFactory.apply(call, engine)); } } @@ -301,7 +301,7 @@ static class SplitStatisticsData { } } - private static final class SplitStatisticsReporter implements GraalTruffleRuntimeListener { + private static final class SplitStatisticsReporter implements OptimizedTruffleRuntimeListener { private static final String D_FORMAT = "%n%-82s: %10d"; private static final String D_LONG_FORMAT = "%n%-120s: %10d"; @@ -358,7 +358,7 @@ private static Map sortByIntegerValue(Map map) { } } - static void installListener(GraalTruffleRuntime runtime) { + static void installListener(OptimizedTruffleRuntime runtime) { runtime.addListener(new SplitStatisticsReporter()); } } diff --git a/truffle/src/com.oracle.truffle.runtime/src/com/oracle/truffle/runtime/TruffleTypes.java b/truffle/src/com.oracle.truffle.runtime/src/com/oracle/truffle/runtime/TruffleTypes.java index 8030caad675d..2798085fa6e4 100644 --- a/truffle/src/com.oracle.truffle.runtime/src/com/oracle/truffle/runtime/TruffleTypes.java +++ b/truffle/src/com.oracle.truffle.runtime/src/com/oracle/truffle/runtime/TruffleTypes.java @@ -42,7 +42,7 @@ /** * A service for getting types that can be resolved by - * {@link GraalTruffleRuntime#resolveType(jdk.vm.ci.meta.MetaAccessProvider, String, boolean)}. + * {@link OptimizedTruffleRuntime#resolveType(jdk.vm.ci.meta.MetaAccessProvider, String, boolean)}. */ public interface TruffleTypes { diff --git a/truffle/src/com.oracle.truffle.runtime/src/com/oracle/truffle/runtime/debug/JFRListener.java b/truffle/src/com.oracle.truffle.runtime/src/com/oracle/truffle/runtime/debug/JFRListener.java index 23253332049d..b099a6f59e1b 100644 --- a/truffle/src/com.oracle.truffle.runtime/src/com/oracle/truffle/runtime/debug/JFRListener.java +++ b/truffle/src/com.oracle.truffle.runtime/src/com/oracle/truffle/runtime/debug/JFRListener.java @@ -56,7 +56,7 @@ import com.oracle.truffle.compiler.TruffleCompilerListener.GraphInfo; import com.oracle.truffle.runtime.AbstractCompilationTask; import com.oracle.truffle.runtime.AbstractGraalTruffleRuntimeListener; -import com.oracle.truffle.runtime.GraalTruffleRuntime; +import com.oracle.truffle.runtime.OptimizedTruffleRuntime; import com.oracle.truffle.runtime.ModuleUtil; import com.oracle.truffle.runtime.OptimizedCallTarget; import com.oracle.truffle.runtime.jfr.CompilationEvent; @@ -86,13 +86,13 @@ public final class JFRListener extends AbstractGraalTruffleRuntimeListener { private final ThreadLocal currentCompilation = new ThreadLocal<>(); private final Statistics statistics; - private JFRListener(GraalTruffleRuntime runtime) { + private JFRListener(OptimizedTruffleRuntime runtime) { super(runtime); statistics = new Statistics(); factory.addPeriodicEvent(CompilationStatisticsEvent.class, statistics); } - public static void install(GraalTruffleRuntime runtime) { + public static void install(OptimizedTruffleRuntime runtime) { if (factory != null) { runtime.addListener(new JFRListener(runtime)); } diff --git a/truffle/src/com.oracle.truffle.runtime/src/com/oracle/truffle/runtime/debug/StatisticsListener.java b/truffle/src/com.oracle.truffle.runtime/src/com/oracle/truffle/runtime/debug/StatisticsListener.java index 1108dd41f990..37bc4e647f5d 100644 --- a/truffle/src/com.oracle.truffle.runtime/src/com/oracle/truffle/runtime/debug/StatisticsListener.java +++ b/truffle/src/com.oracle.truffle.runtime/src/com/oracle/truffle/runtime/debug/StatisticsListener.java @@ -67,7 +67,7 @@ import com.oracle.truffle.runtime.AbstractCompilationTask; import com.oracle.truffle.runtime.AbstractGraalTruffleRuntimeListener; import com.oracle.truffle.runtime.EngineData; -import com.oracle.truffle.runtime.GraalTruffleRuntime; +import com.oracle.truffle.runtime.OptimizedTruffleRuntime; import com.oracle.truffle.runtime.OptimizedCallTarget; import com.oracle.truffle.runtime.OptimizedDirectCallNode; @@ -144,7 +144,7 @@ static final class CompilationStatistics { private final Map timeQueued = new HashMap<>(); - private StatisticsListener(GraalTruffleRuntime runtime) { + private StatisticsListener(OptimizedTruffleRuntime runtime) { super(runtime); } @@ -153,11 +153,11 @@ private StatisticsListener(GraalTruffleRuntime runtime) { */ private final ThreadLocal currentCompilationStatistics = new ThreadLocal<>(); - public static void install(GraalTruffleRuntime runtime) { + public static void install(OptimizedTruffleRuntime runtime) { runtime.addListener(new StatisticsDispatcher(runtime)); } - public static StatisticsListener createEngineListener(GraalTruffleRuntime runtime) { + public static StatisticsListener createEngineListener(OptimizedTruffleRuntime runtime) { return new StatisticsListener(runtime); } @@ -328,7 +328,7 @@ static String formatLabel(String s) { } private void printStatistics(EngineData runtimeData) { - GraalTruffleRuntime rt = runtime; + OptimizedTruffleRuntime rt = runtime; long endTime = System.nanoTime(); StringWriter logMessage = new StringWriter(); try (PrintWriter out = new PrintWriter(logMessage)) { @@ -691,7 +691,7 @@ static class CurrentCompilationStatistics { private static final class StatisticsDispatcher extends AbstractGraalTruffleRuntimeListener { - private StatisticsDispatcher(GraalTruffleRuntime runtime) { + private StatisticsDispatcher(OptimizedTruffleRuntime runtime) { super(runtime); } diff --git a/truffle/src/com.oracle.truffle.runtime/src/com/oracle/truffle/runtime/debug/TraceASTCompilationListener.java b/truffle/src/com.oracle.truffle.runtime/src/com/oracle/truffle/runtime/debug/TraceASTCompilationListener.java index 4e61a30605e8..3a38dc5778e1 100644 --- a/truffle/src/com.oracle.truffle.runtime/src/com/oracle/truffle/runtime/debug/TraceASTCompilationListener.java +++ b/truffle/src/com.oracle.truffle.runtime/src/com/oracle/truffle/runtime/debug/TraceASTCompilationListener.java @@ -50,7 +50,7 @@ import com.oracle.truffle.compiler.TruffleCompilerListener.GraphInfo; import com.oracle.truffle.runtime.AbstractCompilationTask; import com.oracle.truffle.runtime.AbstractGraalTruffleRuntimeListener; -import com.oracle.truffle.runtime.GraalTruffleRuntime; +import com.oracle.truffle.runtime.OptimizedTruffleRuntime; import com.oracle.truffle.runtime.OptimizedCallTarget; import com.oracle.truffle.runtime.OptimizedRuntimeOptions; @@ -59,11 +59,11 @@ */ public final class TraceASTCompilationListener extends AbstractGraalTruffleRuntimeListener { - private TraceASTCompilationListener(GraalTruffleRuntime runtime) { + private TraceASTCompilationListener(OptimizedTruffleRuntime runtime) { super(runtime); } - public static void install(GraalTruffleRuntime runtime) { + public static void install(OptimizedTruffleRuntime runtime) { runtime.addListener(new TraceASTCompilationListener(runtime)); } diff --git a/truffle/src/com.oracle.truffle.runtime/src/com/oracle/truffle/runtime/debug/TraceCompilationListener.java b/truffle/src/com.oracle.truffle.runtime/src/com/oracle/truffle/runtime/debug/TraceCompilationListener.java index 16604926182d..5af09e310ce3 100644 --- a/truffle/src/com.oracle.truffle.runtime/src/com/oracle/truffle/runtime/debug/TraceCompilationListener.java +++ b/truffle/src/com.oracle.truffle.runtime/src/com/oracle/truffle/runtime/debug/TraceCompilationListener.java @@ -50,8 +50,8 @@ import com.oracle.truffle.runtime.AbstractGraalTruffleRuntimeListener; import com.oracle.truffle.runtime.CompilationTask; import com.oracle.truffle.runtime.FixedPointMath; -import com.oracle.truffle.runtime.GraalTruffleRuntime; -import com.oracle.truffle.runtime.GraalTruffleRuntimeListener; +import com.oracle.truffle.runtime.OptimizedTruffleRuntime; +import com.oracle.truffle.runtime.OptimizedTruffleRuntimeListener; import com.oracle.truffle.runtime.OptimizedCallTarget; import com.oracle.truffle.runtime.OptimizedDirectCallNode; @@ -63,11 +63,11 @@ public final class TraceCompilationListener extends AbstractGraalTruffleRuntimeL private final ThreadLocal currentCompilation = new ThreadLocal<>(); - private TraceCompilationListener(GraalTruffleRuntime runtime) { + private TraceCompilationListener(OptimizedTruffleRuntime runtime) { super(runtime); } - public static void install(GraalTruffleRuntime runtime) { + public static void install(OptimizedTruffleRuntime runtime) { runtime.addListener(new TraceCompilationListener(runtime)); } @@ -306,7 +306,7 @@ public void onCompilationInvalidated(OptimizedCallTarget target, Object source, /** * Determines if a failure is permanent. * - * @see GraalTruffleRuntimeListener#onCompilationFailed(OptimizedCallTarget, String, boolean, + * @see OptimizedTruffleRuntimeListener#onCompilationFailed(OptimizedCallTarget, String, boolean, * boolean, int) */ private static boolean isPermanentFailure(boolean bailout, boolean permanentBailout) { diff --git a/truffle/src/com.oracle.truffle.runtime/src/com/oracle/truffle/runtime/debug/TraceCompilationPolymorphismListener.java b/truffle/src/com.oracle.truffle.runtime/src/com/oracle/truffle/runtime/debug/TraceCompilationPolymorphismListener.java index 306fccc5b1f2..c7c3927fa4d2 100644 --- a/truffle/src/com.oracle.truffle.runtime/src/com/oracle/truffle/runtime/debug/TraceCompilationPolymorphismListener.java +++ b/truffle/src/com.oracle.truffle.runtime/src/com/oracle/truffle/runtime/debug/TraceCompilationPolymorphismListener.java @@ -51,17 +51,17 @@ import com.oracle.truffle.compiler.TruffleCompilerListener.GraphInfo; import com.oracle.truffle.runtime.AbstractCompilationTask; import com.oracle.truffle.runtime.AbstractGraalTruffleRuntimeListener; -import com.oracle.truffle.runtime.GraalTruffleRuntime; +import com.oracle.truffle.runtime.OptimizedTruffleRuntime; import com.oracle.truffle.runtime.OptimizedCallTarget; import com.oracle.truffle.runtime.OptimizedRuntimeOptions; public final class TraceCompilationPolymorphismListener extends AbstractGraalTruffleRuntimeListener { - private TraceCompilationPolymorphismListener(GraalTruffleRuntime runtime) { + private TraceCompilationPolymorphismListener(OptimizedTruffleRuntime runtime) { super(runtime); } - public static void install(GraalTruffleRuntime runtime) { + public static void install(OptimizedTruffleRuntime runtime) { runtime.addListener(new TraceCompilationPolymorphismListener(runtime)); } diff --git a/truffle/src/com.oracle.truffle.runtime/src/com/oracle/truffle/runtime/debug/TraceSplittingListener.java b/truffle/src/com.oracle.truffle.runtime/src/com/oracle/truffle/runtime/debug/TraceSplittingListener.java index ad318f443db3..6cf7c0ccfee4 100644 --- a/truffle/src/com.oracle.truffle.runtime/src/com/oracle/truffle/runtime/debug/TraceSplittingListener.java +++ b/truffle/src/com.oracle.truffle.runtime/src/com/oracle/truffle/runtime/debug/TraceSplittingListener.java @@ -45,18 +45,18 @@ import com.oracle.truffle.api.nodes.Node; import com.oracle.truffle.api.nodes.RootNode; import com.oracle.truffle.api.source.SourceSection; -import com.oracle.truffle.runtime.GraalTruffleRuntime; -import com.oracle.truffle.runtime.GraalTruffleRuntimeListener; +import com.oracle.truffle.runtime.OptimizedTruffleRuntime; +import com.oracle.truffle.runtime.OptimizedTruffleRuntimeListener; import com.oracle.truffle.runtime.OptimizedCallTarget; import com.oracle.truffle.runtime.OptimizedDirectCallNode; import com.oracle.truffle.runtime.OptimizedRuntimeOptions; -public final class TraceSplittingListener implements GraalTruffleRuntimeListener { +public final class TraceSplittingListener implements OptimizedTruffleRuntimeListener { private TraceSplittingListener() { } - public static void install(GraalTruffleRuntime runtime) { + public static void install(OptimizedTruffleRuntime runtime) { runtime.addListener(new TraceSplittingListener()); } @@ -69,7 +69,7 @@ public void onCompilationSplit(OptimizedDirectCallNode callNode) { String label = String.format("split %3s-%08x-%-4s ", splitCount++, 0xFFFF_FFFFL & callNode.getCurrentCallTarget().hashCode(), callNode.getCallCount()); final Map debugProperties = callTarget.getDebugProperties(); debugProperties.put("SourceSection", extractSourceSection(callNode)); - GraalTruffleRuntime.getRuntime().logEvent(callTarget, 0, label, debugProperties); + OptimizedTruffleRuntime.getRuntime().logEvent(callTarget, 0, label, debugProperties); } } @@ -80,7 +80,7 @@ public void onCompilationSplitFailed(OptimizedDirectCallNode callNode, CharSeque String label = String.format("split failed " + reason); final Map debugProperties = callTarget.getDebugProperties(); debugProperties.put("SourceSection", extractSourceSection(callNode)); - GraalTruffleRuntime.getRuntime().logEvent(callTarget, 0, label, debugProperties); + OptimizedTruffleRuntime.getRuntime().logEvent(callTarget, 0, label, debugProperties); } } diff --git a/truffle/src/com.oracle.truffle.runtime/src/com/oracle/truffle/runtime/hotspot/HotSpotFastThreadLocal.java b/truffle/src/com.oracle.truffle.runtime/src/com/oracle/truffle/runtime/hotspot/HotSpotFastThreadLocal.java index 26f3abae9cd8..987141ce8b56 100644 --- a/truffle/src/com.oracle.truffle.runtime/src/com/oracle/truffle/runtime/hotspot/HotSpotFastThreadLocal.java +++ b/truffle/src/com.oracle.truffle.runtime/src/com/oracle/truffle/runtime/hotspot/HotSpotFastThreadLocal.java @@ -43,11 +43,11 @@ import java.lang.invoke.MethodHandle; import com.oracle.truffle.api.CompilerDirectives; -import com.oracle.truffle.runtime.GraalFastThreadLocal; +import com.oracle.truffle.runtime.OptimizedFastThreadLocal; import jdk.vm.ci.hotspot.HotSpotJVMCIRuntime; -final class HotSpotFastThreadLocal extends GraalFastThreadLocal { +final class HotSpotFastThreadLocal extends OptimizedFastThreadLocal { static final HotSpotFastThreadLocal SINGLETON = new HotSpotFastThreadLocal(); diff --git a/truffle/src/com.oracle.truffle.runtime/src/com/oracle/truffle/runtime/hotspot/HotSpotTruffleRuntime.java b/truffle/src/com.oracle.truffle.runtime/src/com/oracle/truffle/runtime/hotspot/HotSpotTruffleRuntime.java index 7801644f94be..2a362066d526 100644 --- a/truffle/src/com.oracle.truffle.runtime/src/com/oracle/truffle/runtime/hotspot/HotSpotTruffleRuntime.java +++ b/truffle/src/com.oracle.truffle.runtime/src/com/oracle/truffle/runtime/hotspot/HotSpotTruffleRuntime.java @@ -66,7 +66,7 @@ import com.oracle.truffle.runtime.BackgroundCompileQueue; import com.oracle.truffle.runtime.CompilationTask; import com.oracle.truffle.runtime.EngineData; -import com.oracle.truffle.runtime.GraalTruffleRuntime; +import com.oracle.truffle.runtime.OptimizedTruffleRuntime; import com.oracle.truffle.runtime.OptimizedCallTarget; import com.oracle.truffle.runtime.OptimizedOSRLoopNode; import com.oracle.truffle.runtime.TruffleCallBoundary; @@ -100,7 +100,7 @@ * independent of where the compiler resides (i.e., co-located in the HotSpot heap or running in a * native-image shared library). */ -public final class HotSpotTruffleRuntime extends GraalTruffleRuntime { +public final class HotSpotTruffleRuntime extends OptimizedTruffleRuntime { static final int JAVA_SPEC = Runtime.version().feature(); static final sun.misc.Unsafe UNSAFE = getUnsafe(); @@ -723,7 +723,7 @@ static void traceTransferToInterpreter(HotSpotTruffleRuntime runtime, HotSpotTru } public static HotSpotTruffleRuntime getRuntime() { - return (HotSpotTruffleRuntime) GraalTruffleRuntime.getRuntime(); + return (HotSpotTruffleRuntime) OptimizedTruffleRuntime.getRuntime(); } public boolean isLibGraalCompilationEnabled() { From 442c69dcb6049c12d61c8eb8f0383e453e3fa5d1 Mon Sep 17 00:00:00 2001 From: Christian Humer Date: Fri, 30 Jun 2023 16:49:24 +0200 Subject: [PATCH 19/43] Rename truffle attach projects and distributions. --- compiler/mx.compiler/mx_compiler.py | 3 ++- truffle/mx.truffle/mx_truffle.py | 2 +- truffle/mx.truffle/suite.py | 14 +++++++------- .../src/truffle_attach.cc | 0 4 files changed, 10 insertions(+), 9 deletions(-) rename truffle/src/{org.graalvm.compiler.truffle.libgraal.truffleattach => com.oracle.truffle.runtime.attach}/src/truffle_attach.cc (100%) diff --git a/compiler/mx.compiler/mx_compiler.py b/compiler/mx.compiler/mx_compiler.py index 42addf0fb410..83f3f19a1a01 100644 --- a/compiler/mx.compiler/mx_compiler.py +++ b/compiler/mx.compiler/mx_compiler.py @@ -704,7 +704,8 @@ def _unittest_config_participant(config): # for the junit harness which uses reflection to find @Test methods. In addition, the # tests widely use JVMCI classes so JVMCI needs to also export all its packages to # ALL-UNNAMED. - mainClassArgs.extend(['-JUnitOpenPackages', 'jdk.internal.vm.ci/*=jdk.internal.vm.compiler,ALL-UNNAMED']) + + mainClassArgs.extend(['-JUnitOpenPackages', 'jdk.internal.vm.ci/*=org.graalvm.truffle.runtime,jdk.internal.vm.compiler,ALL-UNNAMED']) mainClassArgs.extend(['-JUnitOpenPackages', 'org.graalvm.truffle/*=ALL-UNNAMED']) mainClassArgs.extend(['-JUnitOpenPackages', 'org.graalvm.truffle.compiler/*=ALL-UNNAMED']) mainClassArgs.extend(['-JUnitOpenPackages', 'org.graalvm.truffle.runtime/*=ALL-UNNAMED']) diff --git a/truffle/mx.truffle/mx_truffle.py b/truffle/mx.truffle/mx_truffle.py index 4fce832bccf1..e2f47c458ded 100644 --- a/truffle/mx.truffle/mx_truffle.py +++ b/truffle/mx.truffle/mx_truffle.py @@ -1147,7 +1147,7 @@ def glob_match(path, pattern): 'truffle:TRUFFLE_COMPILER', 'truffle:TRUFFLE_RUNTIME', ], - support_libraries_distributions=['truffle:TRUFFLE_LIBGRAAL_TRUFFLEATTACH_GRAALVM_SUPPORT'], + support_libraries_distributions=['truffle:TRUFFLE_RUNTIME_ATTACH_SUPPORT'], stability="supported", )) diff --git a/truffle/mx.truffle/suite.py b/truffle/mx.truffle/suite.py index 20a278ccbe40..ca461b03ed2e 100644 --- a/truffle/mx.truffle/suite.py +++ b/truffle/mx.truffle/suite.py @@ -1089,7 +1089,7 @@ "jacoco" : "exclude", }, - "org.graalvm.compiler.truffle.libgraal.truffleattach" : { + "com.oracle.truffle.runtime.attach" : { "subDir" : "src", "native" : "shared_lib", "deliverable" : "truffleattach", @@ -1329,7 +1329,7 @@ } }, - "TRUFFLE_LIBGRAAL_TRUFFLEATTACH" : { + "TRUFFLE_RUNTIME_ATTACH" : { "native" : True, "platformDependent" : True, "platforms" : [ @@ -1340,19 +1340,19 @@ "windows-amd64", ], "layout" : { - "bin/" : "dependency:org.graalvm.compiler.truffle.libgraal.truffleattach", + "bin/" : "dependency:com.oracle.truffle.runtime.attach", }, - "description" : "Contains a library to attach Truffle runtime to jvmci runtime.", + "description" : "Contains a library to provide access for the Truffle runtime to JVMCI.", "maven": True, }, - "TRUFFLE_LIBGRAAL_TRUFFLEATTACH_GRAALVM_SUPPORT" : { + "TRUFFLE_RUNTIME_ATTACH_SUPPORT" : { "native" : True, "platformDependent" : True, "layout" : { - "./" : ["dependency:org.graalvm.compiler.truffle.libgraal.truffleattach"], + "./" : ["dependency:com.oracle.truffle.runtime.attach"], }, - "description" : "Truffle attach library support distribution for the GraalVM", + "description" : "Contains a library to provide access for the Truffle runtime to JVMCI.", "maven" : False, }, diff --git a/truffle/src/org.graalvm.compiler.truffle.libgraal.truffleattach/src/truffle_attach.cc b/truffle/src/com.oracle.truffle.runtime.attach/src/truffle_attach.cc similarity index 100% rename from truffle/src/org.graalvm.compiler.truffle.libgraal.truffleattach/src/truffle_attach.cc rename to truffle/src/com.oracle.truffle.runtime.attach/src/truffle_attach.cc From d120c0abd036032b66d0df62ed7079441677b08b Mon Sep 17 00:00:00 2001 From: Christian Humer Date: Fri, 30 Jun 2023 16:37:44 +0200 Subject: [PATCH 20/43] Improve truffle runtime resolution warning message and handling. --- substratevm/mx.substratevm/mx_substratevm.py | 2 +- truffle/docs/HostCompilation.md | 2 +- truffle/mx.truffle/suite.py | 1 - .../src/com/oracle/truffle/api/Truffle.java | 98 +++++++++++-------- .../api/impl/DefaultTruffleRuntime.java | 13 +++ .../truffle/polyglot/PolyglotEngineImpl.java | 21 ++-- .../truffle/runtime/ModulesSupport.java | 33 +++++-- .../hotspot/HotSpotTruffleRuntimeAccess.java | 29 +++--- 8 files changed, 128 insertions(+), 71 deletions(-) diff --git a/substratevm/mx.substratevm/mx_substratevm.py b/substratevm/mx.substratevm/mx_substratevm.py index c084706c85aa..5900850b41ab 100644 --- a/substratevm/mx.substratevm/mx_substratevm.py +++ b/substratevm/mx.substratevm/mx_substratevm.py @@ -1192,7 +1192,7 @@ def _native_image_launcher_extra_jvm_args(): '--add-exports=org.graalvm.nativeimage.builder/com.oracle.svm.core.feature=ALL-UNNAMED', # Make ModuleSupport accessible to do the remaining opening-up in LibGraalFeature constructor '--add-exports=org.graalvm.nativeimage.base/com.oracle.svm.util=ALL-UNNAMED', - # TruffleLibGraalJVMCIServiceLocator needs access to JVMCIServiceLocator + # TruffleLibGraalJVMCIServiceLocator needs access to JVMCIServiceLocator '--add-exports=jdk.internal.vm.ci/jdk.vm.ci.services=ALL-UNNAMED', '--initialize-at-build-time=org.graalvm.compiler,org.graalvm.libgraal,com.oracle.truffle', diff --git a/truffle/docs/HostCompilation.md b/truffle/docs/HostCompilation.md index 635470a35d9c..02bd63d0b0f5 100644 --- a/truffle/docs/HostCompilation.md +++ b/truffle/docs/HostCompilation.md @@ -178,7 +178,7 @@ This prints: CUTOFF org.graalvm.compiler.truffle.test.HostInliningBytecodeInterpreterExampleTest$BytecodeNode.protectedByInIntepreter() [inlined -1, monomorphic false, deopt false, inInterpreter true, propDeopt false, subTreeInvokes 1, subTreeCost 0, incomplete false, reason protected by inInterpreter()] INLINE com.oracle.truffle.api.CompilerDirectives.transferToInterpreterAndInvalidate() [inlined 3, monomorphic false, deopt true, inInterpreter false, propDeopt false, subTreeInvokes 0, subTreeCost 32, incomplete false, reason null] INLINE com.oracle.truffle.api.CompilerDirectives.inInterpreter() [inlined 3, monomorphic false, deopt true, inInterpreter false, propDeopt false, subTreeInvokes 0, subTreeCost 6, incomplete false, reason null] - CUTOFF com.oracle.truffle.runtime.hotspot.AbstractHotSpotTruffleRuntime.traceTransferToInterpreter() [inlined -1, monomorphic false, deopt true, inInterpreter true, propDeopt false, subTreeInvokes 0, subTreeCost 0, incomplete false, reason dominated by transferToInterpreter()] + CUTOFF com.oracle.truffle.runtime.hotspot.AbstractHotSpotTruffleRuntime.traceTransferToInterpreter() [inlined -1, monomorphic false, deopt true, inInterpreter true, propDeopt false, subTreeInvokes 0, subTreeCost 0, incomplete false, reason dominated by transferToInterpreter()] CUTOFF org.graalvm.compiler.truffle.test.HostInliningBytecodeInterpreterExampleTest$BytecodeNode.dominatedByTransferToInterpreter() [inlined -1, monomorphic false, deopt true, inInterpreter false, propDeopt false, subTreeInvokes 0, subTreeCost 0, incomplete false, reason dominated by transferToInterpreter()] INLINE org.graalvm.compiler.truffle.test.HostInliningBytecodeInterpreterExampleTest$BytecodeNode.recursive(int) [inlined 4, monomorphic false, deopt false, inInterpreter false, propDeopt false, subTreeInvokes 1, subTreeCost 20, incomplete false, reason null] CUTOFF org.graalvm.compiler.truffle.test.HostInliningBytecodeInterpreterExampleTest$BytecodeNode.recursive(int) [inlined -1, monomorphic false, deopt false, inInterpreter false, propDeopt false, subTreeInvokes 1, subTreeCost 0, incomplete false, reason recursive] diff --git a/truffle/mx.truffle/suite.py b/truffle/mx.truffle/suite.py index ca461b03ed2e..c5f80894f184 100644 --- a/truffle/mx.truffle/suite.py +++ b/truffle/mx.truffle/suite.py @@ -1130,7 +1130,6 @@ "checkstyle" : "com.oracle.truffle.api", "javaCompliance" : "17+", }, - }, }, "licenses" : { diff --git a/truffle/src/com.oracle.truffle.api/src/com/oracle/truffle/api/Truffle.java b/truffle/src/com.oracle.truffle.api/src/com/oracle/truffle/api/Truffle.java index 5ade940da787..258e70f88931 100644 --- a/truffle/src/com.oracle.truffle.api/src/com/oracle/truffle/api/Truffle.java +++ b/truffle/src/com.oracle.truffle.api/src/com/oracle/truffle/api/Truffle.java @@ -104,50 +104,66 @@ private static TruffleRuntimeAccess selectTruffleRuntimeAccess(List runtimeClass = Class.forName(runtimeClassName, false, cl); + /* + * This path is taken if a truffle runtime class is directly specified. In such case + * we try to export JVMCI to the module of that class. + */ + maybeExportJVMCITo(runtimeClass); + return (TruffleRuntime) runtimeClass.getDeclaredConstructor().newInstance(); + } catch (Throwable e) { + // Fail fast for other errors + throw new InternalError(e); + } + } + + Class lookupClass = Truffle.class; + ModuleLayer moduleLayer = lookupClass.getModule().getLayer(); + TruffleRuntimeAccess access; + if (moduleLayer != null) { + access = selectTruffleRuntimeAccess(List.of(ServiceLoader.load(moduleLayer, TruffleRuntimeAccess.class))); + } else { + access = selectTruffleRuntimeAccess(List.of(ServiceLoader.load(TruffleRuntimeAccess.class, lookupClass.getClassLoader()))); + } + if (access == null) { + access = selectTruffleRuntimeAccess(List.of(ServiceLoader.load(TruffleRuntimeAccess.class))); + } + + if (access != null) { + exportTo(access.getClass()); + TruffleRuntime runtime = access.getRuntime(); + if (runtime != null) { + return runtime; + } + } + return new DefaultTruffleRuntime("No optimizing Truffle runtime found on the module-path."); + } + + private static void maybeExportJVMCITo(Class runtimeClass) throws ReflectiveOperationException { + Class modulesSupport; + try { + modulesSupport = Class.forName("com.oracle.truffle.runtime.ModulesSupport"); + } catch (ClassNotFoundException e) { + // we ignore if modules support is not available. + // this typically means that the runtime not on the module-path + return; + } + modulesSupport.getMethod("exportJVMCI", Class.class).invoke(null, runtimeClass); + } + + @SuppressWarnings("deprecation") private static TruffleRuntime initRuntime() { return AccessController.doPrivileged(new PrivilegedAction() { public TruffleRuntime run() { - String runtimeClassName = System.getProperty("truffle.TruffleRuntime"); - if (runtimeClassName != null && !runtimeClassName.isEmpty()) { - if (runtimeClassName.equals(DefaultTruffleRuntime.class.getName())) { - return new DefaultTruffleRuntime(); - } - try { - ClassLoader cl = Thread.currentThread().getContextClassLoader(); - Class runtimeClass = Class.forName(runtimeClassName, false, cl); - try { - Class modulesSupport = Class.forName("com.oracle.truffle.runtime.ModulesSupport"); - modulesSupport.getMethod("exportJVMCI", Class.class).invoke(null, runtimeClass); - } catch (ClassNotFoundException e) { - // we ignore if modules support is not available. - } - return (TruffleRuntime) runtimeClass.getDeclaredConstructor().newInstance(); - } catch (Throwable e) { - // Fail fast for other errors - throw new InternalError(e); - } - } - - Class lookupClass = Truffle.class; - ModuleLayer moduleLayer = lookupClass.getModule().getLayer(); - TruffleRuntimeAccess access; - if (moduleLayer != null) { - access = selectTruffleRuntimeAccess(List.of(ServiceLoader.load(moduleLayer, TruffleRuntimeAccess.class))); - } else { - access = selectTruffleRuntimeAccess(List.of(ServiceLoader.load(TruffleRuntimeAccess.class, lookupClass.getClassLoader()))); - } - if (access == null) { - access = selectTruffleRuntimeAccess(List.of(ServiceLoader.load(TruffleRuntimeAccess.class))); - } - - if (access != null) { - exportTo(access.getClass()); - TruffleRuntime runtime = access.getRuntime(); - if (runtime != null) { - return runtime; - } - } - return new DefaultTruffleRuntime(); + return createRuntime(); } }); } diff --git a/truffle/src/com.oracle.truffle.api/src/com/oracle/truffle/api/impl/DefaultTruffleRuntime.java b/truffle/src/com.oracle.truffle.api/src/com/oracle/truffle/api/impl/DefaultTruffleRuntime.java index 8a421251b5d0..6e2a54a67962 100644 --- a/truffle/src/com.oracle.truffle.api/src/com/oracle/truffle/api/impl/DefaultTruffleRuntime.java +++ b/truffle/src/com.oracle.truffle.api/src/com/oracle/truffle/api/impl/DefaultTruffleRuntime.java @@ -77,6 +77,10 @@ public final class DefaultTruffleRuntime implements TruffleRuntime { private final ThreadLocal stackTraces = new ThreadLocal<>(); private final DefaultTVMCI tvmci = new DefaultTVMCI(); + /** + * Contains a reason why the default fallback engine was selected. + */ + private final String fallbackReason; private final TVMCI.Test testTvmci = new TVMCI.Test<>() { @@ -97,6 +101,15 @@ public void finishWarmup(Closeable testContext, CallTarget callTarget) { }; public DefaultTruffleRuntime() { + this.fallbackReason = null; + } + + public DefaultTruffleRuntime(String fallbackReason) { + this.fallbackReason = fallbackReason; + } + + public String getFallbackReason() { + return fallbackReason; } /** diff --git a/truffle/src/com.oracle.truffle.polyglot/src/com/oracle/truffle/polyglot/PolyglotEngineImpl.java b/truffle/src/com.oracle.truffle.polyglot/src/com/oracle/truffle/polyglot/PolyglotEngineImpl.java index c512b2c1e52d..17e46662805c 100644 --- a/truffle/src/com.oracle.truffle.polyglot/src/com/oracle/truffle/polyglot/PolyglotEngineImpl.java +++ b/truffle/src/com.oracle.truffle.polyglot/src/com/oracle/truffle/polyglot/PolyglotEngineImpl.java @@ -1859,7 +1859,7 @@ public PolyglotContextImpl createContext(SandboxPolicy contextSandboxPolicy, Out } } } - checkTruffleRuntime(); + logTruffleRuntimeWarning(); return context; } @@ -1963,14 +1963,19 @@ private static boolean arePreInitializedLanguagesCompatible(PolyglotContextImpl return preInitializedLanguages.isEmpty(); } - private void checkTruffleRuntime() { + private void logTruffleRuntimeWarning() { if (getEngineOptionValues().get(PolyglotEngineOptions.WarnInterpreterOnly) && Truffle.getRuntime().getClass() == DefaultTruffleRuntime.class) { - getEngineLogger().log(Level.WARNING, "" + - "The polyglot context is using an implementation that does not support runtime compilation.\n" + - "The guest application code will therefore be executed in interpreted mode only.\n" + - "Execution only in interpreted mode will strongly impact the guest application performance.\n" + - "For more information on using GraalVM see https://www.graalvm.org/java/quickstart/.\n" + - "To disable this warning the '--engine.WarnInterpreterOnly=false' option or use the '-Dpolyglot.engine.WarnInterpreterOnly=false' system property."); + DefaultTruffleRuntime runtime = (DefaultTruffleRuntime) Truffle.getRuntime(); + String reason = runtime.getFallbackReason(); + if (reason == null) { + reason = "No optimizing Truffle runtime found."; + } + getEngineLogger().log(Level.WARNING, String.format(""" + The polyglot context uses a fallback Truffle implementation that does not support runtime optimization. + Execution without runtime optimization will strongly impact the guest application performance. + The following reason was found: %s + For more information see: https://www.graalvm.org/latest/reference-manual/embed-languages/. + To disable this warning use the '--engine.WarnInterpreterOnly=false' option or the '-Dpolyglot.engine.WarnInterpreterOnly=false' system property.""", reason)); } } diff --git a/truffle/src/com.oracle.truffle.runtime/src/com/oracle/truffle/runtime/ModulesSupport.java b/truffle/src/com.oracle.truffle.runtime/src/com/oracle/truffle/runtime/ModulesSupport.java index edeefba48171..bd1ecbe2cb95 100644 --- a/truffle/src/com.oracle.truffle.runtime/src/com/oracle/truffle/runtime/ModulesSupport.java +++ b/truffle/src/com.oracle.truffle.runtime/src/com/oracle/truffle/runtime/ModulesSupport.java @@ -42,16 +42,18 @@ import java.lang.module.ModuleDescriptor.Requires; +import com.oracle.truffle.api.Truffle; + import jdk.internal.module.Modules; public final class ModulesSupport { - private static final boolean AVAILABLE; + private static final boolean ATTACH_AVAILABLE; static { - AVAILABLE = loadModulesSupportLibrary(); + ATTACH_AVAILABLE = loadModulesSupportLibrary(); - if (AVAILABLE) { + if (ATTACH_AVAILABLE) { // this is the only access we really need to request natively using JNI. // after that we can access through the Modules class addExports0(ModulesSupport.class.getModule().getLayer().findModule("java.base").orElseThrow(), "jdk.internal.module", ModulesSupport.class.getModule()); @@ -61,22 +63,37 @@ public final class ModulesSupport { private ModulesSupport() { } - public static boolean exportJVMCI(Class toClass) { + /** + * This is invoked reflectively from {@link Truffle}. + */ + public static String exportJVMCI(Class toClass) { ModuleLayer layer = toClass.getModule().getLayer(); if (layer == null) { /* * Truffle is running in an unnamed module, so we cannot export jvmci to it. */ - return false; + if (ModulesSupport.class.getModule().getLayer() != null) { + /* + * Even if the runtime is in the unnamed mode, make sure truffle runtime classes are + * in a module layer and ensure they have access to JVMCI. + */ + exportJVMCI(ModulesSupport.class); + } + return "Truffle was loaded from the class-path. Use Truffle from the module-path instead."; } Module jvmciModule = layer.findModule("jdk.internal.vm.ci").orElse(null); if (jvmciModule == null) { // jvmci not found -> fallback to default runtime - return false; + return "JVMCI is not enabled for this JVM. Enable JVMCI using -XX:+EnableJVMCI."; } + + if (!ATTACH_AVAILABLE) { + return "The Truffle attach library is not available."; + } + addExportsRecursive(jvmciModule, toClass.getModule()); - return true; + return null; } private static void addExportsRecursive(Module jvmciModule, Module runtimeModule) { @@ -96,7 +113,7 @@ private static void addExportsRecursive(Module jvmciModule, Module runtimeModule public static void addExports(Module m1, String pn, Module m2) { // we check available to avoid illegal access errors for the Modules class - if (AVAILABLE) { + if (ATTACH_AVAILABLE) { Modules.addExports(m1, pn, m2); } else { throw new UnsupportedOperationException(); diff --git a/truffle/src/com.oracle.truffle.runtime/src/com/oracle/truffle/runtime/hotspot/HotSpotTruffleRuntimeAccess.java b/truffle/src/com.oracle.truffle.runtime/src/com/oracle/truffle/runtime/hotspot/HotSpotTruffleRuntimeAccess.java index ec96936646a5..466338c15ca5 100644 --- a/truffle/src/com.oracle.truffle.runtime/src/com/oracle/truffle/runtime/hotspot/HotSpotTruffleRuntimeAccess.java +++ b/truffle/src/com.oracle.truffle.runtime/src/com/oracle/truffle/runtime/hotspot/HotSpotTruffleRuntimeAccess.java @@ -61,11 +61,7 @@ public HotSpotTruffleRuntimeAccess() { @Override public TruffleRuntime getRuntime() { - TruffleRuntime runtime = createRuntime(); - if (runtime == null) { - return new DefaultTruffleRuntime(); - } - return runtime; + return createRuntime(); } @Override @@ -74,27 +70,38 @@ public int getPriority() { } protected static TruffleRuntime createRuntime() { - if (!ModulesSupport.exportJVMCI(HotSpotTruffleRuntimeAccess.class)) { - return null; + String reason = ModulesSupport.exportJVMCI(HotSpotTruffleRuntimeAccess.class); + if (reason != null) { + return new DefaultTruffleRuntime(reason); + } + try { + Services.initializeJVMCI(); + } catch (Error e) { + // hack to detect the exact error that is thrown when + if (e.getClass() == Error.class && e.getMessage().startsWith("The EnableJVMCI VM option must be true")) { + return new DefaultTruffleRuntime("JVMCI is not enabled on this JVM. JVMCI may be enabled using -XX:+EnableJVMCI."); + } + throw e; } - Services.initializeJVMCI(); HotSpotJVMCIRuntime hsRuntime = (HotSpotJVMCIRuntime) JVMCI.getRuntime(); HotSpotVMConfigAccess config = new HotSpotVMConfigAccess(hsRuntime.getConfigStore()); boolean useCompiler = config.getFlag("UseCompiler", Boolean.class); if (!useCompiler) { // compilation disabled in host VM -> fallback to default runtime - return null; + return new DefaultTruffleRuntime("JVMCI compilation was disabled on this JVM. JVMCI may be enabled using -XX:+EnableJVMCI."); } TruffleCompilationSupport compilationSupport; if (LibGraal.isAvailable()) { + // try LibGraal compilationSupport = new LibGraalTruffleCompilationSupport(); } else { + // try jar graal try { - // jar graal Module compilerModule = HotSpotTruffleRuntimeAccess.class.getModule().getLayer().findModule("jdk.internal.vm.compiler").orElse(null); if (compilerModule == null) { // jargraal compiler module not found -> fallback to default runtime - return null; + return new DefaultTruffleRuntime( + "Libgraal compilation is not available on this JVM. Alternatively, the compiler module jdk.internal.vm.compiler was not found on the --upgrade-module-path."); } Modules.addExports(compilerModule, "org.graalvm.compiler.truffle.compiler.hotspot", HotSpotTruffleRuntimeAccess.class.getModule()); Class hotspotCompilationSupport = Class.forName("org.graalvm.compiler.truffle.compiler.hotspot.HotSpotTruffleCompilationSupport"); From 90048154f46a1da7b3434f1b04ba28bf6c58c0e9 Mon Sep 17 00:00:00 2001 From: Christian Humer Date: Sun, 2 Jul 2023 12:28:59 +0200 Subject: [PATCH 21/43] Fix avoid accidently reachable code from records. --- .../libgraal/truffle/TruffleLibGraalShutdownHook.java | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/substratevm/src/com.oracle.svm.graal.hotspot.libgraal/src/com/oracle/svm/graal/hotspot/libgraal/truffle/TruffleLibGraalShutdownHook.java b/substratevm/src/com.oracle.svm.graal.hotspot.libgraal/src/com/oracle/svm/graal/hotspot/libgraal/truffle/TruffleLibGraalShutdownHook.java index 9d82b49ecf82..7b3dbdc797bc 100644 --- a/substratevm/src/com.oracle.svm.graal.hotspot.libgraal/src/com/oracle/svm/graal/hotspot/libgraal/truffle/TruffleLibGraalShutdownHook.java +++ b/substratevm/src/com.oracle.svm.graal.hotspot.libgraal/src/com/oracle/svm/graal/hotspot/libgraal/truffle/TruffleLibGraalShutdownHook.java @@ -57,7 +57,15 @@ static void registerShutdownHook(JNIEnv env, JClass runtimeClass) { registeredHook = new ShutdownHook(vm, new TruffleFromLibGraalCalls(env, runtimeClass)); } - record ShutdownHook(JavaVM javaVm, TruffleFromLibGraalCalls calls) implements HotSpotVMEventListener { + static class ShutdownHook implements HotSpotVMEventListener { + + private final JavaVM javaVm; + private final TruffleFromLibGraalCalls calls; + + ShutdownHook(JavaVM javaVm, TruffleFromLibGraalCalls calls) { + this.javaVm = javaVm; + this.calls = calls; + } @Override @TruffleFromLibGraal(TruffleFromLibGraal.Id.OnIsolateShutdown) From dfc1ee16bf8bdaaba4f219eca0bfbdc8530d95e5 Mon Sep 17 00:00:00 2001 From: Christian Humer Date: Mon, 3 Jul 2023 11:20:03 +0200 Subject: [PATCH 22/43] Fix eclipseformat. --- .../hotspot/HotSpotTruffleSafepointLoweringSnippet.java | 4 ++-- .../com/oracle/truffle/runtime/BytecodeOSRMetadata.java | 8 ++++---- .../oracle/truffle/runtime/OptimizedTruffleRuntime.java | 6 ++++-- .../truffle/runtime/debug/TraceCompilationListener.java | 4 ++-- 4 files changed, 12 insertions(+), 10 deletions(-) diff --git a/compiler/src/jdk.internal.vm.compiler/src/org/graalvm/compiler/truffle/compiler/hotspot/HotSpotTruffleSafepointLoweringSnippet.java b/compiler/src/jdk.internal.vm.compiler/src/org/graalvm/compiler/truffle/compiler/hotspot/HotSpotTruffleSafepointLoweringSnippet.java index 09d69051abc8..4e889819c1e7 100644 --- a/compiler/src/jdk.internal.vm.compiler/src/org/graalvm/compiler/truffle/compiler/hotspot/HotSpotTruffleSafepointLoweringSnippet.java +++ b/compiler/src/jdk.internal.vm.compiler/src/org/graalvm/compiler/truffle/compiler/hotspot/HotSpotTruffleSafepointLoweringSnippet.java @@ -70,8 +70,8 @@ public final class HotSpotTruffleSafepointLoweringSnippet implements Snippets { /** * Description for a call to - * {@code com.oracle.truffle.runtime.hotspot.HotSpotThreadLocalHandshake.doHandshake()} - * via a stub. + * {@code com.oracle.truffle.runtime.hotspot.HotSpotThreadLocalHandshake.doHandshake()} via a + * stub. */ static final HotSpotForeignCallDescriptor THREAD_LOCAL_HANDSHAKE = new HotSpotForeignCallDescriptor( SAFEPOINT, diff --git a/truffle/src/com.oracle.truffle.runtime/src/com/oracle/truffle/runtime/BytecodeOSRMetadata.java b/truffle/src/com.oracle.truffle.runtime/src/com/oracle/truffle/runtime/BytecodeOSRMetadata.java index dfe2f31483ac..317d5cd1633a 100644 --- a/truffle/src/com.oracle.truffle.runtime/src/com/oracle/truffle/runtime/BytecodeOSRMetadata.java +++ b/truffle/src/com.oracle.truffle.runtime/src/com/oracle/truffle/runtime/BytecodeOSRMetadata.java @@ -66,10 +66,10 @@ *

    * Performance note: We do not require the metadata field to be {@code volatile}. As long as the * field is initialized under double-checked locking (as is done in - * {@link OptimizedRuntimeSupport#pollBytecodeOSRBackEdge}, all threads will observe the same metadata - * instance. The JMM guarantees that the instance's final fields will be safely initialized before - * it is published; the non-final + non-volatile fields (e.g., the back edge counter) may not be, - * but we tolerate this inaccuracy in order to avoid volatile accesses in the hot path. + * {@link OptimizedRuntimeSupport#pollBytecodeOSRBackEdge}, all threads will observe the same + * metadata instance. The JMM guarantees that the instance's final fields will be safely initialized + * before it is published; the non-final + non-volatile fields (e.g., the back edge counter) may not + * be, but we tolerate this inaccuracy in order to avoid volatile accesses in the hot path. */ public final class BytecodeOSRMetadata { // Marker object to indicate that OSR is disabled. diff --git a/truffle/src/com.oracle.truffle.runtime/src/com/oracle/truffle/runtime/OptimizedTruffleRuntime.java b/truffle/src/com.oracle.truffle.runtime/src/com/oracle/truffle/runtime/OptimizedTruffleRuntime.java index 1da381ee380e..c85a7300e101 100644 --- a/truffle/src/com.oracle.truffle.runtime/src/com/oracle/truffle/runtime/OptimizedTruffleRuntime.java +++ b/truffle/src/com.oracle.truffle.runtime/src/com/oracle/truffle/runtime/OptimizedTruffleRuntime.java @@ -1153,8 +1153,10 @@ protected long getCompilerIdleDelay(OptimizedCallTarget callTarget) { } final OptionDescriptors getOptionDescriptors() { - // The engineOptions field needs to be initialized lazily because the OptimizedRuntimeAccessor - // cannot be used in the OptimizedTruffleRuntime constructor. The OptimizedTruffleRuntime must be + // The engineOptions field needs to be initialized lazily because the + // OptimizedRuntimeAccessor + // cannot be used in the OptimizedTruffleRuntime constructor. The OptimizedTruffleRuntime + // must be // fully initialized before using the accessor otherwise a NullPointerException will be // thrown from the Accessor.Constants static initializer because the Truffle#getRuntime // still returns null. diff --git a/truffle/src/com.oracle.truffle.runtime/src/com/oracle/truffle/runtime/debug/TraceCompilationListener.java b/truffle/src/com.oracle.truffle.runtime/src/com/oracle/truffle/runtime/debug/TraceCompilationListener.java index 5af09e310ce3..2e36d04e8e9e 100644 --- a/truffle/src/com.oracle.truffle.runtime/src/com/oracle/truffle/runtime/debug/TraceCompilationListener.java +++ b/truffle/src/com.oracle.truffle.runtime/src/com/oracle/truffle/runtime/debug/TraceCompilationListener.java @@ -306,8 +306,8 @@ public void onCompilationInvalidated(OptimizedCallTarget target, Object source, /** * Determines if a failure is permanent. * - * @see OptimizedTruffleRuntimeListener#onCompilationFailed(OptimizedCallTarget, String, boolean, - * boolean, int) + * @see OptimizedTruffleRuntimeListener#onCompilationFailed(OptimizedCallTarget, String, + * boolean, boolean, int) */ private static boolean isPermanentFailure(boolean bailout, boolean permanentBailout) { return !bailout || permanentBailout; From 191c0badcb303596118fe1c6b08e2e4ca38a0537 Mon Sep 17 00:00:00 2001 From: Christian Humer Date: Mon, 3 Jul 2023 11:46:58 +0200 Subject: [PATCH 23/43] Fix createTerminatingThreadLocal might not be available on all JDKs. --- truffle/mx.truffle/suite.py | 1 + .../truffle/runtime/OptimizedRuntimeSupport.java | 7 +++---- .../truffle/runtime/OptimizedTruffleRuntime.java | 13 +++++++++++++ .../runtime/hotspot/HotSpotTruffleRuntime.java | 9 +-------- 4 files changed, 18 insertions(+), 12 deletions(-) diff --git a/truffle/mx.truffle/suite.py b/truffle/mx.truffle/suite.py index c5f80894f184..39fb447eb228 100644 --- a/truffle/mx.truffle/suite.py +++ b/truffle/mx.truffle/suite.py @@ -262,6 +262,7 @@ "requiresConcealed" : { "jdk.internal.vm.ci" : [ "jdk.vm.ci.meta", + "jdk.vm.ci.services", "jdk.vm.ci.code", "jdk.vm.ci.code.stack", ], diff --git a/truffle/src/com.oracle.truffle.runtime/src/com/oracle/truffle/runtime/OptimizedRuntimeSupport.java b/truffle/src/com.oracle.truffle.runtime/src/com/oracle/truffle/runtime/OptimizedRuntimeSupport.java index 56530805f4f1..6f9216cf3624 100644 --- a/truffle/src/com.oracle.truffle.runtime/src/com/oracle/truffle/runtime/OptimizedRuntimeSupport.java +++ b/truffle/src/com.oracle.truffle.runtime/src/com/oracle/truffle/runtime/OptimizedRuntimeSupport.java @@ -61,13 +61,11 @@ import com.oracle.truffle.api.impl.ThreadLocalHandshake; import com.oracle.truffle.api.nodes.BlockNode; import com.oracle.truffle.api.nodes.BlockNode.ElementExecutor; -import com.oracle.truffle.runtime.OptimizedTruffleRuntime.CompilerOptionsDescriptors; import com.oracle.truffle.api.nodes.BytecodeOSRNode; import com.oracle.truffle.api.nodes.ExplodeLoop; import com.oracle.truffle.api.nodes.Node; import com.oracle.truffle.api.nodes.RootNode; - -import jdk.vm.ci.services.Services; +import com.oracle.truffle.runtime.OptimizedTruffleRuntime.CompilerOptionsDescriptors; final class OptimizedRuntimeSupport extends RuntimeSupport { @@ -370,9 +368,10 @@ public AbstractFastThreadLocal getContextThreadLocal() { return local; } + @SuppressWarnings("unchecked") @Override public ThreadLocal createTerminatingThreadLocal(Supplier initialValue, Consumer onThreadTermination) { - return Services.createTerminatingThreadLocal(initialValue, onThreadTermination); + return OptimizedTruffleRuntime.createTerminatingThreadLocal(initialValue, onThreadTermination); } } diff --git a/truffle/src/com.oracle.truffle.runtime/src/com/oracle/truffle/runtime/OptimizedTruffleRuntime.java b/truffle/src/com.oracle.truffle.runtime/src/com/oracle/truffle/runtime/OptimizedTruffleRuntime.java index c85a7300e101..58ed800d7430 100644 --- a/truffle/src/com.oracle.truffle.runtime/src/com/oracle/truffle/runtime/OptimizedTruffleRuntime.java +++ b/truffle/src/com.oracle.truffle.runtime/src/com/oracle/truffle/runtime/OptimizedTruffleRuntime.java @@ -46,6 +46,7 @@ import java.io.PrintWriter; import java.lang.annotation.Annotation; import java.lang.invoke.MethodHandle; +import java.lang.reflect.Method; import java.nio.Buffer; import java.nio.file.FileSystems; import java.nio.file.Path; @@ -1198,6 +1199,18 @@ public long getStackOverflowLimit() { throw new UnsupportedOperationException(); } + @SuppressWarnings("unchecked") + public static ThreadLocal createTerminatingThreadLocal(Supplier initialValue, Consumer onThreadTermination) { + try { + Method m = Services.class.getMethod("createTerminatingThreadLocal", Supplier.class, Consumer.class); + return (ThreadLocal) m.invoke(null, initialValue, onThreadTermination); + } catch (NoSuchMethodException e) { + return ThreadLocal.withInitial(initialValue); + } catch (ReflectiveOperationException e) { + throw CompilerDirectives.shouldNotReachHere(e); + } + } + public static class StackTraceHelper { public static void logHostAndGuestStacktrace(String reason, OptimizedCallTarget callTarget) { final int limit = callTarget.getOptionValue(OptimizedRuntimeOptions.TraceStackTraceLimit); diff --git a/truffle/src/com.oracle.truffle.runtime/src/com/oracle/truffle/runtime/hotspot/HotSpotTruffleRuntime.java b/truffle/src/com.oracle.truffle.runtime/src/com/oracle/truffle/runtime/hotspot/HotSpotTruffleRuntime.java index 2a362066d526..ff7132f32eac 100644 --- a/truffle/src/com.oracle.truffle.runtime/src/com/oracle/truffle/runtime/hotspot/HotSpotTruffleRuntime.java +++ b/truffle/src/com.oracle.truffle.runtime/src/com/oracle/truffle/runtime/hotspot/HotSpotTruffleRuntime.java @@ -52,7 +52,6 @@ import java.util.Objects; import java.util.concurrent.ExecutionException; import java.util.function.Consumer; -import java.util.function.Supplier; import com.oracle.truffle.api.CompilerDirectives; import com.oracle.truffle.api.CompilerDirectives.TruffleBoundary; @@ -66,9 +65,9 @@ import com.oracle.truffle.runtime.BackgroundCompileQueue; import com.oracle.truffle.runtime.CompilationTask; import com.oracle.truffle.runtime.EngineData; -import com.oracle.truffle.runtime.OptimizedTruffleRuntime; import com.oracle.truffle.runtime.OptimizedCallTarget; import com.oracle.truffle.runtime.OptimizedOSRLoopNode; +import com.oracle.truffle.runtime.OptimizedTruffleRuntime; import com.oracle.truffle.runtime.TruffleCallBoundary; import com.oracle.truffle.runtime.hotspot.libgraal.LibGraalTruffleCompilationSupport; @@ -90,7 +89,6 @@ import jdk.vm.ci.meta.ResolvedJavaType; import jdk.vm.ci.meta.SpeculationLog; import jdk.vm.ci.runtime.JVMCI; -import jdk.vm.ci.services.Services; import sun.misc.Unsafe; /** @@ -730,9 +728,4 @@ public boolean isLibGraalCompilationEnabled() { return compilationSupport instanceof LibGraalTruffleCompilationSupport; } - @SuppressWarnings("static-method") - public ThreadLocal createTerminatingThreadLocal(Supplier initialValue, Consumer onThreadTermination) { - return Services.createTerminatingThreadLocal(initialValue, onThreadTermination); - } - } From 7e6e0fc49ec0d2485d0162e3f7b0f2ac032bf82b Mon Sep 17 00:00:00 2001 From: Christian Humer Date: Mon, 3 Jul 2023 11:53:09 +0200 Subject: [PATCH 24/43] Fix JFR exports. --- truffle/mx.truffle/suite.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/truffle/mx.truffle/suite.py b/truffle/mx.truffle/suite.py index 39fb447eb228..b890e4dad320 100644 --- a/truffle/mx.truffle/suite.py +++ b/truffle/mx.truffle/suite.py @@ -1201,6 +1201,9 @@ # Qualified exports "com.oracle.truffle.runtime to org.graalvm.truffle, jdk.internal.vm.compiler, com.oracle.truffle.enterprise, com.oracle.svm.svm_enterprise, org.graalvm.nativeimage.builder", "com.oracle.truffle.runtime.hotspot to org.graalvm.truffle, jdk.internal.vm.compiler", + "com.oracle.truffle.runtime.hotspot.libgraal to org.graalvm.truffle, jdk.internal.vm.compiler", + "com.oracle.truffle.runtime.jfr to com.oracle.truffle.enterprise, com.oracle.svm.svm_enterprise, org.graalvm.nativeimage.builder", + "com.oracle.truffle.runtime.jfr.impl to com.oracle.truffle.enterprise, com.oracle.svm.svm_enterprise, org.graalvm.nativeimage.builder", ], "uses" : [ "com.oracle.truffle.api.impl.TruffleLocator", From eb0946221db2a85efe1d52cf503e3a63a3ee8e46 Mon Sep 17 00:00:00 2001 From: Christian Humer Date: Mon, 3 Jul 2023 14:19:41 +0200 Subject: [PATCH 25/43] Fix CompileTheWorld. --- .../graalvm/compiler/hotspot/test/CompileTheWorld.java | 5 +++++ truffle/mx.truffle/suite.py | 8 ++++---- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/compiler/src/jdk.internal.vm.compiler.test/src/org/graalvm/compiler/hotspot/test/CompileTheWorld.java b/compiler/src/jdk.internal.vm.compiler.test/src/org/graalvm/compiler/hotspot/test/CompileTheWorld.java index dda68a7970d5..abf725e5af48 100644 --- a/compiler/src/jdk.internal.vm.compiler.test/src/org/graalvm/compiler/hotspot/test/CompileTheWorld.java +++ b/compiler/src/jdk.internal.vm.compiler.test/src/org/graalvm/compiler/hotspot/test/CompileTheWorld.java @@ -115,6 +115,8 @@ import org.graalvm.compiler.serviceprovider.GraalUnsafeAccess; import org.graalvm.util.OptionsEncoder; +import com.oracle.truffle.api.Truffle; +import com.oracle.truffle.runtime.ModulesSupport; import com.oracle.truffle.runtime.hotspot.libgraal.LibGraal; import com.oracle.truffle.runtime.hotspot.libgraal.LibGraalIsolate; import com.oracle.truffle.runtime.hotspot.libgraal.LibGraalScope; @@ -139,6 +141,9 @@ public final class CompileTheWorld { static { ModuleSupport.exportAndOpenAllPackagesToUnnamed("jdk.internal.vm.compiler"); + ModuleSupport.exportAndOpenAllPackagesToUnnamed("org.graalvm.truffle.runtime"); + ModuleSupport.exportAndOpenAllPackagesToUnnamed("org.graalvm.truffle"); + ModulesSupport.exportJVMCI(Truffle.getRuntime().getClass()); } /** diff --git a/truffle/mx.truffle/suite.py b/truffle/mx.truffle/suite.py index b890e4dad320..932b12ba7bfc 100644 --- a/truffle/mx.truffle/suite.py +++ b/truffle/mx.truffle/suite.py @@ -1200,10 +1200,10 @@ "exports" : [ # Qualified exports "com.oracle.truffle.runtime to org.graalvm.truffle, jdk.internal.vm.compiler, com.oracle.truffle.enterprise, com.oracle.svm.svm_enterprise, org.graalvm.nativeimage.builder", - "com.oracle.truffle.runtime.hotspot to org.graalvm.truffle, jdk.internal.vm.compiler", - "com.oracle.truffle.runtime.hotspot.libgraal to org.graalvm.truffle, jdk.internal.vm.compiler", - "com.oracle.truffle.runtime.jfr to com.oracle.truffle.enterprise, com.oracle.svm.svm_enterprise, org.graalvm.nativeimage.builder", - "com.oracle.truffle.runtime.jfr.impl to com.oracle.truffle.enterprise, com.oracle.svm.svm_enterprise, org.graalvm.nativeimage.builder", + "com.oracle.truffle.runtime.hotspot to org.graalvm.truffle, jdk.internal.vm.compiler, com.oracle.truffle.enterprise, com.oracle.svm.svm_enterprise, org.graalvm.nativeimage.builder", + "com.oracle.truffle.runtime.hotspot.libgraal to org.graalvm.truffle, jdk.internal.vm.compiler, com.oracle.truffle.enterprise, com.oracle.svm.svm_enterprise, org.graalvm.nativeimage.builder", + "com.oracle.truffle.runtime.jfr to org.graalvm.truffle, jdk.internal.vm.compiler, com.oracle.truffle.enterprise, com.oracle.svm.svm_enterprise, org.graalvm.nativeimage.builder", + "com.oracle.truffle.runtime.jfr.impl to org.graalvm.truffle, jdk.internal.vm.compiler, com.oracle.truffle.enterprise, com.oracle.svm.svm_enterprise, org.graalvm.nativeimage.builder", ], "uses" : [ "com.oracle.truffle.api.impl.TruffleLocator", From c7a501ac91a4f169a90984b5b1d27a3c704188b3 Mon Sep 17 00:00:00 2001 From: Christian Humer Date: Mon, 3 Jul 2023 14:33:55 +0200 Subject: [PATCH 26/43] Fix findbugs complaining about class name. --- .../processor/{AbstractProcessor.java => BaseProcessor.java} | 2 +- .../libgraal/processor/TruffleFromLibGraalProcessor.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) rename truffle/src/com.oracle.truffle.libgraal.processor/src/com/oracle/truffle/libgraal/processor/{AbstractProcessor.java => BaseProcessor.java} (99%) diff --git a/truffle/src/com.oracle.truffle.libgraal.processor/src/com/oracle/truffle/libgraal/processor/AbstractProcessor.java b/truffle/src/com.oracle.truffle.libgraal.processor/src/com/oracle/truffle/libgraal/processor/BaseProcessor.java similarity index 99% rename from truffle/src/com.oracle.truffle.libgraal.processor/src/com/oracle/truffle/libgraal/processor/AbstractProcessor.java rename to truffle/src/com.oracle.truffle.libgraal.processor/src/com/oracle/truffle/libgraal/processor/BaseProcessor.java index 72e0cf198d5b..6a340f012a3a 100644 --- a/truffle/src/com.oracle.truffle.libgraal.processor/src/com/oracle/truffle/libgraal/processor/AbstractProcessor.java +++ b/truffle/src/com.oracle.truffle.libgraal.processor/src/com/oracle/truffle/libgraal/processor/BaseProcessor.java @@ -75,7 +75,7 @@ /** * {@link javax.annotation.processing.AbstractProcessor} subclass that provides extra functionality. */ -public abstract class AbstractProcessor extends javax.annotation.processing.AbstractProcessor { +public abstract class BaseProcessor extends javax.annotation.processing.AbstractProcessor { /** * Gets the processing environment available to this processor. diff --git a/truffle/src/com.oracle.truffle.libgraal.processor/src/com/oracle/truffle/libgraal/processor/TruffleFromLibGraalProcessor.java b/truffle/src/com.oracle.truffle.libgraal.processor/src/com/oracle/truffle/libgraal/processor/TruffleFromLibGraalProcessor.java index 27da23d8ff4e..953e0c0b925e 100644 --- a/truffle/src/com.oracle.truffle.libgraal.processor/src/com/oracle/truffle/libgraal/processor/TruffleFromLibGraalProcessor.java +++ b/truffle/src/com.oracle.truffle.libgraal.processor/src/com/oracle/truffle/libgraal/processor/TruffleFromLibGraalProcessor.java @@ -77,7 +77,7 @@ @SupportedAnnotationTypes({ "com.oracle.truffle.compiler.hotspot.libgraal.TruffleFromLibGraal", "com.oracle.truffle.compiler.hotspot.libgraal.TruffleFromLibGraalRepeated"}) -public class TruffleFromLibGraalProcessor extends AbstractProcessor { +public class TruffleFromLibGraalProcessor extends BaseProcessor { /** * Captures the info defined by a From af97768d0681be0563ca10b92a3393bdee4bfb43 Mon Sep 17 00:00:00 2001 From: Christian Humer Date: Mon, 3 Jul 2023 14:51:30 +0200 Subject: [PATCH 27/43] Fix HotSpotFastThreadLocals need an IntrinsificationPredicate. --- .../compiler/hotspot/meta/HotSpotGraphBuilderPlugins.java | 2 +- .../truffle/runtime/hotspot/HotSpotFastThreadLocal.java | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/compiler/src/jdk.internal.vm.compiler/src/org/graalvm/compiler/hotspot/meta/HotSpotGraphBuilderPlugins.java b/compiler/src/jdk.internal.vm.compiler/src/org/graalvm/compiler/hotspot/meta/HotSpotGraphBuilderPlugins.java index 600c80016b75..43312ec7447d 100644 --- a/compiler/src/jdk.internal.vm.compiler/src/org/graalvm/compiler/hotspot/meta/HotSpotGraphBuilderPlugins.java +++ b/compiler/src/jdk.internal.vm.compiler/src/org/graalvm/compiler/hotspot/meta/HotSpotGraphBuilderPlugins.java @@ -280,7 +280,7 @@ private static void registerTrufflePlugins(InvocationPlugins plugins, WordTypes // cannot install intrinsics without return; } - + plugins.registerIntrinsificationPredicate(t -> t.getName().equals("Lcom/oracle/truffle/runtime/hotspot/HotSpotFastThreadLocal;")); Registration tl = new Registration(plugins, "com.oracle.truffle.runtime.hotspot.HotSpotFastThreadLocal"); tl.register(new InvocationPlugin("get", Receiver.class) { @Override diff --git a/truffle/src/com.oracle.truffle.runtime/src/com/oracle/truffle/runtime/hotspot/HotSpotFastThreadLocal.java b/truffle/src/com.oracle.truffle.runtime/src/com/oracle/truffle/runtime/hotspot/HotSpotFastThreadLocal.java index 987141ce8b56..89a574bc0a8a 100644 --- a/truffle/src/com.oracle.truffle.runtime/src/com/oracle/truffle/runtime/hotspot/HotSpotFastThreadLocal.java +++ b/truffle/src/com.oracle.truffle.runtime/src/com/oracle/truffle/runtime/hotspot/HotSpotFastThreadLocal.java @@ -71,7 +71,7 @@ protected MutableInt initialValue() { } /* - * This method is intrinsified for partial evaluation. See HotSpotTruffleGraphBuilderPlugins for + * This method is intrinsified for partial evaluation. See HotSpotGraphBuilderPlugins for * details. */ @Override @@ -80,7 +80,7 @@ public void set(Object[] data) { } /* - * This method is intrinsified for partial evaluation. See HotSpotTruffleGraphBuilderPlugins for + * This method is intrinsified for partial evaluation. See HotSpotGraphBuilderPlugins for * details. */ @Override From 2ac870f13e38d07d8ccd923ef41b94f782dacacc Mon Sep 17 00:00:00 2001 From: Christian Humer Date: Mon, 3 Jul 2023 15:19:39 +0200 Subject: [PATCH 28/43] Fix boot module dependencies should allow Truffle. --- .../src/com/oracle/svm/hosted/NativeImageGeneratorRunner.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/substratevm/src/com.oracle.svm.hosted/src/com/oracle/svm/hosted/NativeImageGeneratorRunner.java b/substratevm/src/com.oracle.svm.hosted/src/com/oracle/svm/hosted/NativeImageGeneratorRunner.java index e80ff0afbb99..472dfb668aaa 100644 --- a/substratevm/src/com.oracle.svm.hosted/src/com/oracle/svm/hosted/NativeImageGeneratorRunner.java +++ b/substratevm/src/com.oracle.svm.hosted/src/com/oracle/svm/hosted/NativeImageGeneratorRunner.java @@ -224,6 +224,8 @@ private static void transitiveRequires(boolean verbose, Module requiringModule, potentialNeedModule.getName().startsWith("org.graalvm.") || /* enterprise graal */ potentialNeedModule.getName().startsWith("com.oracle.graal.") || + /* exclude all truffle modules */ + potentialNeedModule.getName().startsWith("com.oracle.truffle.") || /* llvm-backend optional dependencies */ potentialNeedModule.getName().startsWith("com.oracle.svm.shadowed.")) { continue; From 93fed3e7e01eb75b6062768ae367615d43124438 Mon Sep 17 00:00:00 2001 From: Christian Humer Date: Mon, 3 Jul 2023 15:55:51 +0200 Subject: [PATCH 29/43] Simplify qualified exports. --- truffle/mx.truffle/suite.py | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/truffle/mx.truffle/suite.py b/truffle/mx.truffle/suite.py index 932b12ba7bfc..37a98499036e 100644 --- a/truffle/mx.truffle/suite.py +++ b/truffle/mx.truffle/suite.py @@ -1199,11 +1199,7 @@ ], "exports" : [ # Qualified exports - "com.oracle.truffle.runtime to org.graalvm.truffle, jdk.internal.vm.compiler, com.oracle.truffle.enterprise, com.oracle.svm.svm_enterprise, org.graalvm.nativeimage.builder", - "com.oracle.truffle.runtime.hotspot to org.graalvm.truffle, jdk.internal.vm.compiler, com.oracle.truffle.enterprise, com.oracle.svm.svm_enterprise, org.graalvm.nativeimage.builder", - "com.oracle.truffle.runtime.hotspot.libgraal to org.graalvm.truffle, jdk.internal.vm.compiler, com.oracle.truffle.enterprise, com.oracle.svm.svm_enterprise, org.graalvm.nativeimage.builder", - "com.oracle.truffle.runtime.jfr to org.graalvm.truffle, jdk.internal.vm.compiler, com.oracle.truffle.enterprise, com.oracle.svm.svm_enterprise, org.graalvm.nativeimage.builder", - "com.oracle.truffle.runtime.jfr.impl to org.graalvm.truffle, jdk.internal.vm.compiler, com.oracle.truffle.enterprise, com.oracle.svm.svm_enterprise, org.graalvm.nativeimage.builder", + "* to org.graalvm.truffle, jdk.internal.vm.compiler, com.oracle.truffle.enterprise, com.oracle.svm.svm_enterprise, org.graalvm.nativeimage.builder", ], "uses" : [ "com.oracle.truffle.api.impl.TruffleLocator", From 37a18f2e72139bd4dbeca2b3f3f7d3067d7eb6b8 Mon Sep 17 00:00:00 2001 From: Christian Humer Date: Mon, 3 Jul 2023 15:56:02 +0200 Subject: [PATCH 30/43] Services might not be accessible to JVMCI. --- .../src/com/oracle/truffle/api/impl/DefaultTruffleRuntime.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/truffle/src/com.oracle.truffle.api/src/com/oracle/truffle/api/impl/DefaultTruffleRuntime.java b/truffle/src/com.oracle.truffle.api/src/com/oracle/truffle/api/impl/DefaultTruffleRuntime.java index 6e2a54a67962..4c20abe187c0 100644 --- a/truffle/src/com.oracle.truffle.api/src/com/oracle/truffle/api/impl/DefaultTruffleRuntime.java +++ b/truffle/src/com.oracle.truffle.api/src/com/oracle/truffle/api/impl/DefaultTruffleRuntime.java @@ -256,6 +256,9 @@ private static final class Loader { // true (either explicitly or by default) which causes the jdk.internal.vm.ci // module to be resolved. loadMethod = null; + } catch (ServiceConfigurationError iae) { + // The service is not accessible to JVMCI. + loadMethod = null; } catch (Throwable e) { throw new InternalError(e); } From 55446a0382848cdc9cced4b76cf83346153c693e Mon Sep 17 00:00:00 2001 From: Christian Humer Date: Mon, 3 Jul 2023 16:12:03 +0200 Subject: [PATCH 31/43] Update error message in test. --- .../src/com/oracle/truffle/api/test/polyglot/LoggingTest.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/truffle/src/com.oracle.truffle.api.test/src/com/oracle/truffle/api/test/polyglot/LoggingTest.java b/truffle/src/com.oracle.truffle.api.test/src/com/oracle/truffle/api/test/polyglot/LoggingTest.java index 9c8e429974e1..80137b38e940 100644 --- a/truffle/src/com.oracle.truffle.api.test/src/com/oracle/truffle/api/test/polyglot/LoggingTest.java +++ b/truffle/src/com.oracle.truffle.api.test/src/com/oracle/truffle/api/test/polyglot/LoggingTest.java @@ -1283,7 +1283,7 @@ public void testInterpreterOnlyWarning() { private static boolean hasInterpreterOnlyWarning(Iterable> log) { for (Map.Entry record : log) { String message = record.getValue(); - if (message.startsWith("The polyglot context is using an implementation that does not support runtime compilation.")) { + if (message.startsWith("The polyglot context uses a fallback Truffle implementation that does not support runtime optimization.")) { return true; } } From 708140a6f89043f021c6d9e3fc556030f49e1f01 Mon Sep 17 00:00:00 2001 From: Christian Humer Date: Mon, 3 Jul 2023 16:27:32 +0200 Subject: [PATCH 32/43] Fix broken distribution references in vm_gate.py. --- vm/mx.vm/mx_vm_gate.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/vm/mx.vm/mx_vm_gate.py b/vm/mx.vm/mx_vm_gate.py index 4bd8f6862beb..28eea2b2f926 100644 --- a/vm/mx.vm/mx_vm_gate.py +++ b/vm/mx.vm/mx_vm_gate.py @@ -354,7 +354,7 @@ def _test_libgraal_CompilationTimeout_Truffle(extra_vm_arguments): f'-Dpolyglot.log.file={truffle_log_file}', '-Ddebug.graal.CompilationWatchDog=true', # helps debug failure '-Dgraalvm.locatorDisabled=true', - '-Dtruffle.attach.library=' + mx_subst.path_substitutions.substitute('/bin/'), + '-Dtruffle.attach.library=' + mx_subst.path_substitutions.substitute('/bin/'), '-XX:-UseJVMCICompiler', # Stop compilation timeout being applied to JIT '-XX:+UseJVMCINativeLibrary'] # but ensure libgraal is still used by Truffle @@ -437,7 +437,7 @@ def is_truffle_fallback(arg): "-Dpolyglot.engine.BackgroundCompilation=false", "-Dpolyglot.engine.CompilationFailureAction=Throw", "-Dgraalvm.locatorDisabled=true", - '-Dtruffle.attach.library=' + mx_subst.path_substitutions.substitute('/bin/'), + '-Dtruffle.attach.library=' + mx_subst.path_substitutions.substitute('/bin/'), "truffle", "LibGraalCompilerTest"]) def gate_body(args, tasks): From f10a23581c15d05b96716c6af89f2634b2f3856a Mon Sep 17 00:00:00 2001 From: Christian Humer Date: Mon, 3 Jul 2023 17:46:56 +0200 Subject: [PATCH 33/43] Remove JVMCI service loading from default runtime. --- .../api/impl/DefaultTruffleRuntime.java | 61 +++---------------- 1 file changed, 9 insertions(+), 52 deletions(-) diff --git a/truffle/src/com.oracle.truffle.api/src/com/oracle/truffle/api/impl/DefaultTruffleRuntime.java b/truffle/src/com.oracle.truffle.api/src/com/oracle/truffle/api/impl/DefaultTruffleRuntime.java index 4c20abe187c0..1e26c703d914 100644 --- a/truffle/src/com.oracle.truffle.api/src/com/oracle/truffle/api/impl/DefaultTruffleRuntime.java +++ b/truffle/src/com.oracle.truffle.api/src/com/oracle/truffle/api/impl/DefaultTruffleRuntime.java @@ -41,8 +41,6 @@ package com.oracle.truffle.api.impl; import java.io.Closeable; -import java.lang.reflect.InvocationTargetException; -import java.lang.reflect.Method; import java.util.Iterator; import java.util.Objects; import java.util.ServiceConfigurationError; @@ -233,64 +231,23 @@ public T getCapability(Class capability) { } private static final class Loader { - private static final Method LOAD_METHOD; - static { - Method loadMethod = null; - try { - Class servicesClass = Class.forName("jdk.vm.ci.services.Services"); - loadMethod = servicesClass.getMethod("load", Class.class); - } catch (ClassNotFoundException | NoSuchMethodException e) { - // Services.load is not available - } - if (loadMethod != null) { - try { - try { - loadMethod.invoke(null, (Object) null); - } catch (InvocationTargetException e) { - throw e.getTargetException(); - } - } catch (NullPointerException npe) { - // Services.load is accessible - } catch (IllegalAccessException iae) { - // Services.load is not accessible. This happens on JDK 9+ when EnableJVMCI is - // true (either explicitly or by default) which causes the jdk.internal.vm.ci - // module to be resolved. - loadMethod = null; - } catch (ServiceConfigurationError iae) { - // The service is not accessible to JVMCI. - loadMethod = null; - } catch (Throwable e) { - throw new InternalError(e); - } - } - LOAD_METHOD = loadMethod; - } - @SuppressWarnings("unchecked") static Iterable load(Class service) { Module truffleModule = DefaultTruffleRuntime.class.getModule(); if (!truffleModule.canUse(service)) { truffleModule.addUses(service); } - if (LOAD_METHOD != null) { - try { - return (Iterable) LOAD_METHOD.invoke(null, service); - } catch (Exception e) { - throw new InternalError(e); - } + ModuleLayer moduleLayer = truffleModule.getLayer(); + Iterable services; + if (moduleLayer != null) { + services = ServiceLoader.load(moduleLayer, service); } else { - ModuleLayer moduleLayer = truffleModule.getLayer(); - Iterable services; - if (moduleLayer != null) { - services = ServiceLoader.load(moduleLayer, service); - } else { - services = ServiceLoader.load(service, DefaultTruffleRuntime.class.getClassLoader()); - } - if (!services.iterator().hasNext()) { - services = ServiceLoader.load(service); - } - return services; + services = ServiceLoader.load(service, DefaultTruffleRuntime.class.getClassLoader()); + } + if (!services.iterator().hasNext()) { + services = ServiceLoader.load(service); } + return services; } } From 3ae8fbcaacbf1061e755d80f511a012f957aaff9 Mon Sep 17 00:00:00 2001 From: Christian Humer Date: Mon, 3 Jul 2023 18:04:34 +0200 Subject: [PATCH 34/43] Fix access to native image runner for Truffle. --- .../src/com/oracle/svm/hosted/NativeImageGeneratorRunner.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/substratevm/src/com.oracle.svm.hosted/src/com/oracle/svm/hosted/NativeImageGeneratorRunner.java b/substratevm/src/com.oracle.svm.hosted/src/com/oracle/svm/hosted/NativeImageGeneratorRunner.java index 472dfb668aaa..544e042f3009 100644 --- a/substratevm/src/com.oracle.svm.hosted/src/com/oracle/svm/hosted/NativeImageGeneratorRunner.java +++ b/substratevm/src/com.oracle.svm.hosted/src/com/oracle/svm/hosted/NativeImageGeneratorRunner.java @@ -735,6 +735,9 @@ public static void setModuleAccesses() { ModuleSupport.accessPackagesToClass(ModuleSupport.Access.OPEN, null, false, "java.base", "sun.reflect.annotation"); ModuleSupport.accessPackagesToClass(ModuleSupport.Access.OPEN, null, false, "java.base", "sun.security.jca"); ModuleSupport.accessPackagesToClass(ModuleSupport.Access.OPEN, null, false, "jdk.jdeps", "com.sun.tools.classfile"); + ModuleSupport.accessPackagesToClass(ModuleSupport.Access.OPEN, null, false, "org.graalvm.truffle.runtime"); + ModuleSupport.accessPackagesToClass(ModuleSupport.Access.OPEN, null, false, "org.graalvm.truffle.compiler"); + ModuleSupport.accessPackagesToClass(ModuleSupport.Access.OPEN, null, true, "com.oracle.truffle.enterprise"); } } } From 7a6aff4757bdb1e72fdb92f8efb2df994d522a23 Mon Sep 17 00:00:00 2001 From: Christian Humer Date: Tue, 4 Jul 2023 16:56:46 +0200 Subject: [PATCH 35/43] Add back support for LibGraal use on JDK 17 when certain methods are not available. --- .../svm/graal/hotspot/libgraal/LibGraal.java | 132 +++++++++++++++++- .../hotspot/libgraal/LibGraalFeature.java | 2 +- 2 files changed, 128 insertions(+), 6 deletions(-) diff --git a/substratevm/src/com.oracle.svm.graal.hotspot.libgraal/src/com/oracle/svm/graal/hotspot/libgraal/LibGraal.java b/substratevm/src/com.oracle.svm.graal.hotspot.libgraal/src/com/oracle/svm/graal/hotspot/libgraal/LibGraal.java index bbee756d7f02..638689abebde 100644 --- a/substratevm/src/com.oracle.svm.graal.hotspot.libgraal/src/com/oracle/svm/graal/hotspot/libgraal/LibGraal.java +++ b/substratevm/src/com.oracle.svm.graal.hotspot.libgraal/src/com/oracle/svm/graal/hotspot/libgraal/LibGraal.java @@ -24,6 +24,11 @@ */ package com.oracle.svm.graal.hotspot.libgraal; +import static jdk.vm.ci.hotspot.HotSpotJVMCIRuntime.runtime; + +import java.lang.reflect.Method; +import java.util.Arrays; + import org.graalvm.word.PointerBase; import org.graalvm.word.WordFactory; @@ -64,6 +69,12 @@ public final class LibGraal { Services.initializeJVMCI(); } + private static final Method unhand = methodOrNull(HotSpotJVMCIRuntime.class, "unhand", sig(Class.class, Long.TYPE)); + private static final Method attachCurrentThread = methodIf(unhand, HotSpotJVMCIRuntime.class, "attachCurrentThread", sig(Boolean.TYPE, long[].class), sig(Boolean.TYPE)); + private static final Method detachCurrentThread = methodIf(unhand, HotSpotJVMCIRuntime.class, "detachCurrentThread", sig(Boolean.TYPE), sig()); + private static final Method asResolvedJavaType = methodOrNull(HotSpotJVMCIRuntime.class, "asResolvedJavaType", sig(Long.TYPE)); + private static final Method getJObjectValue = methodIf(asResolvedJavaType, HotSpotJVMCIRuntime.class, "getJObjectValue", sig(HotSpotObjectConstant.class)); + /** * Determines if libgraal is available for use. */ @@ -111,14 +122,28 @@ public static T unhand(Class type, long handle) { * @see HotSpotJVMCIRuntime#getJObjectValue(HotSpotObjectConstant) */ public static T getJObjectValue(HotSpotObjectConstant constant) { - return WordFactory.pointer(HotSpotJVMCIRuntime.runtime().getJObjectValue(constant)); + if (getJObjectValue == null) { + return WordFactory.nullPointer(); + } + try { + return WordFactory.pointer((long) getJObjectValue.invoke(runtime(), constant)); + } catch (Throwable throwable) { + throw new InternalError(throwable); + } } /** * @see HotSpotJVMCIRuntime#asResolvedJavaType(long) */ public static HotSpotResolvedJavaType asResolvedJavaType(PointerBase pointer) { - return HotSpotJVMCIRuntime.runtime().asResolvedJavaType(pointer.rawValue()); + if (asResolvedJavaType == null) { + return null; + } + try { + return (HotSpotResolvedJavaType) asResolvedJavaType.invoke(runtime(), pointer.rawValue()); + } catch (Throwable throwable) { + throw new InternalError(throwable); + } } private static long initializeLibgraal() { @@ -129,11 +154,28 @@ private static long initializeLibgraal() { * Ensures the current thread is attached to the peer runtime. * * @param isDaemon if the thread is not yet attached, should it be attached as a daemon + * @param isolate if non-null, the isolate for the current thread is returned in element 0 * @return {@code true} if this call attached the current thread, {@code false} if the current * thread was already attached */ - public static boolean attachCurrentThread(boolean isDaemon) { - return HotSpotJVMCIRuntime.runtime().attachCurrentThread(isDaemon, null); + public static boolean attachCurrentThread(boolean isDaemon, long[] isolate) { + try { + if (attachCurrentThread.getParameterCount() == 2) { + long[] javaVMInfo = isolate != null ? new long[4] : null; + boolean res = (boolean) attachCurrentThread.invoke(runtime(), isDaemon, javaVMInfo); + if (isolate != null) { + isolate[0] = javaVMInfo[1]; + } + return res; + } else { + if (isolate != null) { + isolate[0] = initialIsolate; + } + return (boolean) attachCurrentThread.invoke(runtime(), isDaemon); + } + } catch (Throwable throwable) { + throw new InternalError(throwable); + } } /** @@ -147,7 +189,87 @@ public static boolean attachCurrentThread(boolean isDaemon) { * as a result of this call */ public static boolean detachCurrentThread(boolean release) { - return HotSpotJVMCIRuntime.runtime().detachCurrentThread(release); + try { + if (detachCurrentThread.getParameterCount() == 1) { + return (Boolean) detachCurrentThread.invoke(runtime(), release); + } else { + detachCurrentThread.invoke(runtime()); + return false; + } + } catch (Throwable throwable) { + throw new InternalError(throwable); + } + } + + /** + * Convenience function for wrapping varargs into an array for use in calls to + * {@link #method(Class, String, Class[][])}. + */ + private static Class[] sig(Class... types) { + return types; + } + + /** + * Gets the method in {@code declaringClass} with the unique name {@code name}. + * + * @param sigs the signatures the method may have + */ + private static Method method(Class declaringClass, String name, Class[]... sigs) { + if (sigs.length == 1 || sigs.length == 0) { + try { + Class[] sig = sigs.length == 1 ? sigs[0] : new Class[0]; + return declaringClass.getDeclaredMethod(name, sig); + } catch (NoSuchMethodException | SecurityException e) { + throw (NoSuchMethodError) new NoSuchMethodError(name).initCause(e); + } + } + Method match = null; + for (Method m : declaringClass.getDeclaredMethods()) { + if (m.getName().equals(name)) { + if (match != null) { + throw new InternalError(String.format("Expected single method named %s, found %s and %s", + name, match, m)); + } + match = m; + } + } + if (match == null) { + throw new NoSuchMethodError("Cannot find method " + name + " in " + declaringClass.getName()); + } + Class[] parameterTypes = match.getParameterTypes(); + for (Class[] sig : sigs) { + if (Arrays.equals(parameterTypes, sig)) { + return match; + } + } + throw new NoSuchMethodError(String.format("Unexpected signature for %s: %s", name, Arrays.toString(parameterTypes))); + } + + /** + * Gets the method in {@code declaringClass} with the unique name {@code name} or {@code null} + * if not found. + * + * @param sigs the signatures the method may have + */ + private static Method methodOrNull(Class declaringClass, String name, Class[]... sigs) { + try { + return method(declaringClass, name, sigs); + } catch (NoSuchMethodError e) { + return null; + } + } + + /** + * Gets the method in {@code declaringClass} with the unique name {@code name} or {@code null} + * if {@code guard == null}. + * + * @param sigs the signatures the method may have + */ + private static Method methodIf(Object guard, Class declaringClass, String name, Class[]... sigs) { + if (guard == null) { + return null; + } + return method(declaringClass, name, sigs); } } diff --git a/substratevm/src/com.oracle.svm.graal.hotspot.libgraal/src/com/oracle/svm/graal/hotspot/libgraal/LibGraalFeature.java b/substratevm/src/com.oracle.svm.graal.hotspot.libgraal/src/com/oracle/svm/graal/hotspot/libgraal/LibGraalFeature.java index d7ab360bcee2..2a08be269ab1 100644 --- a/substratevm/src/com.oracle.svm.graal.hotspot.libgraal/src/com/oracle/svm/graal/hotspot/libgraal/LibGraalFeature.java +++ b/substratevm/src/com.oracle.svm.graal.hotspot.libgraal/src/com/oracle/svm/graal/hotspot/libgraal/LibGraalFeature.java @@ -775,7 +775,7 @@ final class Target_org_graalvm_compiler_core_GraalServiceThread { @Substitute() void beforeRun() { GraalServiceThread thread = SubstrateUtil.cast(this, GraalServiceThread.class); - if (!LibGraal.attachCurrentThread(thread.isDaemon())) { + if (!LibGraal.attachCurrentThread(thread.isDaemon(), null)) { throw new InternalError("Couldn't attach to HotSpot runtime"); } } From 5ad19a67a1a8fdbf476ffdb10082610d488010d2 Mon Sep 17 00:00:00 2001 From: Christian Humer Date: Tue, 4 Jul 2023 17:20:04 +0200 Subject: [PATCH 36/43] Truffle runtime needs to depend on sdk:JNIUTILS to support exception entry points. --- substratevm/mx.substratevm/suite.py | 1 + truffle/mx.truffle/mx_truffle.py | 1 + truffle/mx.truffle/suite.py | 1 + 3 files changed, 3 insertions(+) diff --git a/substratevm/mx.substratevm/suite.py b/substratevm/mx.substratevm/suite.py index 29699aff5422..6f520d4651b4 100644 --- a/substratevm/mx.substratevm/suite.py +++ b/substratevm/mx.substratevm/suite.py @@ -1500,6 +1500,7 @@ ], "distDependencies": [ "SVM", + "sdk:JNIUTILS", "sdk:NATIVEBRIDGE", ], "defaultBuild": False, diff --git a/truffle/mx.truffle/mx_truffle.py b/truffle/mx.truffle/mx_truffle.py index e2f47c458ded..316534fccebd 100644 --- a/truffle/mx.truffle/mx_truffle.py +++ b/truffle/mx.truffle/mx_truffle.py @@ -1146,6 +1146,7 @@ def glob_match(path, pattern): 'truffle:TRUFFLE_API', 'truffle:TRUFFLE_COMPILER', 'truffle:TRUFFLE_RUNTIME', + 'sdk:JNIUTILS', ], support_libraries_distributions=['truffle:TRUFFLE_RUNTIME_ATTACH_SUPPORT'], stability="supported", diff --git a/truffle/mx.truffle/suite.py b/truffle/mx.truffle/suite.py index 37a98499036e..952ba54f9656 100644 --- a/truffle/mx.truffle/suite.py +++ b/truffle/mx.truffle/suite.py @@ -1227,6 +1227,7 @@ ], "distDependencies" : [ "sdk:GRAAL_SDK", + "sdk:JNIUTILS", "TRUFFLE_API", "TRUFFLE_COMPILER", ], From 10696de21c3c1299b156d935bcb78bed13940e92 Mon Sep 17 00:00:00 2001 From: Christian Humer Date: Wed, 5 Jul 2023 17:18:50 +0200 Subject: [PATCH 37/43] Refactor nativebridge and jniutils to components. --- sdk/mx.sdk/mx_sdk.py | 27 ++++++++++++++++++-- substratevm/mx.substratevm/mx_substratevm.py | 6 ++--- truffle/mx.truffle/mx_truffle.py | 3 +-- 3 files changed, 29 insertions(+), 7 deletions(-) diff --git a/sdk/mx.sdk/mx_sdk.py b/sdk/mx.sdk/mx_sdk.py index 8a7cd57efdd6..4bfeb08445fd 100644 --- a/sdk/mx.sdk/mx_sdk.py +++ b/sdk/mx.sdk/mx_sdk.py @@ -119,6 +119,31 @@ def upx(args): stability="supported", )) +mx_sdk_vm.register_graalvm_component(mx_sdk_vm.GraalVmJreComponent( + suite=_suite, + name='JNIUtils', + short_name='jniutils', + dir_name='truffle', + license_files=[], + third_party_license_files=[], + dependencies=[], + jar_distributions=[], + boot_jars=['sdk:JNIUTILS'], + stability="supported", +)) + +mx_sdk_vm.register_graalvm_component(mx_sdk_vm.GraalVmJreComponent( + suite=_suite, + name='Native Bridge', + short_name='nativebridge', + dir_name='truffle', + license_files=[], + third_party_license_files=[], + dependencies=['jniutils'], + jar_distributions=[], + boot_jars=['sdk:NATIVEBRIDGE'], + stability="supported", +)) mx_sdk_vm.register_graalvm_component(mx_sdk_vm.GraalVmJreComponent( suite=_suite, @@ -133,7 +158,6 @@ def upx(args): stability="supported", )) - mx_sdk_vm.register_graalvm_component(mx_sdk_vm.GraalVmJreComponent( suite=_suite, name='LLVM.org toolchain', @@ -148,7 +172,6 @@ def upx(args): stability="supported", )) - def mx_register_dynamic_suite_constituents(register_project, register_distribution): mx_sdk_vm_impl.mx_register_dynamic_suite_constituents(register_project, register_distribution) diff --git a/substratevm/mx.substratevm/mx_substratevm.py b/substratevm/mx.substratevm/mx_substratevm.py index 5900850b41ab..c2940b0779e5 100644 --- a/substratevm/mx.substratevm/mx_substratevm.py +++ b/substratevm/mx.substratevm/mx_substratevm.py @@ -938,7 +938,7 @@ def native_image_context_run(func, func_args=None, config=None, build_if_missing installable_id='native-image', license_files=[], third_party_license_files=[], - dependencies=['GraalVM compiler', 'Truffle Macro', 'SubstrateVM Static Libraries'], + dependencies=['GraalVM compiler', 'Truffle API', 'Truffle Macro', 'SubstrateVM Static Libraries'], jar_distributions=['substratevm:LIBRARY_SUPPORT'], builder_jar_distributions=[ 'substratevm:SVM', @@ -1172,7 +1172,7 @@ def _native_image_launcher_extra_jvm_args(): )) libgraal_jar_distributions = [ - 'sdk:JNIUTILS', 'sdk:NATIVEBRIDGE', + 'sdk:NATIVEBRIDGE', 'substratevm:GRAAL_HOTSPOT_LIBRARY'] libgraal_build_args = [ @@ -1225,7 +1225,7 @@ def _native_image_launcher_extra_jvm_args(): dir_name=False, license_files=[], third_party_license_files=[], - dependencies=[], + dependencies=['nativebridge'], jar_distributions=[], builder_jar_distributions=[], support_distributions=[], diff --git a/truffle/mx.truffle/mx_truffle.py b/truffle/mx.truffle/mx_truffle.py index 316534fccebd..5e6aa3a404bb 100644 --- a/truffle/mx.truffle/mx_truffle.py +++ b/truffle/mx.truffle/mx_truffle.py @@ -1140,13 +1140,12 @@ def glob_match(path, pattern): dir_name='truffle', license_files=[], third_party_license_files=[], - dependencies=['Graal SDK'], + dependencies=['Graal SDK', 'jniutils'], jar_distributions=[], jvmci_parent_jars=[ 'truffle:TRUFFLE_API', 'truffle:TRUFFLE_COMPILER', 'truffle:TRUFFLE_RUNTIME', - 'sdk:JNIUTILS', ], support_libraries_distributions=['truffle:TRUFFLE_RUNTIME_ATTACH_SUPPORT'], stability="supported", From fee12edfc87f6519ed1775d14cd1ff769a433d0c Mon Sep 17 00:00:00 2001 From: Christian Humer Date: Wed, 5 Jul 2023 18:14:13 +0200 Subject: [PATCH 38/43] Fix export jvmci to libgraal if it happens to be initialized eagerly. --- .../org/graalvm/compiler/hotspot/test/CompileTheWorld.java | 3 --- .../com/oracle/truffle/runtime/hotspot/libgraal/LibGraal.java | 4 ++++ 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/compiler/src/jdk.internal.vm.compiler.test/src/org/graalvm/compiler/hotspot/test/CompileTheWorld.java b/compiler/src/jdk.internal.vm.compiler.test/src/org/graalvm/compiler/hotspot/test/CompileTheWorld.java index abf725e5af48..e2f793509938 100644 --- a/compiler/src/jdk.internal.vm.compiler.test/src/org/graalvm/compiler/hotspot/test/CompileTheWorld.java +++ b/compiler/src/jdk.internal.vm.compiler.test/src/org/graalvm/compiler/hotspot/test/CompileTheWorld.java @@ -115,8 +115,6 @@ import org.graalvm.compiler.serviceprovider.GraalUnsafeAccess; import org.graalvm.util.OptionsEncoder; -import com.oracle.truffle.api.Truffle; -import com.oracle.truffle.runtime.ModulesSupport; import com.oracle.truffle.runtime.hotspot.libgraal.LibGraal; import com.oracle.truffle.runtime.hotspot.libgraal.LibGraalIsolate; import com.oracle.truffle.runtime.hotspot.libgraal.LibGraalScope; @@ -143,7 +141,6 @@ public final class CompileTheWorld { ModuleSupport.exportAndOpenAllPackagesToUnnamed("jdk.internal.vm.compiler"); ModuleSupport.exportAndOpenAllPackagesToUnnamed("org.graalvm.truffle.runtime"); ModuleSupport.exportAndOpenAllPackagesToUnnamed("org.graalvm.truffle"); - ModulesSupport.exportJVMCI(Truffle.getRuntime().getClass()); } /** diff --git a/truffle/src/com.oracle.truffle.runtime/src/com/oracle/truffle/runtime/hotspot/libgraal/LibGraal.java b/truffle/src/com.oracle.truffle.runtime/src/com/oracle/truffle/runtime/hotspot/libgraal/LibGraal.java index 121b8cd9a6f6..c43db4f59946 100644 --- a/truffle/src/com.oracle.truffle.runtime/src/com/oracle/truffle/runtime/hotspot/libgraal/LibGraal.java +++ b/truffle/src/com.oracle.truffle.runtime/src/com/oracle/truffle/runtime/hotspot/libgraal/LibGraal.java @@ -51,6 +51,9 @@ import org.graalvm.word.PointerBase; import org.graalvm.word.WordFactory; +import com.oracle.truffle.api.Truffle; +import com.oracle.truffle.runtime.ModulesSupport; + import jdk.vm.ci.hotspot.HotSpotJVMCIRuntime; import jdk.vm.ci.hotspot.HotSpotObjectConstant; import jdk.vm.ci.hotspot.HotSpotResolvedJavaType; @@ -88,6 +91,7 @@ public class LibGraal { static { // Initialize JVMCI to ensure JVMCI opens its packages to Graal. + ModulesSupport.exportJVMCI(LibGraal.class); Services.initializeJVMCI(); } From a6c19761a82eca69c44e2d2aaa2088793902a34b Mon Sep 17 00:00:00 2001 From: Christian Humer Date: Wed, 5 Jul 2023 18:45:47 +0200 Subject: [PATCH 39/43] Move nativebridge and jniutils into sdk. --- sdk/mx.sdk/mx_sdk.py | 28 +------------------- substratevm/mx.substratevm/mx_substratevm.py | 2 +- truffle/mx.truffle/mx_truffle.py | 2 +- 3 files changed, 3 insertions(+), 29 deletions(-) diff --git a/sdk/mx.sdk/mx_sdk.py b/sdk/mx.sdk/mx_sdk.py index 4bfeb08445fd..be7352460438 100644 --- a/sdk/mx.sdk/mx_sdk.py +++ b/sdk/mx.sdk/mx_sdk.py @@ -115,33 +115,7 @@ def upx(args): third_party_license_files=[], dependencies=[], jar_distributions=[], - boot_jars=['sdk:GRAAL_SDK'], - stability="supported", -)) - -mx_sdk_vm.register_graalvm_component(mx_sdk_vm.GraalVmJreComponent( - suite=_suite, - name='JNIUtils', - short_name='jniutils', - dir_name='truffle', - license_files=[], - third_party_license_files=[], - dependencies=[], - jar_distributions=[], - boot_jars=['sdk:JNIUTILS'], - stability="supported", -)) - -mx_sdk_vm.register_graalvm_component(mx_sdk_vm.GraalVmJreComponent( - suite=_suite, - name='Native Bridge', - short_name='nativebridge', - dir_name='truffle', - license_files=[], - third_party_license_files=[], - dependencies=['jniutils'], - jar_distributions=[], - boot_jars=['sdk:NATIVEBRIDGE'], + boot_jars=['sdk:GRAAL_SDK', 'sdk:JNIUTILS', 'sdk:NATIVEBRIDGE'], stability="supported", )) diff --git a/substratevm/mx.substratevm/mx_substratevm.py b/substratevm/mx.substratevm/mx_substratevm.py index c2940b0779e5..710ed2a0a74c 100644 --- a/substratevm/mx.substratevm/mx_substratevm.py +++ b/substratevm/mx.substratevm/mx_substratevm.py @@ -1225,7 +1225,7 @@ def _native_image_launcher_extra_jvm_args(): dir_name=False, license_files=[], third_party_license_files=[], - dependencies=['nativebridge'], + dependencies=[], jar_distributions=[], builder_jar_distributions=[], support_distributions=[], diff --git a/truffle/mx.truffle/mx_truffle.py b/truffle/mx.truffle/mx_truffle.py index 5e6aa3a404bb..e2f47c458ded 100644 --- a/truffle/mx.truffle/mx_truffle.py +++ b/truffle/mx.truffle/mx_truffle.py @@ -1140,7 +1140,7 @@ def glob_match(path, pattern): dir_name='truffle', license_files=[], third_party_license_files=[], - dependencies=['Graal SDK', 'jniutils'], + dependencies=['Graal SDK'], jar_distributions=[], jvmci_parent_jars=[ 'truffle:TRUFFLE_API', From 0e2f026f507f74adae50aa89a98b0a993215c703 Mon Sep 17 00:00:00 2001 From: Christian Humer Date: Wed, 5 Jul 2023 18:46:02 +0200 Subject: [PATCH 40/43] Fix compiler warning in Libgraal. --- .../com/oracle/truffle/runtime/hotspot/libgraal/LibGraal.java | 1 - 1 file changed, 1 deletion(-) diff --git a/truffle/src/com.oracle.truffle.runtime/src/com/oracle/truffle/runtime/hotspot/libgraal/LibGraal.java b/truffle/src/com.oracle.truffle.runtime/src/com/oracle/truffle/runtime/hotspot/libgraal/LibGraal.java index c43db4f59946..5c91731438eb 100644 --- a/truffle/src/com.oracle.truffle.runtime/src/com/oracle/truffle/runtime/hotspot/libgraal/LibGraal.java +++ b/truffle/src/com.oracle.truffle.runtime/src/com/oracle/truffle/runtime/hotspot/libgraal/LibGraal.java @@ -51,7 +51,6 @@ import org.graalvm.word.PointerBase; import org.graalvm.word.WordFactory; -import com.oracle.truffle.api.Truffle; import com.oracle.truffle.runtime.ModulesSupport; import jdk.vm.ci.hotspot.HotSpotJVMCIRuntime; From 51cfeecc60f6055fcfea7c87e9877779d8c3954e Mon Sep 17 00:00:00 2001 From: Christian Humer Date: Wed, 5 Jul 2023 20:35:01 +0200 Subject: [PATCH 41/43] Restore OnShutdownCallback implementation. --- .../hotspot/test/CompileTheWorld.java | 2 +- .../hotspot/libgraal/LibGraalFeature.java | 25 ++++++++++++++++++- 2 files changed, 25 insertions(+), 2 deletions(-) diff --git a/compiler/src/jdk.internal.vm.compiler.test/src/org/graalvm/compiler/hotspot/test/CompileTheWorld.java b/compiler/src/jdk.internal.vm.compiler.test/src/org/graalvm/compiler/hotspot/test/CompileTheWorld.java index e2f793509938..e3bb85a7c0ff 100644 --- a/compiler/src/jdk.internal.vm.compiler.test/src/org/graalvm/compiler/hotspot/test/CompileTheWorld.java +++ b/compiler/src/jdk.internal.vm.compiler.test/src/org/graalvm/compiler/hotspot/test/CompileTheWorld.java @@ -139,8 +139,8 @@ public final class CompileTheWorld { static { ModuleSupport.exportAndOpenAllPackagesToUnnamed("jdk.internal.vm.compiler"); - ModuleSupport.exportAndOpenAllPackagesToUnnamed("org.graalvm.truffle.runtime"); ModuleSupport.exportAndOpenAllPackagesToUnnamed("org.graalvm.truffle"); + ModuleSupport.exportAndOpenAllPackagesToUnnamed("org.graalvm.truffle.runtime"); } /** diff --git a/substratevm/src/com.oracle.svm.graal.hotspot.libgraal/src/com/oracle/svm/graal/hotspot/libgraal/LibGraalFeature.java b/substratevm/src/com.oracle.svm.graal.hotspot.libgraal/src/com/oracle/svm/graal/hotspot/libgraal/LibGraalFeature.java index 2a08be269ab1..9dd609f551fe 100644 --- a/substratevm/src/com.oracle.svm.graal.hotspot.libgraal/src/com/oracle/svm/graal/hotspot/libgraal/LibGraalFeature.java +++ b/substratevm/src/com.oracle.svm.graal.hotspot.libgraal/src/com/oracle/svm/graal/hotspot/libgraal/LibGraalFeature.java @@ -94,9 +94,12 @@ import org.graalvm.compiler.truffle.compiler.substitutions.GraphBuilderInvocationPluginProvider; import org.graalvm.compiler.truffle.compiler.substitutions.GraphDecoderInvocationPluginProvider; import org.graalvm.jniutils.JNI; +import org.graalvm.jniutils.JNIExceptionWrapper; import org.graalvm.jniutils.JNIMethodScope; +import org.graalvm.jniutils.JNIUtil; import org.graalvm.nativeimage.ImageSingletons; import org.graalvm.nativeimage.LogHandler; +import org.graalvm.nativeimage.StackValue; import org.graalvm.nativeimage.VMRuntime; import org.graalvm.nativeimage.hosted.Feature; import org.graalvm.nativeimage.hosted.RuntimeJNIAccess; @@ -700,7 +703,27 @@ private static void startupLibGraal(HotSpotGraalRuntime runtime) { @SuppressWarnings("unused") @Substitute private static void shutdownLibGraal(HotSpotGraalRuntime runtime) { - VMRuntime.shutdown(); + try { + String callback = LibGraalOptions.OnShutdownCallback.getValue(); + if (callback != null) { + long offset = runtime.getVMConfig().jniEnvironmentOffset; + long javaThreadAddr = HotSpotJVMCIRuntime.runtime().getCurrentJavaThread(); + JNI.JNIEnv env = (JNI.JNIEnv) WordFactory.unsigned(javaThreadAddr).add(WordFactory.unsigned(offset)); + int lastDot = callback.lastIndexOf('.'); + if (lastDot < 1 || lastDot == callback.length() - 1) { + throw new IllegalArgumentException(LibGraalOptions.OnShutdownCallback.getName() + " value does not have . format: " + callback); + } + String cbClassName = callback.substring(0, lastDot); + String cbMethodName = callback.substring(lastDot + 1); + JNI.JClass cbClass = JNIUtil.findClass(env, JNIUtil.getSystemClassLoader(env), + JNIUtil.getBinaryName(cbClassName), true); + JNI.JMethodID cbMethod = JNIUtil.findMethod(env, cbClass, true, cbMethodName, "()V"); + env.getFunctions().getCallStaticVoidMethodA().call(env, cbClass, cbMethod, StackValue.get(0)); + JNIExceptionWrapper.wrapAndThrowPendingJNIException(env); + } + } finally { + VMRuntime.shutdown(); + } } } From 5968fde3356d959124ef7c016a49b2057733982e Mon Sep 17 00:00:00 2001 From: Christian Humer Date: Wed, 12 Jul 2023 12:11:56 +0100 Subject: [PATCH 42/43] Improve tracing code in LibGraalNativeBridgeSupport. --- .../hotspot/libgraal/truffle/LibGraalNativeBridgeSupport.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/substratevm/src/com.oracle.svm.graal.hotspot.libgraal/src/com/oracle/svm/graal/hotspot/libgraal/truffle/LibGraalNativeBridgeSupport.java b/substratevm/src/com.oracle.svm.graal.hotspot.libgraal/src/com/oracle/svm/graal/hotspot/libgraal/truffle/LibGraalNativeBridgeSupport.java index 1cf88e8146b0..7a36aca2c4d7 100644 --- a/substratevm/src/com.oracle.svm.graal.hotspot.libgraal/src/com/oracle/svm/graal/hotspot/libgraal/truffle/LibGraalNativeBridgeSupport.java +++ b/substratevm/src/com.oracle.svm.graal.hotspot.libgraal/src/com/oracle/svm/graal/hotspot/libgraal/truffle/LibGraalNativeBridgeSupport.java @@ -67,7 +67,7 @@ public void trace(String message) { sb.append('[').append(IsolateUtil.getIsolateID()).append(':').append(Thread.currentThread().getName()).append(']'); JNIMethodScope scope = JNIMethodScope.scopeOrNull(); if (scope != null) { - sb.append(new String(new char[2 + (scope.depth() * 2)]).replace('\0', ' ')); + sb.append(" ".repeat(2 + (scope.depth() * 2))); } sb.append(message); TTY.println(sb.toString()); From cd130002d10ed95d7e2e37c56f013e913bd71c66 Mon Sep 17 00:00:00 2001 From: Christian Humer Date: Wed, 12 Jul 2023 12:14:27 +0100 Subject: [PATCH 43/43] Remove unused jvmci_parent_dists. --- compiler/mx.compiler/mx_compiler.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/compiler/mx.compiler/mx_compiler.py b/compiler/mx.compiler/mx_compiler.py index 83f3f19a1a01..a4b99da5e641 100644 --- a/compiler/mx.compiler/mx_compiler.py +++ b/compiler/mx.compiler/mx_compiler.py @@ -1298,7 +1298,6 @@ class GraalConfig: def __init__(self): self.jvmci_dists = [] self.jvmci_jars = [] - self.jvmci_parent_dists = [] self.jvmci_parent_jars = [] self.boot_dists = [] self.boot_jars = [] @@ -1316,10 +1315,9 @@ def __init__(self): self.boot_dists.append(d) self.boot_jars.append(d.classpath_repr()) - self.jvmci_parent_dists = [] - self.jvmci_parent_jars = [jar.classpath_repr() for jar in self.jvmci_parent_dists] + self.jvmci_parent_jars = [] - self.dists = self.jvmci_dists + self.jvmci_parent_dists + self.boot_dists + self.dists = self.jvmci_dists + self.boot_dists self.jars = self.jvmci_jars + self.jvmci_parent_jars + self.boot_jars self.dists_dict = {e.suite.name + ':' + e.name : e for e in self.dists}