Mercurial > hg > graal-jvmci-8
comparison graal/com.oracle.truffle.codegen.processor/src/com/oracle/truffle/codegen/processor/TruffleProcessor.java @ 8252:0905d796944a
Refactored codegen error model to make error redirection a lot easier.
author | Christian Humer <christian.humer@gmail.com> |
---|---|
date | Wed, 13 Mar 2013 19:58:28 +0100 |
parents | 5e3d1a68664e |
children |
comparison
equal
deleted
inserted
replaced
8251:cb70ed101b5f | 8252:0905d796944a |
---|---|
26 import java.util.*; | 26 import java.util.*; |
27 | 27 |
28 import javax.annotation.processing.*; | 28 import javax.annotation.processing.*; |
29 import javax.lang.model.*; | 29 import javax.lang.model.*; |
30 import javax.lang.model.element.*; | 30 import javax.lang.model.element.*; |
31 import javax.tools.Diagnostic.*; | |
31 | 32 |
32 import com.oracle.truffle.codegen.processor.ProcessorContext.ProcessCallback; | 33 import com.oracle.truffle.codegen.processor.ProcessorContext.ProcessCallback; |
33 import com.oracle.truffle.codegen.processor.node.*; | 34 import com.oracle.truffle.codegen.processor.node.*; |
34 import com.oracle.truffle.codegen.processor.typesystem.*; | 35 import com.oracle.truffle.codegen.processor.typesystem.*; |
35 | 36 |
93 } | 94 } |
94 } | 95 } |
95 | 96 |
96 private static void handleThrowable(AnnotationProcessor generator, Throwable t, Element e) { | 97 private static void handleThrowable(AnnotationProcessor generator, Throwable t, Element e) { |
97 String message = "Uncaught error in " + generator.getClass().getSimpleName() + " while processing " + e; | 98 String message = "Uncaught error in " + generator.getClass().getSimpleName() + " while processing " + e; |
98 generator.getContext().getLog().error(e, message + ": " + Utils.printException(t)); | 99 generator.getContext().getLog().message(Kind.ERROR, e, null, null, message + ": " + Utils.printException(t)); |
99 } | 100 } |
100 | 101 |
101 @SuppressWarnings("unchecked") | 102 @SuppressWarnings("unchecked") |
102 @Override | 103 @Override |
103 public void callback(TypeElement template) { | 104 public void callback(TypeElement template) { |