Mercurial > hg > graal-jvmci-8
diff graal/com.oracle.truffle.codegen.processor/src/com/oracle/truffle/codegen/processor/node/SpecializationGuardData.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 | 6343a09b2ec1 |
children |
line wrap: on
line diff
--- a/graal/com.oracle.truffle.codegen.processor/src/com/oracle/truffle/codegen/processor/node/SpecializationGuardData.java Wed Mar 13 11:32:43 2013 +0100 +++ b/graal/com.oracle.truffle.codegen.processor/src/com/oracle/truffle/codegen/processor/node/SpecializationGuardData.java Wed Mar 13 19:58:28 2013 +0100 @@ -22,20 +22,42 @@ */ package com.oracle.truffle.codegen.processor.node; +import javax.lang.model.element.*; + +import com.oracle.truffle.codegen.processor.template.*; import com.oracle.truffle.codegen.processor.typesystem.*; -public class SpecializationGuardData { +public class SpecializationGuardData extends MessageContainer { + private final SpecializationData specialization; + private final AnnotationValue value; private final String guardMethod; private final boolean onSpecialization; private final boolean onExecution; private GuardData guardDeclaration; - public SpecializationGuardData(String guardMethod, boolean onSpecialization, boolean onExecution) { + public SpecializationGuardData(SpecializationData specialization, AnnotationValue value, String guardMethod, boolean onSpecialization, boolean onExecution) { + this.specialization = specialization; this.guardMethod = guardMethod; this.onSpecialization = onSpecialization; this.onExecution = onExecution; + this.value = value; + } + + @Override + public Element getMessageElement() { + return specialization.getMessageElement(); + } + + @Override + public AnnotationMirror getMessageAnnotation() { + return specialization.getMessageAnnotation(); + } + + @Override + public AnnotationValue getMessageAnnotationValue() { + return value; } public String getGuardMethod() {