Mercurial > hg > graal-compiler
comparison graal/com.oracle.truffle.codegen.processor/src/com/oracle/truffle/codegen/processor/TruffleTypes.java @ 9272:fe5bc02fcd19
Replace TruffleIntrinsics.deoptimize() calls with CompilerDirectives.transferToInterpreter(). Remove obsolete TruffleIntrinsics class.
author | Thomas Wuerthinger <thomas.wuerthinger@oracle.com> |
---|---|
date | Tue, 23 Apr 2013 20:15:52 +0200 |
parents | 07f8d136a05e |
children | 2a4b57f02fb4 |
comparison
equal
deleted
inserted
replaced
9261:4015295cc5f5 | 9272:fe5bc02fcd19 |
---|---|
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 import javax.tools.Diagnostic.*; | 29 import javax.tools.Diagnostic.*; |
30 | 30 |
31 import com.oracle.truffle.api.*; | |
31 import com.oracle.truffle.api.frame.*; | 32 import com.oracle.truffle.api.frame.*; |
32 import com.oracle.truffle.api.intrinsics.*; | |
33 import com.oracle.truffle.api.nodes.*; | 33 import com.oracle.truffle.api.nodes.*; |
34 import com.oracle.truffle.api.nodes.Node.Child; | 34 import com.oracle.truffle.api.nodes.Node.Child; |
35 import com.oracle.truffle.api.nodes.Node.Children; | 35 import com.oracle.truffle.api.nodes.Node.Children; |
36 | 36 |
37 /** | 37 /** |
43 private final TypeMirror nodeArray; | 43 private final TypeMirror nodeArray; |
44 private final TypeMirror unexpectedValueException; | 44 private final TypeMirror unexpectedValueException; |
45 private final TypeMirror frame; | 45 private final TypeMirror frame; |
46 private final DeclaredType childAnnotation; | 46 private final DeclaredType childAnnotation; |
47 private final DeclaredType childrenAnnotation; | 47 private final DeclaredType childrenAnnotation; |
48 private final TypeMirror truffleIntrinsics; | 48 private final TypeMirror compilerDirectives; |
49 | 49 |
50 private final List<String> errors = new ArrayList<>(); | 50 private final List<String> errors = new ArrayList<>(); |
51 | 51 |
52 public TruffleTypes(ProcessorContext context) { | 52 public TruffleTypes(ProcessorContext context) { |
53 node = getRequired(context, Node.class); | 53 node = getRequired(context, Node.class); |
54 nodeArray = context.getEnvironment().getTypeUtils().getArrayType(node); | 54 nodeArray = context.getEnvironment().getTypeUtils().getArrayType(node); |
55 unexpectedValueException = getRequired(context, UnexpectedResultException.class); | 55 unexpectedValueException = getRequired(context, UnexpectedResultException.class); |
56 frame = getRequired(context, VirtualFrame.class); | 56 frame = getRequired(context, VirtualFrame.class); |
57 childAnnotation = getRequired(context, Child.class); | 57 childAnnotation = getRequired(context, Child.class); |
58 childrenAnnotation = getRequired(context, Children.class); | 58 childrenAnnotation = getRequired(context, Children.class); |
59 truffleIntrinsics = getRequired(context, TruffleIntrinsics.class); | 59 compilerDirectives = getRequired(context, CompilerDirectives.class); |
60 } | 60 } |
61 | 61 |
62 public boolean verify(ProcessorContext context, Element element, AnnotationMirror mirror) { | 62 public boolean verify(ProcessorContext context, Element element, AnnotationMirror mirror) { |
63 if (errors.isEmpty()) { | 63 if (errors.isEmpty()) { |
64 return true; | 64 return true; |
77 errors.add(String.format("Could not find required type: %s", clazz.getSimpleName())); | 77 errors.add(String.format("Could not find required type: %s", clazz.getSimpleName())); |
78 } | 78 } |
79 return (DeclaredType) type; | 79 return (DeclaredType) type; |
80 } | 80 } |
81 | 81 |
82 public TypeMirror getTruffleIntrinsics() { | 82 public TypeMirror getCompilerDirectives() { |
83 return truffleIntrinsics; | 83 return compilerDirectives; |
84 } | 84 } |
85 | 85 |
86 public TypeMirror getNode() { | 86 public TypeMirror getNode() { |
87 return node; | 87 return node; |
88 } | 88 } |