Mercurial > hg > truffle
comparison graal/com.oracle.truffle.dsl.processor/src/com/oracle/truffle/dsl/processor/model/SpecializationData.java @ 20940:476374f3fe9a
Truffle-DSL: generate better polymorphic execute signatures
author | Christian Humer <christian.humer@gmail.com> |
---|---|
date | Tue, 14 Apr 2015 15:12:48 +0200 |
parents | 18c0f02fa4d2 |
children | 6361fa2e3321 |
comparison
equal
deleted
inserted
replaced
20939:f83fd99b2962 | 20940:476374f3fe9a |
---|---|
39 POLYMORPHIC, | 39 POLYMORPHIC, |
40 FALLBACK | 40 FALLBACK |
41 } | 41 } |
42 | 42 |
43 private final NodeData node; | 43 private final NodeData node; |
44 private final SpecializationKind kind; | 44 private SpecializationKind kind; |
45 private final List<SpecializationThrowsData> exceptions; | 45 private final List<SpecializationThrowsData> exceptions; |
46 private List<GuardExpression> guards = Collections.emptyList(); | 46 private List<GuardExpression> guards = Collections.emptyList(); |
47 private List<CacheExpression> caches = Collections.emptyList(); | 47 private List<CacheExpression> caches = Collections.emptyList(); |
48 private List<AssumptionExpression> assumptionExpressions = Collections.emptyList(); | 48 private List<AssumptionExpression> assumptionExpressions = Collections.emptyList(); |
49 private List<ShortCircuitData> shortCircuits; | 49 private List<ShortCircuitData> shortCircuits; |
90 } | 90 } |
91 } | 91 } |
92 return false; | 92 return false; |
93 } | 93 } |
94 | 94 |
95 public void setKind(SpecializationKind kind) { | |
96 this.kind = kind; | |
97 } | |
98 | |
95 public boolean isDynamicParameterBound(DSLExpression expression) { | 99 public boolean isDynamicParameterBound(DSLExpression expression) { |
96 Set<VariableElement> boundVariables = expression.findBoundVariableElements(); | 100 Set<VariableElement> boundVariables = expression.findBoundVariableElements(); |
97 for (Parameter parameter : getDynamicParameters()) { | 101 for (Parameter parameter : getDynamicParameters()) { |
98 if (boundVariables.contains(parameter.getVariableElement())) { | 102 if (boundVariables.contains(parameter.getVariableElement())) { |
99 return true; | 103 return true; |