Mercurial > hg > graal-compiler
diff graal/com.oracle.truffle.dsl.processor/src/com/oracle/truffle/dsl/processor/typesystem/GuardData.java @ 16755:bd28da642eea
Truffle-DSL: Several new features implemented:
Implementation of a new code generation layout which shares code between generated nodes.
Declaration order of specializations is now used as specialization order.
Specializations do no longer perform fallthrough on respecialization, they now always respecialize from the first specialization.
Implemented support for contains relations between specializations.
Improved reachability error messages.
Preliminary support for @Implies.
author | Christian Humer <christian.humer@gmail.com> |
---|---|
date | Mon, 11 Aug 2014 15:53:05 +0200 |
parents | f33beed55ddc |
children |
line wrap: on
line diff
--- a/graal/com.oracle.truffle.dsl.processor/src/com/oracle/truffle/dsl/processor/typesystem/GuardData.java Mon Aug 11 15:53:05 2014 +0200 +++ b/graal/com.oracle.truffle.dsl.processor/src/com/oracle/truffle/dsl/processor/typesystem/GuardData.java Mon Aug 11 15:53:05 2014 +0200 @@ -22,29 +22,28 @@ */ package com.oracle.truffle.dsl.processor.typesystem; -import com.oracle.truffle.dsl.processor.node.*; +import java.util.*; + import com.oracle.truffle.dsl.processor.template.*; public class GuardData extends TemplateMethod { - private final SpecializationData specialization; - private final boolean negated; + private List<GuardExpression> impliesExpressions; - public GuardData(TemplateMethod method, SpecializationData specialization, boolean negated) { + public GuardData(TemplateMethod method, List<GuardExpression> impliesExpressions) { super(method); - this.negated = negated; - this.specialization = specialization; + this.impliesExpressions = impliesExpressions; } - public boolean isNegated() { - return negated; + public List<GuardExpression> getImpliesExpressions() { + return impliesExpressions; } @Override public boolean equals(Object obj) { if (obj instanceof GuardData) { GuardData other = (GuardData) obj; - return getMethod().equals(other.getMethod()) && negated == other.negated; + return getMethod().equals(other.getMethod()); } return false; } @@ -54,13 +53,4 @@ return getMethod().hashCode(); } - public SpecializationData getSpecialization() { - return specialization; - } - - @Override - public String toString() { - return (negated ? "!" : "") + getMethodName() + getParameters().toString(); - } - }