Mercurial > hg > graal-compiler
comparison graal/com.oracle.truffle.dsl.processor/src/com/oracle/truffle/dsl/processor/template/Template.java @ 16755:bd28da642eea
Truffle-DSL: Several new features implemented:
Implementation of a new code generation layout which shares code between generated nodes.
Declaration order of specializations is now used as specialization order.
Specializations do no longer perform fallthrough on respecialization, they now always respecialize from the first specialization.
Implemented support for contains relations between specializations.
Improved reachability error messages.
Preliminary support for @Implies.
author | Christian Humer <christian.humer@gmail.com> |
---|---|
date | Mon, 11 Aug 2014 15:53:05 +0200 |
parents | cb364a90ef62 |
children |
comparison
equal
deleted
inserted
replaced
16754:55fd5be68a52 | 16755:bd28da642eea |
---|---|
29 import com.oracle.truffle.dsl.processor.*; | 29 import com.oracle.truffle.dsl.processor.*; |
30 import com.oracle.truffle.dsl.processor.typesystem.*; | 30 import com.oracle.truffle.dsl.processor.typesystem.*; |
31 | 31 |
32 public abstract class Template extends MessageContainer { | 32 public abstract class Template extends MessageContainer { |
33 | 33 |
34 private final ProcessorContext context; | |
34 private final TypeElement templateType; | 35 private final TypeElement templateType; |
35 private final String templateMethodName; | 36 private final String templateMethodName; |
36 private final AnnotationMirror annotation; | 37 private final AnnotationMirror annotation; |
37 | 38 |
38 public Template(TypeElement templateType, String templateMethodName, AnnotationMirror annotation) { | 39 public Template(ProcessorContext context, TypeElement templateType, String templateMethodName, AnnotationMirror annotation) { |
40 this.context = context; | |
39 this.templateType = templateType; | 41 this.templateType = templateType; |
40 this.templateMethodName = templateMethodName; | 42 this.templateMethodName = templateMethodName; |
41 this.annotation = annotation; | 43 this.annotation = annotation; |
44 } | |
45 | |
46 public ProcessorContext getContext() { | |
47 return context; | |
48 } | |
49 | |
50 @Override | |
51 public MessageContainer getBaseContainer() { | |
52 return this; | |
42 } | 53 } |
43 | 54 |
44 public abstract TypeSystemData getTypeSystem(); | 55 public abstract TypeSystemData getTypeSystem(); |
45 | 56 |
46 @Override | 57 @Override |