3 |
#ifndef SCM___SCM_H |
#ifndef SCM___SCM_H |
4 |
#define SCM___SCM_H |
#define SCM___SCM_H |
5 |
|
|
6 |
/* Copyright (C) 1995,1996,1998,1999,2000,2001,2002, 2003 Free Software Foundation, Inc. |
/* Copyright (C) 1995,1996,1998,1999,2000,2001,2002,2003 Free Software Foundation, Inc. |
7 |
* |
* |
8 |
* This program is free software; you can redistribute it and/or modify |
* This program is free software; you can redistribute it and/or modify |
9 |
* it under the terms of the GNU General Public License as published by |
* it under the terms of the GNU General Public License as published by |
306 |
* |
* |
307 |
* Guile as of today can only work on systems which fulfill at least the |
* Guile as of today can only work on systems which fulfill at least the |
308 |
* following requirements: |
* following requirements: |
309 |
* - long ints have at least 32 bits. |
* |
310 |
|
* - scm_t_bits and SCM variables have at least 32 bits. |
311 |
* Guile's type system is based on this assumption. |
* Guile's type system is based on this assumption. |
312 |
* - long ints consist of at least four characters. |
* |
313 |
* It is assumed that cells, i. e. pairs of long ints, are eight character |
* - sizeof (scm_t_bits) >= sizeof (void*) and sizeof (SCM) >= sizeof (void*) |
314 |
* aligned, because three bits of a cell pointer are used for type data. |
* Guile's type system is based on this assumption, since it must be |
315 |
* - sizeof (void*) == sizeof (long int) |
* possible to store pointers to cells on the heap in scm_t_bits and SCM |
316 |
* Pointers are stored in SCM objects, and sometimes SCM objects are passed |
* variables. |
317 |
* as void*. Thus, there has to be a one-to-one correspondence. |
* |
318 |
|
* - sizeof (scm_t_bits) >= 4 and sizeof (scm_t_bits) is a power of 2. |
319 |
|
* Guile's type system is based on this assumption. In particular, it is |
320 |
|
* assumed that cells, i. e. pairs of scm_t_bits variables, are eight |
321 |
|
* character aligned. This is because three bits of a scm_t_bits variable |
322 |
|
* that is holding a pointer to a cell on the heap must be available for |
323 |
|
* storing type data. |
324 |
|
* |
325 |
|
* - sizeof (scm_t_bits) <= sizeof (void*) and sizeof (SCM) <= sizeof (void*) |
326 |
|
* In some parts of guile, scm_t_bits and SCM variables are passed to |
327 |
|
* functions as void* arguments. Together with the requirement above, this |
328 |
|
* requires a one-to-one correspondence between the size of a void* and the |
329 |
|
* sizes of scm_t_bits and SCM variables. |
330 |
|
* |
331 |
* - numbers are encoded using two's complement. |
* - numbers are encoded using two's complement. |
332 |
* The implementation of the bitwise scheme level operations is based on |
* The implementation of the bitwise scheme level operations is based on |
333 |
* this assumption. |
* this assumption. |
334 |
|
* |
335 |
* - ... add more |
* - ... add more |
336 |
*/ |
*/ |
337 |
|
|