comparison graal/com.oracle.truffle.codegen.processor/src/com/oracle/truffle/codegen/processor/template/ActualParameter.java @ 7847:06a7cd6aaf00

Casting is now done on demand using local variables for explicit guards.
author Christian Humer <christian.humer@gmail.com>
date Tue, 19 Feb 2013 17:20:45 +0100
parents 6343a09b2ec1
children 6b74ffe38183
comparison
equal deleted inserted replaced
7846:91cc98eae8ee 7847:06a7cd6aaf00
28 28
29 public class ActualParameter { 29 public class ActualParameter {
30 30
31 private final ParameterSpec specification; 31 private final ParameterSpec specification;
32 private final TypeMirror actualType; 32 private final TypeMirror actualType;
33 private TemplateMethod method;
33 34
34 public ActualParameter(ParameterSpec specification, TypeMirror actualType) { 35 public ActualParameter(ParameterSpec specification, TypeMirror actualType) {
35 this.specification = specification; 36 this.specification = specification;
36 this.actualType = actualType; 37 this.actualType = actualType;
37 } 38 }
38 39
40 void setMethod(TemplateMethod method) {
41 this.method = method;
42 }
43
39 public ParameterSpec getSpecification() { 44 public ParameterSpec getSpecification() {
40 return specification; 45 return specification;
46 }
47
48 public TemplateMethod getMethod() {
49 return method;
41 } 50 }
42 51
43 public TypeMirror getActualType() { 52 public TypeMirror getActualType() {
44 return actualType; 53 return actualType;
45 } 54 }
46 55
47 public TypeData getActualTypeData(TypeSystemData typeSystem) { 56 public TypeData getActualTypeData(TypeSystemData typeSystem) {
48 return typeSystem.findTypeData(actualType); 57 return typeSystem.findTypeData(actualType);
49 } 58 }
59
60 public ActualParameter getPreviousParameter() {
61 return method.getPreviousParam(this);
62 }
50 } 63 }