Mercurial > hg > truffle
changeset 13960:7392b9e0470b
SL: Small JavaDoc fixes
author | Christian Wimmer <christian.wimmer@oracle.com> |
---|---|
date | Sat, 15 Feb 2014 07:59:48 -0800 |
parents | 96bd95f62d92 |
children | 4eda2fa64da6 |
files | graal/com.oracle.truffle.sl/src/com/oracle/truffle/sl/nodes/SLTypes.java graal/com.oracle.truffle.sl/src/com/oracle/truffle/sl/nodes/expression/SLAddNode.java |
diffstat | 2 files changed, 8 insertions(+), 6 deletions(-) [+] |
line wrap: on
line diff
--- a/graal/com.oracle.truffle.sl/src/com/oracle/truffle/sl/nodes/SLTypes.java Sat Feb 15 06:54:20 2014 -0800 +++ b/graal/com.oracle.truffle.sl/src/com/oracle/truffle/sl/nodes/SLTypes.java Sat Feb 15 07:59:48 2014 -0800 @@ -60,11 +60,11 @@ } /** - * Informs the Truffle DSL that a primitive {@code long} value can used in all specializations - * where a {@link BigInteger} is expected. This models the semantic of SL: It only has an - * arbitrary precision Number type (implemented as {@link BigInteger}, and {@code long} is only - * used as a performance optimization to avoid the costly {@link BigInteger} arithmetic for - * values that fit into a 64-bit primitive value. + * Informs the Truffle DSL that a primitive {@code long} value can be used in all + * specializations where a {@link BigInteger} is expected. This models the semantic of SL: It + * only has an arbitrary precision Number type (implemented as {@link BigInteger}, and + * {@code long} is only used as a performance optimization to avoid the costly + * {@link BigInteger} arithmetic for values that fit into a 64-bit primitive value. */ @ImplicitCast public BigInteger castBigInteger(long value) {
--- a/graal/com.oracle.truffle.sl/src/com/oracle/truffle/sl/nodes/expression/SLAddNode.java Sat Feb 15 06:54:20 2014 -0800 +++ b/graal/com.oracle.truffle.sl/src/com/oracle/truffle/sl/nodes/expression/SLAddNode.java Sat Feb 15 07:59:48 2014 -0800 @@ -70,7 +70,9 @@ * operand are {@link BigInteger} values. Because the type system defines an * {@link ImplicitCast implicit conversion} from {@code long} to {@link BigInteger} in * {@link SLTypes#castBigInteger(long)}, this specialization is also taken if the left or the - * right operand is a {@code long} value. + * right operand is a {@code long} value. Because the {@link #add(long, long) long} + * specialization} has the {@code rewriteOn} attribute, this specialization is also taken if + * both input values are {@code long} values but the primitive addition overflows. */ @Specialization protected BigInteger add(BigInteger left, BigInteger right) {