Search in sources :

Example 1 with GeneratedElement

use of com.oracle.truffle.dsl.processor.java.model.GeneratedElement in project graal by oracle.

the class GeneratorUtils method createClass.

public static CodeTypeElement createClass(Template sourceModel, TemplateMethod sourceMethod, Set<Modifier> modifiers, String simpleName, TypeMirror superType) {
    TypeElement templateType = sourceModel.getTemplateType();
    ProcessorContext context = ProcessorContext.getInstance();
    PackageElement pack = ElementUtils.findPackageElement(templateType);
    CodeTypeElement clazz = new CodeTypeElement(modifiers, ElementKind.CLASS, pack, simpleName);
    TypeMirror resolvedSuperType = superType;
    if (resolvedSuperType == null) {
        resolvedSuperType = context.getType(Object.class);
    }
    clazz.setSuperClass(resolvedSuperType);
    CodeAnnotationMirror generatedByAnnotation = new CodeAnnotationMirror(context.getTypes().GeneratedBy);
    Element generatedByElement = templateType;
    while (generatedByElement instanceof GeneratedElement) {
        generatedByElement = generatedByElement.getEnclosingElement();
    }
    if (generatedByElement instanceof TypeElement) {
        generatedByAnnotation.setElementValue(generatedByAnnotation.findExecutableElement("value"), new CodeAnnotationValue(generatedByElement.asType()));
        if (sourceMethod != null) {
            generatedByAnnotation.setElementValue(generatedByAnnotation.findExecutableElement("methodName"), new CodeAnnotationValue(ElementUtils.createReferenceName(sourceMethod.getMethod())));
        }
        clazz.addAnnotationMirror(generatedByAnnotation);
    }
    return clazz;
}
Also used : CodeAnnotationMirror(com.oracle.truffle.dsl.processor.java.model.CodeAnnotationMirror) GeneratedElement(com.oracle.truffle.dsl.processor.java.model.GeneratedElement) CodeTypeElement(com.oracle.truffle.dsl.processor.java.model.CodeTypeElement) ElementUtils.fromTypeMirror(com.oracle.truffle.dsl.processor.java.ElementUtils.fromTypeMirror) TypeMirror(javax.lang.model.type.TypeMirror) TypeElement(javax.lang.model.element.TypeElement) CodeTypeElement(com.oracle.truffle.dsl.processor.java.model.CodeTypeElement) PackageElement(javax.lang.model.element.PackageElement) VariableElement(javax.lang.model.element.VariableElement) TypeElement(javax.lang.model.element.TypeElement) CodeVariableElement(com.oracle.truffle.dsl.processor.java.model.CodeVariableElement) GeneratedElement(com.oracle.truffle.dsl.processor.java.model.GeneratedElement) CodeExecutableElement(com.oracle.truffle.dsl.processor.java.model.CodeExecutableElement) CodeTypeElement(com.oracle.truffle.dsl.processor.java.model.CodeTypeElement) ExecutableElement(javax.lang.model.element.ExecutableElement) Element(javax.lang.model.element.Element) CodeElement(com.oracle.truffle.dsl.processor.java.model.CodeElement) PackageElement(javax.lang.model.element.PackageElement) ProcessorContext(com.oracle.truffle.dsl.processor.ProcessorContext) CodeAnnotationValue(com.oracle.truffle.dsl.processor.java.model.CodeAnnotationValue)

Example 2 with GeneratedElement

use of com.oracle.truffle.dsl.processor.java.model.GeneratedElement in project graal by oracle.

the class Log method message.

public void message(Kind kind, Element element, AnnotationMirror mirror, AnnotationValue value, String format, Object... args) {
    AnnotationMirror usedMirror = mirror;
    Element usedElement = element;
    AnnotationValue usedValue = value;
    String message = String.format(format, args);
    if (element instanceof GeneratedElement) {
        usedMirror = ((GeneratedElement) element).getGeneratorAnnotationMirror();
        usedElement = ((GeneratedElement) element).getGeneratorElement();
        usedValue = null;
        if (usedElement != null) {
            message = String.format("Element %s: %s", element, message);
        }
    }
    if (kind != Kind.WARNING || emitWarnings) {
        processingEnv.getMessager().printMessage(kind, message, usedElement, usedMirror, usedValue);
    }
}
Also used : AnnotationMirror(javax.lang.model.element.AnnotationMirror) GeneratedElement(com.oracle.truffle.dsl.processor.java.model.GeneratedElement) GeneratedElement(com.oracle.truffle.dsl.processor.java.model.GeneratedElement) Element(javax.lang.model.element.Element) AnnotationValue(javax.lang.model.element.AnnotationValue)

