1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-05-18 18:40:22 +02:00

Translation from Scheme to GHIL, and compilation to GLIL work.

* src/*.c:  Removed calls to `scm_must_malloc', `SCM_MUST_MALLOC' and
  `scm_must_free'.  Same for `SCM_INUMP', `SCM_INUM', `SCM_STRING_CHARS',
  and the likes.
* module/system/base/syntax.scm:  Do not import `(ice-9 match)' and do
  not re-export `match', do not export `syntax-error' which was not
  defined here.
* module/system/base/compile.scm (call-with-compile-error-catch):  Use
  the `catch' form instead of `try'.
* src/instructions.c:  Use `scm_from_char ()' instead of the deprecated
  macro `SCM_MAKINUM ()'.
* src/instructions.h (scm_instruction):  Made `npop' a signed char.

git-archimport-id: lcourtes@laas.fr--2004-libre/guile-vm--revival--0.6--patch-2
This commit is contained in:
Ludovic Court`es 2005-04-22 16:00:33 +00:00 committed by Ludovic Courtès
parent f9e8c09d42
commit d8eeb67c89
12 changed files with 111 additions and 79 deletions

View file

@ -53,7 +53,8 @@ SCM
scm_c_make_program (void *addr, size_t size, SCM holder)
#define FUNC_NAME "scm_c_make_program"
{
struct scm_program *p = SCM_MUST_MALLOC (sizeof (struct scm_program));
struct scm_program *p = scm_gc_malloc (sizeof (struct scm_program),
"program");
p->size = size;
p->nargs = 0;
p->nrest = 0;
@ -66,7 +67,7 @@ scm_c_make_program (void *addr, size_t size, SCM holder)
/* If nobody holds bytecode's address, then allocate a new memory */
if (SCM_FALSEP (holder))
p->base = SCM_MUST_MALLOC (size);
p->base = scm_gc_malloc (size, "program-base");
else
p->base = addr;
@ -98,13 +99,13 @@ program_free (SCM obj)
{
struct scm_program *p = SCM_PROGRAM_DATA (obj);
scm_sizet size = (sizeof (struct scm_program));
if (SCM_FALSEP (p->holder))
{
size += p->size;
scm_must_free (p->base);
}
scm_must_free (p);
return size;
scm_gc_free (p->base, p->size, "program-base");
scm_gc_free (p, size, "program");
return 0;
}
static SCM