# HG changeset patch # User Christian Humer # Date 1423676029 -3600 # Node ID 67ab244ab689fc192dcf319a96332b05938ee131 # Parent 8e4f683e16d98bc9ead1c46e352f924096c3f107 Truffle-DSL: fix formatting issues. diff -r 8e4f683e16d9 -r 67ab244ab689 graal/com.oracle.truffle.api.dsl/src/com/oracle/truffle/api/dsl/Cached.java --- a/graal/com.oracle.truffle.api.dsl/src/com/oracle/truffle/api/dsl/Cached.java Wed Feb 11 18:10:02 2015 +0100 +++ b/graal/com.oracle.truffle.api.dsl/src/com/oracle/truffle/api/dsl/Cached.java Wed Feb 11 18:33:49 2015 +0100 @@ -90,7 +90,7 @@ * CompilerAsserts.compilationConstant(cachedOperand); * ... * } - * + * * Example executions: * execute(1) => doCached(1, 1) // new instantiation, localOperand is bound to 1 * execute(0) => doCached(0, 1) @@ -138,16 +138,16 @@ * instantiated. Alternatively if the contains relation is omitted then all * doCached instances remain but no new instances are created. * - *
+ * 
  * @Specialization(guards = "==(operand, cachedOperand)")
  * void doCached(int operand, @Cached("operand") int cachedOperand) {
  *    CompilerAsserts.compilationConstant(cachedOperand);
  *    ...
  * }
- * 
+ *
  * @Specialization(contains = "doCached")
  * void doNormal(int operand) {...}
- * 
+ *
  * Example executions with contains = "doCached":
  * execute(0) => doCached(0, 0) // new instantiation, cachedOperand is bound to 0
  * execute(1) => doCached(1, 1) // new instantiation, cachedOperand is bound to 1
@@ -155,7 +155,7 @@
  * execute(2) => doCached(2, 2) // new instantiation, cachedOperand is bound to 2
  * execute(3) => doNormal(3)    // new instantiation of doNormal due to limit overflow; doCached gets removed.
  * execute(1) => doNormal(1)
- * 
+ *
  * Example executions without contains = "doCached":
  * execute(0) => doCached(0, 0) // new instantiation, cachedOperand is bound to 0
  * execute(1) => doCached(1, 1) // new instantiation, cachedOperand is bound to 1
@@ -164,7 +164,7 @@
  * execute(3) => doNormal(3)    // new instantiation of doNormal due to limit overflow
  * execute(1) => doCached(1, 1)
  *
- * 
+ * * * *
  • @@ -175,7 +175,7 @@ * @Specialization * void s(int operand, @Cached("transformLocal(operand)") int cachedOperand) { * } - * + * * int transformLocal(int operand) { * return operand & 0x42; * } @@ -191,9 +191,9 @@ * void s(Object operand, @Cached("new()") OtherNode someNode) { * someNode.execute(operand); * } - * + * * static class OtherNode extends Node { - * + * * public String execute(Object value) { * throw new UnsupportedOperationException(); * } diff -r 8e4f683e16d9 -r 67ab244ab689 graal/com.oracle.truffle.api.dsl/src/com/oracle/truffle/api/dsl/Specialization.java --- a/graal/com.oracle.truffle.api.dsl/src/com/oracle/truffle/api/dsl/Specialization.java Wed Feb 11 18:10:02 2015 +0100 +++ b/graal/com.oracle.truffle.api.dsl/src/com/oracle/truffle/api/dsl/Specialization.java Wed Feb 11 18:33:49 2015 +0100 @@ -158,13 +158,11 @@ * int doAddNoOverflow(int a, int b) { * return ExactMath.addExact(a, b); * } - * * @Specialization * long doAddWithOverflow(int a, int b) { * return a + b; * } * ... - * * Example executions: * execute(Integer.MAX_VALUE - 1, 1) => doAddNoOverflow(Integer.MAX_VALUE - 1, 1) * execute(Integer.MAX_VALUE, 1) => doAddNoOverflow(Integer.MAX_VALUE, 1) @@ -196,18 +194,15 @@ * void doDivPowerTwo(int a, int b) { * return a >> 1; * } - * * @Specialization(contains ="doDivPowerTwo", guards = "b > 0") * void doDivPositive(int a, int b) { * return a / b; * } * ... - * * Example executions with contains="doDivPowerTwo": * execute(4, 2) => doDivPowerTwo(4, 2) * execute(9, 3) => doDivPositive(9, 3) // doDivPowerTwo instances get removed * execute(4, 2) => doDivPositive(4, 2) - * * Same executions without contains="doDivPowerTwo" * execute(4, 2) => doDivPowerTwo(4, 2) * execute(9, 3) => doDivPositive(9, 3) @@ -253,7 +248,6 @@ * assert operand <= 42; * return operand & 1 == 1; * } - * * @Specialization(guards = {"operand <= 42", "acceptOperand(operand)"}) * void doSpecialization(int operand) {...} * @@ -301,7 +295,6 @@ * abstract Assumption getUnmodifiedAssuption(); * ... * } - * * @Specialization(guards = "operand.getShape() == cachedShape", assumptions = "cachedShape.getUnmodifiedAssumption()") * void doAssumeUnmodifiedShape(DynamicObject operand, @Cached("operand.getShape()") Shape cachedShape) {...} * @@ -345,7 +338,6 @@ * static int getCacheLimit() { * return Integer.parseInt(System.getProperty("language.cacheLimit")); * } - * * @Specialization(guards = "operand == cachedOperand", limit = "getCacheLimit()") * void doCached(Object operand, @Cached("operand") Object cachedOperand) {...} *