Example 3 with GeneratedElement

use of com.oracle.truffle.dsl.processor.java.model.GeneratedElement in project graal by oracle.

the class ElementUtils method getBinaryName.

public static String getBinaryName(TypeElement provider) {
    if (provider instanceof GeneratedElement) {
        String packageName = getPackageName(provider);
        Element enclosing = provider.getEnclosingElement();
        StringBuilder b = new StringBuilder();
        b.append(provider.getSimpleName().toString());
        while (enclosing != null) {
            ElementKind kind = enclosing.getKind();
            if ((kind.isClass() || kind.isInterface()) && enclosing instanceof TypeElement) {
                b.insert(0, enclosing.getSimpleName().toString() + "$");
            } else {
                break;
            }
            enclosing = enclosing.getEnclosingElement();
        }
        b.insert(0, packageName + ".");
        return b.toString();
    } else {
        return ProcessorContext.getInstance().getEnvironment().getElementUtils().getBinaryName(provider).toString();
    }
}
Also used : ElementKind(javax.lang.model.element.ElementKind) GeneratedElement(com.oracle.truffle.dsl.processor.java.model.GeneratedElement) TypeElement(javax.lang.model.element.TypeElement) PackageElement(javax.lang.model.element.PackageElement) VariableElement(javax.lang.model.element.VariableElement) TypeElement(javax.lang.model.element.TypeElement) GeneratedElement(com.oracle.truffle.dsl.processor.java.model.GeneratedElement) ExecutableElement(javax.lang.model.element.ExecutableElement) Element(javax.lang.model.element.Element)

Example 4 with GeneratedElement

use of com.oracle.truffle.dsl.processor.java.model.GeneratedElement in project graal by oracle.

the class MessageContainer method emitDefault.

private void emitDefault(ProcessorContext context, Log log, Message message) {
    Kind kind = message.getKind();
    Element messageElement = getMessageElement();
    AnnotationMirror messageAnnotation = getMessageAnnotation();
    AnnotationValue messageValue = getMessageAnnotationValue();
    if (message.getAnnotationValue() != null) {
        messageValue = message.getAnnotationValue();
    }
    if (message.getAnnotationMirror() != null) {
        messageAnnotation = message.getAnnotationMirror();
    }
    Element enclosedElement = message.getEnclosedElement();
    if (messageElement instanceof GeneratedElement) {
        throw new AssertionError("Tried to emit message to generated element: " + messageElement + ". Make sure messages are redirected correctly. Message: " + message.getText());
    }
    String text = message.getText();
    List<String> expectedErrors = ExpectError.getExpectedErrors(context.getEnvironment(), messageElement);
    if (!expectedErrors.isEmpty()) {
        if (ExpectError.isExpectedError(context.getEnvironment(), messageElement, text)) {
            return;
        }
        log.message(kind, messageElement, null, null, "Message expected one of '%s' but was '%s'.", expectedErrors, text);
    } else {
        if (enclosedElement == null) {
            log.message(kind, messageElement, messageAnnotation, messageValue, text);
        } else {
            log.message(kind, enclosedElement, null, null, text);
        }
    }
}
Also used : AnnotationMirror(javax.lang.model.element.AnnotationMirror) GeneratedElement(com.oracle.truffle.dsl.processor.java.model.GeneratedElement) Kind(javax.tools.Diagnostic.Kind) GeneratedElement(com.oracle.truffle.dsl.processor.java.model.GeneratedElement) Element(javax.lang.model.element.Element) AnnotationValue(javax.lang.model.element.AnnotationValue)

Example 5 with GeneratedElement

use of com.oracle.truffle.dsl.processor.java.model.GeneratedElement in project graal by oracle.

the class NodeParser method computeSharing.

