CC = gcc
-CFLAGS = -Os -mpentiumpro -g -Wall
+CFLAGS = -Os -g -Wall
LIBS = -lm
STRIP = strip
- don't show listener on certain commands\r
- plugin should not exit jEdit on fatal errors\r
- wordpreview: don't show for string literals and comments\r
-- 64 bit support\r
- alist -vs- assoc terminology\r
- clean up listener's action popups\r
- jedit ==> jedit-word, jedit takes a file name\r
- introduce ifte* and ?str-head/?str-tail where appropriate\r
- namespace clone drops static var bindings\r
+- solaris: -lsocket -lnsl\r
+- unparsing: \u000c\r
\r
+ bignums:\r
\r
object-tag here-as >r
bignum-type >header emit
dup 0 = 1 2 ? emit ( capacity )
- dup 0 < [
- 1 emit neg emit
- ] [
- 0 emit emit
- ] ifte r> ;
+ [
+ [ 0 = ] [ emit pad ]
+ [ 0 < ] [ 1 emit neg emit ]
+ [ 0 > ] [ 0 emit emit ]
+ ] cond r> ;
( Special objects )
: (pack-string) ( n list -- )
#! Emit bytes for a string, with n characters per word.
[
- 2dup str-length > [ dupd .s align-string ] when
+ 2dup str-length > [ dupd align-string ] when
emit-string
] each drop ;
--- /dev/null
+USE: test
+USE: cross-compiler
+USE: namespaces
+USE: stdio
+
+[ "ab\0\0" ] [ 4 "ab" align-string ] unit-test
+
+[ { 0 } ] [
+ [ "\0\0\0\0" emit-string ] with-minimal-image
+] unit-test
+
+[ { 6815845 7077996 7274528 7798895 7471212 6553600 } ]
+[
+ [
+ "big-endian" on
+ [ "hello world" pack-string ] with-minimal-image
+ ] with-scope
+] unit-test
+
+[ "\0\0\0\0\u000f\u000e\r\u000c" ]
+[
+ [ image-magic write-big-endian-64 ] with-string
+] unit-test
"parser"
"parse-number"
"prettyprint"
+ "image"
"inspector"
"io/io"
"vectors"
CELL shift_fixnum(FIXNUM x, FIXNUM y)
{
if(y < 0)
- return tag_fixnum(x >> -y);
+ {
+ if(y <= -WORD_SIZE)
+ return (x < 0 ? tag_fixnum(-1) : tag_fixnum(0));
+ else
+ return tag_fixnum(x >> -y);
+ }
else if(y == 0)
return tag_fixnum(x);
else if(y < WORD_SIZE - TAG_BITS)