summaryrefslogtreecommitdiff
path: root/libguile/objcodes.c
diff options
context:
space:
mode:
authorAndy Wingo <wingo@pobox.com>2010-08-18 22:47:55 -0700
committerAndy Wingo <wingo@pobox.com>2010-08-18 23:00:42 -0700
commit4b02bf47f46f5030ded456984aca16945af57645 (patch)
treee48d131a4cae818931d538270751ca25abd68d29 /libguile/objcodes.c
parent9a690dfb4575c8b6162d2eba17d13da6c6d74d3f (diff)
downloadguile-4b02bf47f46f5030ded456984aca16945af57645.tar.gz
objcodes.c comments
* libguile/objcodes.c: Comments from Noah Lavine
Diffstat (limited to 'libguile/objcodes.c')
-rw-r--r--libguile/objcodes.c14
1 files changed, 12 insertions, 2 deletions
diff --git a/libguile/objcodes.c b/libguile/objcodes.c
index 7d79f3621..f54e79bd6 100644
--- a/libguile/objcodes.c
+++ b/libguile/objcodes.c
@@ -33,8 +33,10 @@
#include "programs.h"
#include "objcodes.h"
-/* SCM_OBJCODE_COOKIE is defined in _scm.h */
-/* The length of the header must be a multiple of 8 bytes. */
+/* SCM_OBJCODE_COOKIE, defined in _scm.h, is a magic value prepended
+ to objcode on disk but not in memory.
+
+ The length of the header must be a multiple of 8 bytes. */
verify (((sizeof (SCM_OBJCODE_COOKIE) - 1) & 7) == 0);
@@ -42,6 +44,14 @@ verify (((sizeof (SCM_OBJCODE_COOKIE) - 1) & 7) == 0);
* Objcode type
*/
+/* The words in an objcode SCM object are as follows:
+ - scm_tc7_objcode | the flags for this objcode
+ - the struct scm_objcode C object
+ - the parent of this objcode, if this is a slice, or #f if none
+ - the file descriptor this objcode came from if this was mmaped,
+ or 0 if none
+ */
+
static SCM
make_objcode_by_mmap (int fd)
#define FUNC_NAME "make_objcode_by_mmap"