Mercurial > hg > graal-jvmci-8
comparison graal/com.oracle.truffle.codegen.processor/src/com/oracle/truffle/codegen/processor/node/ExecutableTypeData.java @ 10596:f43eb2f1bbbc
Truffle-DSL: code-generation of polymorphic caching
author | Christian Humer <christian.humer@gmail.com> |
---|---|
date | Mon, 01 Jul 2013 20:32:20 +0200 |
parents | 763100239da6 |
children |
comparison
equal
deleted
inserted
replaced
10595:47233c73ca58 | 10596:f43eb2f1bbbc |
---|---|
20 * or visit www.oracle.com if you need additional information or have any | 20 * or visit www.oracle.com if you need additional information or have any |
21 * questions. | 21 * questions. |
22 */ | 22 */ |
23 package com.oracle.truffle.codegen.processor.node; | 23 package com.oracle.truffle.codegen.processor.node; |
24 | 24 |
25 import java.util.*; | |
26 | |
27 import javax.lang.model.element.*; | 25 import javax.lang.model.element.*; |
28 | 26 |
29 import com.oracle.truffle.codegen.processor.*; | 27 import com.oracle.truffle.codegen.processor.*; |
30 import com.oracle.truffle.codegen.processor.template.*; | 28 import com.oracle.truffle.codegen.processor.template.*; |
31 import com.oracle.truffle.codegen.processor.typesystem.*; | 29 import com.oracle.truffle.codegen.processor.typesystem.*; |
33 public class ExecutableTypeData extends TemplateMethod { | 31 public class ExecutableTypeData extends TemplateMethod { |
34 | 32 |
35 private final TypeSystemData typeSystem; | 33 private final TypeSystemData typeSystem; |
36 private final TypeData type; | 34 private final TypeData type; |
37 | 35 |
38 public ExecutableTypeData(TemplateMethod method, TypeSystemData typeSystem, TypeData type) { | 36 public ExecutableTypeData(TemplateMethod method, ExecutableElement executable, TypeSystemData typeSystem, TypeData type) { |
39 super(method); | 37 super(method, executable); |
40 this.typeSystem = typeSystem; | 38 this.typeSystem = typeSystem; |
41 this.type = type; | 39 this.type = type; |
42 } | 40 } |
43 | 41 |
44 public TypeData getType() { | 42 public TypeData getType() { |
73 } | 71 } |
74 } | 72 } |
75 return count; | 73 return count; |
76 } | 74 } |
77 | 75 |
78 public boolean hasGenericSignature() { | |
79 List<TypeData> types = getSignature(); | |
80 for (TypeData typeData : types) { | |
81 if (!typeData.isGeneric()) { | |
82 return false; | |
83 } | |
84 } | |
85 return true; | |
86 } | |
87 | |
88 @Override | 76 @Override |
89 public int hashCode() { | 77 public int hashCode() { |
90 return type.hashCode(); | 78 return type.hashCode(); |
91 } | 79 } |
92 | 80 |