public static Map<CacheExpression, String> computeSharing(Element templateType, Collection<NodeData> nodes, boolean emitSharingWarnings) {
    TruffleTypes types = ProcessorContext.getInstance().getTypes();
    Map<SharableCache, Collection<CacheExpression>> groups = computeSharableCaches(nodes);
    // compute unnecessary sharing.
    Map<String, List<SharableCache>> declaredGroups = new HashMap<>();
    for (NodeData node : nodes) {
        for (SpecializationData specialization : node.getSpecializations()) {
            for (CacheExpression cache : specialization.getCaches()) {
                if (cache.isAlwaysInitialized()) {
                    continue;
                }
                String group = cache.getSharedGroup();
                if (group != null) {
                    declaredGroups.computeIfAbsent(group, (v) -> new ArrayList<>()).add(new SharableCache(specialization, cache));
                }
            }
        }
    }
    Map<CacheExpression, String> sharedExpressions = new LinkedHashMap<>();
    for (NodeData node : nodes) {
        for (SpecializationData specialization : node.getSpecializations()) {
            for (CacheExpression cache : specialization.getCaches()) {
                if (cache.isAlwaysInitialized()) {
                    continue;
                }
                Element declaringElement;
                if (node.getTemplateType() instanceof GeneratedElement) {
                    // generated node
                    declaringElement = node.getTemplateType().getEnclosingElement();
                    if (!declaringElement.getKind().isClass() && !declaringElement.getKind().isInterface()) {
                        throw new AssertionError("Unexpected declared element for generated element: " + declaringElement.toString());
                    }
                } else {
                    declaringElement = node.getTemplateType();
                }
                String group = cache.getSharedGroup();
                SharableCache sharable = new SharableCache(specialization, cache);
                Collection<CacheExpression> expressions = groups.get(sharable);
                List<SharableCache> declaredSharing = declaredGroups.get(group);
                if (group != null) {
                    if (declaredSharing.size() <= 1) {
                        if (!ElementUtils.elementEquals(templateType, declaringElement)) {
                            // modifiable.
                            continue;
                        }
                    }
                    if (declaredSharing.size() <= 1 && (expressions == null || expressions.size() <= 1)) {
                        cache.addError(cache.getSharedGroupMirror(), cache.getSharedGroupValue(), "Could not find any other cached parameter that this parameter could be shared. " + "Cached parameters are only sharable if they declare the same type and initializer expressions and if the specialization only has a single instance. " + "Remove the @%s annotation or make the parameter sharable to resolve this.", types.Cached_Shared.asElement().getSimpleName().toString());
                    } else {
                        if (declaredSharing.size() <= 1) {
                            String error = String.format("No other cached parameters are specified as shared with the group '%s'.", group);
                            Set<String> similarGroups = new LinkedHashSet<>(declaredGroups.keySet());
                            similarGroups.remove(group);
                            List<String> fuzzyMatches = ExportsParser.fuzzyMatch(similarGroups, group, 0.7f);
                            if (!fuzzyMatches.isEmpty()) {
                                StringBuilder appendix = new StringBuilder(" Did you mean ");
                                String sep = "";
                                for (String string : fuzzyMatches) {
                                    appendix.append(sep);
                                    appendix.append('\'').append(string).append('\'');
                                    sep = ", ";
                                }
                                error += appendix.toString() + "?";
                            }
                            cache.addError(cache.getSharedGroupMirror(), cache.getSharedGroupValue(), error);
                        } else {
                            StringBuilder b = new StringBuilder();
                            for (SharableCache otherCache : declaredSharing) {
                                if (cache == otherCache.expression) {
                                    continue;
                                }
                                String reason = sharable.equalsWithReason(otherCache);
                                if (reason == null) {
                                    continue;
                                }
                                String signature = formatCacheExpression(otherCache.expression);
                                b.append(String.format("  - %s : %s%n", signature, reason));
                            }
                            if (b.length() != 0) {
                                cache.addError(cache.getSharedGroupMirror(), cache.getSharedGroupValue(), "Could not share some of the cached parameters in group '%s': %n%sRemove the @%s annotation or resolve the described issues to allow sharing.", group, b.toString(), types.Cached_Shared.asElement().getSimpleName().toString());
                            } else {
                                sharedExpressions.put(sharable.expression, group);
                            }
                        }
                    }
                } else if (expressions != null && expressions.size() > 1) {
                    if (emitSharingWarnings) {
                        /*
                             * We only emit sharing warnings for the same declaring type, because
                             * otherwise sharing warnings might not be resolvable if the base type
                             * is not modifiable.
                             */
                        List<CacheExpression> declaredInExpression = new ArrayList<>();
                        for (CacheExpression expression : expressions) {
                            if (ElementUtils.isDeclaredIn(expression.getParameter().getVariableElement(), declaringElement)) {
                                declaredInExpression.add(expression);
                            }
                        }
                        if (declaredInExpression.size() > 1 && findAnnotationMirror(cache.getParameter().getVariableElement(), types.Cached_Exclusive) == null) {
                            StringBuilder sharedCaches = new StringBuilder();
                            Set<String> recommendedGroups = new LinkedHashSet<>();
                            for (CacheExpression cacheExpression : declaredInExpression) {
                                if (cacheExpression != cache) {
                                    String signature = formatCacheExpression(cacheExpression);
                                    sharedCaches.append(String.format("  - %s%n", signature));
                                    String otherGroup = cacheExpression.getSharedGroup();
                                    if (otherGroup != null) {
                                        recommendedGroups.add(otherGroup);
                                    }
                                }
                            }
                            String recommendedGroup = recommendedGroups.size() == 1 ? recommendedGroups.iterator().next() : "group";
                            cache.addWarning("The cached parameter may be shared with: %n%s Annotate the parameter with @%s(\"%s\") or @%s to allow or deny sharing of the parameter.", sharedCaches, types.Cached_Shared.asElement().getSimpleName().toString(), recommendedGroup, types.Cached_Exclusive.asElement().getSimpleName().toString());
                        }
                    }
                }
            }
        }
    }
    return sharedExpressions;
}
Also used : Arrays(java.util.Arrays) ElementUtils.getQualifiedSuperTypeNames(com.oracle.truffle.dsl.processor.java.ElementUtils.getQualifiedSuperTypeNames) Modifier(javax.lang.model.element.Modifier) Parameter(com.oracle.truffle.dsl.processor.model.Parameter) AssumptionExpression(com.oracle.truffle.dsl.processor.model.AssumptionExpression) NodeCodeGenerator(com.oracle.truffle.dsl.processor.generator.NodeCodeGenerator) TypeElement(javax.lang.model.element.TypeElement) ElementUtils.uniqueSortedTypes(com.oracle.truffle.dsl.processor.java.ElementUtils.uniqueSortedTypes) NodeFieldData(com.oracle.truffle.dsl.processor.model.NodeFieldData) Map(java.util.Map) ElementUtils.firstLetterUpperCase(com.oracle.truffle.dsl.processor.java.ElementUtils.firstLetterUpperCase) Log(com.oracle.truffle.dsl.processor.Log) ArrayType(javax.lang.model.type.ArrayType) ClassLiteral(com.oracle.truffle.dsl.processor.expression.DSLExpression.ClassLiteral) GeneratedElement(com.oracle.truffle.dsl.processor.java.model.GeneratedElement) CodeExecutableElement(com.oracle.truffle.dsl.processor.java.model.CodeExecutableElement) Set(java.util.Set) Element(javax.lang.model.element.Element) ElementUtils.createReferenceName(com.oracle.truffle.dsl.processor.java.ElementUtils.createReferenceName) GuardExpression(com.oracle.truffle.dsl.processor.model.GuardExpression) ElementUtils.collectAnnotations(com.oracle.truffle.dsl.processor.java.ElementUtils.collectAnnotations) ParameterSpec(com.oracle.truffle.dsl.processor.model.ParameterSpec) NodeChildData(com.oracle.truffle.dsl.processor.model.NodeChildData) Cardinality(com.oracle.truffle.dsl.processor.model.NodeChildData.Cardinality) ElementUtils.isAssignable(com.oracle.truffle.dsl.processor.java.ElementUtils.isAssignable) AnnotationValue(javax.lang.model.element.AnnotationValue) DSLExpression(com.oracle.truffle.dsl.processor.expression.DSLExpression) MessageContainer(com.oracle.truffle.dsl.processor.model.MessageContainer) VariableElement(javax.lang.model.element.VariableElement) TruffleTypes(com.oracle.truffle.dsl.processor.TruffleTypes) ElementUtils.fromTypeMirror(com.oracle.truffle.dsl.processor.java.ElementUtils.fromTypeMirror) ArrayList(java.util.ArrayList) LinkedHashMap(java.util.LinkedHashMap) ElementUtils.findAnnotationMirror(com.oracle.truffle.dsl.processor.java.ElementUtils.findAnnotationMirror) ElementUtils.getVisibility(com.oracle.truffle.dsl.processor.java.ElementUtils.getVisibility) CacheExpression(com.oracle.truffle.dsl.processor.model.CacheExpression) SpecializationThrowsData(com.oracle.truffle.dsl.processor.model.SpecializationThrowsData) DeclaredType(javax.lang.model.type.DeclaredType) ElementFilter(javax.lang.model.util.ElementFilter) LinkedHashSet(java.util.LinkedHashSet) Variable(com.oracle.truffle.dsl.processor.expression.DSLExpression.Variable) LibraryData(com.oracle.truffle.dsl.processor.library.LibraryData) CompileErrorException(com.oracle.truffle.dsl.processor.CompileErrorException) ProcessorContext(com.oracle.truffle.dsl.processor.ProcessorContext) AnnotationMirror(javax.lang.model.element.AnnotationMirror) ElementUtils.getAnnotationValueList(com.oracle.truffle.dsl.processor.java.ElementUtils.getAnnotationValueList) Negate(com.oracle.truffle.dsl.processor.expression.DSLExpression.Negate) DSLExpressionVisitor(com.oracle.truffle.dsl.processor.expression.DSLExpression.DSLExpressionVisitor) ExecutableTypeData(com.oracle.truffle.dsl.processor.model.ExecutableTypeData) DSLExpressionResolver(com.oracle.truffle.dsl.processor.expression.DSLExpressionResolver) ListIterator(java.util.ListIterator) IntLiteral(com.oracle.truffle.dsl.processor.expression.DSLExpression.IntLiteral) MethodSpec(com.oracle.truffle.dsl.processor.model.MethodSpec) ElementUtils.getReadableSignature(com.oracle.truffle.dsl.processor.java.ElementUtils.getReadableSignature) LibraryParser(com.oracle.truffle.dsl.processor.library.LibraryParser) ElementUtils.getRepeatedAnnotation(com.oracle.truffle.dsl.processor.java.ElementUtils.getRepeatedAnnotation) ElementUtils.getSimpleName(com.oracle.truffle.dsl.processor.java.ElementUtils.getSimpleName) CodeTypeMirror(com.oracle.truffle.dsl.processor.java.model.CodeTypeMirror) NodeExecutionData(com.oracle.truffle.dsl.processor.model.NodeExecutionData) ElementUtils.getQualifiedName(com.oracle.truffle.dsl.processor.java.ElementUtils.getQualifiedName) CodeVariableElement(com.oracle.truffle.dsl.processor.java.model.CodeVariableElement) TruffleProcessorOptions(com.oracle.truffle.dsl.processor.TruffleProcessorOptions) ElementUtils.getUniqueIdentifiers(com.oracle.truffle.dsl.processor.java.ElementUtils.getUniqueIdentifiers) NodeData(com.oracle.truffle.dsl.processor.model.NodeData) CodeTypeElement(com.oracle.truffle.dsl.processor.java.model.CodeTypeElement) Collection(java.util.Collection) Collectors(java.util.stream.Collectors) TypeKind(javax.lang.model.type.TypeKind) Objects(java.util.Objects) List(java.util.List) ElementUtils.getCommonSuperType(com.oracle.truffle.dsl.processor.java.ElementUtils.getCommonSuperType) TemplateMethod(com.oracle.truffle.dsl.processor.model.TemplateMethod) ExportsParser(com.oracle.truffle.dsl.processor.library.ExportsParser) NodeFactoryFactory(com.oracle.truffle.dsl.processor.generator.NodeFactoryFactory) ElementUtils.isSubtypeBoxed(com.oracle.truffle.dsl.processor.java.ElementUtils.isSubtypeBoxed) Binary(com.oracle.truffle.dsl.processor.expression.DSLExpression.Binary) ArrayCodeTypeMirror(com.oracle.truffle.dsl.processor.java.model.CodeTypeMirror.ArrayCodeTypeMirror) ElementUtils.compareByTypeHierarchy(com.oracle.truffle.dsl.processor.java.ElementUtils.compareByTypeHierarchy) BooleanLiteral(com.oracle.truffle.dsl.processor.expression.DSLExpression.BooleanLiteral) SpecializationData(com.oracle.truffle.dsl.processor.model.SpecializationData) TypeSystemData(com.oracle.truffle.dsl.processor.model.TypeSystemData) AtomicBoolean(java.util.concurrent.atomic.AtomicBoolean) HashMap(java.util.HashMap) HashSet(java.util.HashSet) Kind(javax.tools.Diagnostic.Kind) CompilerFactory(com.oracle.truffle.dsl.processor.java.compiler.CompilerFactory) ElementUtils.isSubtype(com.oracle.truffle.dsl.processor.java.ElementUtils.isSubtype) ElementUtils.typeEquals(com.oracle.truffle.dsl.processor.java.ElementUtils.typeEquals) InvalidExpressionException(com.oracle.truffle.dsl.processor.expression.InvalidExpressionException) ElementUtils.getAnnotationValue(com.oracle.truffle.dsl.processor.java.ElementUtils.getAnnotationValue) ElementUtils.unboxAnnotationValue(com.oracle.truffle.dsl.processor.java.ElementUtils.unboxAnnotationValue) ElementUtils(com.oracle.truffle.dsl.processor.java.ElementUtils) Iterator(java.util.Iterator) ElementKind(javax.lang.model.element.ElementKind) Call(com.oracle.truffle.dsl.processor.expression.DSLExpression.Call) ExecutableElement(javax.lang.model.element.ExecutableElement) TypeMirror(javax.lang.model.type.TypeMirror) ElementUtils.modifiers(com.oracle.truffle.dsl.processor.java.ElementUtils.modifiers) ElementUtils.resolveAnnotationValue(com.oracle.truffle.dsl.processor.java.ElementUtils.resolveAnnotationValue) ElementUtils.firstLetterLowerCase(com.oracle.truffle.dsl.processor.java.ElementUtils.firstLetterLowerCase) Cast(com.oracle.truffle.dsl.processor.expression.DSLExpression.Cast) Comparator(java.util.Comparator) Collections(java.util.Collections) LinkedHashSet(java.util.LinkedHashSet) Set(java.util.Set) LinkedHashSet(java.util.LinkedHashSet) HashSet(java.util.HashSet) LinkedHashMap(java.util.LinkedHashMap) HashMap(java.util.HashMap) TypeElement(javax.lang.model.element.TypeElement) GeneratedElement(com.oracle.truffle.dsl.processor.java.model.GeneratedElement) CodeExecutableElement(com.oracle.truffle.dsl.processor.java.model.CodeExecutableElement) Element(javax.lang.model.element.Element) VariableElement(javax.lang.model.element.VariableElement) CodeVariableElement(com.oracle.truffle.dsl.processor.java.model.CodeVariableElement) CodeTypeElement(com.oracle.truffle.dsl.processor.java.model.CodeTypeElement) ExecutableElement(javax.lang.model.element.ExecutableElement) TruffleTypes(com.oracle.truffle.dsl.processor.TruffleTypes) ArrayList(java.util.ArrayList) CacheExpression(com.oracle.truffle.dsl.processor.model.CacheExpression) LinkedHashMap(java.util.LinkedHashMap) GeneratedElement(com.oracle.truffle.dsl.processor.java.model.GeneratedElement) ArrayList(java.util.ArrayList) ElementUtils.getAnnotationValueList(com.oracle.truffle.dsl.processor.java.ElementUtils.getAnnotationValueList) List(java.util.List) SpecializationData(com.oracle.truffle.dsl.processor.model.SpecializationData) NodeData(com.oracle.truffle.dsl.processor.model.NodeData) Collection(java.util.Collection)

