Mercurial > hg > graal-compiler
diff graal/com.oracle.truffle.codegen.processor/src/com/oracle/truffle/codegen/processor/node/SpecializationData.java @ 8592:a80bf36c6a1e
Refactor to shared template method signature comparison.
author | Christian Humer <christian.humer@gmail.com> |
---|---|
date | Mon, 01 Apr 2013 11:52:38 +0200 |
parents | 89006c76f737 |
children | 8a1115c92271 |
line wrap: on
line diff
--- a/graal/com.oracle.truffle.codegen.processor/src/com/oracle/truffle/codegen/processor/node/SpecializationData.java Fri Mar 29 21:39:54 2013 +0100 +++ b/graal/com.oracle.truffle.codegen.processor/src/com/oracle/truffle/codegen/processor/node/SpecializationData.java Mon Apr 01 11:52:38 2013 +0200 @@ -28,6 +28,7 @@ import com.oracle.truffle.codegen.processor.*; import com.oracle.truffle.codegen.processor.node.NodeFieldData.*; import com.oracle.truffle.codegen.processor.template.*; +import com.oracle.truffle.codegen.processor.typesystem.*; public class SpecializationData extends TemplateMethod { @@ -35,7 +36,8 @@ private final boolean generic; private final boolean uninitialized; private final List<SpecializationThrowsData> exceptions; - private List<SpecializationGuardData> guards; + private List<String> guardDefinitions = Collections.emptyList(); + private List<GuardData> guards; private List<ShortCircuitData> shortCircuits; private boolean useSpecializationsForGeneric = true; private NodeData node; @@ -101,10 +103,14 @@ this.node = node; } - public void setGuards(List<SpecializationGuardData> guards) { + public void setGuards(List<GuardData> guards) { this.guards = guards; } + public void setGuardDefinitions(List<String> guardDefinitions) { + this.guardDefinitions = guardDefinitions; + } + public int getOrder() { return order; } @@ -121,7 +127,11 @@ return exceptions; } - public List<SpecializationGuardData> getGuards() { + public List<String> getGuardDefinitions() { + return guardDefinitions; + } + + public List<GuardData> getGuards() { return guards; } @@ -152,12 +162,7 @@ } public boolean hasDynamicGuards() { - for (SpecializationGuardData guard : getGuards()) { - if (guard.isOnExecution()) { - return true; - } - } - return false; + return !getGuards().isEmpty(); } }