Mercurial > hg > graal-compiler
comparison graal/com.oracle.truffle.codegen.processor/src/com/oracle/truffle/codegen/processor/TruffleTypes.java @ 7843:4969921f57b7
Renamed generated specialize to specializeAndExecute.
Added call to deoptimize in uninitialized and in specializeAndExecute.
author | Christian Humer <christian.humer@gmail.com> |
---|---|
date | Mon, 18 Feb 2013 19:51:30 +0100 |
parents | a748e4d44694 |
children | 0905d796944a |
comparison
equal
deleted
inserted
replaced
7803:89d316f8f33e | 7843:4969921f57b7 |
---|---|
26 | 26 |
27 import javax.lang.model.element.*; | 27 import javax.lang.model.element.*; |
28 import javax.lang.model.type.*; | 28 import javax.lang.model.type.*; |
29 | 29 |
30 import com.oracle.truffle.api.frame.*; | 30 import com.oracle.truffle.api.frame.*; |
31 import com.oracle.truffle.api.intrinsics.*; | |
31 import com.oracle.truffle.api.nodes.*; | 32 import com.oracle.truffle.api.nodes.*; |
32 import com.oracle.truffle.api.nodes.Node.Child; | 33 import com.oracle.truffle.api.nodes.Node.Child; |
33 import com.oracle.truffle.api.nodes.Node.Children; | 34 import com.oracle.truffle.api.nodes.Node.Children; |
34 | 35 |
35 /** | 36 /** |
42 private final TypeMirror unexpectedValueException; | 43 private final TypeMirror unexpectedValueException; |
43 private final TypeMirror frame; | 44 private final TypeMirror frame; |
44 private final TypeMirror stableAnnotation; | 45 private final TypeMirror stableAnnotation; |
45 private final TypeMirror contentStableAnnotation; | 46 private final TypeMirror contentStableAnnotation; |
46 private final TypeMirror typeConversion; | 47 private final TypeMirror typeConversion; |
48 private final TypeMirror truffleIntrinsics; | |
47 | 49 |
48 private final List<String> errors = new ArrayList<>(); | 50 private final List<String> errors = new ArrayList<>(); |
49 | 51 |
50 public TruffleTypes(ProcessorContext context) { | 52 public TruffleTypes(ProcessorContext context) { |
51 node = getRequired(context, Node.class); | 53 node = getRequired(context, Node.class); |
53 unexpectedValueException = getRequired(context, UnexpectedResultException.class); | 55 unexpectedValueException = getRequired(context, UnexpectedResultException.class); |
54 frame = getRequired(context, VirtualFrame.class); | 56 frame = getRequired(context, VirtualFrame.class); |
55 stableAnnotation = getRequired(context, Child.class); | 57 stableAnnotation = getRequired(context, Child.class); |
56 contentStableAnnotation = getRequired(context, Children.class); | 58 contentStableAnnotation = getRequired(context, Children.class); |
57 typeConversion = getRequired(context, TypeConversion.class); | 59 typeConversion = getRequired(context, TypeConversion.class); |
60 truffleIntrinsics = getRequired(context, TruffleIntrinsics.class); | |
58 } | 61 } |
59 | 62 |
60 public boolean verify(ProcessorContext context, Element element, AnnotationMirror mirror) { | 63 public boolean verify(ProcessorContext context, Element element, AnnotationMirror mirror) { |
61 if (errors.isEmpty()) { | 64 if (errors.isEmpty()) { |
62 return true; | 65 return true; |
73 TypeMirror type = context.getType(clazz); | 76 TypeMirror type = context.getType(clazz); |
74 if (type == null) { | 77 if (type == null) { |
75 errors.add(String.format("Could not find required type: %s", clazz.getSimpleName())); | 78 errors.add(String.format("Could not find required type: %s", clazz.getSimpleName())); |
76 } | 79 } |
77 return type; | 80 return type; |
81 } | |
82 | |
83 public TypeMirror getTruffleIntrinsics() { | |
84 return truffleIntrinsics; | |
78 } | 85 } |
79 | 86 |
80 public TypeMirror getTypeConversion() { | 87 public TypeMirror getTypeConversion() { |
81 return typeConversion; | 88 return typeConversion; |
82 } | 89 } |