Aggregations

GeneratedElement (com.oracle.truffle.dsl.processor.java.model.GeneratedElement)5 Element (javax.lang.model.element.Element)5 AnnotationMirror (javax.lang.model.element.AnnotationMirror)3 AnnotationValue (javax.lang.model.element.AnnotationValue)3 ExecutableElement (javax.lang.model.element.ExecutableElement)3 TypeElement (javax.lang.model.element.TypeElement)3 VariableElement (javax.lang.model.element.VariableElement)3 ProcessorContext (com.oracle.truffle.dsl.processor.ProcessorContext)2 ElementUtils.fromTypeMirror (com.oracle.truffle.dsl.processor.java.ElementUtils.fromTypeMirror)2 ElementKind (javax.lang.model.element.ElementKind)2 Kind (javax.tools.Diagnostic.Kind)2 CompileErrorException (com.oracle.truffle.dsl.processor.CompileErrorException)1 Log (com.oracle.truffle.dsl.processor.Log)1 TruffleProcessorOptions (com.oracle.truffle.dsl.processor.TruffleProcessorOptions)1 TruffleTypes (com.oracle.truffle.dsl.processor.TruffleTypes)1 DSLExpression (com.oracle.truffle.dsl.processor.expression.DSLExpression)1 Binary (com.oracle.truffle.dsl.processor.expression.DSLExpression.Binary)1 BooleanLiteral (com.oracle.truffle.dsl.processor.expression.DSLExpression.BooleanLiteral)1 Call (com.oracle.truffle.dsl.processor.expression.DSLExpression.Call)1 Cast (com.oracle.truffle.dsl.processor.expression.DSLExpression.Cast)1