[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Guile-commits] GNU Guile branch, wip-ffi, created. release_1-9-7-23-gc6
From: |
Andy Wingo |
Subject: |
[Guile-commits] GNU Guile branch, wip-ffi, created. release_1-9-7-23-gc612ed5 |
Date: |
Tue, 26 Jan 2010 21:56:36 +0000 |
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU Guile".
http://git.savannah.gnu.org/cgit/guile.git/commit/?id=c612ed59ab3ba92a0b778d30f21c493341160df2
The branch, wip-ffi has been created
at c612ed59ab3ba92a0b778d30f21c493341160df2 (commit)
- Log -----------------------------------------------------------------
commit c612ed59ab3ba92a0b778d30f21c493341160df2
Author: Andy Wingo <address@hidden>
Date: Tue Jan 26 22:55:58 2010 +0100
add a test for foreign functions taking struct args
* test-suite/standalone/test-ffi (f-sum-struct):
* test-suite/standalone/test-ffi-lib.c (test_ffi_sum_struct): Add a
struct test. Wheee....
commit 75383ddbd77d5981e5ab4ac72818b96d391c9e22
Author: Andy Wingo <address@hidden>
Date: Tue Jan 26 22:55:13 2010 +0100
turn asserts into exceptions in foreign.c
* libguile/foreign.c (scm_foreign_ref, scm_foreign_set_x)
(scm_i_foreign_print, fill_ffi_type, cif_to_procedure, unpack): Turn a
number of asserts into proper errors.
commit 70ea39f70f54e82fc38204ac5f7768505cc37dff
Author: Andy Wingo <address@hidden>
Date: Tue Jan 26 22:18:42 2010 +0100
add make-c-struct, parse-c-struct
* module/system/foreign.scm: Export alignof and sizeof.
(make-c-struct, parse-c-struct): New public functions.
commit 9a396cbdbea984f8265e760f64414e8e712e49ab
Author: Andy Wingo <address@hidden>
Date: Tue Jan 26 22:16:35 2010 +0100
add `alignof' and `sizeof' Scheme functions
* libguile/foreign.h:
* libguile/foreign.c (scm_alignof, scm_sizeof): New functions.
commit 37371ea1ba160e2eb61fb3415024ef8e79b2e502
Author: Andy Wingo <address@hidden>
Date: Mon Jan 25 23:45:15 2010 +0100
add ffi tests
* test-suite/standalone/Makefile.am:
* test-suite/standalone/test-ffi:
* test-suite/standalone/test-ffi-lib.c: Add some tests for the ffi.
commit 4d9130a5b733e844e42f27f209e148fa64f731be
Author: Andy Wingo <address@hidden>
Date: Mon Jan 25 18:04:45 2010 +0100
implement foreign-call
* libguile/foreign.h:
* libguile/foreign.c (scm_i_foreign_call): New internal function,
actually implementing foreign calls. Untested.
* libguile/vm-i-system.c (foreign-call): Wire up the call to
scm_i_foreign_call.
commit d8b04f04e90882f3903092ea85038a9e3cd10d39
Author: Andy Wingo <address@hidden>
Date: Mon Jan 25 18:15:35 2010 +0100
first pass at implementing low-level foreign functions
* libguile/Makefile.am (AM_CPPFLAGS): Move LIBFFI_CFLAGS here (from
AM_CFLAGS), allowing snarfing to work.
* libguile/foreign.h (scm_make_foreign_function): New public function.
* libguile/foreign.c: Flesh out an implementation of foreign functions.
(scm_take_foreign_pointer): Bugfix for the case in which we have a
finalizer.
* module/system/foreign.scm: Export `make-foreign-function'.
commit 827dc8dcb61dcbdd62ad1ae41b98d65ecd8d5b66
Author: Andy Wingo <address@hidden>
Date: Sun Jan 24 18:59:19 2010 -0600
renumber VM opcodes
* libguile/vm-i-loader.c:
* libguile/vm-i-scheme.c:
* libguile/vm-i-system.c: Renumber ops. Add a foreign-call op stub.
Rearrange some ops.
* libguile/_scm.h (SCM_OBJCODE_MINOR_VERSION): Bump
commit 20aafae22a4f11289b65dba685495a808ebd6b07
Author: Andy Wingo <address@hidden>
Date: Mon Jan 18 14:36:23 2010 +0100
byte access to foreigns via bytevectors
* libguile/foreign.h:
* libguile/foreign.c (scm_foreign_ref, scm_foreign_set_x): Remove all
bits about offsets and aliasing; bytevectors are much better at that.
(scm_foreign_to_bytevector, scm_bytevector_to_foreign): New functions
for getting at the bytes of a memory region.
* module/system/foreign.scm (foreign->bytevector, bytevector->foreign):
Export these.
commit ab4779ffcfb463201d46459e06b9188dd5f1cbda
Author: Andy Wingo <address@hidden>
Date: Mon Jan 18 12:16:13 2010 +0100
move foreign function interface to its own module
* libguile/foreign.h:
* libguile/init.c: Change so that init just registers an extension,
later called by foreign.scm.
* libguile/foreign.c (scm_init_foreign): Define constants for the
various foreign types.
* module/Makefile.am:
* module/system/foreign.scm: New module, for the foreign function
interface.
commit 52fd9639fdeee068434342e1bdb8693b05ecac5c
Author: Andy Wingo <address@hidden>
Date: Mon Jan 18 11:42:35 2010 +0100
foreign.h presents a more pointer-centric interface
* libguile/foreign.c:
* libguile/foreign.h: Rework interface to be more pointer-centric.
Details are:
(SCM_FOREIGN_TYPE_STRUCT, SCM_FOREIGN_TYPE_POINTER): Removed; now the
pointer in a foreign is first-class. If it points to a native type
like uint32, then it still has a tag; but if it points to something
else, like a struct or a pointer or something, then its type is VOID
(i.e., void*).
(SCM_FOREIGN_POINTER): Rename from SCM_FOREIGN_OBJECT.
(SCM_FOREIGN_VALUE_REF, SCM_FOREIGN_VALUE_SET): Rename from
SCM_FOREIGN_OBJECT_REF and SCM_FOREIGN_OBJECT_SET, to indicate that
they only work with value types.
(SCM_FOREIGN_HAS_FINALIZER): Reserve a bit to indicate if the foreign
pointer in question has a finalizer registered.
(SCM_FOREIGN_LEN): For void* pointers, optionally store the length in
bytes of the associated memory region.
(SCM_FOREIGN_VALUE_P): Rename from SCM_FOREIGN_SIMPLE_P.
(SCM_VALIDATE_FOREIGN_VALUE): Rename from SCM_VALIDATE_FOREIGN_SIMPLE.
(scm_take_foreign_pointer): Rename from scm_c_take_foreign. Remove
scm_c_from_foreign.
(scm_foreign_type): New accessor.
(scm_foreign_ref, scm_foreign_set_x): Take some optional args, used
when dereferencing void pointers.
* libguile/dynl.h:
* libguile/dynl.c (scm_dynamic_pointer): New function, used by
scm_dynamic_func. Adapt code to foreign.h changes.
* libguile/goops.c (scm_enable_primitive_generic_x)
(scm_set_primitive_generic_x): Use the SCM_SET_SUBR_GENERIC macro.
* libguile/gsubr.c (create_gsubr): Adapt to API change.
* libguile/gsubr.h (SCM_SUBRF, SCM_SUBR_GENERIC): Store the pointer
directly, not indirected.
* libguile/snarf.h (SCM_DEFINE, SCM_IMMUTABLE_FOREIGN): Store subr
pointers directly. Adapt to SCM_FOREIGN_TYPE_VOID change.
* libguile/vm-i-system.c (subr-call): Access the void* directly.
commit 75c242a256c273ab0690397df4277d44f01946e6
Author: Andy Wingo <address@hidden>
Date: Fri Jan 15 22:55:11 2010 +0100
add libffi dependency
* configure.ac:
* libguile/Makefile.am (AM_CFLAGS, libguile_la_LDFLAGS): Add a libffi
dependency, for making a dynamic FFI.
-----------------------------------------------------------------------
hooks/post-receive
--
GNU Guile
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Guile-commits] GNU Guile branch, wip-ffi, created. release_1-9-7-23-gc612ed5,
Andy Wingo <=