Mercurial > hg > graal-compiler
diff graal/com.oracle.truffle.api.dsl/src/com/oracle/truffle/api/dsl/Specialization.java @ 19300:67ab244ab689
Truffle-DSL: fix formatting issues.
author | Christian Humer <christian.humer@gmail.com> |
---|---|
date | Wed, 11 Feb 2015 18:33:49 +0100 |
parents | 3a37116ef37f |
children | 48bdad77afcd |
line wrap: on
line diff
--- 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) {...} * </pre> @@ -301,7 +295,6 @@ * abstract Assumption getUnmodifiedAssuption(); * ... * } - * * @Specialization(guards = "operand.getShape() == cachedShape", assumptions = "cachedShape.getUnmodifiedAssumption()") * void doAssumeUnmodifiedShape(DynamicObject operand, @Cached("operand.getShape()") Shape cachedShape) {...} * </pre> @@ -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) {...} * </pre>