1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-05-19 19:20:23 +02:00

Got the VM up and running! Augmented the documentation.

* src/*.[ch]:  Replaced the remaining `SCM_MAKINUM', and changed `SCM_VELTS'
  into `scm_vector_elements ()'.
* src/vm_loader.c (link):  Fixed so that it pushed a variable object on
  the stack.
* src/vm_system.c (variable-ref):  Fixed so that it uses `scm_variable_ref ()'
  and friends.
* module/system/vm/assemble.scm (dump-object!):  Fixed the string case.
* src/vm_engine.h (CONS):  Use `scm_cons' instead of `SCM_NEWCELL'.
* doc/guile-vm.texi:  Added actual instruction definitions, explanations of
  the program invocation mechanism, programs' object tables, etc., in the
  `Instruction Set' chapter.

git-archimport-id: lcourtes@laas.fr--2004-libre/guile-vm--revival--0.6--patch-5
This commit is contained in:
Ludovic Court`es 2005-04-28 15:45:59 +00:00 committed by Ludovic Courtès
parent fa19602c28
commit 238e7a11a8
8 changed files with 213 additions and 40 deletions

View file

@ -130,10 +130,20 @@
vp->fp = fp; \
}
#define CACHE_PROGRAM() \
{ \
bp = SCM_PROGRAM_DATA (program); \
objects = SCM_VELTS (bp->objs); \
/* Get a local copy of the program's "object table" (i.e. the vector of
external bindings that are referenced by the program), initialized by
`load-program'. */
#define CACHE_PROGRAM() \
{ \
size_t _vsize; \
ssize_t _vincr; \
scm_t_array_handle _vhandle; \
\
bp = SCM_PROGRAM_DATA (program); \
/* Was: objects = SCM_VELTS (bp->objs); */ \
objects = scm_vector_elements (bp->objs, &_vhandle, \
&_vsize, &_vincr); \
scm_array_handle_release (&_vhandle); \
}
#define SYNC_BEFORE_GC() \
@ -208,12 +218,8 @@
#define CONS(x,y,z) \
{ \
SCM cell; \
SYNC_BEFORE_GC (); \
SCM_NEWCELL (cell); \
SCM_SET_CELL_OBJECT_0 (cell, y); \
SCM_SET_CELL_OBJECT_1 (cell, z); \
x = cell; \
x = scm_cons (y, z); \
}
#define POP_LIST(n) \