diff options
author | Andy Wingo <wingo@pobox.com> | 2009-07-19 15:35:33 +0200 |
---|---|---|
committer | Andy Wingo <wingo@pobox.com> | 2010-01-07 22:06:56 +0100 |
commit | a2689737679cf2553c118a1d96de7c9ddfec62b0 (patch) | |
tree | 527a55fa0ed77eae66e282f8b87cf7b836edb9e8 /libguile/objcodes.h | |
parent | 3dc2afe2b85eb5c7ec784b6ed8b19242e45f6e34 (diff) | |
download | guile-a2689737679cf2553c118a1d96de7c9ddfec62b0.tar.gz |
reimplement srfi-4 vectors on top of bytevectors
* libguile/srfi-4.h:
* libguile/srfi-4.c (scm_make_srfi_4_vector): New function, exported by
(srfi srfi-4 gnu).
* libguile/srfi-4.i.c: Removed.
* module/srfi/srfi-4.scm:
* module/srfi/srfi-4/gnu.scm: Reimplement srfi-4 vectors on top of
bytevectors. The implementation is mostly in Scheme now.
* test-suite/tests/unif.test: Update to use (srfi srfi-4 gnu).
* libguile/bytevectors.c (bytevector_ref_c32, bytevector_ref_c64)
(bytevector_set_c32, bytevector_set_c64): Fix some embarrassing bugs.
Still need to do an upper bounds check.
* libguile/deprecated.h: Remove deprecated array functions:
scm_i_arrayp, scm_i_array_ndim, scm_i_array_mem, scm_i_array_v,
scm_i_array_base, scm_i_array_dims, and the deprecated macros:
SCM_ARRAYP, SCM_ARRAY_NDIM, SCM_ARRAY_CONTP, SCM_ARRAY_MEM,
SCM_ARRAY_V, SCM_ARRAY_BASE, SCM_ARRAY_DIMS.
* libguile/deprecated.c (scm_uniform_vector_read_x)
(scm_uniform_vector_write, scm_uniform_array_read_x)
(scm_uniform_array_write): Newly deprecated functions.
* libguile/generalized-arrays.c (scm_array_type): Remove the bytevector
hack.
* libguile/objcodes.c (scm_bytecode_to_objcode, scm_objcode_to_bytecode):
Rework to operate on bytevectors, as scm_make_u8vector now causes a
module lookup, which can't be done e.g. when loading the VM boot
program for psyntax-pp.go on a fresh bootstrap.
* libguile/objcodes.h (SCM_F_OBJCODE_IS_BYTEVECTOR):
(SCM_OBJCODE_IS_BYTEVECTOR): s/U8VECTOR/BYTEVECTOR/.
* module/ice-9/boot-9.scm (the-scm-module): A terrible hack to pull in
(srfi srfi-4), as the bindings are primarily there now. We'll worry
about this later.
Diffstat (limited to 'libguile/objcodes.h')
-rw-r--r-- | libguile/objcodes.h | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/libguile/objcodes.h b/libguile/objcodes.h index 4627cfb89..f28f713e0 100644 --- a/libguile/objcodes.h +++ b/libguile/objcodes.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2001, 2009 Free Software Foundation, Inc. +/* Copyright (C) 2001, 2009, 2010 Free Software Foundation, Inc. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public License @@ -35,9 +35,9 @@ struct scm_objcode #define SCM_C_OBJCODE_BASE(obj) \ ((scm_t_uint8 *)(obj) + sizeof (struct scm_objcode)) -#define SCM_F_OBJCODE_IS_MMAP (1<<0) -#define SCM_F_OBJCODE_IS_U8VECTOR (1<<1) -#define SCM_F_OBJCODE_IS_SLICE (1<<2) +#define SCM_F_OBJCODE_IS_MMAP (1<<0) +#define SCM_F_OBJCODE_IS_BYTEVECTOR (1<<1) +#define SCM_F_OBJCODE_IS_SLICE (1<<2) SCM_API scm_t_bits scm_tc16_objcode; @@ -51,7 +51,7 @@ SCM_API scm_t_bits scm_tc16_objcode; #define SCM_OBJCODE_BASE(x) (SCM_C_OBJCODE_BASE (SCM_OBJCODE_DATA (x))) #define SCM_OBJCODE_IS_MMAP(x) (SCM_SMOB_FLAGS (x) & SCM_F_OBJCODE_IS_MMAP) -#define SCM_OBJCODE_IS_U8VECTOR(x) (SCM_SMOB_FLAGS (x) & SCM_F_OBJCODE_IS_U8VECTOR) +#define SCM_OBJCODE_IS_BYTEVECTOR(x) (SCM_SMOB_FLAGS (x) & SCM_F_OBJCODE_IS_BYTEVECTOR) #define SCM_OBJCODE_IS_SLICE(x) (SCM_SMOB_FLAGS (x) & SCM_F_OBJCODE_IS_SLICE) SCM scm_c_make_objcode_slice (SCM parent, const scm_t_uint8 *ptr); |