Mercurial > hg > graal-compiler
comparison graal/com.oracle.truffle.dsl.processor/src/com/oracle/truffle/dsl/processor/generator/SpecializedNodeFactory.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 | 3912400fc33a |
comparison
equal
deleted
inserted
replaced
18753:f6b8787dc113 | 18754:59bf50cc5a32 |
---|---|
52 public CodeTypeElement create() { | 52 public CodeTypeElement create() { |
53 TypeMirror baseType = node.getNodeType(); | 53 TypeMirror baseType = node.getNodeType(); |
54 if (nodeGen != null) { | 54 if (nodeGen != null) { |
55 baseType = nodeGen.asType(); | 55 baseType = nodeGen.asType(); |
56 } | 56 } |
57 CodeTypeElement clazz = GeneratorUtils.createClass(node, modifiers(PRIVATE, STATIC, FINAL), nodeSpecializationClassName(specialization), baseType, false); | 57 CodeTypeElement clazz = GeneratorUtils.createClass(node, modifiers(PRIVATE, FINAL), nodeSpecializationClassName(specialization), baseType, false); |
58 | 58 |
59 if (specialization.isSpecialized() || specialization.isUninitialized()) { | 59 if (specialization.isSpecialized() || specialization.isUninitialized()) { |
60 clazz.add(createGetMetadata0(false)); | 60 clazz.add(createGetMetadata0(false)); |
61 clazz.add(createMetadataLiteral()); | 61 clazz.add(createMetadataLiteral()); |
62 } | 62 } |