! Copyright (C) 2010, 2011 Joe Groff, Daniel Ehrenberg,
! John Benediktsson, Slava Pestov.
-! See http://factorcode.org/license.txt for BSD license
+! See https://factorcode.org/license.txt for BSD license
IN: classes.struct
DEFER: struct-slots ! for stack-checker
DEFER: struct-class? ! for stack-checker
: sign-extend ( n bits -- n' )
! formula from:
- ! http://guru.multimedia.cx/fast-sign-extension/
+ ! https://guru.multimedia.cx/fast-sign-extension/
1 - -1 swap shift [ + ] keep bitxor ; inline
: sign-extender ( signed? bits -- quot )