Mercurial > hg > graal-compiler
comparison graal/com.oracle.truffle.dsl.processor/src/com/oracle/truffle/dsl/processor/generator/PolymorphicNodeFactory.java @ 18754:59bf50cc5a32
Truffle-DSL: implemented @GenerateNodeFactory to enable generation of factories. Factory generation is now disabled by default.
author | Christian Humer <christian.humer@gmail.com> |
---|---|
date | Mon, 29 Dec 2014 23:38:25 +0100 |
parents | f6b8787dc113 |
children | a665483c3881 |
comparison
equal
deleted
inserted
replaced
18753:f6b8787dc113 | 18754:59bf50cc5a32 |
---|---|
44 public CodeTypeElement create() { | 44 public CodeTypeElement create() { |
45 TypeMirror baseType = node.getNodeType(); | 45 TypeMirror baseType = node.getNodeType(); |
46 if (nodeGen != null) { | 46 if (nodeGen != null) { |
47 baseType = nodeGen.asType(); | 47 baseType = nodeGen.asType(); |
48 } | 48 } |
49 CodeTypeElement clazz = GeneratorUtils.createClass(node, modifiers(PRIVATE, STATIC, FINAL), nodePolymorphicClassName(node), baseType, false); | 49 CodeTypeElement clazz = GeneratorUtils.createClass(node, modifiers(PRIVATE, FINAL), nodePolymorphicClassName(node), baseType, false); |
50 | 50 |
51 clazz.getAnnotationMirrors().add(createNodeInfo(NodeCost.POLYMORPHIC)); | 51 clazz.getAnnotationMirrors().add(createNodeInfo(NodeCost.POLYMORPHIC)); |
52 | 52 |
53 for (Parameter polymorphParameter : specialization.getSignatureParameters()) { | 53 for (Parameter polymorphParameter : specialization.getSignatureParameters()) { |
54 if (!polymorphParameter.getTypeSystemType().isGeneric()) { | 54 if (!polymorphParameter.getTypeSystemType().isGeneric()) { |