comparison graal/com.oracle.truffle.dsl.processor/src/com/oracle/truffle/dsl/processor/model/TemplateMethod.java @ 19283:08aa0372dad4

Truffle-DSL: implement new guard expression syntax.
author Christian Humer <christian.humer@gmail.com>
date Fri, 23 Jan 2015 02:55:23 +0100
parents ae81dd154fb6
children 62c43fcf5be2
comparison
equal deleted inserted replaced
19282:ae81dd154fb6 19283:08aa0372dad4
33 /** 33 /**
34 * Note: this class has a natural ordering that is inconsistent with equals. 34 * Note: this class has a natural ordering that is inconsistent with equals.
35 */ 35 */
36 public class TemplateMethod extends MessageContainer implements Comparable<TemplateMethod> { 36 public class TemplateMethod extends MessageContainer implements Comparable<TemplateMethod> {
37 37
38 public static final String FRAME_NAME = "frameValue";
38 public static final int NO_NATURAL_ORDER = -1; 39 public static final int NO_NATURAL_ORDER = -1;
39 40
40 private String id; 41 private String id;
41 private final Template template; 42 private final Template template;
42 private final int naturalOrder; 43 private final int naturalOrder;
66 parameterCache.put(returnType.getLocalName(), returnType); 67 parameterCache.put(returnType.getLocalName(), returnType);
67 } 68 }
68 this.id = id; 69 this.id = id;
69 } 70 }
70 71
72 public final Parameter getFrame() {
73 return findParameter(FRAME_NAME);
74 }
75
71 public String createReferenceName() { 76 public String createReferenceName() {
72 if (getMethod() == null) { 77 if (getMethod() == null) {
73 return "-"; 78 return "-";
74 } 79 }
75 return ElementUtils.createReferenceName(getMethod()); 80 return ElementUtils.createReferenceName(getMethod());