Mercurial > hg > graal-jvmci-8
comparison graal/com.oracle.truffle.codegen.processor/src/com/oracle/truffle/codegen/processor/node/SpecializationData.java @ 8242:ac4e8c16ffdf
Added new codegen api classes NodeId, NodeClass to codegen along with some refactorings.
author | Christian Humer <christian.humer@gmail.com> |
---|---|
date | Mon, 04 Mar 2013 15:14:11 +0100 |
parents | 06a7cd6aaf00 |
children | d81ff782fa1a |
comparison
equal
deleted
inserted
replaced
8241:91982900acee | 8242:ac4e8c16ffdf |
---|---|
19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA | 19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA |
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 | |
25 import java.util.*; | |
24 | 26 |
25 import com.oracle.truffle.api.codegen.*; | 27 import com.oracle.truffle.api.codegen.*; |
26 import com.oracle.truffle.codegen.processor.template.*; | 28 import com.oracle.truffle.codegen.processor.template.*; |
27 | 29 |
28 public class SpecializationData extends TemplateMethod { | 30 public class SpecializationData extends TemplateMethod { |
104 public boolean isUseSpecializationsForGeneric() { | 106 public boolean isUseSpecializationsForGeneric() { |
105 return useSpecializationsForGeneric; | 107 return useSpecializationsForGeneric; |
106 } | 108 } |
107 | 109 |
108 public SpecializationData findNextSpecialization() { | 110 public SpecializationData findNextSpecialization() { |
109 SpecializationData[] specializations = node.getSpecializations(); | 111 List<SpecializationData> specializations = node.getSpecializations(); |
110 for (int i = 0; i < specializations.length - 1; i++) { | 112 for (int i = 0; i < specializations.size() - 1; i++) { |
111 if (specializations[i] == this) { | 113 if (specializations.get(i) == this) { |
112 return specializations[i + 1]; | 114 return specializations.get(i + 1); |
113 } | 115 } |
114 } | 116 } |
115 return null; | 117 return null; |
116 } | 118 } |
117 | 119 |