Mercurial > hg > graal-compiler
comparison graal/com.oracle.truffle.codegen.processor/src/com/oracle/truffle/codegen/processor/ProcessorContext.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 | 57edf6b07d36 |
children | 5e3d1a68664e |
comparison
equal
deleted
inserted
replaced
7497:0f8c6dbf68be | 7502:6343a09b2ec1 |
---|---|
43 private final Map<String, Template> models = new HashMap<>(); | 43 private final Map<String, Template> models = new HashMap<>(); |
44 private final Map<String, Map<String, TypeMirror>> generatedClasses = new HashMap<>(); | 44 private final Map<String, Map<String, TypeMirror>> generatedClasses = new HashMap<>(); |
45 | 45 |
46 private final ProcessCallback callback; | 46 private final ProcessCallback callback; |
47 private final Log log; | 47 private final Log log; |
48 private TruffleTypes truffleTypes; | 48 private final TruffleTypes truffleTypes; |
49 | 49 |
50 public ProcessorContext(ProcessingEnvironment env, ProcessCallback callback) { | 50 public ProcessorContext(ProcessingEnvironment env, ProcessCallback callback) { |
51 this.environment = env; | 51 this.environment = env; |
52 this.callback = callback; | 52 this.callback = callback; |
53 this.log = new Log(environment); | 53 this.log = new Log(environment); |
54 this.truffleTypes = new TruffleTypes(this); | |
54 } | 55 } |
55 | 56 |
56 public TruffleTypes getTruffleTypes() { | 57 public TruffleTypes getTruffleTypes() { |
57 if (truffleTypes == null) { | |
58 truffleTypes = new TruffleTypes(this); | |
59 } | |
60 return truffleTypes; | 58 return truffleTypes; |
61 } | 59 } |
62 | 60 |
63 public Log getLog() { | 61 public Log getLog() { |
64 return log; | 62 return log; |