Commit Graph

849 Commits

Author SHA1 Message Date
Abdulaziz Ghuloum 9c60997b02 - invoking ikarus in r6rs mode now takes optional library files
arguments as in
  $ ikarus <library-file> ... --r6rs-script <script-file> args ...
2008-11-01 16:19:35 -04:00
Abdulaziz Ghuloum ae9d095527 - fixed bug in printing "-0.0i" on some archs (cygwin, solaris,
- fixed bug reading non-ascii strings in 64-bit mode.
2008-11-01 15:13:27 -04:00
Abdulaziz Ghuloum 069bd683cd - added file-mtime
- Ikarus fasl files and source files are not compared using 
   (< (file-mtime ikfasl) (file-mtime filename))
  instead of
   (<= (file-ctime ikfasl) (file-ctime filename))
2008-11-01 07:28:08 -04:00
Abdulaziz Ghuloum 74a1d302ec - added better hashing function for flonums and bignums. 2008-10-31 23:53:15 -04:00
Abdulaziz Ghuloum 671eba4990 added make-eqv-hashtable 2008-10-31 23:09:03 -04:00
Abdulaziz Ghuloum 8afcbbef67 - fixed function cast in ikarus-ffi.
- added "make check" rule in the scheme directory.
2008-10-31 16:55:43 -04:00
Abdulaziz Ghuloum 359aa1d2c9 - fixed errors where multiple internal definitions were silently
allowed if typed in the repl.
- added some tests for the interaction environment.
2008-10-31 16:22:25 -04:00
Abdulaziz Ghuloum db2604ad2a open-file-input-port and open-file-output-port now signal an error
when file-options are not enum-sets.
2008-10-29 14:10:24 -04:00
Abdulaziz Ghuloum d2022faf53 fixed a few gcc warnings as reported in bug 288824. 2008-10-29 13:54:06 -04:00
Abdulaziz Ghuloum a4ba327173 - speedup of unicode normalization routines.
- added unicode normalization tests.
2008-10-29 03:15:17 -04:00
Abdulaziz Ghuloum 15e8775c67 - reduced latency of construction of unicode composition tables. 2008-10-29 02:11:53 -04:00
Abdulaziz Ghuloum 9a3666d3ea - completed all unicode primitives (thanks to Kent Dybvig) 2008-10-28 19:59:40 -04:00
Abdulaziz Ghuloum 7fa2aa75ab fixed gensym read syntax problem. 2008-10-26 12:35:07 -04:00
Abdulaziz Ghuloum 5ed3f80901 - fixed problem with importing (main) when (main main) is available.
- fixed decoding of library names containing funny characters.
2008-10-23 13:26:07 -04:00
Abdulaziz Ghuloum 32a260ebb0 added doc/ikarus-scheme-users-guide.pdf which I've deleted by
2008-10-23 08:45:44 -04:00
Abdulaziz Ghuloum d3fb9eeb96 Added an "_" to the file name obtained from library-name->file-name
if the last symbol of the library name matches the regex "^main_*$".
2008-10-23 00:40:50 -04:00
Abdulaziz Ghuloum c19b79927e - Changed set of library extensions to be:
("/main.ikarus.sls" "/" "/main.ikarus.scm"
     "/main.sls" "/" "/main.scm" ".ikarus.sls"
     "" ".ikarus.scm" ".sls" ".ss" ".scm")
  and updated documentation accordingly.
2008-10-22 21:15:12 -04:00
Abdulaziz Ghuloum cc686d8e8f utf16-coded output port do not produce a BOM now. 2008-10-21 23:00:10 -04:00
Abdulaziz Ghuloum f1013454db fixed wrong endianness in bytevector-[su]32-native-ref. 2008-10-21 06:03:31 -04:00
Abdulaziz Ghuloum 8d460a32af added make-hashtable. 2008-10-21 05:52:42 -04:00
Abdulaziz Ghuloum d8058e0cbf utf16 output ports now work. 2008-10-21 03:31:44 -04:00
Abdulaziz Ghuloum c0978044a5 fixed a big in string->utf16 and string->utf32 that I introduced in
the last commit.
2008-10-19 23:10:34 -04:00
Abdulaziz Ghuloum 0da61d51cb - input ports can now handle utf-16 codecs. 2008-10-19 18:43:42 -04:00
Abdulaziz Ghuloum 8cd9d6ef16 - supplying <init-files> for --r6rs-script or --script now raises an
error (as suggested by Derick Eddington).
- The -h or [-b <bootfile>] options must now come first, so,
  the rest of the command-line arguments are not scanned: only the
  first one or two.   The docs (in ikarus -h) already suggested the
  correct invocation arguments, so, this conforms to the previously
  documented behavior.
2008-10-18 17:49:20 -04:00
Abdulaziz Ghuloum c464e8ebce - open-file-output-port now understands "none" as a buffer-mode.
Previously, all output ports were unbuffered.
- the console error port is made unbuffered.
  The following program:

     (write-char #\a (current-output-port))
     (write-char #\b (current-error-port)) 
     (write-char #\c (current-output-port)))

  now prints "bac" when run from the repl, when it used to only
  print "ac" (the b just sat in the error port).
2008-10-18 17:01:57 -04:00
Abdulaziz Ghuloum 8844e118b8 - flushing of output ports now happens as soon as the port is full
rather than at subsequent write operations.
2008-10-18 15:42:11 -04:00
Abdulaziz Ghuloum 7b32940d04 - fixed a silly bug in (/ <bignum> x/y) which evaluated to
(/ (* <bignum> x) y) instead of (/ (* <bignum> y) x).
2008-10-18 13:34:18 -04:00
Abdulaziz Ghuloum 69d573a54f fixed bugs in char-ci-*? procedures in the 3+ args case. E.g.,
(char-ci<=? #\a #\r #\z)
2008-10-18 13:19:01 -04:00
Abdulaziz Ghuloum bbafcc08d2 fixed bug in (eqv? 0.0 -0.0) returning #t. 2008-10-18 13:08:14 -04:00
Abdulaziz Ghuloum 29edb9d800 cleaned up the test suite a little. 2008-10-18 13:03:17 -04:00
Abdulaziz Ghuloum 06e9d149c9 - fixed bug in tag annotation for primitives that are applied an
incorrect number of arguments.
2008-10-17 21:37:05 -04:00
Abdulaziz Ghuloum 0d91ab9774 - pretty-printing record type now work properly and share/graph
marks are propagated between record fields and surrounding
2008-10-16 02:43:03 -04:00
Abdulaziz Ghuloum f570ea8c2a - interface between write/display and custom struct writers is
changed in order to allow large structures (e.g., libraries,
  syntax objects, etc.) to print efficiently.  This is done by only
  traversing the parts of the structure that will actually be
  printed, rather than traversing the whole data structure (which is
  what write/display used to do).  Pretty-print should be fixed in a
  similar manner (TODO).
2008-10-15 07:44:06 -04:00
Abdulaziz Ghuloum fd567eb0c6 - fasl reader did not know how to read strings containing unicode
chars, fixed.
2008-10-14 02:28:46 -04:00
Abdulaziz Ghuloum afa61cc1a7 - synching scheme/psyntax.*.ss from the psyntax distribution. 2008-10-13 17:33:25 -04:00
Abdulaziz Ghuloum 442f6e9049 - native bytevector operations on 16-bit values were implemented
using the wrong endianness.
2008-10-13 02:40:26 -04:00
Abdulaziz Ghuloum 1be0f2af6e - changed foreign accessors and mutator names to have '-c-' in their
names as suggested by Ken Dickey.
2008-10-12 02:06:25 -04:00
Abdulaziz Ghuloum 811c94361b - fixed bugs in pass-specify-rep where some (known) types were
unhandled causing compile time errors.
- fixed some bootstrapping issues with pointer? (which was moved out
  of the (ikarus) library)
- freshened up the bootfiles for both 32- and 64-bit version of
2008-10-12 01:15:20 -04:00
Abdulaziz Ghuloum 69c62649cc - defined RTLD_LOCAL for cygwin (possibly incorrect)
- added a missing save to a callee-save register (%edi) 
  when entering/reentering to Scheme which caused Ikarus
  not to run properly depending on whether or not gcc places
  the pcb in %edi or not during Scheme execution.
- updated lab/ to use the new names for foreign
  types, etc.
2008-10-07 02:46:56 -04:00
Abdulaziz Ghuloum 1e5e516b08 - added (ikarus foreign) library that should be used instead of
(ikarus system $foreign).
- changed the names of some of the pointer primitives
- changed the name of the procedure make-ffi to make-callout
- updated examples and libraries to conform with new names
- updated the users guide to provide a complete description of 
  the (ikarus foreign) library
- updated list of missing R6RS features in the users guide
2008-10-06 01:19:27 -04:00
Abdulaziz Ghuloum 0a7a3a8266 made load feel like a top-level by consuming the contents of the
given file one expression at a time.  Most notable difference is 
observed when the loaded file captures a conitnuation in one
expression.  Re-invoking this continuation should evaluate the 
next expression that has not been evaluated yet, and not the
expression following the call/cc.
2008-09-28 00:08:34 -04:00
Abdulaziz Ghuloum 90175f528f speech synthesizer demo 2008-09-27 03:20:24 -04:00
Abdulaziz Ghuloum 8c30f0715b Managed to a simple Ikarus -> Objective-C interface to work. Ikarus
can now open a Cocoa window under Mac OS X.   Happy Happy Joy Joy!!
2008-09-26 02:46:07 -04:00
Abdulaziz Ghuloum 89d9a472a5 "darwin" is no longer hardcoded in lib/,
instead, it is obtained from the target info that autoconf
2008-09-24 23:18:35 -04:00
Abdulaziz Ghuloum 55c3fbcc4d moved the opengl libraries from lab/ to lib/ so that they get
installed as user libraries.
2008-09-24 07:22:25 -04:00
Abdulaziz Ghuloum 9f53841fb9 fixed endianness error in bytevector-native-[us]32-native-set!. 2008-09-23 08:02:47 -04:00
Abdulaziz Ghuloum 61ecbe0dd1 - opengl demos from ypsilon (gears and glut-demo) now work under
ikarus's ffi using a compatibility layer.
2008-09-23 07:48:16 -04:00
Abdulaziz Ghuloum abe97b4053 - argument conversion for callbacks now work.
- added more tests in lab/
2008-09-23 03:21:41 -04:00
Abdulaziz Ghuloum 876ab09eee - gc during callbacks now works.
- system continuations are now maintained as part of the list in
2008-09-23 01:49:06 -04:00
Abdulaziz Ghuloum df4cb7a6ce fixed an off-by-one bug in ffi callbacks. 2008-09-23 00:24:41 -04:00
Abdulaziz Ghuloum 09657334c0 fixed autoconf so that ffi.h and libffi are checked iff ffi is
enabled.  Also made prep-callback return #f if libffi does not
support closures.
2008-09-22 21:55:05 -04:00
Abdulaziz Ghuloum e07d8f9760 ffi callbacks sorta kinda work now. 2008-09-21 04:08:54 -04:00
Abdulaziz Ghuloum 06fd988a17 C callbacks now reach the C point where they should make the call
back into Scheme land.
2008-09-20 01:58:57 -04:00
Abdulaziz Ghuloum 31f5f88889 first test of ffi works:
> (import (ikarus system $foreign))
> (((ffi-prep-cif 'void '(uint32))
    (dlsym (dlopen #f) "hello_world"))
Hello World
Hello World
Hello World
Hello World
Hello World
Hello World
Hello World
Hello World
Hello World
Hello World
2008-09-14 04:17:24 -07:00
Abdulaziz Ghuloum 9f2d7484ab fixed uint/ulong pointer ref bug (and added appropriate tests). 2008-09-14 00:38:59 -07:00
Abdulaziz Ghuloum 58d937c520 upgraded to using latest versions of autoconf, aclocal, and m4. 2008-09-13 15:16:14 -07:00
Abdulaziz Ghuloum 8e750562d6 - Added memory operations on pointer types for setting and accessing
char, short, int, and long values from pointer arrays.
2008-09-13 07:49:17 -07:00
Abdulaziz Ghuloum e05e84d1c2 Added dlopen, dlclose, dlerror, dlsym, malloc, and free to
(ikarus system $foreign).
2008-09-12 14:22:57 -07:00
Abdulaziz Ghuloum 30cd6a2de8 made environment-symbols work on the interaction-environment. 2008-09-10 11:02:42 -07:00
Abdulaziz Ghuloum 0b017898a8 - minor change to how export (with renaming) is parsed. When you
rename from-name to to-name, the from-name is now treated as an
  identifier while the to-name is treated as a symbol.
2008-09-10 08:17:18 -07:00
Abdulaziz Ghuloum fcef21c693 - Added (environment-symbols <env>) which returns a list of symbols
exported by the environment.  Try 
  > (environment-symbols (environment '(rnrs)))

- Added an internal export mechanism so that identifiers can be
  exported from within a library.  The syntax is the same:
    (export export-spec* ...) 
  when appears in a library's top level, adds the export specs to
  the set of exported identifiers.  So, one can do:
    (library (A) 
      (import (ikarus))
      (export a)
      (define a 17))
  When appearing in non-library definition context, the export form
  is ignored.
2008-09-10 06:35:18 -07:00
Abdulaziz Ghuloum c597e7a4b3 Added option for searching for socket and nanosleep in libraries
-lsocket and -lrt (makes it work on SunOS).
2008-09-08 14:43:47 -07:00
Abdulaziz Ghuloum afc9bff07f - added experimental pointer manipulation primitives. 2008-09-06 06:01:39 -07:00
Abdulaziz Ghuloum 814c797633 - removed bset/h instruction from the compiler (it was rarely used
and not implemented 100% correctly)
- fixed parameterize to allow (parameterize () def ... exp exp ...)
2008-09-06 04:17:20 -07:00
Abdulaziz Ghuloum 9b9464229a - fixed how stack overflow check is performed (now using unsigned
arithmetic to compare the stack pointer with the redline).
- disabled stack overflow check elimination due to a bug in the
  logic that assumes primitive calls are not recursive.
2008-08-13 22:28:22 -07:00
Abdulaziz Ghuloum b9085e15da - more work on trig functions
- mkstx now checks that double wraps are not merged incorrectly
2008-08-12 01:17:04 -07:00
Abdulaziz Ghuloum 476a0cb6d8 fixed small bug in rationalize 2008-08-11 13:38:28 -07:00
Abdulaziz Ghuloum c64fda7619 fixed a few problems in geometric functions when they are passed
complex numbers or when they're passed real numbers but the results
are complex.
2008-08-11 10:37:05 -07:00
Abdulaziz Ghuloum e58c53cca5 symbols containing unicode characters now print properly and respect
the print-unicode parameter.
2008-08-10 11:50:39 -07:00
Abdulaziz Ghuloum fdca9ed33f command line arguments are now interpreted as utf8 strings. 2008-08-10 11:33:10 -07:00
Abdulaziz Ghuloum 2ad6d9bddf strings containing non-ascii characters are written using either
hex escaping or as-is depending on the value of the print-unicode
2008-08-10 11:03:09 -07:00
Abdulaziz Ghuloum 22d216f9ed - fixed a problem with loading an empty file.
- added to
2008-08-10 10:46:24 -07:00
Abdulaziz Ghuloum 7bacb4a0a5 Added string-downcase and string-upcase. String-downcase does not
handle greek-final-sigma properly.
2008-08-09 07:12:22 -07:00
Abdulaziz Ghuloum e24356eb4a scheme-script is now its own program; it does not fork and exec
ikarus, and therefore does not interfere with ikarus's command line
2008-08-09 05:47:44 -07:00
Abdulaziz Ghuloum c5930ac113 exported enum-set?. 2008-08-08 08:29:18 -07:00
Abdulaziz Ghuloum b7d9c0cf1f - added two argument version of log
- handled (/ flonum complexnum)
2008-08-08 08:21:23 -07:00
Abdulaziz Ghuloum 53cc48d23c fxsll was missing an interrupt call. 2008-08-07 15:02:53 -07:00
Abdulaziz Ghuloum 9eead5327a Added bitwise-if and bitwise-copy-bit-field (inefficiently) 2008-08-04 23:43:11 -07:00
Abdulaziz Ghuloum e1215998e0 quick fix for incorrect reading of subsequent* characters in a
2008-08-04 23:19:55 -07:00
Abdulaziz Ghuloum 2b4e89bcf0 - fixed a minor import subversion bug.
- added 2-argument version of fllog.
2008-08-04 16:44:24 -07:00
Abdulaziz Ghuloum a9fb7b0fef fixed small bug in enum-universe. 2008-08-03 14:18:11 -07:00
Abdulaziz Ghuloum c5381d4cb3 Applied a patch fixing error when the standard input/output ports
are closed before the interactive session terminates.
2008-08-03 13:50:20 -07:00
Abdulaziz Ghuloum 6d52912aef reimplemented enums to use bitmaps instead of lists. 2008-08-03 12:52:33 -07:00
Abdulaziz Ghuloum 0da4e99a12 simplified when, unless, and case macros and added better handler
for (if (not e) e e).
2008-08-02 11:09:22 -07:00
Abdulaziz Ghuloum 39e84d1395 simplified parameterize macro. 2008-08-02 10:11:04 -07:00
Abdulaziz Ghuloum 9b74020647 fixed a bug in fasl reader for shared/cyclic data structures. 2008-07-30 17:28:33 -07:00
Abdulaziz Ghuloum f2d6f433bb fixed shift-left bug on bignums in 64-bit mode only 2008-07-30 08:17:20 -07:00
Abdulaziz Ghuloum f144722b36 bumped the number of registers available on AMD64 by 4. 2008-07-30 07:47:22 -07:00
Abdulaziz Ghuloum 959082d12d assert now gives source information when available. 2008-07-29 11:04:52 -07:00
Abdulaziz Ghuloum 5aa6e1b05e some work on parsing polar notation. 2008-07-29 08:35:36 -07:00
Abdulaziz Ghuloum c0a1abace1 Added &undefined condition to unbound error conditions. 2008-07-29 07:54:06 -07:00
Abdulaziz Ghuloum d84dd99061 added fxrotate-bit-field 2008-07-27 10:53:31 -07:00
Abdulaziz Ghuloum 282fa962a8 fixed div0-and-mod0 bug 2008-07-26 15:08:13 -07:00
Abdulaziz Ghuloum 4ee88498a9 fixes quasisyntax bugs, making them more conforming to the r6rs test
2008-07-26 14:11:22 -07:00
Abdulaziz Ghuloum b3d8a8f9fd sqrt now supports negative arguments properly. 2008-07-26 12:39:11 -07:00
Abdulaziz Ghuloum 3b80d4f321 fixed a bug in quotient and div when given (least-fixnum) and -1. 2008-07-26 12:28:51 -07:00
Abdulaziz Ghuloum 4909a9ef08 fixed make-rectangular so that (make-rectangular 1.0 0.0) returns
a cflonum 1.0+0.0i while (make-rectangular 1.0 0) returns 1.0.
2008-07-25 17:46:34 -07:00
Abdulaziz Ghuloum f332927d23 kinda fixes a port-position computation bug for custom binary ports. 2008-07-24 22:30:21 -07:00
Abdulaziz Ghuloum 7db56cf76e - bytevector-ieee-[single|double]-[ref|set!] now accept unaligned
indices (r6rs requirement).
- file-options are now represented as enum-sets (r6rs requirement)
- odd?, even?, lcm, remainder, etc., now accept inexact integers.
2008-07-24 18:58:53 -07:00
Abdulaziz Ghuloum 9085b79b64 fixed some r6rs bitwise bugs. 2008-07-24 00:06:12 -07:00
Abdulaziz Ghuloum 0305537374 get-u8 and lookahead-u8 did not update the port position properly.
2008-07-23 11:15:44 -07:00
Abdulaziz Ghuloum 9f623124d5 symbol=? and boolean=? now accept 2+ args. 2008-07-23 07:55:32 -07:00
Abdulaziz Ghuloum acc9940379 fixed gc bug in 64-bit mode along with another 64-bit bug in the
assembler when addressing using special %eax/%rax instructions.
2008-07-21 22:07:31 -07:00
Abdulaziz Ghuloum 358eee03ee Added a 64-bit bootfile and modified the configure script to not add
its own -m32 or -m64 flags.  To built ikarus in 32-bit mode, one can
  ./configure CFLAGS=-m32
and in 64-bit mode:
  ./configure CFLAGS=-m64
2008-07-20 14:09:04 -07:00
Abdulaziz Ghuloum 59b9d28001 guard expressions now re-raise unhandled conditions using
raise-continuable (as per the R6RS errata page, part 7.1)
2008-07-20 02:51:14 -07:00
Abdulaziz Ghuloum 78d9fa1f42 In 64-bit, ikarus now passes all tests, can recompile itself,
and runs all benchmarks (inefficiently but correctly).
2008-07-20 00:14:09 -07:00
Abdulaziz Ghuloum 4f48c55bfc all existing tests pass under 64-bit 2008-07-19 14:41:06 -07:00
Abdulaziz Ghuloum 81a1a640df more progress on the AMD64 front, fixing more numeric and more cogen
64-bit bugs.
2008-07-18 22:21:57 -07:00
Abdulaziz Ghuloum 01c4afa320 Major work towards the AMD64 port. Most important of which is that
continuations work, more assembly instructions are testing in 64-bit
mode, and some arithmetic operations (shift-right, etc.) have been
fixed by removing some 32-bit dependencies.
2008-07-18 01:35:13 -07:00
Abdulaziz Ghuloum 0ef81aa13e Added make-polar. 2008-07-15 23:13:59 -07:00
Abdulaziz Ghuloum 195dc0ea45 Fixed some problems parsing complex numbers. 2008-07-15 22:44:55 -07:00
Abdulaziz Ghuloum 2a49d5c538 Added "angle". 2008-07-14 22:43:19 -07:00
Abdulaziz Ghuloum a9657c4642 define-record-type now understands parent-rtd (used to ignore it). 2008-07-13 11:25:46 -07:00
Abdulaziz Ghuloum c3b12a22e8 the repl now resets on receiving &interrupted conditions. 2008-07-12 20:05:45 -07:00
Abdulaziz Ghuloum 70f5375d6b refixing trace-define-syntax. 2008-07-12 10:40:22 -07:00
Abdulaziz Ghuloum eccca7f4ea - Added trace-let-syntax, trace-letrec-syntax, as well as fixed
trace-define-syntax to handle variable transformers.

- added primops for fx comparison functions.
2008-07-11 22:31:40 -07:00
Abdulaziz Ghuloum 00970f12d2 - compound conditions are made non-opaque.
- more tag analysis for bytevectors and friends.
2008-07-08 08:15:14 -07:00
Abdulaziz Ghuloum 749080724c get-char now raises an error if the string port is closed (bug 245959) 2008-07-07 01:22:12 -07:00
Abdulaziz Ghuloum f6957b91c2 Added string->bytevector and bytevector->string as per bug 245983. 2008-07-07 01:11:36 -07:00
Abdulaziz Ghuloum 8423610f45 call-with-port does not use dynamic-wind to close the port. 2008-07-07 00:56:52 -07:00
Abdulaziz Ghuloum b15c7063f9 repl exception handler now returns for non-serious conditions
(as per bug 242900)
2008-07-07 00:50:19 -07:00
Abdulaziz Ghuloum badf83557f fixed rounding for rationals. 2008-07-07 00:22:14 -07:00
Abdulaziz Ghuloum 579b823f44 WIP on tag analysis, annotations, and utilization. 2008-07-06 23:48:16 -07:00
Abdulaziz Ghuloum d73dfd1287 - More work on the new optimizer
- Deleted old optimizer and changed the meaning of optimize level to
    0: bypass the optimizer
    1: copy propagation, constant folding, no inlining
    1: copy propagation, constant folding, with inlining
  The default is set to 1.
2008-06-29 12:35:34 -07:00
Abdulaziz Ghuloum 66464cc348 Fixed a bug when doing (/ 1 1 1 ...). 2008-06-28 13:02:05 -07:00
Abdulaziz Ghuloum 2c8cb7dda2 fixed a bug in matching library subversion in psyntax. 2008-06-28 03:16:21 -07:00
Abdulaziz Ghuloum 1cd581de70 fixed char encoding error message and condition as per bug 243662. 2008-06-28 02:49:50 -07:00
Abdulaziz Ghuloum 45346ef865 - Added cp0! including:
- (optimize-level [0,1,2])  and  ikarus -O[0,1,2]
       where -O0 = no optimizations
             -O1 = using old optimizer
             -O2 = using the new cp0 optimizer
       defaults to -O1 for now.
   - (cp0-size-limit n) which is the limit of the residual size for
     each inlining attempt
   - (cp0-effort-limit n) which is the limit on the effort expended 
     for each inlining attempt
- Rewrote the syntax-match macro to make use of the same technology
  used in syntax-case itself resulting in reduced code size.

- Added (system-value <symbol>) which returns the system value.
  E.g., (system-value 'car) => #<procedure car>
  This is pretty much the same as 
    (eval <symbol> (environment '(ikarus)))
  except that it does not involve compiling the expression or 
  consulting the library/expander systems.

- Fixed the fasl loader to make it understand complex numbers.
2008-06-28 02:25:44 -07:00
Abdulaziz Ghuloum 7d9ed176ac More work on cp0 which can now swallow the compiler but cannot yet
fold any primitives.
2008-06-22 22:10:05 -07:00
Abdulaziz Ghuloum 5a2501d4bb Added port-position and port-has-port-position? 2008-06-19 21:49:24 -07:00
Abdulaziz Ghuloum e65b39d95d All parameters that are bound to variables now have proper names.
E.g., pretty-width now prints as #<procedure pretty-width>.
2008-06-19 01:58:59 -07:00
Abdulaziz Ghuloum 4bb7e170b5 Some procedures (like console-output-port) did not get names when
printed (instead, they were just #<procedure>).  Names for
procedures that are defined like
  (define foo
    (let ([something ---]) 
      (lamdba () ---)))
now works.
2008-06-18 22:47:56 -07:00
Abdulaziz Ghuloum 1bd699349a Fixed a problem with port position accounting which was using fixnum
arithmetic instead of generic arithmetic.
2008-06-17 21:05:01 -07:00
Abdulaziz Ghuloum 333dc03f8f (waitpid -1 #f) now returns #f if no child has died yet. 2008-06-13 22:11:51 -07:00
Abdulaziz Ghuloum 8f0f0abbca Applied a patch supplied by Derick Eddington that provides enhanced
functionality for waitpid (nonblocking waitpid and more status info)
as well as the ability to send a signal to a process, e.g., 
  (kill pid 'HUP).
2008-06-13 05:43:17 -07:00
Abdulaziz Ghuloum 041f9fdafa Fixed a problem in code generator that was producing invalid memory
addressing for predicate operations.
2008-06-13 04:15:25 -07:00
Abdulaziz Ghuloum 3bddca30c4 allocation overflow check sequence is a little tighter now. 2008-06-10 23:01:22 -07:00
Abdulaziz Ghuloum 3ee75bece0 fixed incorrect handling of ".ddd" when reading from a port. 2008-06-10 18:38:06 -07:00
Abdulaziz Ghuloum 0939370a07 suppressing printing of file names during bootstrap. 2008-06-10 13:21:00 -07:00
Abdulaziz Ghuloum fe1f7077ff fixed minor bug in syntax-case where the wraps and marks of
top-marked wrapped syntax objects were incorrectly combined.
E.g., it used to be that:

  (syntax-case (datum->syntax #'foo #'(x y)) ()
    [(x y) 'shouldntmatch] [_ 'ok])

yields shouldntmatch; it's now ok.
2008-06-10 12:35:56 -07:00
Abdulaziz Ghuloum ef50e9f515 dropping input-port-byte-position from (ikarus)'s exports. 2008-06-09 01:36:27 -07:00
Abdulaziz Ghuloum c53ffd5314 fixed lookahead-char bug that I just made. 2008-06-08 15:53:42 -07:00
Abdulaziz Ghuloum 665ca784d1 Fixed a couple of typos in 2008-06-08 15:48:52 -07:00
Abdulaziz Ghuloum ee950fcaf2 Added test to exercise last bug fixed (refilling io read buffer
drops bytes already in the buffer).
2008-06-08 06:42:58 -07:00
Abdulaziz Ghuloum 432e1d9b87 replaced &i/o-write with &i/o-read for IO read errors. Duuh. 2008-06-08 06:25:22 -07:00
Abdulaziz Ghuloum a0c8346840 fixed bug in IO where the system was silently eating up any
remaining bytes while refilling a buffer.
2008-06-08 06:19:29 -07:00
Abdulaziz Ghuloum 1a5ab01e26 The bottom-most exception handler now only exits. 2008-06-07 08:32:00 -07:00
Abdulaziz Ghuloum 9438328f55 bytevector size for doing select has been fixed. It used to be 8
times larger than needed.
2008-06-06 08:22:45 -07:00
Abdulaziz Ghuloum df4b31af1f io-error and raise/strerr now include an &error condition. 2008-06-06 08:10:17 -07:00
Abdulaziz Ghuloum af5472bfb2 exporting fork 2008-06-06 07:52:40 -07:00
Abdulaziz Ghuloum 6741ac2817 better error message when a library file "" does not contain
the expected library name (foo).
2008-06-05 00:58:04 -07:00
Abdulaziz Ghuloum 9f7196d11a better contextual error messages for invalid numeric sequences. 2008-06-03 22:27:33 -07:00
Abdulaziz Ghuloum be37f629c5 the reader now understands some complex numbers. 2008-06-02 00:01:59 -07:00
Abdulaziz Ghuloum a492d318e1 - fixed minor bug in current-directory
- changed implementation of string->number.
2008-05-31 20:10:17 -07:00
Abdulaziz Ghuloum 53905b9eea Changes from Derick Eddington supporting file system info:
- Added file-regular?, file-directory?, file-symbolic-link?,
  directory-list, make-directory, delete-directory, change-mode, 
  and make-symbolic-link.

- Bug fix in ikrt_open_input_fd and ikrt_open_output_fd which
  considered a 0 FD as an error.

- Bug fix in ikrt_getcwd about len+1.

- Bug fix of &i/o-file-protection which didn't have &i/o-filename as
  its parent.

- There is a new src/ikarus-errno.c file.  

- Made tcp-connect and friends tell when they "failed to resolve
  host name or connect".

- To support the uses of &i/o-filename subtypes, I modified
  print-condition so it will cleanly print the parents' fields of a
2008-05-31 10:43:55 -07:00
Abdulaziz Ghuloum 6437aa98e0 - exp now understands complex numbers.
- expt of complex exponent is implemented in terms of exp.
2008-05-28 23:50:36 -07:00
Abdulaziz Ghuloum fec5dcd419 sqrt, log, and expt now understand complex numbers. 2008-05-28 22:21:08 -07:00
Abdulaziz Ghuloum b74e3976df allocation check was still incorrect when the ap+size overflows and
shows up to be less than the end of allocation pointer.
2008-05-25 15:32:22 -07:00
Abdulaziz Ghuloum 7f0f127081 Allocation overflow check was incorrectly using signed comparison
instead of an unsigned one.
2008-05-25 14:39:03 -07:00
Abdulaziz Ghuloum 467095677e +, -, *, and / now handle inexact complex numbers. 2008-05-25 10:37:41 -07:00
Abdulaziz Ghuloum ab2e05e8b0 Added inexact complex numbers. 2008-05-24 10:13:01 -07:00
Abdulaziz Ghuloum 8827b98972 fasl reader/writer now understands complex numbers. 2008-05-21 00:40:42 -07:00
Abdulaziz Ghuloum 0a6df79e3b ikarus.reader is now loadable separately. 2008-05-20 23:21:37 -07:00
Abdulaziz Ghuloum ebcc042ea1 = now handles complex numbers. 2008-05-18 22:33:49 -07:00
Abdulaziz Ghuloum 4cb8165181 +, -, *, / now handle complex numbers. 2008-05-18 21:41:53 -07:00
Abdulaziz Ghuloum 82140f87ba - Added complex numbers representation (exact complex only).
- Added make-rectangular.
- Added the ability to display complex numbers.
2008-05-18 20:39:41 -07:00
Abdulaziz Ghuloum da7cedfe64 Added bitwise-xor. 2008-05-18 03:21:05 -07:00
Abdulaziz Ghuloum de4276124b added bitwise-ior. 2008-05-18 02:27:55 -07:00
Abdulaziz Ghuloum 0cd61369b2 added some preliminary work for known-types. 2008-05-16 23:27:08 -07:00
Abdulaziz Ghuloum 71640d11bf Fixed a problem with forward references in the repl which used to
get a location different from the one assigned when the variable is
2008-05-15 06:40:07 -07:00
Abdulaziz Ghuloum 6511dd1002 Fixed a paren mismatch in "macro?" helper in printer. 2008-05-13 06:09:58 -07:00
Abdulaziz Ghuloum 5d3ab96c2c fixed "inaccurate error message" bug in map when applied a non-list
2008-05-12 02:39:28 -07:00
Abdulaziz Ghuloum 4133bd73d3 Added copyright notice to 2008-05-12 00:37:55 -07:00
Abdulaziz Ghuloum 4acf71d6d2 moved pretty-printing formats to their own library. 2008-05-12 00:35:19 -07:00
Abdulaziz Ghuloum f05f171f28 exported pretty-format, a parameter maker for setting the pretty
format for various forms.  The pretty format structure is not
documented yet and there is no error-checking mechanism for
verifying proper input.
2008-05-12 01:00:01 -04:00
Abdulaziz Ghuloum f8b0e949d9 - syntax-case now raises a syntax violation when _ appears in the
- syntax-rules points to the invalid literal when raising an
2008-05-10 19:05:40 -04:00
Abdulaziz Ghuloum 5c21f9995e source annotations for r6rs-script and r6rs-libraries are now in
chars instead of bytes.
2008-05-06 15:38:05 -04:00
Abdulaziz Ghuloum b5fc5624ec Fixed a bug in enum-set-universe not returning an enum type. 2008-05-05 23:53:48 -04:00
Abdulaziz Ghuloum 3bcc3249e5 Fixed another source of "annotations being revealed". This time,
it's a reader bug of not inserting enough annotations for reader
macro forms.
2008-05-05 03:52:08 -04:00
Abdulaziz Ghuloum c3b8e50b23 Fixed a minor exposure of annotation records. 2008-05-03 06:49:36 -04:00
Abdulaziz Ghuloum 3f9b567a5b with-syntax now gives more informative error messages:
> (with-syntax ([(x y) #'(a 1)] [(q) #'(a b c)]) 12)
Unhandled exception
 Condition components:
   1. &assertion
   2. &who: with-syntax
   3. &message: "pattern does not match value"
   4. &irritants: ((q) #<syntax (a b c)>)

instead of the previous behavior:

> (with-syntax ([(x y) #'(a 1)] [(q) #'(a b c)]) 12)
Unhandled exception
 Condition components:
    1. &message: "invalid syntax"
    2. &syntax:
        form: ((a 1) (a b c))
        subform: #f
2008-05-03 06:23:35 -04:00
Abdulaziz Ghuloum 373edfc969 Fixes typos in (rnrs enumeration) error messages. 2008-05-03 04:25:58 -04:00
Abdulaziz Ghuloum 5f92e4b96d Added current-directory parameter that gets/sets cwd. 2008-05-03 02:39:49 -04:00
Abdulaziz Ghuloum 7e5d053fb2 Fixed a bug causing syntax-error traces to print as
#[annotation ---]
instead of
  #<syntax --- [position ---]>
2008-05-02 14:34:03 -04:00
Abdulaziz Ghuloum d87ced74d1 cleaned up some stale primitive names. 2008-05-01 18:13:11 -04:00
Abdulaziz Ghuloum db70f9751f Made all unimplemented procedures raise errors when called. 2008-05-01 17:52:52 -04:00
Abdulaziz Ghuloum b56b0fbd85 fixed a problem causing free-id=? to intern unbound identifiers
into the interaction environment.
2008-05-01 15:04:43 -04:00
Abdulaziz Ghuloum d49aed209a Added (interaction-environment). 2008-05-01 06:02:36 -04:00
Abdulaziz Ghuloum e7386cd7d7 Major changes to the interactive repl:
- We can now redefine imported identifiers.
- We can now use let-syntax, letrec-syntax, and modules at

Hand-wavey Repl Semantics:
- Imported identifiers mean what they meant previously.  In
  particular, you cannot set! imported identifiers.
- An imported identifier may be redefined using define.  Once
  something is defined at the top-level, a specific location for it
  is created, and all definitions, references, and set!s to that
  variable go through the top-level location.
- Re-importing an identifier shadows the top-level location.
- Redefining re-exposes the top-level location.
- and do on.
- A reference to an unbound variable also fabricates a top-level
  location for that variable.

Let's see how this goes.
2008-05-01 04:21:07 -04:00
Abdulaziz Ghuloum 1389f239fe Added process-nonblocking which is like process but returns
nonblocking ports.
2008-04-30 22:55:59 -04:00
Abdulaziz Ghuloum f69e82e6c5 Added with-output-to-port:
> (let-values ([(p e) (open-string-output-port)])
    (with-output-to-port p (lambda () (printf "Hello\n")))
2008-04-29 00:20:29 -04:00
Abdulaziz Ghuloum d8cd4f0acf Added engine-handler parameter and a ($swap-engine-counter! <neg-fx>)
to (ikarus system $interrupts).
2008-04-29 00:10:49 -04:00
Abdulaziz Ghuloum 478719cf32 Fixed names of procedures <, <=, =, >, >=. They used to be
printed as #<procedure f>.
2008-04-28 16:52:44 -04:00
Abdulaziz Ghuloum b97b568e36 Reader now explicitly checks for valid unicode range when reading
#\xHHHH  "\xHHHH;" and foo\xHHHH;bar sequences.
2008-04-28 15:01:45 -04:00
Abdulaziz Ghuloum 89def78c3c Fixed the definition of identifier? and id? in expander so that only
top-make-wrapped (possibly annotated) symbols are identifiers.  It
used to be that symbols were considered identifiers by the previous
2008-04-28 14:01:49 -04:00
Abdulaziz Ghuloum 3ce6d037e4 Fixed a bug in module imports where some marks were missing in action.
(Note from Kent, extracted from chez scheme release notes, follows)

This always worked:

(let ()
  (define-syntax from
    (syntax-rules ()
      [(_ m v) (let () (import m) v)]))
  (module a (x) (define x 'x-of-a))
  (from a x))

Didn't work before this change:

(let ()
  (define-syntax x-from-a
    (syntax-rules ()
      [(_) (let () (import a) x)]))
  (module a (x) (define x 'x-of-a))
2008-04-19 17:55:30 -04:00
Abdulaziz Ghuloum 66d085713f Made interrupted conditions &serious so that you can interrupt R6RS
2008-04-19 16:55:40 -04:00
Abdulaziz Ghuloum 177f6b84a7 Fixed a reader bug that causes '#!eof not to read properly.
Used to be:
> '#!eof
Unhandled exception
 Condition components:
  1. &lexical
  2. &message: "invalid eof after quote read macro"
  3. &lexical-position:
      file-name: *stdin*
      character: 7

> '#!eof
2008-04-14 22:18:56 -04:00
Abdulaziz Ghuloum 139ff2f33c First complete (but broken) build of ikarus in 64-bit. 2008-04-14 22:02:03 -04:00
Abdulaziz Ghuloum d02e9fe035 Passing 709 tests in 64-bit mode 2008-04-12 15:06:55 -04:00
Abdulaziz Ghuloum df0aa2de1f Added input-socket-buffer-size and output-socket-buffer-size
2008-04-11 14:02:43 -04:00
Abdulaziz Ghuloum bdd81e2b05 accept and accept-nonblocking now set the port-id to a string
representing the incoming address like "nnn.nnn.nnn.nnn:pppp"
2008-04-11 07:01:27 -04:00
Abdulaziz Ghuloum 25344fa1d0 Added nanosleep as per bug 210678. 2008-04-11 05:36:54 -04:00
Abdulaziz Ghuloum 191a82e007 Passing 685 tests in 64bit including handling of some foreign calls. 2008-04-09 07:04:02 -04:00
Abdulaziz Ghuloum 866b2b1c17 Now passing 682 tests in 64-bit mode. 2008-04-09 05:34:36 -04:00
Abdulaziz Ghuloum f63f85e1cc 570 tests in 64-bit mode 2008-04-09 03:05:19 -04:00
Abdulaziz Ghuloum aa44ce2733 Passing 548 tests in 64-bit mode. 2008-04-08 03:57:13 -04:00
Abdulaziz Ghuloum 5eaa2ff469 fixed a couple of bugs in 64bit assembler. 2008-04-08 02:22:26 -04:00
Abdulaziz Ghuloum 6bdb38ca16 fixed bug in ($make-vector 0) 2008-04-07 12:32:55 -04:00
Abdulaziz Ghuloum 42e3d53d00 I CAN HAZ CONS in 64BIT! 2008-04-07 10:20:05 -04:00
Abdulaziz Ghuloum bf6138f86f - Added reset-output-port! which sets the write index to 0 and
unregisters any callbacks associated with the buffer.
- commented out the call for unblocking the stdin for now
  (for reason yet unknown to me, it causes stdout to be unblocked
   as well, making writes to the console to come out in bizarre 
   mixed order)
2008-04-06 10:57:56 -04:00
Abdulaziz Ghuloum afd7592ae1 Added &i/o-read, &i/o-write, and &i/o conditions to read/write
2008-04-05 05:15:30 -04:00
Abdulaziz Ghuloum 8d8f6d39f7 Fixing bug 210744: Interrupts and IO callbacks not interacting
2008-04-02 20:28:45 -04:00
Abdulaziz Ghuloum 30bc1b7be9 apply error now shows the procedure before the number of args. 2008-03-25 22:15:10 -04:00
Abdulaziz Ghuloum 398ff23992 Fixes bug 206847: default exception handler expected to return for
non-&serious conditions
2008-03-25 21:38:11 -04:00
Abdulaziz Ghuloum c01f3049e4 Fixes bug 206842: syntax tracing not working by default when
syntax-case fenders fail
2008-03-25 21:23:23 -04:00
Abdulaziz Ghuloum c2e20a3a68 Fixes bug 206839: map not failing with invalid arguments 2008-03-25 21:03:26 -04:00
Abdulaziz Ghuloum 48f7c88e2d made time macro not depend on format. 2008-03-24 21:50:37 -04:00
Abdulaziz Ghuloum 81c17da20b Fixes bug 190373: `time' macro's "running stats for" can be misleading 2008-03-24 21:45:36 -04:00
Abdulaziz Ghuloum 3c3fec3908 Fixed problem shutting down servers on cygwin. 2008-03-24 13:25:59 -04:00
Abdulaziz Ghuloum 12a3f7e19b Fixes bug 205988: sockaddr_in not recognized on cygwin. 2008-03-24 13:18:39 -04:00
Abdulaziz Ghuloum fc92ec8e9f Fixes bug 205437: socket errors not being reported 2008-03-24 00:01:22 -04:00
Abdulaziz Ghuloum 884f3fe921 Added tcp-server-socket-nonblocking, tcp-accept-connection-nonblocking
and register-callback for handling nonblocking servers and connections.
2008-03-23 05:02:12 -04:00
Abdulaziz Ghuloum 0f55361b19 Fixes bug 205427 in letrec*. 2008-03-23 04:14:53 -04:00
Abdulaziz Ghuloum 2119f44125 Added a simple tcp server facility. See lab/ 2008-03-23 03:44:20 -04:00
Abdulaziz Ghuloum 9aaf306f16 Nonblocking sockets no longer raise a continuable exception when a
read or write operation would block.  Instead, they are schedules
with an event handler that `selects' on the pending file descriptors
and dispatches the appropriate callback.
2008-03-23 02:14:00 -04:00
Abdulaziz Ghuloum 6e599c4c72 refactored nonblocking code in ikarus-io.c and 2008-03-23 00:41:49 -04:00
Abdulaziz Ghuloum ec69dc4a7c Added more tests for div0 and mod0. 2008-03-22 21:25:42 -04:00
Abdulaziz Ghuloum 48a86cbaa3 Fixed bug in (mod 3 5/6). 2008-03-22 21:23:51 -04:00
Abdulaziz Ghuloum ce496aebaf * Better error message when a tcp connection is refused.
* implemented udp connections (not working yet).
2008-03-22 19:29:41 -04:00
Abdulaziz Ghuloum 85d09cbc1c fxarithmetic-shift-left now detects overflows properly. 2008-03-18 00:49:24 -04:00
Abdulaziz Ghuloum 97507bce08 Fixes bug in reader now recognizing the following comment:
> #|| hello ||# '12
2008-03-15 21:12:43 -04:00
Abdulaziz Ghuloum 50888bef94 Fixes issues/warnings in bug 193327. 2008-03-15 21:06:47 -04:00
Abdulaziz Ghuloum d35566081b import now recognizes and ignore ``for'' spec. 2008-03-15 21:00:16 -04:00
Abdulaziz Ghuloum a3f6e3e039 Cut down bootstrap time by 10% by caching the values of scheme-stx.
Macroexpansion time is reduced by 25%.
2008-03-12 18:12:57 -04:00
Abdulaziz Ghuloum 1943212436 - Added tests for fasl objects
- fasl-read can now read bignums, flonums, and ratnums.
2008-03-09 00:25:03 -05:00
Abdulaziz Ghuloum 8f0b606609 sin, cos, tan, asin, acos, and atan now support rational numbers. 2008-03-03 13:49:47 -05:00
Abdulaziz Ghuloum 5210f1448b Fixed part of bug 162334. Reason: (inexact -1/2) lost the sign and
returned 0.5.  It now correctly return -0.5.
2008-03-01 21:54:27 -05:00
Abdulaziz Ghuloum f6ee3618ba (+ 1/2), (+ 0.5), (* 1/2) and (* 0.5) used to raise "not a number" errors. 2008-03-01 21:48:42 -05:00
Abdulaziz Ghuloum db54cd0074 Fixes bug 191116: rationalize broken 2008-03-01 21:45:48 -05:00
Abdulaziz Ghuloum 755843e251 196894: --compile-dependencies misnamed in error message 2008-03-01 21:14:35 -05:00
Abdulaziz Ghuloum ed9f85ea7c Fixes bug 194232: fasl-write error message wrong about textual
output ports
2008-02-26 04:07:33 -05:00
Abdulaziz Ghuloum e36b0029f6 Fixes bug 194259. R6RS records can now be written and read back
through fasl-write and fasl-read.
2008-02-26 03:53:00 -05:00
Abdulaziz Ghuloum c8f9b1dc3d Added fluid-let-syntax.
for details.
2008-02-25 02:15:51 -05:00
Abdulaziz Ghuloum 7a9526ec91 removed a macos-specific dependencies in ikrt_file_ctime procedure. 2008-02-19 03:28:40 -05:00
Abdulaziz Ghuloum 523fa2e588 minor fixes to warning messages. 2008-02-19 00:15:18 -05:00
Abdulaziz Ghuloum 81f6c50341 fixed struct initialization problem in fasl-read. 2008-02-18 23:37:01 -05:00
Abdulaziz Ghuloum 259d43ca37 Changed fasl extension from ".ikfasl" to ".ikarus-fasl" 2008-02-18 23:29:49 -05:00
Abdulaziz Ghuloum 405c7dc9e2 fixed a missing put-mark call in fasl-read. 2008-02-18 23:26:54 -05:00
Abdulaziz Ghuloum f45a74c115 removed the file because it was not needed. 2008-02-18 22:07:58 -05:00