diff --git a/base/int.jl b/base/int.jl index 303319e41f4e9..ba6002fc11dc1 100644 --- a/base/int.jl +++ b/base/int.jl @@ -418,12 +418,19 @@ if WORD_SIZE == 32 Int128(mod(BigInt(x),BigInt(y))) end - <<( x::Int128, y::Int) = y == 0 ? x : box(Int128,shl_int(unbox(Int128,x),unbox(Int,y))) - <<( x::UInt128, y::Int) = y == 0 ? x : box(UInt128,shl_int(unbox(UInt128,x),unbox(Int,y))) - >>( x::Int128, y::Int) = y == 0 ? x : box(Int128,ashr_int(unbox(Int128,x),unbox(Int,y))) - >>( x::UInt128, y::Int) = y == 0 ? x : box(UInt128,lshr_int(unbox(UInt128,x),unbox(Int,y))) - >>>(x::Int128, y::Int) = y == 0 ? x : box(Int128,lshr_int(unbox(Int128,x),unbox(Int,y))) - >>>(x::UInt128, y::Int) = y == 0 ? x : box(UInt128,lshr_int(unbox(UInt128,x),unbox(Int,y))) + <<( x::Int128, y::UInt) = y == 0 ? x : box(Int128,shl_int(unbox(Int128,x),unbox(Int,y))) + <<( x::UInt128, y::UInt) = y == 0 ? x : box(UInt128,shl_int(unbox(UInt128,x),unbox(Int,y))) + >>( x::Int128, y::UInt) = y == 0 ? x : box(Int128,ashr_int(unbox(Int128,x),unbox(Int,y))) + >>( x::UInt128, y::UInt) = y == 0 ? x : box(UInt128,lshr_int(unbox(UInt128,x),unbox(Int,y))) + >>>(x::Int128, y::UInt) = y == 0 ? x : box(Int128,lshr_int(unbox(Int128,x),unbox(Int,y))) + >>>(x::UInt128, y::UInt) = y == 0 ? x : box(UInt128,lshr_int(unbox(UInt128,x),unbox(Int,y))) + + <<( x::Int128, y::Int) = x << UInt(y) + <<( x::UInt128, y::Int) = x << UInt(y) + >>( x::Int128, y::Int) = x >> UInt(y) + >>( x::UInt128, y::Int) = x >> UInt(y) + >>>(x::Int128, y::Int) = x >>> UInt(y) + >>>(x::UInt128, y::Int) = x >>> UInt(y) else *{T<:Union{Int128,UInt128}}(x::T, y::T) = box(T,mul_int(unbox(T,x),unbox(T,y)))