mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-05-19 19:20:23 +02:00
Started documenting the compiler.
* doc/guile-vm.texi: Documented the compiler (node `The Compiler'). Removed a number of things that might have been relevant to Guile-VM 0.0. * module/system/il/compile.scm (optimize): Commented out the case using `<ghil-inst?>'. * src/vm_engine.c (vm_run)[objects_handle]: New variable. Before leaving the function, release OBJECTS_HANDLE. * src/vm_engine.h (CACHE_PROGRAM): Use `scm_vector_writable_elements' instead of `scm_vector_elements'; don't release the handle right away. * src/vm_loader.c (load-program): New commented out piece of code dealing with simple vectors. * src/vm_system.c (object-ref): Added the type of OBJNUM. git-archimport-id: lcourtes@laas.fr--2005-mobile/guile-vm--mobile--0.6--patch-3
This commit is contained in:
parent
0b5f0e49a8
commit
a52b2d3d55
6 changed files with 251 additions and 161 deletions
|
@ -134,16 +134,20 @@
|
|||
/* 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() \
|
||||
{ \
|
||||
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, \
|
||||
&object_count, &_vincr); \
|
||||
scm_array_handle_release (&_vhandle); \
|
||||
/* XXX: We could instead use the "simple vector macros", thus not having to
|
||||
call `scm_vector_writable_elements ()' and the likes. */
|
||||
#define CACHE_PROGRAM() \
|
||||
{ \
|
||||
ssize_t _vincr; \
|
||||
\
|
||||
bp = SCM_PROGRAM_DATA (program); \
|
||||
/* Was: objects = SCM_VELTS (bp->objs); */ \
|
||||
\
|
||||
if (objects) \
|
||||
scm_array_handle_release (&objects_handle); \
|
||||
\
|
||||
objects = scm_vector_writable_elements (bp->objs, &objects_handle, \
|
||||
&object_count, &_vincr); \
|
||||
}
|
||||
|
||||
#define SYNC_BEFORE_GC() \
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue