Commit Graph

186 Commits

Author SHA1 Message Date
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
  ikarus.
2008-10-12 01:15:20 -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 89d9a472a5 "darwin" is no longer hardcoded in lib/ypsilon-compat.ikarus.ss,
instead, it is obtained from the target info that autoconf
generates.
2008-09-24 23:18:35 -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"))
   10)
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 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 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) 
      (export)
      (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 afc9bff07f - added experimental pointer manipulation primitives. 2008-09-06 06:01:39 -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 fdca9ed33f command line arguments are now interpreted as utf8 strings. 2008-08-10 11:33:10 -07:00
Abdulaziz Ghuloum c5930ac113 exported enum-set?. 2008-08-08 08:29:18 -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 959082d12d assert now gives source information when available. 2008-07-29 11:04:52 -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 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 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 c3b12a22e8 the repl now resets on receiving &interrupted conditions. 2008-07-12 20:05:45 -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 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
  be:
    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 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 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 0939370a07 suppressing printing of file names during bootstrap. 2008-06-10 13:21:00 -07:00
Abdulaziz Ghuloum ef50e9f515 dropping input-port-byte-position from (ikarus)'s exports. 2008-06-09 01:36:27 -07:00
Abdulaziz Ghuloum af5472bfb2 exporting fork 2008-06-06 07:52:40 -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
  condition;
2008-05-31 10:43:55 -07:00
Abdulaziz Ghuloum ab2e05e8b0 Added inexact complex numbers. 2008-05-24 10:13:01 -07:00
Abdulaziz Ghuloum 0a6df79e3b ikarus.reader is now loadable separately. 2008-05-20 23:21:37 -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 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 5f92e4b96d Added current-directory parameter that gets/sets cwd. 2008-05-03 02:39:49 -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 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
  top-level.

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")))
    (e))
"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 df0aa2de1f Added input-socket-buffer-size and output-socket-buffer-size
parameters.
2008-04-11 14:02:43 -04:00
Abdulaziz Ghuloum 25344fa1d0 Added nanosleep as per bug 210678. 2008-04-11 05:36:54 -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 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