From 7e43c6da240f4ff516c723cca7fc3a88a20ea3da Mon Sep 17 00:00:00 2001 From: Andrey Breslav Date: Thu, 7 Apr 2011 20:27:00 +0400 Subject: [PATCH] Bitwise operations for Ints and Longs --- idea/src/jet/lang/Library.jet | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/idea/src/jet/lang/Library.jet b/idea/src/jet/lang/Library.jet index 269dbcae6c7..ea0cee780d1 100644 --- a/idea/src/jet/lang/Library.jet +++ b/idea/src/jet/lang/Library.jet @@ -251,6 +251,14 @@ class Long : Number, Comparable { fun dec() : Long fun plus() : Long fun minus() : Long + + fun shl(bits : Int) : Long + fun shr(bits : Int) : Long + fun ushr(bits : Int) : Long + fun and(other : Long) : Long + fun or(other : Long) : Long + fun xor(other : Long) : Long + fun inv() : Long } class Int : Number, Comparable { @@ -314,6 +322,14 @@ class Int : Number, Comparable { fun dec() : Int fun plus() : Int fun minus() : Int + + fun shl(bits : Int) : Int + fun shr(bits : Int) : Int + fun ushr(bits : Int) : Int + fun and(other : Int) : Int + fun or(other : Int) : Int + fun xor(other : Int) : Int + fun inv() : Int } class Char : Number, Comparable {