Mercurial > hg > graal-jvmci-8
comparison 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 |
comparison
equal
deleted
inserted
replaced
8251:cb70ed101b5f | 8252:0905d796944a |
---|---|
20 * or visit www.oracle.com if you need additional information or have any | 20 * or visit www.oracle.com if you need additional information or have any |
21 * questions. | 21 * questions. |
22 */ | 22 */ |
23 package com.oracle.truffle.codegen.processor.node; | 23 package com.oracle.truffle.codegen.processor.node; |
24 | 24 |
25 import javax.lang.model.element.*; | |
26 | |
27 import com.oracle.truffle.codegen.processor.template.*; | |
25 import com.oracle.truffle.codegen.processor.typesystem.*; | 28 import com.oracle.truffle.codegen.processor.typesystem.*; |
26 | 29 |
27 public class SpecializationGuardData { | 30 public class SpecializationGuardData extends MessageContainer { |
28 | 31 |
32 private final SpecializationData specialization; | |
33 private final AnnotationValue value; | |
29 private final String guardMethod; | 34 private final String guardMethod; |
30 private final boolean onSpecialization; | 35 private final boolean onSpecialization; |
31 private final boolean onExecution; | 36 private final boolean onExecution; |
32 | 37 |
33 private GuardData guardDeclaration; | 38 private GuardData guardDeclaration; |
34 | 39 |
35 public SpecializationGuardData(String guardMethod, boolean onSpecialization, boolean onExecution) { | 40 public SpecializationGuardData(SpecializationData specialization, AnnotationValue value, String guardMethod, boolean onSpecialization, boolean onExecution) { |
41 this.specialization = specialization; | |
36 this.guardMethod = guardMethod; | 42 this.guardMethod = guardMethod; |
37 this.onSpecialization = onSpecialization; | 43 this.onSpecialization = onSpecialization; |
38 this.onExecution = onExecution; | 44 this.onExecution = onExecution; |
45 this.value = value; | |
46 } | |
47 | |
48 @Override | |
49 public Element getMessageElement() { | |
50 return specialization.getMessageElement(); | |
51 } | |
52 | |
53 @Override | |
54 public AnnotationMirror getMessageAnnotation() { | |
55 return specialization.getMessageAnnotation(); | |
56 } | |
57 | |
58 @Override | |
59 public AnnotationValue getMessageAnnotationValue() { | |
60 return value; | |
39 } | 61 } |
40 | 62 |
41 public String getGuardMethod() { | 63 public String getGuardMethod() { |
42 return guardMethod; | 64 return guardMethod; |
43 } | 65 } |