Mercurial > hg > graal-jvmci-8
comparison graal/com.oracle.truffle.codegen.processor/src/com/oracle/truffle/codegen/processor/ast/CodeCompilationUnit.java @ 7502:6343a09b2ec1
Codegen operation generation is inferred from the node type hierarchy.
author | Christian Humer <christian.humer@gmail.com> |
---|---|
date | Fri, 18 Jan 2013 13:28:12 +0100 |
parents | a748e4d44694 |
children |
comparison
equal
deleted
inserted
replaced
7497:0f8c6dbf68be | 7502:6343a09b2ec1 |
---|---|
48 throw new UnsupportedOperationException(); | 48 throw new UnsupportedOperationException(); |
49 } | 49 } |
50 | 50 |
51 @Override | 51 @Override |
52 public <R, P> R accept(ElementVisitor<R, P> v, P p) { | 52 public <R, P> R accept(ElementVisitor<R, P> v, P p) { |
53 for (TypeElement type : getEnclosedElements()) { | 53 for (Element type : getEnclosedElements()) { |
54 type.accept(v, p); | 54 if (type.getKind().isClass()) { |
55 type.accept(v, p); | |
56 } else { | |
57 throw new ClassCastException(type.getClass().getName()); | |
58 } | |
55 } | 59 } |
56 return null; | 60 return null; |
57 } | 61 } |
58 | 62 |
59 } | 63 } |