Module: common-dylan-internals Copyright: Original Code is Copyright (c) 1995-2004 Functional Objects, Inc. All rights reserved. License: Functional Objects Library Public License Version 1.0 Dual-license: GNU Lesser General Public License Warranty: Distributed WITHOUT WARRANTY OF ANY KIND ////////////////////////////////////////////////////////////////////////////// // shift-left (x :: , count :: ) // => low :: , high :: , overflow? :: define sealed generic %shift-left (x :: , count :: ) => (low :: , high :: , overflow? :: ); define inline method %shift-left (x :: , count :: ) => (low :: , high :: , overflow? :: ); check-shift-quantity(count); machine-word-shift-left-with-overflow(x, count); end method; define inline method %shift-left (x :: , count :: ) => (low :: , high :: , overflow? :: ); check-shift-quantity(count); machine-word-shift-left-with-overflow (coerce-abstract-integer-to-machine-word(x), count); end method; ////////////////////////////////////////////////////////////////////////////// // shift-right (x :: , count :: ) // => result :: define sealed generic %shift-right (x :: , count :: ) => result :: ; define method %shift-right (x :: , count :: ) => result :: ; check-shift-quantity(count); machine-word-shift-right(x, count); end method; define method %shift-right (x :: , count :: ) => result :: ; check-shift-quantity(count); machine-word-shift-right(coerce-abstract-integer-to-machine-word(x), count); end method;