Browse files

rename shift-right-logical to unsigned-shift-right

also update :added version

Signed-off-by: Stuart Halloway <>
  • Loading branch information...
1 parent 1e5e5be commit 22164511c43ef19fbff91fb75ef5f7147526769d @cldwalker cldwalker committed with stuarthalloway May 24, 2013
Showing with 14 additions and 14 deletions.
  1. +4 −4 src/clj/clojure/core.clj
  2. +2 −2 src/jvm/clojure/lang/
  3. +8 −8 src/jvm/clojure/lang/
8 src/clj/clojure/core.clj
@@ -1317,11 +1317,11 @@
:added "1.0"}
[x n] (. clojure.lang.Numbers shiftRight x n))
-(defn bit-shift-right-logical
+(defn unsigned-bit-shift-right
"Bitwise shift right, without sign-extension."
- {:inline (fn [x n] `(. clojure.lang.Numbers (shiftRightLogical ~x ~n)))
- :added "1.4"}
- [x n] (. clojure.lang.Numbers shiftRightLogical x n))
+ {:inline (fn [x n] `(. clojure.lang.Numbers (unsignedShiftRight ~x ~n)))
+ :added "1.6"}
+ [x n] (. clojure.lang.Numbers unsignedShiftRight x n))
(defn integer?
"Returns true if n is an integer"
4 src/jvm/clojure/lang/
@@ -29,15 +29,15 @@
"public static long clojure.lang.Numbers.remainder(long,long)", LREM,
"public static long clojure.lang.Numbers.shiftLeft(long,long)", oa(L2I, LSHL),
"public static long clojure.lang.Numbers.shiftRight(long,long)", oa(L2I, LSHR),
- "public static long clojure.lang.Numbers.shiftRightLogical(long,long)", oa(L2I, LUSHR),
+ "public static long clojure.lang.Numbers.unsignedShiftRight(long,long)", oa(L2I, LUSHR),
"public static double clojure.lang.Numbers.minus(double)", DNEG,
"public static double clojure.lang.Numbers.minus(double,double)", DSUB,
"public static double", oa(DCONST_1, DADD),
"public static double clojure.lang.Numbers.dec(double)", oa(DCONST_1, DSUB),
"public static long clojure.lang.Numbers.quotient(long,long)", LDIV,
"public static int clojure.lang.Numbers.shiftLeftInt(int,int)", ISHL,
"public static int clojure.lang.Numbers.shiftRightInt(int,int)", ISHR,
- "public static int clojure.lang.Numbers.shiftRightLogicalInt(int,int)", IUSHR,
+ "public static int clojure.lang.Numbers.unsignedShiftRightInt(int,int)", IUSHR,
"public static int clojure.lang.Numbers.unchecked_int_add(int,int)", IADD,
"public static int clojure.lang.Numbers.unchecked_int_subtract(int,int)", ISUB,
"public static int clojure.lang.Numbers.unchecked_int_negate(int)", INEG,
16 src/jvm/clojure/lang/
@@ -389,20 +389,20 @@ static public long shiftRight(long x, long n){
return x >> n;
-static public int shiftRightLogicalInt(int x, int n){
+static public int unsignedShiftRightInt(int x, int n){
return x >>> n;
-static public long shiftRightLogical(Object x, Object y){
- return shiftRightLogical(bitOpsCast(x),bitOpsCast(y));
+static public long unsignedShiftRight(Object x, Object y){
+ return unsignedShiftRight(bitOpsCast(x),bitOpsCast(y));
-static public long shiftRightLogical(Object x, long y){
- return shiftRightLogical(bitOpsCast(x),y);
+static public long unsignedShiftRight(Object x, long y){
+ return unsignedShiftRight(bitOpsCast(x),y);
-static public long shiftRightLogical(long x, Object y){
- return shiftRightLogical(x,bitOpsCast(y));
+static public long unsignedShiftRight(long x, Object y){
+ return unsignedShiftRight(x,bitOpsCast(y));
-static public long shiftRightLogical(long x, long n){
+static public long unsignedShiftRight(long x, long n){
return x >>> n;

0 comments on commit 2216451

Please sign in to comment.