Mercurial > hg > graal-jvmci-8
diff 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 |
line wrap: on
line diff
--- a/graal/com.oracle.truffle.codegen.processor/src/com/oracle/truffle/codegen/processor/node/SpecializationData.java Mon Mar 04 15:13:25 2013 +0100 +++ b/graal/com.oracle.truffle.codegen.processor/src/com/oracle/truffle/codegen/processor/node/SpecializationData.java Mon Mar 04 15:14:11 2013 +0100 @@ -22,6 +22,8 @@ */ package com.oracle.truffle.codegen.processor.node; +import java.util.*; + import com.oracle.truffle.api.codegen.*; import com.oracle.truffle.codegen.processor.template.*; @@ -106,10 +108,10 @@ } public SpecializationData findNextSpecialization() { - SpecializationData[] specializations = node.getSpecializations(); - for (int i = 0; i < specializations.length - 1; i++) { - if (specializations[i] == this) { - return specializations[i + 1]; + List<SpecializationData> specializations = node.getSpecializations(); + for (int i = 0; i < specializations.size() - 1; i++) { + if (specializations.get(i) == this) { + return specializations.get(i + 1); } } return null;